When not using large file support WIN32's lseek offset is a 'long'.
authorYang Tse <yangsita@gmail.com>
Thu, 28 Aug 2008 22:41:35 +0000 (22:41 +0000)
committerYang Tse <yangsita@gmail.com>
Thu, 28 Aug 2008 22:41:35 +0000 (22:41 +0000)
lib/setup.h
src/main.c

index c1f7135..8648961 100644 (file)
 #  include <io.h>
 #  include <sys/types.h>
 #  include <sys/stat.h>
-#  define lseek(fdes,offset,whence)  _lseek(fdes, offset, whence)
+#  define lseek(fdes,offset,whence)  _lseek(fdes, (long)offset, whence)
 #  define fstat(fdes,stp)            _fstat(fdes, stp)
 #  define stat(fname,stp)            _stat(fname, stp)
 #  define struct_stat                struct _stat
index 784d175..d26eecb 100644 (file)
@@ -232,7 +232,7 @@ typedef enum {
 #  include <io.h>
 #  include <sys/types.h>
 #  include <sys/stat.h>
-#  define lseek(fdes,offset,whence)  _lseek(fdes, offset, whence)
+#  define lseek(fdes,offset,whence)  _lseek(fdes, (long)offset, whence)
 #  define fstat(fdes,stp)            _fstat(fdes, stp)
 #  define stat(fname,stp)            _stat(fname, stp)
 #  define struct_stat                struct _stat