فهرست منبع

_GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE

this is ugly and stupid, but now that the *64 symbol names exist, a
lot of broken GNU software detects them in configure, then either
breaks during build due to missing off64_t definition, or attempts to
compile without function declarations/prototypes. "fixing" it here is
easier than telling everyone to add yet another feature test macro to
their builds.
Rich Felker 12 سال پیش
والد
کامیت
3b94daba71
15فایلهای تغییر یافته به همراه15 افزوده شده و 15 حذف شده
  1. 1 1
      include/aio.h
  2. 1 1
      include/dirent.h
  3. 1 1
      include/fcntl.h
  4. 1 1
      include/ftw.h
  5. 1 1
      include/glob.h
  6. 1 1
      include/stdio.h
  7. 1 1
      include/stdlib.h
  8. 1 1
      include/sys/mman.h
  9. 1 1
      include/sys/resource.h
  10. 1 1
      include/sys/sendfile.h
  11. 1 1
      include/sys/stat.h
  12. 1 1
      include/sys/statfs.h
  13. 1 1
      include/sys/statvfs.h
  14. 1 1
      include/sys/types.h
  15. 1 1
      include/unistd.h

+ 1 - 1
include/aio.h

@@ -48,7 +48,7 @@ int aio_fsync(int, struct aiocb *);
 
 int lio_listio(int, struct aiocb *const [], int, struct sigevent *);
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define aiocb64 aiocb
 #define aio_read64 aio_read
 #define aio_write64 aio_write

+ 1 - 1
include/dirent.h

@@ -50,7 +50,7 @@ int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int
 #define DTTOIF(x) ((x)<<12)
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define dirent64 dirent
 #define readdir64 readdir
 #define readdir64_r readdir_r

+ 1 - 1
include/fcntl.h

@@ -99,7 +99,7 @@ int posix_fallocate(int, off_t, off_t);
 int lockf(int, int, off_t);
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define open64 open
 #define openat64 openat
 #define creat64 creat

+ 1 - 1
include/ftw.h

@@ -32,7 +32,7 @@ struct FTW
 int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
 int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define ftw64 ftw
 #define nftw64 nftw
 #endif

+ 1 - 1
include/glob.h

@@ -34,7 +34,7 @@ void globfree(glob_t *);
 #define GLOB_NOMATCH 3
 #define GLOB_NOSYS   4
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define glob64 glob
 #define globfree64 globfree
 #endif

+ 1 - 1
include/stdio.h

@@ -177,7 +177,7 @@ char *fgets_unlocked(char *, int, FILE *);
 int fputs_unlocked(const char *, FILE *);
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define tmpfile64 tmpfile
 #define fopen64 fopen
 #define freopen64 freopen

+ 1 - 1
include/stdlib.h

@@ -147,7 +147,7 @@ char *fcvt(double, int, int *, int *);
 char *gcvt(double, int, char *);
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define mkstemp64 mkstemp
 #endif
 

+ 1 - 1
include/sys/mman.h

@@ -36,7 +36,7 @@ int madvise (void *, size_t, int);
 int shm_open (const char *, int, mode_t);
 int shm_unlink (const char *);
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define mmap64 mmap
 #define off64_t off_t
 #endif

+ 1 - 1
include/sys/resource.h

@@ -87,7 +87,7 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
 
 #define RLIM_NLIMITS RLIMIT_NLIMITS
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define getrlimit64 getrlimit
 #define setrlimit64 setrlimit
 #define rlimit64 rlimit

+ 1 - 1
include/sys/sendfile.h

@@ -9,7 +9,7 @@ extern "C" {
 
 ssize_t sendfile(int, int, off_t *, size_t);
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define sendfile64 sendfile
 #define off64_t off_t
 #endif

+ 1 - 1
include/sys/stat.h

@@ -96,7 +96,7 @@ int lchmod(const char *, mode_t);
 #define S_IEXEC S_IXUSR
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define stat64 stat
 #define fstat64 fstat
 #define lstat64 lstat

+ 1 - 1
include/sys/statfs.h

@@ -16,7 +16,7 @@ typedef struct {
 int statfs (const char *, struct statfs *);
 int fstatfs (int, struct statfs *);
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define statfs64 statfs
 #define fstatfs64 fstatfs
 #define fsblkcnt64_t fsblkcnt_t

+ 1 - 1
include/sys/statvfs.h

@@ -41,7 +41,7 @@ int fstatvfs (int, struct statvfs *);
 #define ST_NOATIME     1024
 #define ST_NODIRATIME  2048
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define statvfs64 statvfs
 #define fstatvfs64 fstatvfs
 #define fsblkcnt64_t fsblkcnt_t

+ 1 - 1
include/sys/types.h

@@ -72,7 +72,7 @@ typedef long register_t;
 #include <sys/sysmacros.h>
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define blksize64_t blksize_t
 #define blkcnt64_t blkcnt_t
 #define fsblkcnt64_t fsblkcnt_t

+ 1 - 1
include/unistd.h

@@ -176,7 +176,7 @@ int getresgid(gid_t *, gid_t *, gid_t *);
 char *get_current_dir_name(void);
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define lseek64 lseek
 #define pread64 pread
 #define pwrite64 pwrite