# HG changeset patch # User Jun Wu # Date 1458512725 25200 # Node ID d4d8a3c89e6dd11e69a742c404b2d7616cb50950 # Parent f467073cd798c6f0068979cd53af38130a0ced01 chg: define PRINTF_FORMAT_ for non gnu C compiler Before this patch, if __GNUC__ is not defined, PRINTF_FORMAT_ will not be defined and will cause compilation error. This patch solves the issue by making sure PRINTF_FORMAT_ is defined. It allows chg to be compiled with tcc (http://bellard.org/tcc/) by: tcc -o chg *.c diff -r f467073cd798 -r d4d8a3c89e6d contrib/chg/util.h --- a/contrib/chg/util.h Sun Mar 20 15:11:34 2016 -0700 +++ b/contrib/chg/util.h Sun Mar 20 15:25:25 2016 -0700 @@ -12,6 +12,8 @@ #ifdef __GNUC__ #define PRINTF_FORMAT_ __attribute__((format(printf, 1, 2))) +#else +#define PRINTF_FORMAT_ #endif void abortmsg(const char *fmt, ...) PRINTF_FORMAT_;