diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-11-13 13:35:02 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-11-13 13:35:02 -0800 |
commit | 6715208bdb5087ae33a54f7e8150e020aebbf15d (patch) | |
tree | beda2f73a3c6fb956523db0138a70a84c88137b4 | |
parent | d169dd73007cf1eadea79fb2c506b03f178a2bad (diff) | |
download | zlib-6715208bdb5087ae33a54f7e8150e020aebbf15d.tar.gz |
Change ON macro to Z_ARG to avoid application conflicts.
Using "ON" was a dumb idea, since it is common to have macros with
names like ON and OFF. In fact, defining the OF macro back in 1995
was a bad idea, but now we're stuck with it. Attempts to rename OF
to something else breaks many applications.
-rw-r--r-- | zconf.h | 6 | ||||
-rw-r--r-- | zconf.h.cmakein | 6 | ||||
-rw-r--r-- | zconf.h.in | 6 | ||||
-rw-r--r-- | zlib.h | 2 |
4 files changed, 10 insertions, 10 deletions
@@ -266,11 +266,11 @@ # endif #endif -#ifndef ON /* function prototypes for stdarg */ +#ifndef Z_ARG /* function prototypes for stdarg */ # if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define ON(args) args +# define Z_ARG(args) args # else -# define ON(args) () +# define Z_ARG(args) () # endif #endif diff --git a/zconf.h.cmakein b/zconf.h.cmakein index 0b880ad..b2d78b3 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -268,11 +268,11 @@ # endif #endif -#ifndef ON /* function prototypes for stdarg */ +#ifndef Z_ARG /* function prototypes for stdarg */ # if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define ON(args) args +# define Z_ARG(args) args # else -# define ON(args) () +# define Z_ARG(args) () # endif #endif @@ -266,11 +266,11 @@ # endif #endif -#ifndef ON /* function prototypes for stdarg */ +#ifndef Z_ARG /* function prototypes for stdarg */ # if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define ON(args) args +# define Z_ARG(args) args # else -# define ON(args) () +# define Z_ARG(args) () # endif #endif @@ -1298,7 +1298,7 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, error. */ -ZEXTERN int ZEXPORTVA gzprintf ON((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); /* Converts, formats, and writes the arguments to the compressed file under control of the format string, as in fprintf. gzprintf returns the number of |