From b11688bf41f91552292f069375f5e970ec0bab2b Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 17 Feb 2004 11:59:17 +0000 Subject: [PATCH] [project @ 2004-02-17 11:59:16 by simonmar] Also need to wrap fstat(). --- System/Posix/Internals.hs | 2 +- include/HsBase.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 4a91d58..989a082 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -341,7 +341,7 @@ foreign import ccall unsafe "HsBase.h dup" foreign import ccall unsafe "HsBase.h dup2" c_dup2 :: CInt -> CInt -> IO CInt -foreign import ccall unsafe "HsBase.h fstat" +foreign import ccall unsafe "HsBase.h __hscore_fstat" c_fstat :: CInt -> Ptr CStat -> IO CInt foreign import ccall unsafe "HsBase.h getcwd" diff --git a/include/HsBase.h b/include/HsBase.h index 33f44f4..b131841 100644 --- a/include/HsBase.h +++ b/include/HsBase.h @@ -675,7 +675,7 @@ INLINE int __hsposix_SIG_UNBLOCK() { return SIG_UNBLOCK; } INLINE int __hsposix_SIG_SETMASK() { return SIG_SETMASK; } #endif /* mingw32_TARGET_OS */ -// These two are wrapped because on some OSs (eg. Linux) they are +// These three are wrapped because on some OSs (eg. Linux) they are // macros which redirect to the 64-bit-off_t versions when large file // support is enabled. // @@ -687,5 +687,9 @@ INLINE off_t __hscore_lseek(int fd, off_t off, int whence) { return (lseek(fd,off,whence)); } +INLINE int __hscore_fstat(int fd, struct stat *buf) { + return (fstat(fd,buf)); +} + #endif /* __HSBASE_H__ */ -- 1.7.10.4