1 From 6820c53c3952f78185beb59f767c372fc745dcf3 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Sun, 11 Dec 2022 21:42:59 -0800
4 Subject: [PATCH] Use AC_SYS_LARGEFILE macro to control largefile support
6 The autoconf macro AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS=64
7 where necessary to ensure that off_t and all interfaces using off_t
8 are 64bit, even on 32bit systems.
10 replace stat64 by equivalent stat struct/func
12 Upstream-Status: Accepted [https://github.com/thkukuk/rpcsvc-proto/pull/15]
13 Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 rpcgen/rpc_main.c | 16 +++++-----------
17 2 files changed, 6 insertions(+), 11 deletions(-)
19 diff --git a/configure.ac b/configure.ac
20 index bacc2fb..a9fc730 100644
23 @@ -8,6 +8,7 @@ AC_PREFIX_DEFAULT(/usr)
31 diff --git a/rpcgen/rpc_main.c b/rpcgen/rpc_main.c
32 index 277adc6..fd7dea9 100644
33 --- a/rpcgen/rpc_main.c
34 +++ b/rpcgen/rpc_main.c
36 #define EXTEND 1 /* alias for TRUE */
37 #define DONT_EXTEND 0 /* alias for FALSE */
40 -# if __DARWIN_ONLY_64_BIT_INO_T
47 int cflag; /* xdr C routines */
48 @@ -337,9 +331,9 @@ clear_args (void)
55 - if (stat64 (CPP, &buf) == 0)
56 + if (stat (CPP, &buf) == 0)
59 if (cppDefined) /* user specified cpp but it does not exist */
60 @@ -1125,17 +1119,17 @@ putarg (int whereto, const char *cp)
62 checkfiles (const char *infile, const char *outfile)
67 if (infile) /* infile ! = NULL */
68 - if (stat64 (infile, &buf) < 0)
69 + if (stat (infile, &buf) < 0)
76 - if (stat64 (outfile, &buf) < 0)
77 + if (stat (outfile, &buf) < 0)
78 return; /* file does not exist */