Browse Source

- honor __UCLIBC_HAS_LFS__

Bernhard Reutner-Fischer 17 years ago
parent
commit
2c20597657
2 changed files with 6 additions and 2 deletions
  1. 4 2
      include/features.h
  2. 2 0
      libc/sysdeps/linux/common/bits/posix_opt.h

+ 4 - 2
include/features.h

@@ -176,8 +176,10 @@
 # define _XOPEN_SOURCE	600
 # undef  _XOPEN_SOURCE_EXTENDED
 # define _XOPEN_SOURCE_EXTENDED	1
-# undef	 _LARGEFILE64_SOURCE
-# define _LARGEFILE64_SOURCE	1
+# ifdef __UCLIBC_HAS_LFS__
+#  undef	 _LARGEFILE64_SOURCE
+#  define _LARGEFILE64_SOURCE	1
+# endif /* __UCLIBC_HAS_LFS__ */
 # undef  _BSD_SOURCE
 # define _BSD_SOURCE	1
 # undef  _SVID_SOURCE

+ 2 - 0
libc/sysdeps/linux/common/bits/posix_opt.h

@@ -96,10 +96,12 @@
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
 
+#ifdef __UCLIBC_HAS_LFS__
 /* The rest of the LFS is also available.  */
 #define _LFS_LARGEFILE		1
 #define _LFS64_LARGEFILE	1
 #define _LFS64_STDIO		1
+#endif
 
 /* POSIX shared memory objects are implemented.  */
 #define _POSIX_SHARED_MEMORY_OBJECTS	200112L