git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/1] git-compat-util.h: drop the `PRIuMAX` definition

From
HGHariom Verma via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 24, 2019, 13:09 UTC
Message-ID
<177deddcf83c2550c0db536a7a6942ba69a92fa5.1574600963.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.473.git.1574600963.gitgitgadget@gmail.com>
From: Hariom Verma <hariom18599@gmail.com>

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).

Therefore it should be safe to drop the fallback definition for `PRIuMAX` in `git-compat-util.h`.

This addresses https://github.com/gitgitgadget/git/issues/399
Signed-off-by: Hariom Verma <hariom18599@gmail.com>
---
 git-compat-util.h | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index 607dca7534..ba710cfa6c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -320,10 +320,6 @@ char *gitdirname(char *);
 #define PATH_MAX 4096
 #endif
 
-#ifndef PRIuMAX
-#define PRIuMAX "llu"
-#endif
-
 #ifndef SCNuMAX
 #define SCNuMAX PRIuMAX
 #endif
-- 
gitgitgadget
Previous: Hariom Verma via GitGitGadgetNext: Jeff King
Message 2 of 8 in “git-compat-util.h: drop the PRIuMAX definition”
  1. 0/1 git-compat-util.h: drop the PRIuMAX definitionHariom Verma via GitGitGadget, Nov 24, 2019
  2. 1/1 git-compat-util.h: drop the `PRIuMAX` definitionHariom Verma via GitGitGadget, Nov 24, 2019
  3. Jeff KingNov 24, 2019
  4. Carlo ArenasNov 24, 2019
  5. Carlo ArenasNov 24, 2019
  6. Junio C HamanoNov 25, 2019
  7. Junio C HamanoNov 25, 2019
  8. Jeff KingNov 25, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.