diff options
author | Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> | 2006-07-30 16:38:28 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-02 00:27:18 -0700 |
commit | 579d1fbfaf25550254014fa472faac95f88eb779 (patch) | |
tree | a6cc7f0ba87e166d30007e6e9c91213a8ca7dded /Makefile | |
parent | 446c6faec69f7ac521b8b9fc2b1874731729032f (diff) | |
download | git-579d1fbfaf25550254014fa472faac95f88eb779.tar.gz git-579d1fbfaf25550254014fa472faac95f88eb779.tar.xz |
Add NO_C99_FORMAT to support older compilers.
The NO_C99_FORMAT macro allows compilers that lack support for the
ll,hh,j,z,t size specifiers (eg. gcc 2.95.2) to adapt the code to avoid
runtime errors in the formatted IO functions.
Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -24,6 +24,11 @@ all: # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks # d_type in struct dirent (latest Cygwin -- will be fixed soonish). # +# Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.) +# do not support the 'size specifiers' introduced by C99, namely ll, hh, +# j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). +# some c compilers supported these specifiers prior to C99 as an extension. +# # Define NO_STRCASESTR if you don't have strcasestr. # # Define NO_STRLCPY if you don't have strlcpy. @@ -432,6 +437,9 @@ endif ifdef NO_D_INO_IN_DIRENT ALL_CFLAGS += -DNO_D_INO_IN_DIRENT endif +ifdef NO_C99_FORMAT + ALL_CFLAGS += -DNO_C99_FORMAT +endif ifdef NO_SYMLINK_HEAD ALL_CFLAGS += -DNO_SYMLINK_HEAD endif |