From 59e1829827c6daa888587f5aaf657dfc177daf3d Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 23 Dec 2002 16:42:16 +0000 Subject: Win32 sux --- include/generic.h | 4 ++-- lib/Handle.cc | 7 +++++-- lib/Input.cc | 1 - lib/Output.cc | 7 +++++-- lib/fileutils.cc | 2 ++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/generic.h b/include/generic.h index 28a3baf..4920beb 100644 --- a/include/generic.h +++ b/include/generic.h @@ -66,7 +66,7 @@ typedef long long int64; typedef unsigned long long uint64; #elif defined _WIN32 typedef _int64 int64; -typedef unsigned _int64 int64; +typedef unsigned _int64 uint64; #else #error Unsupported platform (need 64 bits ints definition) #endif @@ -119,7 +119,7 @@ inline T MIN(T a, T b) { #if defined __linux__ || defined __CYGWIN32__ #define MKDIR(name) mkdir(name, 0777) -#elif defined __WIN32__ +#elif defined __WIN32__ || defined _WIN32 #define MKDIR mkdir #else #error Unknow compiler/platform diff --git a/lib/Handle.cc b/lib/Handle.cc index 07a2752..1941254 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -4,9 +4,12 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#ifdef HAVE_FCNTL_H -#include +#ifdef HAVE_UNISTD_H +#include +#else +#include #endif +#include #include "Handle.h" #include "gettext.h" diff --git a/lib/Input.cc b/lib/Input.cc index 5109d2a..719c560 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/lib/Output.cc b/lib/Output.cc index 99fff7a..2007757 100644 --- a/lib/Output.cc +++ b/lib/Output.cc @@ -6,9 +6,12 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#ifdef HAVE_FCNTL_H -#include +#ifdef HAVE_UNISTD_H +#include +#else +#include #endif +#include #include "Output.h" #include "Exceptions.h" #include "gettext.h" diff --git a/lib/fileutils.cc b/lib/fileutils.cc index 6e3ef17..b637546 100644 --- a/lib/fileutils.cc +++ b/lib/fileutils.cc @@ -26,6 +26,8 @@ #endif #ifdef HAVE_UNISTD_H #include +#else +#include #endif #include "generic.h" -- cgit v1.2.3