Skip to content

Get rid of the PRIuMAX guard in git-compat-util.h #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dscho opened this issue Oct 14, 2019 · 5 comments
Closed

Get rid of the PRIuMAX guard in git-compat-util.h #399

dscho opened this issue Oct 14, 2019 · 5 comments
Labels
leftoverbits From the Git mailing list: https://lore.kernel.org/git/?q=%23leftoverbits

Comments

@dscho
Copy link
Member

dscho commented Oct 14, 2019

As mentioned in https://public-inbox.org/git/[email protected]/t/#u:

The %lld format is supported on Linux and macOS, but not on Windows. Therefore, we use PRIdMAX instead and a cast the parameter to intmax_t.

The fact that PRIdMAX is used without any fallback definition in git-compat-util.h is a pretty good sign that we can drop the fallback for PRIuMAX, too.

@dscho dscho added the leftoverbits From the Git mailing list: https://lore.kernel.org/git/?q=%23leftoverbits label Oct 14, 2019
@harry-hov
Copy link

Looking forward to this 😀

@dscho
Copy link
Member Author

dscho commented Nov 22, 2019

@harry-hov this is a really easy one. How about giving it a try?

harry-hov added a commit to harry-hov/git that referenced this issue Nov 24, 2019
Git's code base already seems to be using `PRIdMAX` without any such
fallback definition for quite a while (7545941 (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 gitgitgadget#399

Signed-off-by: Hariom Verma <[email protected]>
@Denton-L
Copy link
Member

Denton-L commented Dec 7, 2019

Closed by e547e5a (Merge branch 'hv/assume-priumax-is-available-anywhere', 2019-12-05).

(Unfortunately, I don't have permission to close issues here.)

@dscho
Copy link
Member Author

dscho commented Dec 7, 2019

(Unfortunately, I don't have permission to close issues here.)

@Denton-L once you accept the invitation I just sent, you should have the permission. I'll leave this issue open so you can try?

@Denton-L
Copy link
Member

Denton-L commented Dec 7, 2019

Thanks, it works!

@Denton-L Denton-L closed this as completed Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
leftoverbits From the Git mailing list: https://lore.kernel.org/git/?q=%23leftoverbits
Projects
None yet
Development

No branches or pull requests

3 participants