diff options
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/config.in | 6 | ||||
-rwxr-xr-x | libiberty/configure | 159 | ||||
-rw-r--r-- | libiberty/configure.in | 1 | ||||
-rw-r--r-- | libiberty/physmem.c | 4 |
5 files changed, 122 insertions, 54 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 2c72bfc..c74ef6b 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2003-02-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * physmem.c (physmem_total, physmem_available): De-ANSI-fy. + * configure.in (AC_CHECK_FUNCS): Add pstat_getstatic and + pstat_getdynamic. + 2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Makefile.in (CFILES): Add physmem.c. diff --git a/libiberty/config.in b/libiberty/config.in index 97c5702..8a267ed 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -114,6 +114,12 @@ /* Define if you have the psignal function. */ #undef HAVE_PSIGNAL +/* Define if you have the pstat_getdynamic function. */ +#undef HAVE_PSTAT_GETDYNAMIC + +/* Define if you have the pstat_getstatic function. */ +#undef HAVE_PSTAT_GETSTATIC + /* Define if you have the putenv function. */ #undef HAVE_PUTENV diff --git a/libiberty/configure b/libiberty/configure index 75e7564..5bc1bfb 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -2128,7 +2128,7 @@ else fi done - for ac_func in realpath canonicalize_file_name + for ac_func in pstat_getstatic pstat_getdynamic do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2135: checking for $ac_func" >&5 @@ -2183,6 +2183,61 @@ else fi done + for ac_func in realpath canonicalize_file_name +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2190: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2195 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + cat >> confdefs.h <<\EOF #define HAVE_SYS_ERRLIST 1 EOF @@ -2389,7 +2444,7 @@ if test -z "${setobjs}"; then # We haven't set the list of objects yet. Use the standard autoconf # tests. This will only work if the compiler works. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2393: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2448: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2400,12 +2455,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2404 "configure" +#line 2459 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2431,19 +2486,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2435: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2490: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross for ac_func in $funcs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2442: checking for $ac_func" >&5 +echo "configure:2497: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2447 "configure" +#line 2502 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2466,7 +2521,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2493,12 +2548,12 @@ done echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2497: checking whether alloca needs Cray hooks" >&5 +echo "configure:2552: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2502 "configure" +#line 2557 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2523,12 +2578,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2527: checking for $ac_func" >&5 +echo "configure:2582: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2532 "configure" +#line 2587 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2551,7 +2606,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2577,7 +2632,7 @@ fi fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2581: checking stack direction for C alloca" >&5 +echo "configure:2636: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2585,7 +2640,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2589 "configure" +#line 2644 "configure" #include "confdefs.h" find_stack_direction () { @@ -2604,7 +2659,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2626,17 +2681,17 @@ EOF ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2630: checking for vfork.h" >&5 +echo "configure:2685: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2635 "configure" +#line 2690 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2661,18 +2716,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2665: checking for working vfork" >&5 +echo "configure:2720: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2671: checking for vfork" >&5 +echo "configure:2726: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2676 "configure" +#line 2731 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -2695,7 +2750,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2717,7 +2772,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 2721 "configure" +#line 2776 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -2812,7 +2867,7 @@ main() { } } EOF -if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2844,12 +2899,12 @@ fi for ac_func in _doprnt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2848: checking for $ac_func" >&5 +echo "configure:2903: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2853 "configure" +#line 2908 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2872,7 +2927,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2902,12 +2957,12 @@ done for ac_func in _doprnt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2906: checking for $ac_func" >&5 +echo "configure:2961: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2911 "configure" +#line 2966 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2930,7 +2985,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2958,19 +3013,19 @@ done for v in $vars; do echo $ac_n "checking for $v""... $ac_c" 1>&6 -echo "configure:2962: checking for $v" >&5 +echo "configure:3017: checking for $v" >&5 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2967 "configure" +#line 3022 "configure" #include "confdefs.h" int *p; int main() { extern int $v []; p = $v; ; return 0; } EOF -if { (eval echo configure:2974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "libiberty_cv_var_$v=yes" else @@ -2996,12 +3051,12 @@ EOF for ac_func in $checkfuncs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3000: checking for $ac_func" >&5 +echo "configure:3055: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3005 "configure" +#line 3060 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3024,7 +3079,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3049,12 +3104,12 @@ fi done echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 -echo "configure:3053: checking whether canonicalize_file_name must be declared" >&5 +echo "configure:3108: checking whether canonicalize_file_name must be declared" >&5 if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3058 "configure" +#line 3113 "configure" #include "confdefs.h" #include "confdefs.h" @@ -3076,7 +3131,7 @@ int main() { char *(*pfn) = (char *(*)) canonicalize_file_name ; return 0; } EOF -if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libiberty_cv_decl_needed_canonicalize_file_name=no else @@ -3112,17 +3167,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3116: checking for $ac_hdr" >&5 +echo "configure:3171: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3121 "configure" +#line 3176 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3151,12 +3206,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3155: checking for $ac_func" >&5 +echo "configure:3210: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3160 "configure" +#line 3215 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3179,7 +3234,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3204,7 +3259,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3208: checking for working mmap" >&5 +echo "configure:3263: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3212,7 +3267,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3216 "configure" +#line 3271 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3352,7 +3407,7 @@ main() } EOF -if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3376,7 +3431,7 @@ fi echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 -echo "configure:3380: checking for working strncmp" >&5 +echo "configure:3435: checking for working strncmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3384,7 +3439,7 @@ else ac_cv_func_strncmp_works=no else cat > conftest.$ac_ext <<EOF -#line 3388 "configure" +#line 3443 "configure" #include "confdefs.h" /* Test by Jim Wilson and Kaveh Ghazi. @@ -3448,7 +3503,7 @@ main () } EOF -if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strncmp_works=yes else diff --git a/libiberty/configure.in b/libiberty/configure.in index 71e7a09..32a3458 100644 --- a/libiberty/configure.in +++ b/libiberty/configure.in @@ -219,6 +219,7 @@ if test "x" = "y"; then AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf) AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal) AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs) + AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic) AC_CHECK_FUNCS(realpath canonicalize_file_name) AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.]) AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.]) diff --git a/libiberty/physmem.c b/libiberty/physmem.c index c540d18..6954261 100644 --- a/libiberty/physmem.c +++ b/libiberty/physmem.c @@ -31,7 +31,7 @@ /* Return the total amount of physical memory. */ double -physmem_total (void) +physmem_total () { #if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE { @@ -61,7 +61,7 @@ physmem_total (void) /* Return the amount of physical memory available. */ double -physmem_available (void) +physmem_available () { #if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE { |