From 9fbc7507dabf3147ce29b4b52fc2249977252313 Mon Sep 17 00:00:00 2001 From: Rujia Liu Date: Tue, 7 Jan 2025 15:02:48 +0800 Subject: [PATCH] Preliminary native windows support, part 2: standard library and libgerbil --- src/build/build-libgerbil.ss | 23 +++++- src/gerbil/expander/module.ss | 5 +- src/std/build-spec.ss | 57 ++++++++++----- src/std/crypto/libcrypto.ss | 4 ++ src/std/make.ss | 22 +++++- src/std/net/httpd/handler.ss | 8 +++ src/std/net/ssl/libssl.ss | 4 ++ src/std/os/_socket.scm | 30 ++++++++ src/std/os/error.ss | 7 ++ src/std/os/fcntl.ss | 30 +++++++- src/std/os/fdio.ss | 13 +++- src/std/os/flock.ss | 15 +++- src/std/os/hostname.ss | 4 ++ src/std/os/pid.ss | 7 ++ src/std/os/pipe.ss | 7 ++ src/std/os/signal.ss | 132 ++++++++++++++++++++-------------- 16 files changed, 289 insertions(+), 79 deletions(-) diff --git a/src/build/build-libgerbil.ss b/src/build/build-libgerbil.ss index ecb15fc07..508960d64 100755 --- a/src/build/build-libgerbil.ss +++ b/src/build/build-libgerbil.ss @@ -25,6 +25,8 @@ (def default-ld-options "-lutil")) (netbsd (def default-ld-options "-lm")) + (visualc + (def default-ld-options "/link Kernel32.Lib User32.Lib Gdi32.Lib WS2_32.Lib /subsystem:console /entry:WinMainCRTStartup")) (else (def default-ld-options "-ldl -lm"))) @@ -244,8 +246,24 @@ (def (module-c-file f) (file-replace-extension f ".c")) +(def compiler-obj-suffix + (cond-expand + (visualc ".obj") + (else ".o"))) + +; generates an `include` form for use in a source code, gsc's -e option etc. +; It takes care of windows paths where we need to escape the path. +; e.g. (displayln (include-source "d:\\gerbil\\mycode.scm")) should print +; (include "d:\\gerbil\\mycode.scm") +; instead of: +; (include "d:\gerbil\mycode.scm") +; which results in an error: +; *** ERROR -- Invalid escaped character: #\g +(def (include-source path) + (string-append "(include " (object->string path) ")")) + (def (module-o-file f) - (file-replace-extension f ".o")) + (file-replace-extension f compiler-obj-suffix)) (def (library-file-path f) (path-expand f (gerbil-lib-dir))) @@ -323,8 +341,7 @@ (static-module-c-paths (map module-c-file static-module-scm-paths)) (static-module-o-paths (map module-o-file static-module-c-paths)) (gambit-sharp (library-file-path "_gambit#.scm")) - (include-gambit-sharp - (string-append "(include \"" gambit-sharp "\")")) + (include-gambit-sharp (include-source gambit-sharp)) (gsc-gx-macros (if (gerbil-runtime-smp?) ["-e" "(define-cond-expand-feature|enable-smp|)" diff --git a/src/gerbil/expander/module.ss b/src/gerbil/expander/module.ss index c3aa41dd5..8b0fc8e2b 100644 --- a/src/gerbil/expander/module.ss +++ b/src/gerbil/expander/module.ss @@ -38,7 +38,10 @@ namespace: gx (def current-module-reader-args (make-parameter #f)) -(def source-file-settings '(char-encoding: UTF-8 eol-encoding: lf)) +(def source-file-settings + (cond-expand + (visualc '(char-encoding: UTF-8 eol-encoding: cr-lf)) + (else '(char-encoding: UTF-8 eol-encoding: lf)))) (def (call-with-input-source-file path fun) (call-with-input-file [path: path . source-file-settings] fun)) diff --git a/src/std/build-spec.ss b/src/std/build-spec.ss index 3b04f2e4c..1b6a0cb5a 100644 --- a/src/std/build-spec.ss +++ b/src/std/build-spec.ss @@ -201,9 +201,15 @@ "text/json/api" "text/json" ,@(if config-enable-zlib - `((gsc: "text/_zlib" - "-cc-options" ,(cppflags "zlib" "") - "-ld-options" ,(ldflags "zlib" "-lz")) + `(,(cond-expand + (visualc + `(gsc: "text/_zlib" + "-cc-options" ,(cppflags "zlib" "") + "-ld-options" ,(ldflags "zlib" "zlibstatic.lib"))) + (else + `(gsc: "text/_zlib" + "-cc-options" ,(cppflags "zlib" "") + "-ld-options" ,(ldflags "zlib" "-lz")))) (ssi: "text/_zlib") "text/zlib") '()) @@ -219,6 +225,10 @@ (if (enable-shared?) [(string-append "-L" (gerbil-libdir)) "-lgambit"] [])))) + (visualc + `(gxc: "net/ssl/libssl" + "-cc-options" ,(cppflags "libssl" "") + "-ld-options" ,(ldflags "libssl" "libssl.lib libcrypto.lib"))) (else `(gxc: "net/ssl/libssl" "-ld-options" ,(ldflags "libssl" "-lssl")))) "net/ssl/error" @@ -257,16 +267,16 @@ "net/socks" ;; std/os (gxc: "os/error" ,@(include-gambit-sharp)) - (gxc: "os/fd" ,@(include-gambit-sharp)) - (gxc: "os/fdio" ,@(include-gambit-sharp)) - (gxc: "os/fcntl" ,@(include-gambit-sharp)) - (gxc: "os/flock" ,@(include-gambit-sharp)) - (gxc: "os/pipe" ,@(include-gambit-sharp)) + (gxc: "os/fd" ,@(include-gambit-sharp)) + (gxc: "os/fdio" ,@(non-posix-extra-gsc-options) ,@(include-gambit-sharp)) + (gxc: "os/fcntl" ,@(non-posix-extra-gsc-options) ,@(include-gambit-sharp)) + (gxc: "os/flock" ,@(non-posix-extra-gsc-options) ,@(include-gambit-sharp)) + (gxc: "os/pipe" ,@(non-posix-extra-gsc-options) ,@(include-gambit-sharp)) ,(cond-expand (linux `(gsc: "os/_socket" "-cc-options" "-D_GNU_SOURCE -Wno-implicit-function-declaration" ,@(include-gambit-sharp))) (else - `(gsc: "os/_socket" ,@(include-gambit-sharp)))) + `(gsc: "os/_socket" ,@(non-posix-extra-gsc-options) ,@(include-gambit-sharp)))) (ssi: "os/_socket") "os/socket" ,@(cond-expand @@ -282,9 +292,9 @@ `((gxc: "os/signalfd" ,@(include-gambit-sharp)))) (else '())) "os/signal-handler" - "os/pid" + (gxc: "os/pid" ,@(non-posix-extra-gsc-options)) "os/temporaries" - "os/hostname" + (gxc: "os/hostname" ,@(non-posix-extra-gsc-options)) ,@(if config-enable-deprecated ;; :std/net/bio -- DEPRECATED ["net/bio/input" @@ -339,10 +349,17 @@ "xml" ;; :std/crypto (static-include: "crypto/libcrypto-rfc5114.c") - (gxc: "crypto/libcrypto" - "-cc-options" ,(append-options (cppflags "libcrypto" "") "-Wno-deprecated-declarations -Wno-implicit-function-declaration") - "-ld-options" ,(ldflags "libcrypto" "-lcrypto") - ,@(include-gambit-sharp)) + ,(cond-expand + (visualc + `(gxc: "crypto/libcrypto" + "-cc-options" ,(append-options (cppflags "libcrypto" "") "") + "-ld-options" ,(ldflags "libcrypto" "libcrypto.lib") + ,@(include-gambit-sharp))) + (else + `(gxc: "crypto/libcrypto" + "-cc-options" ,(append-options (cppflags "libcrypto" "") "-Wno-deprecated-declarations -Wno-implicit-function-declaration") + "-ld-options" ,(ldflags "libcrypto" "-lcrypto") + ,@(include-gambit-sharp)))) (gxc: "crypto/etc" ,@(include-gambit-sharp)) "crypto/digest" "crypto/cipher" @@ -436,9 +453,15 @@ "db/postgresql-driver" "db/postgresql" ,@(if config-enable-sqlite - `((gsc: "db/_sqlite" + `(,(cond-expand + (visualc + `(gsc: "db/_sqlite" + "-cc-options" ,(cppflags "sqlite3" "") + "-ld-options" ,(append-options (ldflags "sqlite3" "sqlite3.lib") ""))) + (else + `(gsc: "db/_sqlite" "-cc-options" ,(cppflags "sqlite3" "") - "-ld-options" ,(append-options (ldflags "sqlite3" "-lsqlite3") "-lm")) + "-ld-options" ,(append-options (ldflags "sqlite3" "-lsqlite3") "-lm")))) (ssi: "db/_sqlite") "db/sqlite") '()))) diff --git a/src/std/crypto/libcrypto.ss b/src/std/crypto/libcrypto.ss index def727fe9..470242582 100644 --- a/src/std/crypto/libcrypto.ss +++ b/src/std/crypto/libcrypto.ss @@ -127,6 +127,10 @@ END-C ;; error handling (c-declare #<string path) ")")) + (def (include-gambit-sharp) (let* ((gambit-sharp (path-expand "lib/_gambit#.scm" (getenv "GERBIL_BUILD_PREFIX" (gerbil-home)))) - (include-gambit-sharp - (string-append "(include \"" gambit-sharp "\")"))) + (include-gambit-sharp (include-source gambit-sharp))) (cond ((gerbil-runtime-smp?) `("-e" "(define-cond-expand-feature|enable-smp|)" @@ -461,6 +472,13 @@ TODO: (else `("-e" ,include-gambit-sharp))))) +(def (non-posix-extra-gsc-options) + (cond-expand + (visualc + `("-cc-options" ,((env-cppflags) ""))) + (else + `()))) + (def (build spec settings) (match spec ((? string? modf) diff --git a/src/std/net/httpd/handler.ss b/src/std/net/httpd/handler.ss index 858801ec0..2023423d2 100644 --- a/src/std/net/httpd/handler.ss +++ b/src/std/net/httpd/handler.ss @@ -302,15 +302,23 @@ (begin-ffi (http-date) (c-declare #< #include __thread char date_buf[64]; static char *ffi_httpd_date () { +#ifndef _WINDOWS struct tm tm; time_t t = time(NULL); asctime_r (gmtime_r (&t, &tm), date_buf); // clobber newline date_buf[strlen(date_buf)-1] = 0; +#else + date_buf[0] = 0; +#endif return date_buf; } END-C diff --git a/src/std/net/ssl/libssl.ss b/src/std/net/ssl/libssl.ss index 9464e1b55..4f6576ce6 100644 --- a/src/std/net/ssl/libssl.ss +++ b/src/std/net/ssl/libssl.ss @@ -338,6 +338,10 @@ static SSL_CTX *ffi_actor_tls_ctx(const char *caroot, const char *ca_file, const return ctx; } +#ifdef _MSC_VER +#define __thread __declspec(thread) +#endif + __thread char openssl_x509_name_buf[16384]; static char *ffi_X509_get_subject_name(X509 *cert) { diff --git a/src/std/os/_socket.scm b/src/std/os/_socket.scm index 48a3ce8dc..5c0b7d739 100644 --- a/src/std/os/_socket.scm +++ b/src/std/os/_socket.scm @@ -18,12 +18,26 @@ (c-declare #< #include +#ifdef _WINDOWS +#include +#include + +// workaround: define mandatory consts +// constants defined by define-const* (e.g. AF_NETLINK) is optional +// TODO: check their actual values +#define AF_LOCAL 0 +#define SHUT_RD 0 +#define SHUT_WR 0 +#define SHUT_RDWR 0 + +#else #include #include #include #include #include #include +#endif #include #include #include @@ -456,8 +470,10 @@ static socklen_t ___sockaddr_family_len (int family) return sizeof (struct sockaddr_in); case AF_INET6: return sizeof (struct sockaddr_in6); +#ifndef _WINDOWS case AF_UNIX: return sizeof (struct sockaddr_un); +#endif #ifdef __linux__ case AF_NETLINK: return sizeof (struct sockaddr_nl); @@ -531,6 +547,7 @@ int ffi_socket_sendto (int fd, ___SCMOBJ bytes, int start, int end, int flags, s int ffi_socket_sendmsg (int fd, ___SCMOBJ name, ___SCMOBJ io, ___SCMOBJ ctl, int flags) { +#ifndef _WINDOWS void *msg_name = NULL; socklen_t msg_namelen = 0; struct iovec msg_iov = {NULL, 0}; @@ -565,6 +582,9 @@ int ffi_socket_sendmsg (int fd, ___SCMOBJ name, ___SCMOBJ io, ___SCMOBJ ctl, int msg.msg_flags = 0; return sendmsg (fd, &msg, flags); +#else + return 0; +#endif } int ffi_socket_recv (int fd, ___SCMOBJ bytes, int start, int end, int flags) @@ -580,6 +600,7 @@ int ffi_socket_recvfrom (int fd, ___SCMOBJ bytes, int start, int end, int flags, int ffi_socket_recvmsg (int fd, ___SCMOBJ name, int *rname, ___SCMOBJ io, ___SCMOBJ ctl, int *rctl, int flags, int *rflags) { +#ifndef _WINDOWS void *msg_name = NULL; socklen_t msg_namelen = 0; struct iovec msg_iov = {NULL, 0}; @@ -624,6 +645,9 @@ int ffi_socket_recvmsg (int fd, ___SCMOBJ name, int *rname, ___SCMOBJ io, ___SCM *rflags = msg.msg_flags; return r; +#else + return 0; +#endif } int ffi_socket_getpeername (int fd, struct sockaddr *sa) @@ -703,14 +727,20 @@ void ffi_socket_sockaddr_in6_port_set (struct sockaddr *sa, int port) char *ffi_socket_sockaddr_un_path (struct sockaddr *sa) { +#ifndef _WINDOWS struct sockaddr_un *sa_un = (struct sockaddr_un*)sa; return sa_un->sun_path; +#else + return NULL; +#endif } void ffi_socket_sockaddr_un_path_set (struct sockaddr *sa, char *path) { +#ifndef _WINDOWS struct sockaddr_un *sa_un = (struct sockaddr_un*)sa; strncpy (sa_un->sun_path, path, sizeof (sa_un->sun_path)); +#endif } int ffi_socket_sockaddr_len (struct sockaddr *sa) diff --git a/src/std/os/error.ss b/src/std/os/error.ss index 28a472ae5..ad93f8e62 100644 --- a/src/std/os/error.ss +++ b/src/std/os/error.ss @@ -134,6 +134,13 @@ (c-declare "#include ") (c-declare "#include ") + ; I don't know why, but it's the only error code msvc doesn't define + (c-declare " + #ifdef _WINDOWS + #define ENOTBLK 15 + #endif + ") + (define-const EPERM) (define-const ENOENT) (define-const ESRCH) diff --git a/src/std/os/fcntl.ss b/src/std/os/fcntl.ss index c8b1b14c5..fa3916da8 100644 --- a/src/std/os/fcntl.ss +++ b/src/std/os/fcntl.ss @@ -67,7 +67,28 @@ ) (c-declare "#include ") (c-declare "#include ") - (c-declare "#include ") + (c-declare " +#ifndef _WINDOWS +#include +#else + +// workaround: define mandatory consts +// TODO: check their actual values +#define F_DUPFD 0 +#define F_GETFD 0 +#define F_SETFD 0 +#define F_GETFL 0 +#define F_SETFL 0 + +#define FD_CLOEXEC 0 + +#define O_NOCTTY 0 +#define O_NONBLOCK 0 +#define O_SYNC 0 +#define O_ACCMODE 0 + +#endif +") (c-declare "#include ") (namespace ("std/os/fcntl#" __fcntl0 __fcntl1)) @@ -112,6 +133,13 @@ (define-const* O_NOFOLLOW) (define-const* O_TMPFILE) + (c-declare " + #ifdef _WINDOWS + int fcntl (int __fd, int __cmd, ...) { + return 0; + } + #endif + ") (define-c-lambda __fcntl0 (int int) int "fcntl") (define-c-lambda __fcntl1 (int int int) int "fcntl") diff --git a/src/std/os/fdio.ss b/src/std/os/fdio.ss index 8f67761e7..02e162e6e 100644 --- a/src/std/os/fdio.ss +++ b/src/std/os/fdio.ss @@ -79,8 +79,19 @@ (c-declare "#include ") (c-declare "#include ") - (c-declare "#include ") + (c-declare " +#ifndef _WINDOWS +#include +#endif +") (c-declare "#include ") + (c-declare " + #ifdef _WINDOWS + int fsync(int fd) { + return 0; + } + #endif + ") (define-const S_IRWXU) (define-const S_IRUSR) diff --git a/src/std/os/flock.ss b/src/std/os/flock.ss index 58fed67a8..4e3769c2f 100644 --- a/src/std/os/flock.ss +++ b/src/std/os/flock.ss @@ -94,7 +94,20 @@ fd)) (begin-ffi (_flock LOCK_SH LOCK_EX LOCK_UN LOCK_NB) - (c-declare "#include ") + (c-declare " + #ifndef _WINDOWS + #include + #else + // fake it...for now + #define LOCK_SH 0 + #define LOCK_EX 1 + #define LOCK_UN 2 + #define LOCK_NB 3 + int flock(int fd, int op) { + return 0; + } + #endif + ") (define-const LOCK_SH) (define-const LOCK_EX) diff --git a/src/std/os/hostname.ss b/src/std/os/hostname.ss index 9ec304ca1..450d6e24d 100644 --- a/src/std/os/hostname.ss +++ b/src/std/os/hostname.ss @@ -18,6 +18,10 @@ (c-declare " #include +#ifdef _MSC_VER +#define __thread __declspec(thread) +#endif + __thread char hostname_buf[1024]; static char* ffi_gethostname() { gethostname(hostname_buf, sizeof(hostname_buf)); diff --git a/src/std/os/pid.ss b/src/std/os/pid.ss index 9f2cf82ad..df3435461 100644 --- a/src/std/os/pid.ss +++ b/src/std/os/pid.ss @@ -8,6 +8,13 @@ (begin-ffi (getpid getppid) (c-declare "#include ") (c-declare "#include ") + (c-declare " + #ifdef _WINDOWS + int getppid() { + return 0; + } + #endif + ") (define-c-lambda getpid () int) (define-c-lambda getppid () int)) diff --git a/src/std/os/pipe.ss b/src/std/os/pipe.ss index 8d7e18eb7..6d646ee32 100644 --- a/src/std/os/pipe.ss +++ b/src/std/os/pipe.ss @@ -40,6 +40,13 @@ (begin-ffi (_pipe make_pipe_ptr pipe_ptr_ref) (c-declare "#include ") + (c-declare " + #ifdef _WINDOWS + int pipe(int p[2]) { + return 0; + } + #endif + ") (namespace ("std/os/pipe#" __pipe)) diff --git a/src/std/os/signal.ss b/src/std/os/signal.ss index 13500f1d0..c61705900 100644 --- a/src/std/os/signal.ss +++ b/src/std/os/signal.ss @@ -6,12 +6,19 @@ ./error) (export - SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGBUS SIGFPE - SIGKILL SIGUSR1 SIGSEGV SIGUSR2 SIGPIPE SIGALRM SIGTERM - SIGCHLD SIGCONT SIGSTOP SIGTSTP SIGTTIN SIGTTOU SIGURG - SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWINCH SIGIO SIGSYS - SIGMAX - SIG_BLOCK SIG_UNBLOCK SIG_SETMASK) + SIGINT SIGILL SIGABRT SIGFPE + SIGSEGV SIGTERM) + +(cond-expand + (visualc + (export SIGMAX)) ; actually there is a SIGBREAK but anyone needs it? + (else + (export SIGHUP SIGQUIT SIGTRAP SIGBUS + SIGKILL SIGUSR1 SIGUSR2 SIGPIPE SIGALRM + SIGCHLD SIGCONT SIGSTOP SIGTSTP SIGTTIN SIGTTOU SIGURG + SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWINCH SIGIO SIGSYS + SIGMAX + SIG_BLOCK SIG_UNBLOCK SIG_SETMASK))) (cond-expand (linux @@ -71,7 +78,10 @@ (define-cond-expand-feature linux))) (bsd (begin-foreign - (define-cond-expand-feature bsd)))) + (define-cond-expand-feature bsd))) + (visualc + (begin-foreign + (define-cond-expand-feature visualc)))) (cond-expand (openbsd @@ -97,6 +107,13 @@ sigismember) (c-declare "#include ") (c-declare "#include ") + (c-declare " + #ifdef _WINDOWS + int kill(int pid, int signo) { + return 0; + } + #endif + ") (namespace ("std/os/signal#" SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGBUS @@ -110,40 +127,44 @@ __kill __sigprocmask)) - - (define-const SIGHUP) + (define-const SIGINT) - (define-const SIGQUIT) (define-const SIGILL) - (define-const SIGTRAP) (define-const SIGABRT) - (define-const SIGBUS) (define-const SIGFPE) - (define-const SIGKILL) - (define-const SIGUSR1) (define-const SIGSEGV) - (define-const SIGUSR2) - (define-const SIGPIPE) - (define-const SIGALRM) (define-const SIGTERM) - (define-const SIGCHLD) - (define-const SIGCONT) - (define-const SIGSTOP) - (define-const SIGTSTP) - (define-const SIGTTIN) - (define-const SIGTTOU) - (define-const SIGURG) - (define-const SIGXCPU) - (define-const SIGXFSZ) - (define-const SIGVTALRM) - (define-const SIGPROF) - (define-const SIGWINCH) - (define-const SIGIO) - (define-const SIGSYS) - - (define-const SIG_BLOCK) - (define-const SIG_UNBLOCK) - (define-const SIG_SETMASK) + + (cond-expand + (visualc) + (else + (define-const SIGHUP) + (define-const SIGQUIT) + (define-const SIGTRAP) + (define-const SIGBUS) + (define-const SIGKILL) + (define-const SIGUSR1) + (define-const SIGUSR2) + (define-const SIGPIPE) + (define-const SIGALRM) + (define-const SIGCHLD) + (define-const SIGCONT) + (define-const SIGSTOP) + (define-const SIGTSTP) + (define-const SIGTTIN) + (define-const SIGTTOU) + (define-const SIGURG) + (define-const SIGXCPU) + (define-const SIGXFSZ) + (define-const SIGVTALRM) + (define-const SIGPROF) + (define-const SIGWINCH) + (define-const SIGIO) + (define-const SIGSYS) + + (define-const SIG_BLOCK) + (define-const SIG_UNBLOCK) + (define-const SIG_SETMASK))) (cond-expand (linux @@ -175,24 +196,27 @@ "kill") (define-with-errno _kill __kill (pid signo)) - (define-guard ffi-have-sigset - (c-define-type sigset_t "sigset_t")) - (define-guard ffi-have-sigset* - (c-define-type sigset_t* - (pointer "sigset_t" (sigset_t*) "ffi_free"))) - - (define-c-lambda __sigprocmask (int sigset_t* sigset_t*) int - "sigprocmask") - (define-with-errno _sigprocmask __sigprocmask (how sigset old-sigset)) - - (define-c-lambda make_sigset () sigset_t* - "___return ((sigset_t*) malloc (sizeof (sigset_t))); ") - - (define-c-lambda sigemptyset (sigset_t*) int) - (define-c-lambda sigfillset (sigset_t*) int) - (define-c-lambda sigaddset (sigset_t* int) int) - (define-c-lambda sigdelset (sigset_t* int) int) - (define-c-lambda sigismember (sigset_t* int) int)) + (cond-expand + (visualc) + (else + (define-guard ffi-have-sigset + (c-define-type sigset_t "sigset_t")) + (define-guard ffi-have-sigset* + (c-define-type sigset_t* + (pointer "sigset_t" (sigset_t*) "ffi_free"))) + + (define-c-lambda __sigprocmask (int sigset_t* sigset_t*) int + "sigprocmask") + (define-with-errno _sigprocmask __sigprocmask (how sigset old-sigset)) + + (define-c-lambda make_sigset () sigset_t* + "___return ((sigset_t*) malloc (sizeof (sigset_t))); ") + + (define-c-lambda sigemptyset (sigset_t*) int) + (define-c-lambda sigfillset (sigset_t*) int) + (define-c-lambda sigaddset (sigset_t* int) int) + (define-c-lambda sigdelset (sigset_t* int) int) + (define-c-lambda sigismember (sigset_t* int) int)))) (def SIGMAX (cond-expand @@ -200,4 +224,6 @@ (+ SIGRTMAX 1)) (bsd NSIG) + (visualc + 0) (else #f)))