Changeset 9315


Ignore:
Timestamp:
Apr 28, 2008, 8:23:01 AM (11 years ago)
Author:
gb
Message:

Use windows (pseudo-) syscalls, for directory access functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/level-1/linux-files.lisp

    r9277 r9315  
    2828  #+(and freebsd-target x8664-target)
    2929  (require "X8664-FREEBSD-SYSCALLS")
     30  #+(and windows-target x8664-target)
     31  (require "X86-WIN64-SYSCALLS")
    3032  )
    3133
     
    656658(defun %open-dir (namestring)
    657659  (with-filename-cstrs ((name namestring))
    658     (let* ((DIR (#_opendir name)))
     660    (let* ((DIR #+windows-target (syscall syscalls::opendir name)
     661                #-windows-target (#_opendir name)))
    659662      (unless (%null-ptr-p DIR)
    660663        DIR))))
    661664
    662665(defun close-dir (dir)
    663   (#_closedir DIR))
    664 
     666  #+windows-target (syscall syscalls::closedir DIR)
     667  #-windows-target (#_closedir DIR))
     668
     669#-windows-target                        ;want a reentrant version, anyhow
    665670(defun %read-dir (dir)
    666671  (let* ((res (#_readdir dir)))
    667672    (unless (%null-ptr-p res)
    668673      (get-foreign-namestring (pref res :dirent.d_name)))))
     674
     675#+windows-target
     676(defun %read-dir (dir)
     677  (let* ((res (syscall syscalls::readdir dir)))
     678    (unless (%null-ptr-p res)
     679      (get-foreign-namestring (pref res :_wdirent.d_name)))))
    669680
    670681#-windows-target
Note: See TracChangeset for help on using the changeset viewer.