diff options
author | Tor Andersson <tor@ghostscript.com> | 2004-10-05 11:17:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2004-10-05 11:17:23 +0200 |
commit | 3566056843acebe667317eea8749e274891cf31d (patch) | |
tree | fc2742614da57b13d2b605c1ff4ffc4499c5fd27 | |
parent | 7edeed5a4fae0199a65dc724c2c131d4d120bf28 (diff) | |
download | mupdf-3566056843acebe667317eea8749e274891cf31d.tar.xz |
more win32 fixes
-rw-r--r-- | base/hash.c | 2 | ||||
-rw-r--r-- | include/fitz/base.h | 2 | ||||
-rw-r--r-- | include/fitz/sysdep.h | 26 |
3 files changed, 13 insertions, 17 deletions
diff --git a/base/hash.c b/base/hash.c index 4b85b6b3..24d49ab5 100644 --- a/base/hash.c +++ b/base/hash.c @@ -32,7 +32,7 @@ struct fz_hashtable_s static unsigned hash(unsigned char *s, int len) { unsigned hash = 0; - unsigned i; + int i; for (i = 0; i < len; i++) { hash += s[i]; diff --git a/include/fitz/base.h b/include/fitz/base.h index c255efe9..26a23be5 100644 --- a/include/fitz/base.h +++ b/include/fitz/base.h @@ -35,7 +35,7 @@ struct fz_error_s #define fz_outofmem (&fz_koutofmem) extern fz_error fz_koutofmem; -#ifdef __WIN32__ +#ifdef WIN32 #define fz_throw fz_throwMS fz_error *fz_throwMS(char *fmt, ...); #else diff --git a/include/fitz/sysdep.h b/include/fitz/sysdep.h index 39221272..f3125601 100644 --- a/include/fitz/sysdep.h +++ b/include/fitz/sysdep.h @@ -11,32 +11,28 @@ #include <float.h> /* DBL_EPSILON */ #include <math.h> +#ifdef WIN32 +#define NEED_STRLCPY +#define NEED_STRSEP +#define NEED_GETOPT +#define M_PI 3.14159265358979323846 +#define inline __inline +#define vsnprintf _vsnprintf +#endif + #include <errno.h> +#ifndef WIN32 #include <unistd.h> +#endif #include <fcntl.h> /* O_RDONLY & co */ /* not supposed to be here, but printf debugging sorta needs it */ #include <stdio.h> -typedef unsigned char fz_u8; -typedef signed char fz_s8; -typedef unsigned short fz_u16; -typedef signed short fz_s16; -typedef unsigned long fz_u32; -typedef signed long fz_s32; -typedef unsigned long long fz_u64; -typedef signed long long fz_s64; - /* * Extras! Extras! Get them while they're hot! */ -#ifdef __WIN32__ -#define NEED_STRLCPY -#define NEED_STRSEP -#define NEED_GETOPT -#endif - #ifdef NEED_STRLCPY extern int strlcpy(char *dst, const char *src, int n); extern int strlcat(char *dst, const char *src, int n); |