aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRamsay Allan Jones <ramsay@ramsay1.demon.co.uk>2006-07-30 16:38:28 +0100
committerJunio C Hamano <junkio@cox.net>2006-08-02 00:27:18 -0700
commit579d1fbfaf25550254014fa472faac95f88eb779 (patch)
treea6cc7f0ba87e166d30007e6e9c91213a8ca7dded /Makefile
parent446c6faec69f7ac521b8b9fc2b1874731729032f (diff)
downloadgit-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--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6df93c18f..e66e9b16a 100644
--- a/Makefile
+++ b/Makefile
@@ -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