* While most of SBCL is derived from the CMU CL system, many
* utilities for the build process (like this one) were written from
* scratch after the fork from CMU CL.
- *
+ *
* This software is in the public domain and is provided with
* absolutely no warranty. See the COPYING and CREDITS files for
* more information.
#include <stdio.h>
#include <sys/types.h>
-#include <sys/times.h>
+#ifdef _WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #include <stdlib.h>
+#else
+ #include <sys/times.h>
+ #include <sys/wait.h>
+ #include <sys/ioctl.h>
+ #include <sys/termios.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
+#endif
+
#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <sys/termios.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"
defconstant(char* lisp_name, long unix_number)
{
printf("(defconstant %s %ld) ; #x%lx\n",
- lisp_name, unix_number, unix_number);
+ lisp_name, unix_number, unix_number);
}
void deferrno(char* lisp_name, long unix_number)
{
/* don't need no steenking command line arguments */
if (1 != argc) {
- fprintf(stderr, "argh! command line argument(s)\n");
- exit(1);
+ fprintf(stderr, "argh! command line argument(s)\n");
+ exit(1);
}
/* don't need no steenking hand-editing */
;;;; See the program \"grovel-headers.c\".\n\
\n\
");
+#ifdef _WIN32
+ printf("(in-package \"SB!WIN32\")\n\n");
+ defconstant ("input-record-size", sizeof (INPUT_RECORD));
+#else
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(";;; langinfo\n");
defconstant("s-ifblk", S_IFBLK);
defconstant("s-ifreg", S_IFREG);
printf("\n");
-
+
defconstant("s-iflnk", S_IFLNK);
defconstant("s-ifsock", S_IFSOCK);
printf("\n");
defsignal("sigstkflt", SIGSTKFLT);
#endif
defsignal("sigstop", SIGSTOP);
-#if (!((defined LISP_FEATURE_LINUX) && (defined LISP_FEATURE_X86)))
+#if (!((defined LISP_FEATURE_LINUX) && (defined LISP_FEATURE_X86)))
defsignal("sigsys", SIGSYS);
#endif
defsignal("sigterm", SIGTERM);
defsignal("sigxcpu", SIGXCPU);
defsignal("sigxfsz", SIGXFSZ);
#endif
+#endif // _WIN32
return 0;
}