summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Handle.cc9
-rw-r--r--lib/Makefile.sol.mingw2
2 files changed, 7 insertions, 4 deletions
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