diff options
| -rw-r--r-- | include/Handle.h | 2 | ||||
| -rw-r--r-- | lib/Handle.cc | 9 | ||||
| -rw-r--r-- | lib/Makefile.sol.mingw | 2 | 
3 files changed, 8 insertions, 5 deletions
diff --git a/include/Handle.h b/include/Handle.h index 23ecfe6..5d0bdee 100644 --- a/include/Handle.h +++ b/include/Handle.h @@ -48,7 +48,7 @@ class Handle : public Base {      int h;      bool closed, nonblock;      gzFile zfile; -    zstream zstrm; +    z_stream zstrm;      int z, c;  }; diff --git a/lib/Handle.cc b/lib/Handle.cc index 7bd9e37..68f4a7a 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -21,8 +21,9 @@  #include "gettext.h"  enum { -    DEFLATE, INFLATE; -} +    DEFLATE, +    INFLATE +};  Handle::Handle(const Handle & nh) : itell(0), h(nh.h >= 0 ? dup(nh.h) : nh.h), closed(nh.closed), nonblock(nh.closed), zfile(0), z(0)  { @@ -452,8 +453,10 @@ void Handle::Flush() {      if (z >= 10) {      } else if (z) { -	gzflush(z); +	gzflush(&z, Z_FULL_FLUSH);      } else { +#ifdef HAVE_FSYNC  	fsync(h); +#endif      }  } diff --git a/lib/Makefile.sol.mingw b/lib/Makefile.sol.mingw index d4685e5..f9a9c71 100644 --- a/lib/Makefile.sol.mingw +++ b/lib/Makefile.sol.mingw @@ -2,7 +2,7 @@ CC = i586-mingw32msvc-gcc  CXX = i586-mingw32msvc-g++  AR = i586-mingw32msvc-ar  RANLIB = i586-mingw32msvc-ranlib -CPPFLAGS = -I../include -DFORCE64 -O3 -mwindows -D_REENTRANT -I/usr/local/win32/include -I../../extra/regex +CPPFLAGS = -I../include -DFORCE64 -O3 -mwindows -D_REENTRANT -I/usr/local/win32/include -I../../extra/regex -DHAVE_UNISTD_H  OBJECTS = Buffer.o Exceptions.o Handle.o Image.o Input.o Main.o Output.o \    Regex.o String.o checkargs.o datecalc.o fileutils.o generic.o  TARGET = Baltisot-sol.a  | 
