diff options
Diffstat (limited to 'test/example.c')
| -rw-r--r-- | test/example.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/example.c b/test/example.c index c3521dd5934f..9cc5f763bc89 100644 --- a/test/example.c +++ b/test/example.c @@ -1,10 +1,14 @@ /* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2006, 2011, 2016 Jean-loup Gailly + * Copyright (C) 1995-2026 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ +#if defined(_WIN32) && !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +#endif + #include "zlib.h" #include <stdio.h> @@ -13,8 +17,10 @@ # include <stdlib.h> #endif -#if defined(VMS) || defined(RISCOS) +#if defined(VMS) # define TESTFILE "foo-gz" +#elif defined(__riscos) && !defined(__TARGET_UNIXLIB__) +# define TESTFILE "foo/gz" #else # define TESTFILE "foo.gz" #endif @@ -319,7 +325,7 @@ static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, CHECK_ERR(err, "inflateEnd"); if (d_stream.total_out != 2*uncomprLen + uncomprLen/2) { - fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); + fprintf(stderr, "bad large inflate: %lu\n", d_stream.total_out); exit(1); } else { printf("large_inflate(): OK\n"); @@ -504,7 +510,7 @@ int main(int argc, char *argv[]) { } printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", - ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); + ZLIB_VERSION, (unsigned)ZLIB_VERNUM, zlibCompileFlags()); compr = (Byte*)calloc((uInt)comprLen, 1); uncompr = (Byte*)calloc((uInt)uncomprLen, 1); |
