[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonComplexOp
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonComplexOptions.ml |
Date: |
Wed, 31 Aug 2005 19:54:03 -0400 |
Index: mldonkey/src/daemon/common/commonComplexOptions.ml
diff -u mldonkey/src/daemon/common/commonComplexOptions.ml:1.29
mldonkey/src/daemon/common/commonComplexOptions.ml:1.30
--- mldonkey/src/daemon/common/commonComplexOptions.ml:1.29 Sun Aug 28
12:07:49 2005
+++ mldonkey/src/daemon/common/commonComplexOptions.ml Wed Aug 31 23:54:02 2005
@@ -1057,3 +1057,71 @@
with e -> lprintf_nl () "Exception %s while options backup"
(Printexc2.to_string e); raise e
end;
lprintf_nl () "Options backup as %s correctly saved" format
+
+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 = CommonGraphics.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 = CommonGraphics.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.)))
+*)
+
+ ))