X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fgrovel_headers.c;h=9025031d2d20430e97c0d18406f9ed5755799db6;hb=8dc064d2296902f01afd9107e89a81146e3771fe;hp=4c6831f5924e82f0ddf4e0db5d2d1656e68d06fe;hpb=4cf50b1896b25f5337e7c258b0b560da00d47993;p=sbcl.git diff --git a/tools-for-build/grovel_headers.c b/tools-for-build/grovel_headers.c index 4c6831f..9025031 100644 --- a/tools-for-build/grovel_headers.c +++ b/tools-for-build/grovel_headers.c @@ -5,11 +5,25 @@ * Lisp code. */ +/* + * This software is part of the SBCL system. See the README file for + * more information. + * + * 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 #include #include #include #include +#include #define DEFTYPE(lispname,cname) { cname foo; \ printf("(def-alien-type "##lispname##" (%s %d))\n", (((foo=-1)<0) ? "sb!alien:signed" : "unsigned"), (8 * (sizeof foo))); } @@ -40,18 +54,19 @@ main(int argc, char *argv[]) printf("(in-package \"SB!UNIX\")\n\n"); printf(";;; types, types, types\n"); + DEFTYPE("clock-t", clock_t); DEFTYPE("dev-t", dev_t); + DEFTYPE("gid-t", gid_t); DEFTYPE("ino-t", ino_t); DEFTYPE("mode-t", mode_t); DEFTYPE("nlink-t", nlink_t); - DEFTYPE("uid-t", uid_t); - DEFTYPE("gid-t", gid_t); - DEFTYPE("clock-t", clock_t); DEFTYPE("off-t", off_t); + DEFTYPE("size-t", size_t); DEFTYPE("time-t", time_t); + DEFTYPE("uid-t", uid_t); printf("\n"); - printf(";;; fcntl.h\n"); + printf(";;; fcntl.h (or unistd.h on OpenBSD)\n"); defconstant("r_ok", R_OK); defconstant("w_ok", W_OK); defconstant("x_ok", X_OK); @@ -69,16 +84,16 @@ main(int argc, char *argv[]) defconstant("o_trunc", O_TRUNC); defconstant("o_append", O_APPEND); printf(";;;\n"); - defconstant( "s-ifmt", S_IFMT); - defconstant( "s-ififo", S_IFIFO); - defconstant( "s-ifchr", S_IFCHR); - defconstant( "s-ifdir", S_IFDIR); - defconstant( "s-ifblk", S_IFBLK); - defconstant( "s-ifreg", S_IFREG); + defconstant("s-ifmt", S_IFMT); + defconstant("s-ififo", S_IFIFO); + defconstant("s-ifchr", S_IFCHR); + defconstant("s-ifdir", S_IFDIR); + defconstant("s-ifblk", S_IFBLK); + defconstant("s-ifreg", S_IFREG); printf("\n"); - defconstant( "s-iflnk", S_IFLNK); - defconstant( "s-ifsock", S_IFSOCK); + defconstant("s-iflnk", S_IFLNK); + defconstant("s-ifsock", S_IFSOCK); printf("\n"); return 0;