]> git.lizzy.rs Git - zlib.git/commitdiff
Change ON macro to Z_ARG to avoid application conflicts.
authorMark Adler <madler@alumni.caltech.edu>
Sun, 13 Nov 2011 21:35:02 +0000 (13:35 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Sun, 13 Nov 2011 21:35:02 +0000 (13:35 -0800)
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.

zconf.h
zconf.h.cmakein
zconf.h.in
zlib.h

diff --git a/zconf.h b/zconf.h
index fd10c6a927878e830b94161581852b8106a7ca42..84ffb32ba16b559f8338265bf9c13039c80d1f92 100644 (file)
--- a/zconf.h
+++ b/zconf.h
 #  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
 
index 0b880ad586d01e589a52940bc8d5716d98414483..b2d78b3a70a51de8f3d044c85059c5cb228d4526 100644 (file)
 #  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
 
index fd10c6a927878e830b94161581852b8106a7ca42..84ffb32ba16b559f8338265bf9c13039c80d1f92 100644 (file)
 #  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/zlib.h b/zlib.h
index 6728d897559f4d2f782c6c77d6506496fe18ff97..3121b0a7381e68e6d90e8f0bd11a22ef9d44ae76 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -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