Skip to content
Snippets Groups Projects
  1. Oct 26, 2013
  2. Oct 25, 2013
  3. Oct 22, 2013
  4. Oct 02, 2013
  5. Sep 17, 2013
  6. Sep 11, 2013
  7. Sep 09, 2013
    • Lasse Collin's avatar
      Build: Create liblzma.pc in a src/liblzma/Makefile.am. · 72975df6
      Lasse Collin authored
      Previously it was done in configure, but doing that goes
      against the Autoconf manual. Autoconf requires that it is
      possible to override e.g. prefix after running configure
      and that doesn't work correctly if liblzma.pc is created
      by configure.
      
      A potential downside of this change is that now e.g.
      libdir in liblzma.pc is a standalone string instead of
      being defined via ${prefix}, so if one overrides prefix
      when running pkg-config the libdir won't get the new value.
      I don't know if this matters in practice.
      
      Thanks to Vincent Torri.
      72975df6
  8. Aug 04, 2013
  9. Aug 03, 2013
  10. Jul 15, 2013
  11. Jul 04, 2013
    • Lasse Collin's avatar
      xz: Add preliminary support for --flush-timeout=TIMEOUT. · dee6ad3d
      Lasse Collin authored
      When --flush-timeout=TIMEOUT is used, xz will use
      LZMA_SYNC_FLUSH if read() would block and at least
      TIMEOUT milliseconds has elapsed since the previous flush.
      
      This can be useful in realtime-like use cases where the
      data is simultanously decompressed by another process
      (possibly on a different computer). If new uncompressed
      input data is produced slowly, without this option xz could
      buffer the data for a long time until it would become
      decompressible from the output.
      
      If TIMEOUT is 0, the feature is disabled. This is the default.
      
      This commit affects the compression side. Using xz for
      the decompression side for the above purpose doesn't work
      yet so well because there is quite a bit of input and
      output buffering when decompressing.
      
      The --long-help or man page were not updated yet.
      The details of this feature may change.
      dee6ad3d
    • Lasse Collin's avatar
    • Lasse Collin's avatar
      xz: Fix the test when to read more input. · ea00545b
      Lasse Collin authored
      Testing for end of file was no longer correct after full flushing
      became possible with --block-size=SIZE and --block-list=SIZES.
      There was no bug in practice though because xz just made a few
      unneeded zero-byte reads.
      ea00545b
    • Lasse Collin's avatar
      xz: Move some of the timing code into mytime.[hc]. · 736903c6
      Lasse Collin authored
      This switches units from microseconds to milliseconds.
      
      New clock_gettime(CLOCK_MONOTONIC) will be used if available.
      There is still a fallback to gettimeofday().
      736903c6
  12. Jul 01, 2013
  13. Jun 30, 2013
  14. Jun 29, 2013
    • Lasse Collin's avatar
      xz: Use non-blocking I/O for the output file. · cdba9ddd
      Lasse Collin authored
      Now both reading and writing should be without
      race conditions with signals.
      
      They might still be signal handling issues left.
      Signals are blocked during many operations to avoid
      EINTR but it may cause problems e.g. if writing to
      stderr blocks when trying to display an error message.
      cdba9ddd
  15. Jun 28, 2013
    • Lasse Collin's avatar
      xz: Fix return value type in io_write_buf(). · e61a5c95
      Lasse Collin authored
      It didn't affect the behavior of the code since -1
      becomes true anyway.
      e61a5c95
    • Lasse Collin's avatar
      xz: Use the self-pipe trick to avoid a race condition with signals. · 9dc319ea
      Lasse Collin authored
      It is possible that a signal to set user_abort arrives right
      before a blocking system call is made. In this case the call
      may block until another signal arrives, while the wanted
      behavior is to make xz clean up and exit as soon as possible.
      
      After this commit, the race condition is avoided with the
      input side which already uses non-blocking I/O. The output
      side still uses blocking I/O and thus has the race condition.
      9dc319ea
    • Lasse Collin's avatar
      3541bc79
    • Lasse Collin's avatar
      xz: Remove an outdated NetBSD-specific comment. · 78673a08
      Lasse Collin authored
      Nowadays errno == EFTYPE is documented in open(2).
      78673a08
    • Lasse Collin's avatar
      xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls. · a616fdad
      Lasse Collin authored
      POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on
      error and "other than -1" on success. This is how it is
      documented e.g. on OpenBSD too. On Linux, success with
      F_SETFL is always 0 (at least accorinding to fcntl(2)
      from man-pages 3.51).
      a616fdad
    • Lasse Collin's avatar
      xz: Fix use of wrong variable in a fcntl() call. · 4a08a6e4
      Lasse Collin authored
      Due to a wrong variable name, when writing a sparse file
      to standard output, *all* file status flags were cleared
      (to the extent the operating system allowed it) instead of
      only clearing the O_APPEND flag. In practice this worked
      fine in the common situations on GNU/Linux, but I didn't
      check how it behaved elsewhere.
      
      The original flags were still restored correctly. I still
      changed the code to use a separate boolean variable to
      indicate when the flags should be restored instead of
      relying on a special value in stdout_flags.
      4a08a6e4
    • Lasse Collin's avatar
      xz: Fix assertion related to posix_fadvise(). · b790b435
      Lasse Collin authored
      Input file can be a FIFO or something else that doesn't
      support posix_fadvise() so don't check the return value
      even with an assertion. Nothing bad happens if the call
      to posix_fadvise() fails.
      b790b435
  16. Jun 26, 2013
    • Lasse Collin's avatar
      xz: Check the value of lzma_stream_flags.version in --list. · 84d2da6c
      Lasse Collin authored
      It is a no-op for now, but if an old xz version is used
      together with a newer liblzma that supports something new,
      then this check becomes important and will stop the old xz
      from trying to parse files that it won't understand.
      84d2da6c
    • Lasse Collin's avatar
      Build: Require Automake 1.12 and use serial-tests option. · 9376f5f8
      Lasse Collin authored
      It should actually still work with Automake 1.10 if
      the serial-tests option is removed. Automake 1.13 started
      using parallel tests by default and the option to get
      the old behavior isn't supported before 1.12.
      
      At least for now, parallel tests don't improve anything
      in XZ Utils but they hide the progress output from
      test_compress.sh.
      9376f5f8
  17. Jun 23, 2013
Loading