[kaffe] CVS kaffe (robilad): fixes for openbsd

Kaffe CVS cvs-commits at kaffe.org
Sun Aug 13 18:13:53 PDT 2006


PatchSet 7386 
Date: 2006/08/14 01:05:47
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fixes for openbsd

2006-08-13  Kurt Miller <kurt at intricatesoftware.com>

        * configure.ac: Include sys/param.h when testing for
        sys/sysctl.h. Needed for OpenBSD.

        Reported by:  Frederick C. Druseikis  <fredd at cse.sc.edu>

2006-08-13  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/xprof/xprofiler.c: Include sys/param.h.

Members: 
	ChangeLog:1.4888->1.4889 
	configure:1.566->1.567 
	configure.ac:1.244->1.245 
	kaffe/xprof/xprofiler.c:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4888 kaffe/ChangeLog:1.4889
--- kaffe/ChangeLog:1.4888	Sun Aug 13 21:15:18 2006
+++ kaffe/ChangeLog	Mon Aug 14 01:05:47 2006
@@ -1,3 +1,14 @@
+2006-08-13  Kurt Miller <kurt at intricatesoftware.com>
+
+	* configure.ac: Include sys/param.h when testing for 
+	sys/sysctl.h. Needed for OpenBSD.
+
+	Reported by:  Frederick C. Druseikis  <fredd at cse.sc.edu>
+
+2006-08-13  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/xprof/xprofiler.c: Include sys/param.h.
+
 2006-08-13  Dalibor Topic  <robilad at kaffe.org>
 
 	* configure.ac: Don't output libraries/javalib/rebuildLib.
Index: kaffe/configure
diff -u kaffe/configure:1.566 kaffe/configure:1.567
--- kaffe/configure:1.566	Sun Aug 13 21:15:26 2006
+++ kaffe/configure	Mon Aug 14 01:05:50 2006
@@ -30331,7 +30331,6 @@
 
 
 
-
 for ac_header in stdarg.h \
 alloca.h \
 bsd/libc.h \
@@ -30373,7 +30372,6 @@
 sys/socket.h \
 sys/sockio.h \
 sys/stat.h \
-sys/sysctl.h \
 sys/sysinfo.h \
 sys/time.h \
 sys/types.h \
@@ -30525,6 +30523,72 @@
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# check sys/sysctl.h seperately, as it requires other headers on at least OpenBSD
+
+for ac_header in sys/sysctl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.244 kaffe/configure.ac:1.245
--- kaffe/configure.ac:1.244	Sun Aug 13 21:15:36 2006
+++ kaffe/configure.ac	Mon Aug 14 01:05:57 2006
@@ -1180,7 +1180,6 @@
 sys/socket.h \
 sys/sockio.h \
 sys/stat.h \
-sys/sysctl.h \
 sys/sysinfo.h \
 sys/time.h \
 sys/types.h \
@@ -1193,6 +1192,13 @@
 wintypes.h \
 wtypes.h \
 zlib.h])
+
+# check sys/sysctl.h seperately, as it requires other headers on at least OpenBSD
+AC_CHECK_HEADERS([sys/sysctl.h], [], [],
+[[#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+]])
 
 # check net/if.h seperately, as it requrires other headers on OS X
 # and HP-UX 10.20
Index: kaffe/kaffe/xprof/xprofiler.c
diff -u kaffe/kaffe/xprof/xprofiler.c:1.9 kaffe/kaffe/xprof/xprofiler.c:1.10
--- kaffe/kaffe/xprof/xprofiler.c:1.9	Mon Dec 26 20:06:36 2005
+++ kaffe/kaffe/xprof/xprofiler.c	Mon Aug 14 01:05:59 2006
@@ -26,6 +26,11 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/gmon.h>
+
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
+
 #include <sys/sysctl.h>
 
 #include "gtypes.h"




More information about the kaffe mailing list