Changeset 791d3cdc in rtems


Ignore:
Timestamp:
Mar 19, 2011, 7:42:49 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
89130ec
Parents:
fad4d973
Message:

Update to zlib-1.2.5.

Location:
cpukit/zlib
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • cpukit/zlib/ChangeLog.zlib

    rfad4d973 r791d3cdc  
    11
    22                ChangeLog file for zlib
     3
     4Changes in 1.2.5 (19 Apr 2010)
     5- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
     6- Default to libdir as sharedlibdir in configure [Nieder]
     7- Update copyright dates on modified source files
     8- Update trees.c to be able to generate modified trees.h
     9- Exit configure for MinGW, suggesting win32/Makefile.gcc
     10
     11Changes in 1.2.4.5 (18 Apr 2010)
     12- Set sharedlibdir in configure [Torok]
     13- Set LDFLAGS in Makefile.in [Bar-Lev]
     14- Avoid mkdir objs race condition in Makefile.in [Bowler]
     15- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
     16- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
     17- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
     18
     19Changes in 1.2.4.4 (18 Apr 2010)
     20- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
     21- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
     22- Try to use bash or ksh regardless of functionality of /bin/sh
     23- Fix configure incompatibility with NetBSD sh
     24- Remove attempt to run under bash or ksh since have better NetBSD fix
     25- Fix win32/Makefile.gcc for MinGW [Bar-Lev]
     26- Add diagnostic messages when using CROSS_PREFIX in configure
     27- Added --sharedlibdir option to configure [Weigelt]
     28- Use hidden visibility attribute when available [Frysinger]
     29
     30Changes in 1.2.4.3 (10 Apr 2010)
     31- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
     32- Use CROSS_PREFIX for nm [Bar-Lev]
     33- Assume _LARGEFILE64_SOURCE defined is equivalent to true
     34- Avoid use of undefined symbols in #if with && and ||
     35- Make *64 prototypes in gzguts.h consistent with functions
     36- Add -shared load option for MinGW in configure [Bowler]
     37- Move z_off64_t to public interface, use instead of off64_t
     38- Remove ! from shell test in configure (not portable to Solaris)
     39- Change +0 macro tests to -0 for possibly increased portability
     40
     41Changes in 1.2.4.2 (9 Apr 2010)
     42- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
     43- Really provide prototypes for *64 functions when building without LFS
     44- Only define unlink() in minigzip.c if unistd.h not included
     45- Update README to point to contrib/vstudio project files
     46- Move projects/vc6 to old/ and remove projects/
     47- Include stdlib.h in minigzip.c for setmode() definition under WinCE
     48- Clean up assembler builds in win32/Makefile.msc [Rowe]
     49- Include sys/types.h for Microsoft for off_t definition
     50- Fix memory leak on error in gz_open()
     51- Symbolize nm as $NM in configure [Weigelt]
     52- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
     53- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
     54- Fix bug in gzeof() to take into account unused input data
     55- Avoid initialization of structures with variables in puff.c
     56- Updated win32/README-WIN32.txt [Rowe]
     57
     58Changes in 1.2.4.1 (28 Mar 2010)
     59- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
     60- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
     61- Restore "for debugging" comment on sprintf() in gzlib.c
     62- Remove fdopen for MVS from gzguts.h
     63- Put new README-WIN32.txt in win32 [Rowe]
     64- Add check for shell to configure and invoke another shell if needed
     65- Fix big fat stinking bug in gzseek() on uncompressed files
     66- Remove vestigial F_OPEN64 define in zutil.h
     67- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
     68- Avoid errors on non-LFS systems when applications define LFS macros
     69- Set EXE to ".exe" in configure for MINGW [Kahle]
     70- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
     71- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
     72- Add DLL install in win32/makefile.gcc [Bar-Lev]
     73- Allow Linux* or linux* from uname in configure [Bar-Lev]
     74- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
     75- Add cross-compilation prefixes to configure [Bar-Lev]
     76- Match type exactly in gz_load() invocation in gzread.c
     77- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
     78- Provide prototypes for *64 functions when building zlib without LFS
     79- Don't use -lc when linking shared library on MinGW
     80- Remove errno.h check in configure and vestigial errno code in zutil.h
    381
    482Changes in 1.2.4 (14 Mar 2010)
     
    100178- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
    101179- Update zlib.map [Brown]
    102 - Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Tšršk]
     180- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
    103181- Apply various fixes to CMakeLists.txt [Lowman]
    104182- Add checks on len in gzread() and gzwrite()
  • cpukit/zlib/adler32.c

    rfad4d973 r791d3cdc  
    161161}
    162162
    163 #if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64))
    164163uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
    165164    uLong adler1;
     
    169168    return adler32_combine_(adler1, adler2, len2);
    170169}
    171 #endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */
  • cpukit/zlib/crc32.c

    rfad4d973 r791d3cdc  
    11/* crc32.c -- compute the CRC-32 of a data stream
    2  * Copyright (C) 1995-2006 Mark Adler
     2 * Copyright (C) 1995-2006, 2010 Mark Adler
    33 * For conditions of distribution and use, see copyright notice in zlib.h
    44 *
     
    434434}
    435435
    436 #if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64))
    437436uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
    438437    uLong crc1;
     
    442441    return crc32_combine_(crc1, crc2, len2);
    443442}
    444 #endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */
  • cpukit/zlib/deflate.c

    rfad4d973 r791d3cdc  
    5353
    5454const char deflate_copyright[] =
    55    " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
     55   " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
    5656/*
    5757  If you use the zlib library in a product, an acknowledgment is welcome
  • cpukit/zlib/deflate.h

    rfad4d973 r791d3cdc  
    11/* deflate.h -- internal compression state
    2  * Copyright (C) 1995-2009 Jean-loup Gailly
     2 * Copyright (C) 1995-2010 Jean-loup Gailly
    33 * For conditions of distribution and use, see copyright notice in zlib.h
    44 */
     
    291291
    292292        /* in trees.c */
    293 void _tr_init        OF((deflate_state *s));
    294 int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
    295 void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
    296                           int last));
    297 void _tr_align        OF((deflate_state *s));
    298 void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
    299                           int last));
     293void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
     294int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
     295void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
     296                        ulg stored_len, int last));
     297void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
     298void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
     299                        ulg stored_len, int last));
    300300
    301301#define d_code(dist) \
     
    310310
    311311#if defined(GEN_TREES_H) || !defined(STDC)
    312   extern uch _length_code[];
    313   extern uch _dist_code[];
     312  extern uch ZLIB_INTERNAL _length_code[];
     313  extern uch ZLIB_INTERNAL _dist_code[];
    314314#else
    315   extern const uch _length_code[];
    316   extern const uch _dist_code[];
     315  extern const uch ZLIB_INTERNAL _length_code[];
     316  extern const uch ZLIB_INTERNAL _dist_code[];
    317317#endif
    318318
  • cpukit/zlib/gzguts.h

    rfad4d973 r791d3cdc  
    66#ifdef _LARGEFILE64_SOURCE
    77#  ifndef _LARGEFILE_SOURCE
    8 #    define _LARGEFILE_SOURCE
     8#    define _LARGEFILE_SOURCE 1
    99#  endif
    1010#  ifdef _FILE_OFFSET_BITS
     
    1313#endif
    1414
    15 #define ZLIB_INTERNAL
     15#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
     16#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
     17#else
     18#  define ZLIB_INTERNAL
     19#endif
    1620
    1721#include <stdio.h>
     
    4549
    4650/* get errno and strerror definition */
    47 #if defined UNDER_CE && defined NO_ERRNO_H
     51#if defined UNDER_CE
    4852#  include <windows.h>
    4953#  define zstrerror() gz_strwinerror((DWORD)GetLastError())
     
    5761#endif
    5862
    59 /* MVS fdopen() */
    60 #ifdef __MVS__
    61   #pragma map (fdopen , "\174\174FDOPEN")
    62    FILE *fdopen(int, const char *);
    63 #endif
    64 
    65 #ifdef _LARGEFILE64_SOURCE
    66 #  define z_off64_t off64_t
    67 #else
    68 #  define z_off64_t z_off_t
     63/* provide prototypes for these when building zlib without LFS */
     64#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
     65    ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
     66    ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
     67    ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
     68    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
    6969#endif
    7070
     
    117117
    118118/* shared functions */
    119 ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
    120 #if defined UNDER_CE && defined NO_ERRNO_H
    121 ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
     119void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
     120#if defined UNDER_CE
     121char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
    122122#endif
    123123
     
    128128#  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
    129129#else
    130 ZEXTERN unsigned ZEXPORT gz_intmax OF((void));
     130unsigned ZLIB_INTERNAL gz_intmax OF((void));
    131131#  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
    132132#endif
  • cpukit/zlib/gzlib.c

    rfad4d973 r791d3cdc  
    66#include "gzguts.h"
    77
    8 #ifdef _LARGEFILE64_SOURCE
     8#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
    99#  define LSEEK lseek64
    1010#else
     
    1616local gzFile gz_open OF((const char *, int, const char *));
    1717
    18 #if defined UNDER_CE && defined NO_ERRNO_H
     18#if defined UNDER_CE
    1919
    2020/* Map the Windows error number in ERROR to a locale-dependent error message
     
    2727   The gz_strwinerror function does not change the current setting of
    2828   GetLastError. */
    29 char ZEXPORT *gz_strwinerror (error)
     29char ZLIB_INTERNAL *gz_strwinerror (error)
    3030     DWORD error;
    3131{
     
    6666}
    6767
    68 #endif /* UNDER_CE && NO_ERRNO_H */
     68#endif /* UNDER_CE */
    6969
    7070/* Reset gzip file state */
     
    173173            0666);
    174174    if (state->fd == -1) {
     175        free(state->path);
    175176        free(state);
    176177        return NULL;
     
    200201}
    201202
    202 #if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64))
    203203/* -- see zlib.h -- */
    204204gzFile ZEXPORT gzopen64(path, mode)
     
    208208    return gz_open(path, -1, mode);
    209209}
    210 #endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */
    211210
    212211/* -- see zlib.h -- */
     
    220219    if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
    221220        return NULL;
    222     sprintf(path, "<fd:%d>", fd);
     221    sprintf(path, "<fd:%d>", fd);   /* for debugging */
    223222    gz = gz_open(path, fd, mode);
    224223    free(path);
     
    308307    if (state->mode == GZ_READ && state->how == COPY &&
    309308        state->pos + offset >= state->raw) {
    310         ret = LSEEK(state->fd, offset, SEEK_CUR);
     309        ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
    311310        if (ret == -1)
    312311            return -1;
     
    389388
    390389/* -- see zlib.h -- */
    391 
    392390z_off64_t ZEXPORT gzoffset64(file)
    393391    gzFile file;
     
    436434
    437435    /* return end-of-file state */
    438     return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0;
     436    return state->mode == GZ_READ ?
     437        (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
    439438}
    440439
     
    484483   allocation failure constructing the error message, then convert the error to
    485484   out of memory. */
    486 void ZEXPORT gz_error(state, err, msg)
     485void ZLIB_INTERNAL gz_error(state, err, msg)
    487486    gz_statep state;
    488487    int err;
     
    524523   used, since C standard permits 1's complement and sign-bit representations,
    525524   otherwise we could just use ((unsigned)-1) >> 1 */
    526 unsigned ZEXPORT gz_intmax()
     525unsigned ZLIB_INTERNAL gz_intmax()
    527526{
    528527    unsigned p, q;
  • cpukit/zlib/gzread.c

    rfad4d973 r791d3cdc  
    5656        return -1;
    5757    if (state->eof == 0) {
    58         if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1)
     58        if (gz_load(state, state->in, state->size,
     59                (unsigned *)&(strm->avail_in)) == -1)
    5960            return -1;
    6061        strm->next_in = state->in;
  • cpukit/zlib/inffast.c

    rfad4d973 r791d3cdc  
    11/* inffast.c -- fast decoding
    2  * Copyright (C) 1995-2008 Mark Adler
     2 * Copyright (C) 1995-2008, 2010 Mark Adler
    33 * For conditions of distribution and use, see copyright notice in zlib.h
    44 */
     
    6565      output space.
    6666 */
    67 void inflate_fast(strm, start)
     67void ZLIB_INTERNAL inflate_fast(strm, start)
    6868z_streamp strm;
    6969unsigned start;         /* inflate()'s starting value for strm->avail_out */
  • cpukit/zlib/inftrees.c

    rfad4d973 r791d3cdc  
    1010
    1111const char inflate_copyright[] =
    12    " inflate 1.2.4 Copyright 1995-2010 Mark Adler ";
     12   " inflate 1.2.5 Copyright 1995-2010 Mark Adler ";
    1313/*
    1414  If you use the zlib library in a product, an acknowledgment is welcome
     
    3030   longest code or if it is less than the shortest code.
    3131 */
    32 int inflate_table(type, lens, codes, table, bits, work)
     32int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
    3333codetype type;
    3434unsigned short FAR *lens;
     
    6363    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
    6464        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
    65         19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195};
     65        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195};
    6666    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
    6767        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
  • cpukit/zlib/inftrees.h

    rfad4d973 r791d3cdc  
    11/* inftrees.h -- header to use inftrees.c
    2  * Copyright (C) 1995-2005 Mark Adler
     2 * Copyright (C) 1995-2005, 2010 Mark Adler
    33 * For conditions of distribution and use, see copyright notice in zlib.h
    44 */
     
    5858} codetype;
    5959
    60 extern int inflate_table OF((codetype type, unsigned short FAR *lens,
     60int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
    6161                             unsigned codes, code FAR * FAR *table,
    6262                             unsigned FAR *bits, unsigned short FAR *work));
  • cpukit/zlib/trees.c

    rfad4d973 r791d3cdc  
    11/* trees.c -- output deflated data using Huffman coding
    2  * Copyright (C) 1995-2009 Jean-loup Gailly
     2 * Copyright (C) 1995-2010 Jean-loup Gailly
    33 * detect_data_type() function provided freely by Cosmin Truta, 2006
    44 * For conditions of distribution and use, see copyright notice in zlib.h
     
    352352    }
    353353
    354     fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
     354    fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n");
    355355    for (i = 0; i < DIST_CODE_LEN; i++) {
    356356        fprintf(header, "%2u%s", _dist_code[i],
     
    358358    }
    359359
    360     fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
     360    fprintf(header,
     361        "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
    361362    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
    362363        fprintf(header, "%2u%s", _length_code[i],
     
    383384 * Initialize the tree data structures for a new zlib stream.
    384385 */
    385 void _tr_init(s)
     386void ZLIB_INTERNAL _tr_init(s)
    386387    deflate_state *s;
    387388{
     
    868869 * Send a stored block
    869870 */
    870 void _tr_stored_block(s, buf, stored_len, last)
     871void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
    871872    deflate_state *s;
    872873    charf *buf;       /* input block */
     
    893894 * on one bit only.
    894895 */
    895 void _tr_align(s)
     896void ZLIB_INTERNAL _tr_align(s)
    896897    deflate_state *s;
    897898{
     
    922923 * trees or store, and output the encoded block to the zip file.
    923924 */
    924 void _tr_flush_block(s, buf, stored_len, last)
     925void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
    925926    deflate_state *s;
    926927    charf *buf;       /* input block, or NULL if too old */
     
    10231024 * the current block must be flushed.
    10241025 */
    1025 int _tr_tally (s, dist, lc)
     1026int ZLIB_INTERNAL _tr_tally (s, dist, lc)
    10261027    deflate_state *s;
    10271028    unsigned dist;  /* distance of matched string */
  • cpukit/zlib/zlib.h

    rfad4d973 r791d3cdc  
    11/* zlib.h -- interface of the 'zlib' general purpose compression library
    2   version 1.2.4, Mar 14th, 2010
     2  version 1.2.5, April 19th, 2010
    33
    44  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
     
    3838#endif
    3939
    40 #define ZLIB_VERSION "1.2.4"
    41 #define ZLIB_VERNUM 0x1240
     40#define ZLIB_VERSION "1.2.5"
     41#define ZLIB_VERNUM 0x1250
    4242#define ZLIB_VER_MAJOR 1
    4343#define ZLIB_VER_MINOR 2
    44 #define ZLIB_VER_REVISION 4
     44#define ZLIB_VER_REVISION 5
    4545#define ZLIB_VER_SUBREVISION 0
    4646
     
    15571557                                            ZLIB_VERSION, sizeof(z_stream))
    15581558
    1559 #ifdef _LARGEFILE64_SOURCE
     1559/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
     1560 * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
     1561 * both are true, the application gets the *64 functions, and the regular
     1562 * functions are changed to 64 bits) -- in case these are set on systems
     1563 * without large file support, _LFS64_LARGEFILE must also be true
     1564 */
     1565#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
    15601566   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
    1561    ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
    1562    ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
    1563    ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile));
    1564    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t));
    1565    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
     1567   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
     1568   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
     1569   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
     1570   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
     1571   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
    15661572#endif
    15671573
    1568 #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64
     1574#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
    15691575#  define gzopen gzopen64
    15701576#  define gzseek gzseek64
     
    15731579#  define adler32_combine adler32_combine64
    15741580#  define crc32_combine crc32_combine64
    1575 #  ifndef _LARGEFILE64_SOURCE
     1581#  ifdef _LARGEFILE64_SOURCE
    15761582     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
    1577      ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
    1578      ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
    1579      ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
    1580      ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
    1581      ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
     1583     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
     1584     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
     1585     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
     1586     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
     1587     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
    15821588#  endif
    15831589#else
     
    15881594   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
    15891595   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
    1590 #  ifndef _LARGEFILE64_SOURCE
    1591      ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
    1592      ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
    1593      ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
    1594 #  endif
    15951596#endif
    15961597
     1598/* hack for buggy compilers */
    15971599#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
    1598     struct internal_state {int dummy;}; /* hack for buggy compilers */
     1600    struct internal_state {int dummy;};
    15991601#endif
    16001602
     1603/* undocumented functions */
    16011604ZEXTERN const char   * ZEXPORT zError           OF((int));
    16021605ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
  • cpukit/zlib/zutil.c

    rfad4d973 r791d3cdc  
    11/* zutil.c -- target dependent utility functions for the compression library
    2  * Copyright (C) 1995-2005 Jean-loup Gailly.
     2 * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
    33 * For conditions of distribution and use, see copyright notice in zlib.h
    44 */
     
    118118#    define verbose 0
    119119#  endif
    120 int z_verbose = verbose;
    121 
    122 void z_error (m)
     120int ZLIB_INTERNAL z_verbose = verbose;
     121
     122void ZLIB_INTERNAL z_error (m)
    123123    char *m;
    124124{
     
    147147#ifndef HAVE_MEMCPY
    148148
    149 void zmemcpy(dest, source, len)
     149void ZLIB_INTERNAL zmemcpy(dest, source, len)
    150150    Bytef* dest;
    151151    const Bytef* source;
     
    158158}
    159159
    160 int zmemcmp(s1, s2, len)
     160int ZLIB_INTERNAL zmemcmp(s1, s2, len)
    161161    const Bytef* s1;
    162162    const Bytef* s2;
     
    171171}
    172172
    173 void zmemzero(dest, len)
     173void ZLIB_INTERNAL zmemzero(dest, len)
    174174    Bytef* dest;
    175175    uInt  len;
     
    214214 */
    215215
    216 voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
     216voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
    217217{
    218218    voidpf buf = opaque; /* just to make some compilers happy */
     
    238238}
    239239
    240 void zcfree (voidpf opaque, voidpf ptr)
     240void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
    241241{
    242242    int n;
     
    273273#endif
    274274
    275 voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
     275voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
    276276{
    277277    if (opaque) opaque = 0; /* to make compiler happy */
     
    279279}
    280280
    281 void zcfree (voidpf opaque, voidpf ptr)
     281void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
    282282{
    283283    if (opaque) opaque = 0; /* to make compiler happy */
     
    298298#endif
    299299
    300 voidpf zcalloc (opaque, items, size)
     300voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
    301301    voidpf opaque;
    302     uInt items;
    303     uInt size;
     302    unsigned items;
     303    unsigned size;
    304304{
    305305    if (opaque) items += size - size; /* make compiler happy */
     
    308308}
    309309
    310 void zcfree (opaque, ptr)
     310void ZLIB_INTERNAL zcfree (opaque, ptr)
    311311    voidpf opaque;
    312312    voidpf ptr;
  • cpukit/zlib/zutil.h

    rfad4d973 r791d3cdc  
    1414#define ZUTIL_H
    1515
    16 #define ZLIB_INTERNAL
     16#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
     17#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
     18#else
     19#  define ZLIB_INTERNAL
     20#endif
     21
    1722#include "zlib.h"
    1823
     
    2328#  include <string.h>
    2429#  include <stdlib.h>
    25 #endif
    26 
    27 #if defined(UNDER_CE) && defined(NO_ERRNO_H)
    28 #  define zseterrno(ERR) SetLastError((DWORD)(ERR))
    29 #  define zerrno() ((int)GetLastError())
    30 #else
    31 #  ifdef NO_ERRNO_H
    32      extern int errno;
    33 #  else
    34 #    include <errno.h>
    35 #  endif
    36 #  define zseterrno(ERR) do { errno = (ERR); } while (0)
    37 #  define zerrno() errno
    3830#endif
    3931
     
    168160#endif
    169161
    170 #ifdef _LARGEFILE64_SOURCE
    171 #  define z_off64_t off64_t
    172 #else
    173 #  define z_off64_t z_off_t
     162/* provide prototypes for these when building zlib without LFS */
     163#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
     164    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
     165    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
    174166#endif
    175167
     
    182174#ifndef F_OPEN
    183175#  define F_OPEN(name, mode) fopen((name), (mode))
    184 #endif
    185 
    186 #ifdef _LARGEFILE64_SOURCE
    187 #  define F_OPEN64(name, mode) fopen64((name), (mode))
    188 #else
    189 #  define F_OPEN64(name, mode) fopen((name), (mode))
    190176#endif
    191177
     
    251237#  endif
    252238#else
    253    extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
    254    extern int  zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
    255    extern void zmemzero OF((Bytef* dest, uInt len));
     239   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
     240   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
     241   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
    256242#endif
    257243
     
    259245#ifdef DEBUG
    260246#  include <stdio.h>
    261    extern int z_verbose;
    262    extern void z_error    OF((char *m));
     247   extern int ZLIB_INTERNAL z_verbose;
     248   extern void ZLIB_INTERNAL z_error OF((char *m));
    263249#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
    264250#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
     
    277263
    278264
    279 voidpf zcalloc OF((voidpf opaque, uInt items, uInt size));
    280 void   zcfree  OF((voidpf opaque, voidpf ptr));
     265voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
     266                        unsigned size));
     267void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
    281268
    282269#define ZALLOC(strm, items, size) \
Note: See TracChangeset for help on using the changeset viewer.