summaryrefslogtreecommitdiffstats
path: root/cpukit/zlib/gzguts.h
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-03-19 07:42:49 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-03-19 07:42:49 +0000
commit791d3cdcf73cf6721e91c1d5e0837c679944ce19 (patch)
tree17e6fc320aeab4fbfcf49103daf36323bf205f9a /cpukit/zlib/gzguts.h
parent2011-03-18 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-791d3cdcf73cf6721e91c1d5e0837c679944ce19.tar.bz2
Update to zlib-1.2.5.
Diffstat (limited to 'cpukit/zlib/gzguts.h')
-rw-r--r--cpukit/zlib/gzguts.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/cpukit/zlib/gzguts.h b/cpukit/zlib/gzguts.h
index 0e7ed4330a..0f8fb79f87 100644
--- a/cpukit/zlib/gzguts.h
+++ b/cpukit/zlib/gzguts.h
@@ -5,14 +5,18 @@
#ifdef _LARGEFILE64_SOURCE
# ifndef _LARGEFILE_SOURCE
-# define _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE 1
# endif
# ifdef _FILE_OFFSET_BITS
# undef _FILE_OFFSET_BITS
# endif
#endif
-#define ZLIB_INTERNAL
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
#include <stdio.h>
#include "zlib.h"
@@ -44,7 +48,7 @@
#endif
/* get errno and strerror definition */
-#if defined UNDER_CE && defined NO_ERRNO_H
+#if defined UNDER_CE
# include <windows.h>
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
#else
@@ -56,16 +60,12 @@
# endif
#endif
-/* MVS fdopen() */
-#ifdef __MVS__
- #pragma map (fdopen , "\174\174FDOPEN")
- FILE *fdopen(int, const char *);
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-# define z_off64_t off64_t
-#else
-# define z_off64_t z_off_t
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
#endif
/* default i/o buffer size -- double this for output when reading */
@@ -116,9 +116,9 @@ typedef struct {
typedef gz_state FAR *gz_statep;
/* shared functions */
-ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
-#if defined UNDER_CE && defined NO_ERRNO_H
-ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
+void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
+#if defined UNDER_CE
+char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
#endif
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
@@ -127,6 +127,6 @@ ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
#ifdef INT_MAX
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
#else
-ZEXTERN unsigned ZEXPORT gz_intmax OF((void));
+unsigned ZLIB_INTERNAL gz_intmax OF((void));
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
#endif