Skip to content

Commit

Permalink
git-compat-util.h: support variadic macros with the XL C compiler
Browse files Browse the repository at this point in the history
When the XL C compiler is run with an appropriate language level or
suboption, it defines a feature test macro to indicate support for
variadic macros by defining __C99_MACRO_WITH_VA_ARGS C preprocessor
macro.

This was tested on z/OS, but it should also work on AIX according
to IBM documentation.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
David Michael authored and Junio C Hamano committed Oct 27, 2014
1 parent 3c2dc76 commit f51140c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void git_qsort(void *base, size_t nmemb, size_t size,
#endif
#endif

#if defined(__GNUC__) || (_MSC_VER >= 1400)
#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__C99_MACRO_WITH_VA_ARGS)
#define HAVE_VARIADIC_MACROS 1
#endif

Expand Down

0 comments on commit f51140c

Please sign in to comment.