Hi,
I wrote a patch to turn out well at configure to run, anyway.
So I put it here. If there are someone or other willing to test,
I appreciate.
--- Configure.orig 2004-11-25 15:43:08.987228109 +0900
+++ Configure 2004-11-25 16:37:14.827717780 +0900
@@ -317,6 +317,7 @@
d_strchr=''
d_strlcpy=''
d_sysctl=''
+d_getinvent=''
d_ucnv_open_2_6=''
d_volatile=''
d_vsnprintf=''
@@ -353,6 +354,7 @@
i_sysparam=''
i_syssendfile=''
i_syssysctl=''
+i_invent=''
i_systime=''
i_systimek=''
i_time=''
@@ -5025,6 +5021,10 @@
set sysctl d_sysctl
eval $inlibc
+: see if getinvent exists
+set getinvent d_getinvent
+eval $inlibc
+
: check for volatile keyword
echo " "
echo 'Checking to see if your C compiler knows about "volatile"...' >&4
@@ -6048,6 +6048,10 @@
set sys/sysctl.h i_syssysctl
eval $inhdr
+: see if this is a invent.h system
+set invent.h i_invent
+eval $inhdr
+
: see if we should include time.h, sys/time.h, or both
echo " "
echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
@@ -6337,6 +6341,7 @@
d_strchr='$d_strchr'
d_strlcpy='$d_strlcpy'
d_sysctl='$d_sysctl'
+d_getinvent='$d_getinvent'
d_ucnv_open_2_6='$d_ucnv_open_2_6'
d_useglib1='$d_useglib1'
d_useglib2='$d_useglib2'
@@ -6391,6 +6396,7 @@
i_sysparam='$i_sysparam'
i_syssendfile='$i_syssendfile'
i_syssysctl='$i_syssysctl'
+i_invent='$i_invent'
i_systime='$i_systime'
i_systimek='$i_systimek'
i_time='$i_time'
--- config_h.SH.orig 2004-11-25 15:43:09.025501650 +0900
+++ config_h.SH 2004-11-25 16:32:01.946339137 +0900
@@ -297,6 +297,12 @@
*/
#$d_sysctl HAS_SYSCTL /**/
+/* HAS_GETINVENT:
+ * This symbol, if defined, indicates that the getinvent routine is
+ * available.
+ */
+#$d_getinvent HAS_GETINVENT /**/
+
/* HAS_VSNPRINTF:
* This symbol, if defined, indicates that the vsnprintf routine is
* available.
@@ -333,6 +339,12 @@
*/
#$i_syssysctl I_SYS_SYSCTL /**/
+/* I_INVENT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <invent.h>.
+ */
+#$i_invent I_INVENT /**/
+
/* USE_ICU:
* This symbol is defined when we have a working ICU library.
*/
--- src/common.h.orig 2004-11-25 16:15:07.766345087 +0900
+++ src/common.h 2004-11-25 16:15:49.225832337 +0900
@@ -69,6 +69,9 @@
#ifdef I_SYS_SYSCTL
#include <sys/sysctl.h>
#endif
+#ifdef I_INVENT
+#include <invent.h>
+#endif
#ifdef I_INTTYPES
#include <inttypes.h>
--- src/core/settings.c.orig 2004-11-19 12:11:44.717640255 +0900
+++ src/core/settings.c 2004-11-25 19:49:18.916182799 +0900
@@ -210,7 +210,25 @@
"settings_getphysmemsize: sysctl() for HW_USERMEM
failed: %s",
g_strerror(errno));
return amount / 1024;
-#else /* !(defined (_SC_PHYS_PAGES) || defined(HAS_SYSCTL)) */
+#elif defined (HAS_GETINVENT) && defined (__sgi__)
+ inventory_t *inv;
+ glong physmem = 0;
+
+ setinvent();
+ while ((inv = getinvent())) {
+ if (inv->inv_class == INV_MEMORY && inv->inv_type ==
INV_MAIN_MB) {
+ physmem = inv->inv_state;
+ break;
+ }
+ }
+ endinvent();
+
+ if ((glong) -1 == physmem && 0 != errno)
+ g_warning(
+ "settings_getphysmemsize: getinvent() for INV_MEMORY
faild: %s",
+ g_strerror(errno));
+ return physmem * 1024;
+#else /* !(defined (_SC_PHYS_PAGES) || defined(HAS_SYSCTL) || defined
(HAS_GETINVENT)) */
g_warning("Unable to determine amount of physical RAM");
return 0;
#endif /* _SC_PHYS_PAGES */
--- U/new/d_getinvent.U.orig 2004-11-26 14:29:59.025889030 +0900
+++ U/new/d_getinvent.U 2004-11-26 14:30:53.503908625 +0900
@@ -0,0 +1,20 @@
+?RCS:
+?RCS: @COPYRIGHT@
+?RCS:
+?MAKE:d_getinvent: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_invent:
+?S: This variable conditionally defines the HAS_GETINVENT symbol, which
+?S: indicates to the C program that the getinvent() routine is available.
+?S:.
+?C:HAS_GETINVENT:
+?C: This symbol, if defined, indicates that the getinvent routine is
+?C: available.
+?C:.
+?H:#$d_getinvent HAS_GETINVENT /**/
+?H:.
+?LINT:set d_getinvent
+: see if getinvent exists
+set getinvent d_getinvent
+eval $inlibc
+
--- U/new/i_invent.U.orig 2004-11-26 14:30:08.838365140 +0900
+++ U/new/i_invent.U 2004-11-26 14:30:57.192807637 +0900
@@ -0,0 +1,20 @@
+?RCS:
+?RCS: @COPYRIGHT@
+?RCS:
+?MAKE:i_invent: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_invent:
+?S: This variable conditionally defines the I_INVENT symbol, and indicates
+?S: whether a C program should include <invent.h>.
+?S:.
+?C:I_INVENT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <invent.h>.
+?C:.
+?H:#$i_invent I_INVENT /**/
+?H:.
+?LINT:set i_invent
+: see if this is a invent.h system
+set invent.h i_invent
+eval $inhdr
+
--
Daichi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel