diff --git a/contrib/sb-bsd-sockets/win32-lib.lisp b/contrib/sb-bsd-sockets/win32-lib.lisp index c5c47563d..a259c08e6 100644 --- a/contrib/sb-bsd-sockets/win32-lib.lisp +++ b/contrib/sb-bsd-sockets/win32-lib.lisp @@ -1,2 +1,2 @@ (sb-alien:load-shared-object "ws2_32.dll") -(sb-alien:load-shared-object "msvcrt.dll") + diff --git a/contrib/sb-posix/defpackage.lisp b/contrib/sb-posix/defpackage.lisp index 34606c350..8076c9bc1 100644 --- a/contrib/sb-posix/defpackage.lisp +++ b/contrib/sb-posix/defpackage.lisp @@ -29,6 +29,3 @@ )) (eval-when (:compile-toplevel :load-toplevel :execute) (setf (sb-int:system-package-p (find-package "SB-POSIX")) t)) - -#+win32 -(sb-alien:load-shared-object "msvcrt.dll") diff --git a/contrib/sb-posix/interface.lisp b/contrib/sb-posix/interface.lisp index 9e808873c..192debd2a 100644 --- a/contrib/sb-posix/interface.lisp +++ b/contrib/sb-posix/interface.lisp @@ -744,8 +744,11 @@ not supported." (defmacro define-stat-call (name arg designator-fun type) ;; FIXME: this isn't the documented way of doing this, surely? (let ((lisp-name (lisp-for-c-symbol name)) - (real-name #+inode64 (format nil "~A$INODE64" name) - #-inode64 name)) + (real-name (or #+inode64 + (format nil "~A$INODE64" name) + #+(and ucrt 64-bit) + (format nil "~A64" name) + name))) `(progn (export ',lisp-name :sb-posix) (declaim (inline ,lisp-name)) diff --git a/src/code/warm-lib.lisp b/src/code/warm-lib.lisp index f7d1668c2..9d6c5c3fe 100644 --- a/src/code/warm-lib.lisp +++ b/src/code/warm-lib.lisp @@ -6,7 +6,7 @@ #+win32 (progn (load-shared-object "kernel32.dll") - (load-shared-object "msvcrt.dll") + (load-shared-object #+ucrt "ucrtbase.dll" #-ucrt "msvcrt.dll") (load-shared-object "advapi32.dll") (load-shared-object "ws2_32.dll") (load-shared-object "shell32.dll")) diff --git a/tools-for-build/grovel-features.sh b/tools-for-build/grovel-features.sh index 6265439b6..ad2a09576 100644 --- a/tools-for-build/grovel-features.sh +++ b/tools-for-build/grovel-features.sh @@ -34,6 +34,7 @@ featurep() { # It will get added in by Config.*-win32 only if LISP_FEATURE_SB_FUTEX. if [ "$sbcl_os" = win32 ] ; then LOADLIBES=-lSynchronization featurep os-provides-wakebyaddr sb-futex + featurep ucrt fi featurep os-provides-dlopen diff --git a/tools-for-build/ucrt-test.c b/tools-for-build/ucrt-test.c new file mode 100644 index 000000000..3cd2a9773 --- /dev/null +++ b/tools-for-build/ucrt-test.c @@ -0,0 +1,10 @@ +#include + +int main () +{ +#ifdef _UCRT + return 104; +#else + return 1; +#endif +}