diff options
author | Tor Andersson <tor@ghostscript.com> | 2004-10-12 08:37:25 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2004-10-12 08:37:25 +0200 |
commit | 4ee01bbc747ce85b5ccfeed3e934dfb76fb14482 (patch) | |
tree | cde2ab7ff286056127ca4d7929ece9dc0b0216ca /include/fitz/sysdep.h | |
parent | 358811630686460d6b0a96021a1bcb4c3124fb03 (diff) | |
download | mupdf-4ee01bbc747ce85b5ccfeed3e934dfb76fb14482.tar.xz |
merged seokgyos win32 fixes
Diffstat (limited to 'include/fitz/sysdep.h')
-rw-r--r-- | include/fitz/sysdep.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/include/fitz/sysdep.h b/include/fitz/sysdep.h index f3125601..7f7ddbca 100644 --- a/include/fitz/sysdep.h +++ b/include/fitz/sysdep.h @@ -11,28 +11,50 @@ #include <float.h> /* DBL_EPSILON */ #include <math.h> +#include <errno.h> +#include <fcntl.h> /* O_RDONLY & co */ + #ifdef WIN32 + #define NEED_STRLCPY #define NEED_STRSEP #define NEED_GETOPT + +#define M_E 2.71828182845904523536 +#define M_LOG2E 1.44269504088896340736 +#define M_LOG10E 0.434294481903251827651 +#define M_LN2 0.693147180559945309417 +#define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.785398163397448309616 +#define M_1_PI 0.318309886183790671538 +#define M_2_PI 0.636619772367581343076 +#define M_1_SQRTPI 0.564189583547756286948 +#define M_2_SQRTPI 1.12837916709551257390 +#define M_SQRT2 1.41421356237309504880 +#define M_SQRT_2 0.707106781186547524401 + +#define va_copy(a,b) (a) = (b) #define inline __inline #define vsnprintf _vsnprintf -#endif -#include <errno.h> -#ifndef WIN32 +#include <io.h> + +#else + +#define O_BINARY 0 #include <unistd.h> -#endif -#include <fcntl.h> /* O_RDONLY & co */ -/* not supposed to be here, but printf debugging sorta needs it */ -#include <stdio.h> +#endif /* * Extras! Extras! Get them while they're hot! */ +/* not supposed to be here, but printf debugging sorta needs it */ +#include <stdio.h> + #ifdef NEED_STRLCPY extern int strlcpy(char *dst, const char *src, int n); extern int strlcat(char *dst, const char *src, int n); |