Skip to content
Snippets Groups Projects
  1. Apr 14, 2019
  2. Feb 16, 2017
    • Mark Adler's avatar
      Avoid a conversion error in gzseek when off_t type too small. · a3622937
      Mark Adler authored
      This is a problem in the odd case that the second argument of
      LSEEK is a larger type than off_t. Apparently MinGW defines off_t
      to be 32 bits, but _lseeki64 has a 64-bit second argument.
      
      Also undo a previous commit to permit MinGW to use _lseeki64.
      a3622937
  3. Jan 15, 2017
  4. Jan 02, 2017
  5. Jan 01, 2017
  6. Dec 04, 2016
    • Mark Adler's avatar
      Create z_size_t and z_ssize_t types. · ca50ebd4
      Mark Adler authored
      Normally these are set to size_t and ssize_t. But if they do not
      exist, then they are set to the smallest integer type that can
      contain a pointer. size_t is unsigned and ssize_t is signed.
      ca50ebd4
    • Mark Adler's avatar
      Clean up gz* function return values. · 123f9cfa
      Mark Adler authored
      In some cases the return values did not match the documentation,
      or the documentation did not document all of the return values.
      gzprintf() now consistently returns negative values on error,
      which matches the behavior of the stdio fprintf() function.
      123f9cfa
  7. Jan 30, 2016
  8. Aug 02, 2015
  9. Jul 06, 2015
  10. Apr 24, 2014
    • Mark Adler's avatar
      Assure that gzoffset() is correct when appending. · 72c70060
      Mark Adler authored
      An open() with O_APPEND followed by an lseek() to determine the
      position will return zero for a non-empty file, even though the
      next write will start at the end of the file.  This commit works
      around that by doing an lseek() to the end when appending.
      72c70060
  11. Mar 25, 2013
  12. Mar 24, 2013
  13. Aug 13, 2012
    • Mark Adler's avatar
      Clean up the usage of z_const and respect const usage within zlib. · 62d6112a
      Mark Adler authored
      This patch allows zlib to compile cleanly with the -Wcast-qual gcc
      warning enabled, but only if ZLIB_CONST is defined, which adds
      const to next_in and msg in z_stream and in the in_func prototype.
      A --const option is added to ./configure which adds -DZLIB_CONST
      to the compile flags, and adds -Wcast-qual to the compile flags
      when ZLIBGCCWARN is set in the environment.
      62d6112a
  14. May 23, 2012
  15. May 03, 2012
    • Mark Adler's avatar
      Replace use of unsafe string functions with snprintf if available. · c58f7ab2
      Mark Adler authored
      This avoids warnings in OpenBSD that apparently can't be turned
      off whenever you link strcpy, strcat, or sprintf.  When snprintf
      isn't available, the use of the "unsafe" string functions has
      always in fact been safe, since the lengths are all checked before
      those functions are called.
      
      We do not use strlcpy or strlcat, since they are not (yet) found on
      all systems.  snprintf on the other hand is part of the C standard
      library and is very common.
      c58f7ab2
  16. Mar 18, 2012
  17. Mar 17, 2012
  18. Mar 11, 2012
  19. Mar 10, 2012
  20. Mar 04, 2012
  21. Mar 03, 2012
  22. Dec 19, 2011
  23. Dec 12, 2011
    • Mark Adler's avatar
      Fix gzeof() to behave just like feof() when read is not past end of file. · 98f5779f
      Mark Adler authored
      Before, gzeof() would return true (accurately) when the last read request
      went just up to the end of the uncompressed data.  In the analogous case,
      feof() would return false, only returning true when a read request goes
      past the end of the file.  This patch corrects gzeof() to behave in the
      same way as feof(), as noted in the zlib.h documentation.
      98f5779f
  24. Oct 02, 2011
  25. Oct 01, 2011
  26. Sep 27, 2011
  27. Sep 26, 2011
    • Mark Adler's avatar
      Allow gzread() and related to continue after gzclearerr(). · 5ad116ab
      Mark Adler authored
      Before this fix, gzread() would lose data if a premature end of file
      was encountered.  This prevented gzread() from being used on a file
      that was being written concurrently.  Now gzread() returns all of the
      data it has available before indicating a premature end of file.
      
      This also changes the error returned on a premature end of file from
      Z_DATA_ERROR to Z_BUF_ERROR.  This allows the user to determine if
      the error is recoverable, which it is if Z_BUF_ERROR is returned.  If
      a Z_DATA_ERROR is returned, then the error is not recoverable.
      
      This patch replaces the functionality of a previous patch that fixed
      reading through an empty gzip stream in a concatenation of gzip
      streams.
      
      To implement this fix, a noticeable rewrite of gzread.c was needed.
      The patch has the added advantage of using inflate's gzip processing
      instead of replicating the functionality in gzread.c.  This makes the
      gz code a little simpler.
      5ad116ab
  28. Sep 11, 2011
  29. Sep 10, 2011
Loading