/[mldonkey]/mldonkey/src/daemon/common/commonGlobals.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonGlobals.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.50 by spiralvoice, Sun Aug 28 12:18:30 2005 UTC revision 1.51 by spiralvoice, Wed Aug 31 23:54:02 2005 UTC
# Line 102  let version () = Line 102  let version () =
102    Printf.sprintf "MLNet %s: Multi-Network p2p client (%s)"    Printf.sprintf "MLNet %s: Multi-Network p2p client (%s)"
103      Autoconf.current_version !networks_string      Autoconf.current_version !networks_string
104    
   
 let buildinfo () =  
   (  
     "MLNet Multi-Network p2p client version " ^ Autoconf.current_version  
       ^ (if Autoconf.scm_version <> "" then "\nSCM version info: " ^ Autoconf.scm_version else "")  
       ^ "\nNetworks: " ^ !networks_string  
       ^ "\nOcaml version: " ^ Autoconf.ocaml_version  
       ^ "\nBuild on: " ^ Autoconf.build_system  
           ^ (if Autoconf.glibc_version <> "" then " with glibc " ^ Autoconf.glibc_version else "")  
           ^ (let real_glibc_version = MlUnix.glibc_version_num () in  
                if real_glibc_version <> Autoconf.glibc_version  
                  && real_glibc_version <> "" then  
                    Printf.sprintf " (DANGER: glibc %s present on system)" real_glibc_version else "")  
       ^ (if Autoconf.configure_arguments <> "" then "\nConfigure arguments: " ^ Autoconf.configure_arguments else "")  
       ^ (if !patches_string <> "" then "\n" ^ !patches_string else "")  
       ^ "\nFeatures:"  
           ^ (if BasicSocket.has_threads () then " threads" else " no-threads")  
           ^ (if Autoconf.has_zlib then  
                begin  
                  let s = Zlib.zlib_version_num () in  
                    Printf.sprintf " zlib%s" (if s <> "" then "-" ^ s else "")  
                end  
              else " no-zlib")  
           ^ (if Autoconf.has_bzip2 then  
                begin  
                  let s =  
                    (* catch the exception in the case Bzip2.bzlib_version_num returns an empty string *)  
                    try  
                      List.hd(String2.split_simplify  
                    (Bzip2.bzlib_version_num ()) ',')  
                    with e -> ""  
                  in  
                  Printf.sprintf " bzip2%s" (if s <> "" then "-" ^ s else "")  
                end  
              else " no-bzip2")  
           ^ (if Autoconf.has_gd && Autoconf.has_gd_png && Autoconf.has_gd_jpg then  
                Printf.sprintf " gd(jpg/png%s)"  
                  (let s = Gd.png_version_num () in  
                     if s <> "" then "-" ^ s else "")  
              else "")  
           ^ (if Autoconf.has_gd && Autoconf.has_gd_png && not Autoconf.has_gd_jpg then  
                Printf.sprintf " gd(png%s)"  
                  (let s = Gd.png_version_num () in  
                     if s <> "" then "-" ^ s else "")  
              else "")  
           ^ (if Autoconf.has_gd && not Autoconf.has_gd_png && Autoconf.has_gd_jpg then " gd(jpg)" else "")  
           ^ (if not Autoconf.has_gd then " no-gd" else "")  
           ^ (if Autoconf.has_iconv then " iconv" else " no-iconv")  
           ^ (if Autoconf.check_bounds then " check-bounds" else " no-check-bounds")  
           ^ " " ^ Autoconf.sha1_version  
       ^ "\nLanguage: " ^ Charset.default_language  
       ^ " - locale: " ^ Charset.locstr  
       ^ "\n max_string_length: " ^ string_of_int Sys.max_string_length  
       ^ " - word_size: " ^ string_of_int Sys.word_size  
       ^ " - max_array_length: " ^ string_of_int Sys.max_array_length  
       ^ "\n max file descriptors: " ^ string_of_int (Unix2.c_getdtablesize ())  
       ^ " - max useable file size: " ^  
             (match Unix2.c_sizeofoff_t () with  
              | 4 -> "2GB"  
   
              |  _ -> Printf.sprintf "2^%d-1 bits (do the maths ;-p)" ((Unix2.c_sizeofoff_t () *8)-1)  
   
 (*  
              | _ -> Printf.sprintf "%s"  
                ((*size_of_int64*)(string_of_float(((2. ** (float_of_int((Unix2.c_sizeofoff_t () * 8)-1))) -. 1.)/. 8.)))  
 *)  
   
              ))  
   
   
105  (* Should we try to find another port when we cannot bind to the one set  (* Should we try to find another port when we cannot bind to the one set
106  in an option, and then change the option accordingly. ?> *)  in an option, and then change the option accordingly. ?> *)
107  let find_other_port = ref false  let find_other_port = ref false

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26