From 0a7813e93e5de46f10ce55998e68bd01909876bc Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Mon, 29 Nov 2004 13:05:22 +0000 Subject: [PATCH] Fixes for Windows --- src/c/unixfsys.d | 21 +++++++++++++-------- src/lsp/numlib.lsp | 6 +++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index 18e9f9be5..e3d96c434 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -487,14 +487,22 @@ list_current_directory(const char *mask, bool only_dir) #else # ifdef _MSC_VER WIN32_FIND_DATA fd; - HANDLE hFind = FindFirstFile(".\\*", &fd); + HANDLE hFind = NULL; BOOL found = FALSE; - if (hFind == INVALID_HANDLE_VALUE) - return Cnil; - found = TRUE; + for (;;) { + if (hFind == NULL) + { + hFind = FindFirstFile(".\\*", &fd); + if (hFind == INVALID_HANDLE_VALUE) + return Cnil; + found = TRUE; + } + else + found = FindNextFile(hFind, &fd); - while (found) { + if (!found) + break; text = fd.cFileName; # else /* sys/dir.h as in SYSV */ @@ -525,9 +533,6 @@ list_current_directory(const char *mask, bool only_dir) continue; *out_cdr = CONS(make_string_copy(text), Cnil); out_cdr = &CDR(*out_cdr); -#ifdef _MSC_VER - found = FindNextFile(hFind, &fd); -#endif } #ifdef HAVE_DIRENT_H closedir(dir); diff --git a/src/lsp/numlib.lsp b/src/lsp/numlib.lsp index ae1d6dc34..6bc4d1151 100644 --- a/src/lsp/numlib.lsp +++ b/src/lsp/numlib.lsp @@ -156,9 +156,9 @@ Returns the arc cosine of NUMBER." #+(and (not ecl-min) win32) (progn - (ffi:clines "double asinh(x) { return log(x+sqrt(1.0+x*x)); }") - (ffi:clines "double acosh(x) { return log(x+sqrt((x-1)*(x+1))); }") - (ffi:clines "double atanh(x) { return (log(x+1)-log(x-1))/2; }")) + (ffi:clines "double asinh(double x) { return log(x+sqrt(1.0+x*x)); }") + (ffi:clines "double acosh(double x) { return log(x+sqrt((x-1)*(x+1))); }") + (ffi:clines "double atanh(double x) { return log((1+x)/(1-x))/2; }")) ;; Ported from CMUCL (defun asinh (x)