summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHariom Verma <hariom18599@gmail.com>2019-11-24 13:09:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-25 02:44:51 (GMT)
commitebc3278665f8b320c35f89aa4afe9c8a69257cd5 (patch)
treedbe7d83535b1d26326a60cc4fd3166f400479590
parentd9f6f3b6195a0ca35642561e530798ad1469bd41 (diff)
downloadgit-ebc3278665f8b320c35f89aa4afe9c8a69257cd5.zip
git-ebc3278665f8b320c35f89aa4afe9c8a69257cd5.tar.gz
git-ebc3278665f8b320c35f89aa4afe9c8a69257cd5.tar.bz2
git-compat-util.h: drop the `PRIuMAX` and other fallback definitions
Git's code base already seems to be using `PRIdMAX` without any such fallback definition for quite a while (75459410edd (json_writer: new routines to create JSON data, 2018-07-13), to be precise, and the first Git version to include that commit was v2.19.0). Having a fallback definition only for `PRIuMAX` is a bit inconsistent. We do sometimes get portability reports more than a year after the problem was introduced. This one should be fairly safe. PRIuMAX is in C99 (for that matter, SCNuMAX, PRIu32 and others also are), and we've been picking up other C99-isms without complaint. The PRIuMAX fallback definition was originally added in 3efb1f343a (Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c., 2007-02-20). But it was replacing a construct that was introduced in an even earlier commit, 579d1fbfaf (Add NO_C99_FORMAT to support older compilers., 2006-07-30), which talks about gcc 2.95. That's pretty ancient at this point. Signed-off-by: Hariom Verma <hariom18599@gmail.com> Helped-by: Jeff King <peff@peff.net> [jc: tweaked both message and code, taking what peff wrote] Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--git-compat-util.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 607dca7..ddb7fca 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -320,26 +320,6 @@ char *gitdirname(char *);
#define PATH_MAX 4096
#endif
-#ifndef PRIuMAX
-#define PRIuMAX "llu"
-#endif
-
-#ifndef SCNuMAX
-#define SCNuMAX PRIuMAX
-#endif
-
-#ifndef PRIu32
-#define PRIu32 "u"
-#endif
-
-#ifndef PRIx32
-#define PRIx32 "x"
-#endif
-
-#ifndef PRIo32
-#define PRIo32 "o"
-#endif
-
typedef uintmax_t timestamp_t;
#define PRItime PRIuMAX
#define parse_timestamp strtoumax