[Openmcl-cvs-notifications] r10716 - /trunk/source/lisp-kernel/windows-calls.c

gb at clozure.com gb at clozure.com
Fri Sep 12 02:05:17 EDT 2008


Author: gb
Date: Fri Sep 12 02:05:16 2008
New Revision: 10716

Log:
lisp_read(), lisp_write(): return 64-bit result.
Add library-opening support.

Modified:
    trunk/source/lisp-kernel/windows-calls.c

Modified: trunk/source/lisp-kernel/windows-calls.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/windows-calls.c (original)
+++ trunk/source/lisp-kernel/windows-calls.c Fri Sep 12 02:05:16 2008
@@ -277,7 +277,7 @@
   return close(fd);
 }
 =

-int
+ssize_t
 lisp_read(int fd, void *buf, unsigned int count)
 {
   HANDLE hfile;
@@ -341,7 +341,7 @@
   }
 }
 =

-int
+ssize_t
 lisp_write(int fd, void *buf, unsigned int count)
 {
   return _write(fd, buf, count);
@@ -467,6 +467,23 @@
   }
 }
 =

+/* Note that we're using 8-bit strings here */
+
+void *
+windows_open_shared_library(char *path)
+{
+  HMODULE module =3D (HMODULE)0;
+
+  /* Try to open an existing module in a way that increments its
+     reference count without running any initialization code in
+     the dll. */
+  if (!GetModuleHandleExA(0,path,&module)) {
+    /* If that failed ... */
+    module =3D LoadLibraryA(path);
+  }
+  return (void *)module;
+}
+
 void
 init_windows_io()
 {



More information about the Openmcl-cvs-notifications mailing list