Update of /cvsroot/sbcl/sbcl/tools-for-build
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8807/tools-for-build
Modified Files:
grovel-headers.c ldso-stubs.lisp
Log Message:
1.0.28.44: better MACHINE-VERSION answers on BSD'ish platforms
Also reduce OAOOMity of GET-MACHINE-VERSION.
Patch by Josh Elsasser.
Index: grovel-headers.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tools-for-build/grovel-headers.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- grovel-headers.c 3 Jan 2009 15:50:46 -0000 1.36
+++ grovel-headers.c 13 May 2009 13:58:32 -0000 1.37
@@ -51,6 +51,11 @@
#include <sys/bsdtty.h> /* for TIOCGPGRP */
#endif
+#ifdef LISP_FEATURE_BSD
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
+#endif
+
#include "wrap.h"
#define DEFTYPE(lispname,cname) { cname foo; \
@@ -432,5 +437,18 @@
defconstant("fpe-fltsub", -1);
#endif
#endif // !WIN32
+
+#ifdef LISP_FEATURE_BSD
+ printf(";;; sysctl(3) names\n");
+ printf("(in-package \"SB!IMPL\")\n\n");
+ defconstant("ctl-kern", CTL_KERN);
+ defconstant("ctl-hw", CTL_HW);
+ defconstant("ctl-maxname", CTL_MAXNAME);
+ defconstant("kern-ostype", KERN_OSTYPE);
+ defconstant("kern-osrelease", KERN_OSRELEASE);
+ defconstant("hw-model", HW_MODEL);
+ defconstant("hw-pagesize", HW_PAGESIZE);
+ printf("\n");
+#endif
return 0;
}
Index: ldso-stubs.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tools-for-build/ldso-stubs.lisp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- ldso-stubs.lisp 3 Jan 2009 15:50:46 -0000 1.22
+++ ldso-stubs.lisp 13 May 2009 13:58:32 -0000 1.23
@@ -326,6 +326,8 @@
"dlerror"
"dlopen"
"dlsym")
+ #!+bsd
+ '("sysctl")
#!+os-provides-dladdr
'("dladdr")
#!-sunos ;; !defined(SVR4)
|