aboutsummaryrefslogtreecommitdiff
path: root/gzguts.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-10-02 11:15:00 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-10-02 11:15:00 -0700
commit00c836e325a07419f5d855e2f275500a37cb27d2 (patch)
tree1b4ef187059c19ee142f6c61952133b50a295136 /gzguts.h
parent0956bd23dd070074ec572fd5557a74ff29797b2f (diff)
downloadzlib-00c836e325a07419f5d855e2f275500a37cb27d2.tar.gz
zlib-00c836e325a07419f5d855e2f275500a37cb27d2.tar.bz2
zlib-00c836e325a07419f5d855e2f275500a37cb27d2.zip
Merge vestigial vsnprintf determination from zutil.h to gzguts.h.
This also moves some of the same from zconf.h to gzguts.h. A new function, gzflags(), was created to pass the compilation flags related to vsnprintf usage back to zlibCompileFlags() in zutil.c. In the process, various compiler configuration files were updated to include gzflags(), as well as the new gzgetc_() function added when the gzgetc() macro was introduced in a previous patch.
Diffstat (limited to 'gzguts.h')
-rw-r--r--gzguts.h45
1 files changed, 42 insertions, 3 deletions
diff --git a/gzguts.h b/gzguts.h
index c226a09..8193451 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -31,9 +31,48 @@
31# define NO_GZCOMPRESS 31# define NO_GZCOMPRESS
32#endif 32#endif
33 33
34#ifdef _MSC_VER 34#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
35# include <io.h> 35# ifndef HAVE_VSNPRINTF
36# define vsnprintf _vsnprintf 36# define HAVE_VSNPRINTF
37# endif
38#endif
39
40#if defined(__CYGWIN__)
41# ifndef HAVE_VSNPRINTF
42# define HAVE_VSNPRINTF
43# endif
44#endif
45
46#ifndef HAVE_VSNPRINTF
47# ifdef MSDOS
48/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
49 but for now we just assume it doesn't. */
50# define NO_vsnprintf
51# endif
52# ifdef __TURBOC__
53# define NO_vsnprintf
54# endif
55# ifdef WIN32
56/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
57# if !defined(vsnprintf) && !defined(NO_vsnprintf)
58# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
59# include <io.h>
60# define vsnprintf _vsnprintf
61# endif
62# endif
63# endif
64# ifdef __SASC
65# define NO_vsnprintf
66# endif
67# ifdef VMS
68# define NO_vsnprintf
69# endif
70# ifdef __OS400__
71# define NO_vsnprintf
72# endif
73# ifdef __MVS__
74# define NO_vsnprintf
75# endif
37#endif 76#endif
38 77
39#ifndef local 78#ifndef local