author | Jonathan Nieder <jrnieder@gmail.com> | |
Wed, 16 Mar 2011 05:15:31 +0000 (00:15 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 17 Mar 2011 22:30:49 +0000 (15:30 -0700) | ||
commit | 28bd70d811391be10c55ce4aee1b6ee991d7a86b | |
tree | bf682c250e811b0e8f52e9305b5b4b23dc521bd5 | tree | snapshot |
parent | 31d713d069f6586c3b18aa721ccd668fa994219c | commit | diff |
unbreak and eliminate NO_C99_FORMAT
In the spirit of v1.5.0.2~21 (Check for PRIuMAX rather than
NO_C99_FORMAT in fast-import.c, 2007-02-20), use PRIuMAX from
git-compat-util.h on all platforms instead of C99-specific formats
like %zu with dangerous fallbacks to %u or %lu.
So now C99-challenged platforms can build git without provoking
warnings or errors from printf, even if pointers do not have the same
size as an int or long.
The need for a fallback PRIuMAX is detected in git-compat-util.h with
"#ifndef PRIuMAX". So while at it, simplify the Makefile and configure
script by eliminating the NO_C99_FORMAT knob altogether.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In the spirit of v1.5.0.2~21 (Check for PRIuMAX rather than
NO_C99_FORMAT in fast-import.c, 2007-02-20), use PRIuMAX from
git-compat-util.h on all platforms instead of C99-specific formats
like %zu with dangerous fallbacks to %u or %lu.
So now C99-challenged platforms can build git without provoking
warnings or errors from printf, even if pointers do not have the same
size as an int or long.
The need for a fallback PRIuMAX is detected in git-compat-util.h with
"#ifndef PRIuMAX". So while at it, simplify the Makefile and configure
script by eliminating the NO_C99_FORMAT knob altogether.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | diff | blob | history | |
alloc.c | diff | blob | history | |
config.mak.in | diff | blob | history | |
configure.ac | diff | blob | history | |
sha1_file.c | diff | blob | history |