Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-s committed Dec 5, 2024
1 parent 3a16c86 commit 44b663e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/fasl-lib.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ symbols defined in SYSTEMS. The C functions to perform
:do (format stream "~v@{ ~}lisp_require(\"~A\");~%" indent-size system-name))))
(with-open-file (stream (uiop:merge-pathnames* *fasl-loader-filename* directory) :direction :output :if-exists :supersede)
#+linux
(format stream "#include <dlfcn.h>~%")
(progn
(format stream "#define _GNU_SOURCE~%")
(format stream "#include <dlfcn.h>~%"))
#+win32
(format stream "#include <Windows.h>~%")
(format stream "#include \<~A.h\>~%" *base-library-name*)
Expand All @@ -110,7 +112,7 @@ symbols defined in SYSTEMS. The C functions to perform
#+linux
(progn
(format stream " Dl_info info;~%")
(format stream " dladdr(~A_fasl, &info);~%" (system-c-name (first systems)))
(format stream " dladdr(~A_fasl, &info);~%" (system-c-name (first (remove-if-not #'system-loadable-from-fasl-p systems))))
(format stream " dlopen(info.dli_fname, RTLD_NOW | RTLD_GLOBAL);~%"))
#+win32
(let ((buf-size 1024))
Expand Down

0 comments on commit 44b663e

Please sign in to comment.