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.
pull/2/head
Mark Adler 14 years ago
parent d169dd7300
commit 6715208bdb
  1. 6
      zconf.h
  2. 6
      zconf.h.cmakein
  3. 6
      zconf.h.in
  4. 2
      zlib.h

@ -266,11 +266,11 @@
# endif # endif
#endif #endif
#ifndef ON /* function prototypes for stdarg */ #ifndef Z_ARG /* function prototypes for stdarg */
# if defined(STDC) || defined(Z_HAVE_STDARG_H) # if defined(STDC) || defined(Z_HAVE_STDARG_H)
# define ON(args) args # define Z_ARG(args) args
# else # else
# define ON(args) () # define Z_ARG(args) ()
# endif # endif
#endif #endif

@ -268,11 +268,11 @@
# endif # endif
#endif #endif
#ifndef ON /* function prototypes for stdarg */ #ifndef Z_ARG /* function prototypes for stdarg */
# if defined(STDC) || defined(Z_HAVE_STDARG_H) # if defined(STDC) || defined(Z_HAVE_STDARG_H)
# define ON(args) args # define Z_ARG(args) args
# else # else
# define ON(args) () # define Z_ARG(args) ()
# endif # endif
#endif #endif

@ -266,11 +266,11 @@
# endif # endif
#endif #endif
#ifndef ON /* function prototypes for stdarg */ #ifndef Z_ARG /* function prototypes for stdarg */
# if defined(STDC) || defined(Z_HAVE_STDARG_H) # if defined(STDC) || defined(Z_HAVE_STDARG_H)
# define ON(args) args # define Z_ARG(args) args
# else # else
# define ON(args) () # define Z_ARG(args) ()
# endif # endif
#endif #endif

@ -1298,7 +1298,7 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
error. 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 Converts, formats, and writes the arguments to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of control of the format string, as in fprintf. gzprintf returns the number of

Loading…
Cancel
Save