Move definitions of fopen_for_input to largefile_wrappers.h

* largefile_wrappers.h (fopen_for_input): Define along with
fopen_for_output.
* mmap_cache.c: Include "largefile_wrappers.h".
(fopen_for_input): Remove.
This commit is contained in:
Дмитрий Левин 2018-02-26 23:22:24 +00:00
parent bbeee0be62
commit fd4c976cf9
2 changed files with 4 additions and 10 deletions

View File

@ -35,8 +35,10 @@
#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

View File

@ -28,19 +28,10 @@
#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;