From: Eugene Syromyatnikov Date: Thu, 21 Feb 2019 15:48:44 +0000 (+0100) Subject: Move open_file to largefile_wrappers.h X-Git-Tag: v5.1~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75f2c0f0751bf828f7022fa176d4961c4b2b774b;p=strace Move open_file to largefile_wrappers.h * util.c (open_file): Move it ... * largefile_wrappers.h: ... here. --- diff --git a/largefile_wrappers.h b/largefile_wrappers.h index 508882c4..fc178006 100644 --- a/largefile_wrappers.h +++ b/largefile_wrappers.h @@ -14,6 +14,11 @@ # include "defs.h" # ifdef _LARGEFILE64_SOURCE +# ifdef HAVE_OPEN64 +# define open_file open64 +# else +# define open_file open +# endif # ifdef HAVE_FOPEN64 # define fopen_stream fopen64 # else @@ -26,6 +31,7 @@ # define struct_rlimit struct rlimit64 # define set_rlimit setrlimit64 # else +# define open_file open # define fopen_stream fopen # define struct_stat struct stat # define stat_file stat diff --git a/util.c b/util.c index 6190f550..7dec473f 100644 --- a/util.c +++ b/util.c @@ -1351,12 +1351,6 @@ print_abnormal_hi(const kernel_ulong_t val) } } -#if defined _LARGEFILE64_SOURCE && defined HAVE_OPEN64 -# define open_file open64 -#else -# define open_file open -#endif - int read_int_from_file(struct tcb *tcp, const char *const fname, int *const pvalue) {