This adds a check for sys/loadavg.h and includes it as necessary.
This is required to build on Solaris 9.

ChangeLog:

2008-02-27  Andrew John Hughes  <[EMAIL PROTECTED]>

        * configure.ac:
        Check for sys/loadavg.h.
        * 
native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c:
        Include sys/loadavg.h if found.

-- 
Andrew :)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
Index: configure.ac
===================================================================
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.226
diff -u -3 -p -u -r1.226 configure.ac
--- configure.ac	22 Feb 2008 04:19:12 -0000	1.226
+++ configure.ac	28 Feb 2008 00:04:20 -0000
@@ -369,6 +369,7 @@ if test "x${COMPILE_JNI}" = xyes; then
   dnl BSD_COMP is defined; just including sys/filio.h is simpler.
   dnl Check for crt_externs.h on Darwin.
   dnl Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE.
+  dnl Check for sys/loadavg.h for getloadavg() on Solaris 9.
   AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
 		    asm/ioctls.h \
 		    inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
@@ -380,7 +381,8 @@ if test "x${COMPILE_JNI}" = xyes; then
 		    magic.h \
                     sys/event.h sys/epoll.h \
 		    ifaddrs.h \
-		    netinet/in_systm.h netinet/ip.h net/if.h])
+		    netinet/in_systm.h netinet/ip.h net/if.h \
+		    sys/loadavg.h])
 
   AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
   AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
Index: native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c
===================================================================
RCS file: /sources/classpath/classpath/native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c
--- native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c	26 Dec 2006 02:35:22 -0000	1.1
+++ native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c	28 Feb 2008 00:04:30 -0000
@@ -37,7 +37,12 @@ obligated to do so.  If you do not wish 
 exception statement from your version. */
 
 #include <config.h>
+
+#if defined HAVE_SYS_LOADAVG_H /* Get getloadavg() on Solaris 9 */
+#include <sys/loadavg.h>
+#else
 #include <stdlib.h>
+#endif
 
 #include "gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h"
 

Attachment: signature.asc
Description: Digital signature

Reply via email to