projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.18.13:
[sbcl.git]
/
tools-for-build
/
grovel-headers.c
diff --git
a/tools-for-build/grovel-headers.c
b/tools-for-build/grovel-headers.c
index
facc3f8
..
5a78c71
100644
(file)
--- a/
tools-for-build/grovel-headers.c
+++ b/
tools-for-build/grovel-headers.c
@@
-28,6
+28,14
@@
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
+#include <errno.h>
+#ifdef __APPLE_CC__
+ #include "../src/runtime/ppc-darwin-dlshim.h"
+ #include "../src/runtime/ppc-darwin-langinfo.h"
+#else
+ #include <dlfcn.h>
+ #include <langinfo.h>
+#endif
#include "genesis/config.h"
#include "genesis/config.h"
@@
-41,6
+49,7
@@
defconstant(char* lisp_name, long unix_number)
lisp_name, unix_number, unix_number);
}
lisp_name, unix_number, unix_number);
}
+#define DEFERRNO(name) defconstant(#name, name)
#define DEFSIGNAL(name) defconstant(#name, name)
int
#define DEFSIGNAL(name) defconstant(#name, name)
int
@@
-59,8
+68,19
@@
main(int argc, char *argv[])
\n\
");
\n\
");
+ printf("(in-package \"SB!ALIEN\")\n\n");
+
+ printf (";;;flags for dlopen()\n");
+
+ defconstant ("rtld-lazy", RTLD_LAZY);
+ defconstant ("rtld-now", RTLD_NOW);
+ defconstant ("rtld-global", RTLD_GLOBAL);
+
printf("(in-package \"SB!UNIX\")\n\n");
printf("(in-package \"SB!UNIX\")\n\n");
+ printf(";;; langinfo\n");
+ defconstant("codeset", CODESET);
+
printf(";;; types, types, types\n");
DEFTYPE("clock-t", clock_t);
DEFTYPE("dev-t", dev_t);
printf(";;; types, types, types\n");
DEFTYPE("clock-t", clock_t);
DEFTYPE("dev-t", dev_t);
@@
-74,7
+94,7
@@
main(int argc, char *argv[])
DEFTYPE("uid-t", uid_t);
printf("\n");
DEFTYPE("uid-t", uid_t);
printf("\n");
- printf(";;; fcntl.h (or unistd.h on OpenBSD)\n");
+ printf(";;; fcntl.h (or unistd.h on OpenBSD and NetBSD)\n");
defconstant("r_ok", R_OK);
defconstant("w_ok", W_OK);
defconstant("x_ok", X_OK);
defconstant("r_ok", R_OK);
defconstant("w_ok", W_OK);
defconstant("x_ok", X_OK);
@@
-104,6
+124,15
@@
main(int argc, char *argv[])
defconstant("s-ifsock", S_IFSOCK);
printf("\n");
defconstant("s-ifsock", S_IFSOCK);
printf("\n");
+ printf(";;; error numbers\n");
+ DEFERRNO(ENOENT);
+ DEFERRNO(EINTR);
+ DEFERRNO(EIO);
+ DEFERRNO(EEXIST);
+ DEFERRNO(ESPIPE);
+ DEFERRNO(EWOULDBLOCK);
+ printf("\n");
+
printf(";;; for wait3(2) in run-program.lisp\n");
defconstant("wnohang", WNOHANG);
defconstant("wuntraced", WUNTRACED);
printf(";;; for wait3(2) in run-program.lisp\n");
defconstant("wnohang", WNOHANG);
defconstant("wuntraced", WUNTRACED);
@@
-149,8
+178,7
@@
main(int argc, char *argv[])
DEFSIGNAL(SIGBUS);
DEFSIGNAL(SIGCHLD);
DEFSIGNAL(SIGCONT);
DEFSIGNAL(SIGBUS);
DEFSIGNAL(SIGCHLD);
DEFSIGNAL(SIGCONT);
-/* FIXME: Maybe #ifdef SIGEMT would be a smarter conditional? */
-#if (!(defined LISP_FEATURE_LINUX) || !((defined LISP_FEATURE_PPC) || (defined LISP_FEATURE_X86)))
+#ifdef SIGEMT
DEFSIGNAL(SIGEMT);
#endif
DEFSIGNAL(SIGFPE);
DEFSIGNAL(SIGEMT);
#endif
DEFSIGNAL(SIGFPE);