Changeset 10879


Ignore:
Timestamp:
Sep 25, 2008, 1:26:28 PM (11 years ago)
Author:
gb
Message:

When using #_CreateFile to open a .cdb file, check for
*WINDOWS-INVALID-HANDLE* (because of word-size issues.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/db-io.lisp

    r10760 r10879  
    103103  (defun fid-open-input (pathname)
    104104    (with-filename-cstrs ((name (cdb-native-namestring pathname)))
    105       (let* ((handle (%ptr-to-int (#_CreateFileW
     105      (let* ((handle (#_CreateFileW
    106106                                   name
    107107                                   #$GENERIC_READ
     
    110110                                   #$OPEN_EXISTING
    111111                                   #$FILE_ATTRIBUTE_NORMAL
    112                                    (%null-ptr)))))
    113         (if (eq handle #xffffffffffffffff)
     112                                   (%null-ptr))))
     113        (if (eql handle *windows-invalid-handle*)
    114114          (error "Error opening CDB database ~S" pathname)
    115           (#__open_osfhandle handle #$O_RDONLY)))))
     115          (#__open_osfhandle (%ptr-to-int handle) #$O_RDONLY)))))
    116116 
    117117 
Note: See TracChangeset for help on using the changeset viewer.