diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-03-25 20:28:20 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-03-25 20:28:32 +0100 |
commit | ecfb80367e891394f5bc0eaf52523b7fc71ab878 (patch) | |
tree | 3d3be1a862ddb5f6369bfa6aa813673339c555dd /include | |
parent | 680156458242c87bfa9f3013cc5d23308409e8de (diff) | |
download | mupdf-ecfb80367e891394f5bc0eaf52523b7fc71ab878.tar.xz |
Add va_copy/va_copy_end macros to support both C89 and C99.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/system.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h index 41f45245..bf339eb4 100644 --- a/include/mupdf/fitz/system.h +++ b/include/mupdf/fitz/system.h @@ -63,6 +63,15 @@ #ifdef _MSC_VER /* Microsoft Visual C */ +/* MSVC up to VS2012 */ +#if _MSC_VER < 1800 +#define va_copy(a, oa) do { a=oa; } while (0) +#define va_copy_end(a) do {} while(0) +#define strtof(a,b) ((float)strtod((a),(b))) +#else +#define va_copy_end(a) va_end(a) +#endif + typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; @@ -110,9 +119,10 @@ void fz_free_argv(int argc, char **argv); #ifndef O_BINARY #define O_BINARY 0 - #endif +#define va_copy_end(a) va_end(a) + #endif #ifdef __ANDROID__ |