[GRASS-SVN] r43119 - grass/trunk/include
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 15 07:08:34 EDT 2010
Author: mmetz
Date: 2010-08-15 11:08:34 +0000 (Sun, 15 Aug 2010)
New Revision: 43119
Modified:
grass/trunk/include/config.h.in
Log:
LFS for wingrass
Modified: grass/trunk/include/config.h.in
===================================================================
--- grass/trunk/include/config.h.in 2010-08-14 22:29:37 UTC (rev 43118)
+++ grass/trunk/include/config.h.in 2010-08-15 11:08:34 UTC (rev 43119)
@@ -259,8 +259,11 @@
/*
* Defines needed to get large file support - from cdrtools-2.01
*/
-#ifdef USE_LARGEFILES
+#undef HAVE_LARGEFILES
+#ifdef HAVE_LARGEFILES /* If we have working largefiles at all */
+ /* This is not defined with glibc-2.1.3 */
+
#undef _FILE_OFFSET_BITS /* # of bits in off_t if settable */
#undef _LARGEFILE_SOURCE /* To make ftello() visible (HP-UX 10.20). */
#undef _LARGE_FILES /* Large file defined on AIX-style hosts. */
@@ -275,13 +278,54 @@
#if defined(__MINGW32__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
/* add/remove as needed */
+/* no old names for sys/types.h */
+#define _NO_OLDNAMES
+/* but... */
+#define pid_t _pid_t
+/* ...and these old names from fcntl.h: */
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR _O_RDWR
+#define O_ACCMODE _O_ACCMODE
+#define O_APPEND _O_APPEND
+#define O_CREAT _O_CREAT
+#define O_TRUNC _O_TRUNC
+#define O_EXCL _O_EXCL
+#define O_TEXT _O_TEXT
+#define O_BINARY _O_BINARY
+#define O_TEMPORARY _O_TEMPORARY
+#define O_NOINHERIT _O_NOINHERIT
+#define O_SEQUENTIAL _O_SEQUENTIAL
+#define O_RANDOM _O_RANDOM
+
+/* ...and these old names from stat.h */
+#define S_IFIFO _S_IFIFO
+#define S_IFCHR _S_IFCHR
+#define S_IFBLK _S_IFBLK
+#define S_IFDIR _S_IFDIR
+#define S_IFREG _S_IFREG
+#define S_IFMT _S_IFMT
+#define S_IEXEC _S_IEXEC
+#define S_IWRITE _S_IWRITE
+#define S_IREAD _S_IREAD
+#define S_IRWXU _S_IRWXU
+#define S_IXUSR _S_IXUSR
+#define S_IWUSR _S_IWUSR
+#define S_IRUSR _S_IRUSR
+
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+
#define off_t off64_t
-#define HAVE_FSEEKO
#define fseeko fseeko64
#define ftello ftello64
#define lseek lseek64
-#define stat stat64
-#define fstat fstat64
+/* use _stati64 compatible with MSVCRT < 6.1 */
+#define stat _stati64
+#define fstat _fstati64
typedef struct _stati64 STRUCT_STAT;
#else
typedef struct stat STRUCT_STAT;
@@ -289,7 +333,7 @@
#else
typedef struct stat STRUCT_STAT;
-#endif /* USE_LARGEFILES */
+#endif /* HAVE_LARGEFILES */
/* define if langinfo.h exists */
#undef HAVE_LANGINFO_H
More information about the grass-commit
mailing list