Stop using _LFS64_LARGEFILE
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Nov 2013 22:34:42 +0000 (22:34 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Nov 2013 22:44:40 +0000 (22:44 +0000)
There is only one place left in the code where strace guesses whether
libc provides LFS64 functions and structures.  The most natural thing to
do there is to check for _LARGEFILE64_SOURCE - the macro provided by
glibc.  Other libc implementations that provide nondegenerate LFS64
interfaces are expected to define this macro as well.

* defs.h (_LFS64_LARGEFILE): Remove.
* strace.c: Use _LARGEFILE64_SOURCE instead of _LFS64_LARGEFILE.

defs.h
strace.c

diff --git a/defs.h b/defs.h
index 5b2b0ca726a8ae9c1639e972a8484e9261383afb..6b5f650494046fba1664647be002f0c0129aab7b 100644 (file)
--- a/defs.h
+++ b/defs.h
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
-#ifdef _LARGEFILE64_SOURCE
-/* This is the macro everything checks before using foo64 names.  */
-# ifndef _LFS64_LARGEFILE
-#  define _LFS64_LARGEFILE 1
-# endif
-#endif
 
 #ifdef MIPS
 # include <sgidefs.h>
index 32a3f5e0d209ea63c113e337994a02de84002f2c..914b0a6a9fd141b94600b3d02a6caf5abae37a9d 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -438,7 +438,7 @@ swap_uid(void)
        }
 }
 
-#if _LFS64_LARGEFILE
+#ifdef _LARGEFILE64_SOURCE
 # define fopen_for_output fopen64
 # define struct_stat struct stat64
 # define stat_file stat64