diff options
Diffstat (limited to 'gzwrite.c')
-rw-r--r-- | gzwrite.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* gzwrite.c -- zlib functions for writing gzip files | 1 | /* gzwrite.c -- zlib functions for writing gzip files |
2 | * Copyright (C) 2004, 2005, 2010 Mark Adler | 2 | * Copyright (C) 2004, 2005, 2010, 2011 Mark Adler |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -274,7 +274,7 @@ int ZEXPORT gzputs(file, str) | |||
274 | return ret == 0 && len != 0 ? -1 : ret; | 274 | return ret == 0 && len != 0 ? -1 : ret; |
275 | } | 275 | } |
276 | 276 | ||
277 | #ifdef STDC | 277 | #if defined(STDC) || defined(Z_HAVE_STDARG_H) |
278 | #include <stdarg.h> | 278 | #include <stdarg.h> |
279 | 279 | ||
280 | /* -- see zlib.h -- */ | 280 | /* -- see zlib.h -- */ |
@@ -346,7 +346,7 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) | |||
346 | return len; | 346 | return len; |
347 | } | 347 | } |
348 | 348 | ||
349 | #else /* !STDC */ | 349 | #else /* !STDC && !Z_HAVE_STDARG_H */ |
350 | 350 | ||
351 | /* -- see zlib.h -- */ | 351 | /* -- see zlib.h -- */ |
352 | int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, | 352 | int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, |
@@ -366,6 +366,10 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, | |||
366 | state = (gz_statep)file; | 366 | state = (gz_statep)file; |
367 | strm = &(state->strm); | 367 | strm = &(state->strm); |
368 | 368 | ||
369 | /* check that can really pass pointer in ints */ | ||
370 | if (sizeof(int) != sizeof(void *)) | ||
371 | return 0; | ||
372 | |||
369 | /* check that we're writing and that there's no error */ | 373 | /* check that we're writing and that there's no error */ |
370 | if (state->mode != GZ_WRITE || state->err != Z_OK) | 374 | if (state->mode != GZ_WRITE || state->err != Z_OK) |
371 | return 0; | 375 | return 0; |