[Openmcl-cvs-notifications] r10879 - /trunk/source/lib/db-io.lisp
gb at clozure.com
gb at clozure.com
Thu Sep 25 09:26:28 EDT 2008
Author: gb
Date: Thu Sep 25 09:26:28 2008
New Revision: 10879
Log:
When using #_CreateFile to open a .cdb file, check for
*WINDOWS-INVALID-HANDLE* (because of word-size issues.)
Modified:
trunk/source/lib/db-io.lisp
Modified: trunk/source/lib/db-io.lisp
=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/lib/db-io.lisp (original)
+++ trunk/source/lib/db-io.lisp Thu Sep 25 09:26:28 2008
@@ -102,17 +102,17 @@
#+windows-target
(defun fid-open-input (pathname)
(with-filename-cstrs ((name (cdb-native-namestring pathname)))
- (let* ((handle (%ptr-to-int (#_CreateFileW
+ (let* ((handle (#_CreateFileW
name
#$GENERIC_READ
#$FILE_SHARE_READ
(%null-ptr)
#$OPEN_EXISTING
#$FILE_ATTRIBUTE_NORMAL
- (%null-ptr)))))
- (if (eq handle #xffffffffffffffff)
+ (%null-ptr))))
+ (if (eql handle *windows-invalid-handle*)
(error "Error opening CDB database ~S" pathname)
- (#__open_osfhandle handle #$O_RDONLY)))))
+ (#__open_osfhandle (%ptr-to-int handle) #$O_RDONLY)))))
=
=
;;; Read N octets from FID into BUF. Return #of octets read or error.
More information about the Openmcl-cvs-notifications
mailing list