|
| 1 | +diff --git a/cpukit/zlib/zconf.h.in b/cpukit/zlib/zconf.h.in |
| 2 | +index 15b7cfd..beca553 100644 |
| 3 | +--- a/cpukit/zlib/zconf.h.in |
| 4 | ++++ b/cpukit/zlib/zconf.h.in |
| 5 | +@@ -3,7 +3,7 @@ |
| 6 | + * For conditions of distribution and use, see copyright notice in zlib.h |
| 7 | + */ |
| 8 | + |
| 9 | +-/* @(#) $Id: zconf.h.in,v 1.1 2010/02/21 22:38:24 ralf Exp $ */ |
| 10 | ++/* @(#) $Id: zconf.h.in,v 1.1.1.2 2010/04/18 17:58:06 ralf Exp $ */ |
| 11 | + |
| 12 | + #ifndef ZCONF_H |
| 13 | + #define ZCONF_H |
| 14 | +@@ -315,10 +315,6 @@ |
| 15 | + # endif |
| 16 | + #endif |
| 17 | + |
| 18 | +-#ifdef HAVE_VISIBILITY_PRAGMA |
| 19 | +-# define ZEXTERN __attribute__((visibility ("default"))) extern |
| 20 | +-#endif |
| 21 | +- |
| 22 | + #ifndef ZEXTERN |
| 23 | + # define ZEXTERN extern |
| 24 | + #endif |
| 25 | +@@ -364,8 +360,21 @@ typedef uLong FAR uLongf; |
| 26 | + # define Z_HAVE_UNISTD_H |
| 27 | + #endif |
| 28 | + |
| 29 | +-#ifdef Z_HAVE_UNISTD_H |
| 30 | ++#ifdef STDC |
| 31 | + # include <sys/types.h> /* for off_t */ |
| 32 | ++#endif |
| 33 | ++ |
| 34 | ++/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and |
| 35 | ++ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even |
| 36 | ++ * though the former does not conform to the LFS document), but considering |
| 37 | ++ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as |
| 38 | ++ * equivalently requesting no 64-bit operations |
| 39 | ++ */ |
| 40 | ++#if -_LARGEFILE64_SOURCE - -1 == 1 |
| 41 | ++# undef _LARGEFILE64_SOURCE |
| 42 | ++#endif |
| 43 | ++ |
| 44 | ++#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) |
| 45 | + # include <unistd.h> /* for SEEK_* and off_t */ |
| 46 | + # ifdef VMS |
| 47 | + # include <unixio.h> /* for off_t */ |
| 48 | +@@ -375,19 +384,22 @@ typedef uLong FAR uLongf; |
| 49 | + # endif |
| 50 | + #endif |
| 51 | + |
| 52 | +-#ifdef _LARGEFILE64_SOURCE |
| 53 | +-# include <sys/types.h> |
| 54 | +-#endif |
| 55 | +- |
| 56 | + #ifndef SEEK_SET |
| 57 | + # define SEEK_SET 0 /* Seek from beginning of file. */ |
| 58 | + # define SEEK_CUR 1 /* Seek from current position. */ |
| 59 | + # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ |
| 60 | + #endif |
| 61 | ++ |
| 62 | + #ifndef z_off_t |
| 63 | + # define z_off_t long |
| 64 | + #endif |
| 65 | + |
| 66 | ++#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 |
| 67 | ++# define z_off64_t off64_t |
| 68 | ++#else |
| 69 | ++# define z_off64_t z_off_t |
| 70 | ++#endif |
| 71 | ++ |
| 72 | + #if defined(__OS400__) |
| 73 | + # define NO_vsnprintf |
| 74 | + #endif |
0 commit comments