]> granicus.if.org Git - strace/commitdiff
Move definitions of fopen_for_input to largefile_wrappers.h
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Feb 2018 23:22:24 +0000 (23:22 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Feb 2018 23:22:24 +0000 (23:22 +0000)
* largefile_wrappers.h (fopen_for_input): Define along with
fopen_for_output.
* mmap_cache.c: Include "largefile_wrappers.h".
(fopen_for_input): Remove.

largefile_wrappers.h
mmap_cache.c

index 6bb11a3f0684ab6846ffd590f3d518d2679f9031..2cdd5ad975d7b6da23b52ada4048db25a64bfe8d 100644 (file)
 
 #ifdef _LARGEFILE64_SOURCE
 # ifdef HAVE_FOPEN64
+#  define fopen_for_input fopen64
 #  define fopen_for_output fopen64
 # else
+#  define fopen_for_input fopen
 #  define fopen_for_output fopen
 # endif
 # define struct_stat struct stat64
@@ -46,6 +48,7 @@
 # define struct_rlimit struct rlimit64
 # define set_rlimit setrlimit64
 #else
+# define fopen_for_input fopen
 # define fopen_for_output fopen
 # define struct_stat struct stat
 # define stat_file stat
index 4593f3892d7142969a7fb02ed3f745ea970d734b..8db57991be7131b25233c39bb0a0794f9fd9830e 100644 (file)
 #include "defs.h"
 #include <limits.h>
 
+#include "largefile_wrappers.h"
 #include "mmap_cache.h"
 #include "xstring.h"
 
-#ifdef _LARGEFILE64_SOURCE
-# ifdef HAVE_FOPEN64
-#  define fopen_for_input fopen64
-# else
-#  define fopen_for_input fopen
-# endif
-#else
-# define fopen_for_input fopen
-#endif
-
 static unsigned int mmap_cache_generation;
 static bool use_mmap_cache;