diff options
author | Kevin Ryde <user42@zip.com.au> | 2006-06-17 23:15:59 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2006-06-17 23:15:59 +0000 |
commit | 23f2b9a3de013f093c5913aa381219f09353c676 (patch) | |
tree | 3a3315e24402e90d9c4094f18ac7ab6c2047f31f /libguile/filesys.c | |
parent | a4f1c77ddb2057ca630b8bed9be437bdbc5dc552 (diff) | |
download | guile-23f2b9a3de013f093c5913aa381219f09353c676.tar.gz |
merge from 1.8 branch
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r-- | libguile/filesys.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c index 14078ef45..8ac6bd246 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -45,6 +45,9 @@ char *alloca (); # endif # endif #endif +#if HAVE_MALLOC_H +#include <malloc.h> /* alloca on mingw, though its not used on that system */ +#endif #include <stdio.h> #include <errno.h> @@ -349,7 +352,7 @@ SCM_DEFINE (scm_open_fdes, "open-fdes", 2, 1, 0, iflags = SCM_NUM2INT (2, flags); imode = SCM_NUM2INT_DEF (3, mode, 0666); - STRING_SYSCALL (path, c_path, fd = open (c_path, iflags, imode)); + STRING_SYSCALL (path, c_path, fd = open_or_open64 (c_path, iflags, imode)); if (fd == -1) SCM_SYSERROR; return scm_from_int (fd); @@ -466,7 +469,7 @@ SCM_DEFINE (scm_close_fdes, "close-fdes", 1, 0, 0, SCM_SYMBOL (scm_sym_regular, "regular"); SCM_SYMBOL (scm_sym_directory, "directory"); -#ifdef HAVE_S_ISLNK +#ifdef S_ISLNK SCM_SYMBOL (scm_sym_symlink, "symlink"); #endif SCM_SYMBOL (scm_sym_block_special, "block-special"); @@ -512,7 +515,8 @@ scm_stat2scm (struct stat_or_stat64 *stat_temp) SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_regular); else if (S_ISDIR (mode)) SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_directory); -#ifdef HAVE_S_ISLNK +#ifdef S_ISLNK + /* systems without symlinks probably don't have S_ISLNK */ else if (S_ISLNK (mode)) SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_symlink); #endif @@ -1707,6 +1711,9 @@ scm_init_filesys () #ifdef O_SYNC scm_c_define ("O_SYNC", scm_from_long (O_SYNC)); #endif +#ifdef O_LARGEFILE + scm_c_define ("O_LARGEFILE", scm_from_long (O_LARGEFILE)); +#endif #ifdef F_DUPFD scm_c_define ("F_DUPFD", scm_from_long (F_DUPFD)); |