From 445fb07281859322b4b76b0a92dda2ccea430947 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 10 Mar 2003 21:06:58 +0000 Subject: Fixing mingw32 --- lib/Handle.cc | 9 ++++++--- lib/Makefile.sol.mingw | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3