From: divverent Date: Sun, 12 Feb 2012 08:14:26 +0000 (+0000) Subject: fix jump buffer type X-Git-Tag: xonotic-v0.8.0~96^2~332 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=50c0fce741481cf340d6bb2d3224210c120220a8;p=xonotic%2Fdarkplaces.git fix jump buffer type git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11682 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/image_png.c b/image_png.c index e498b9e5..3965a50e 100644 --- a/image_png.c +++ b/image_png.c @@ -30,6 +30,21 @@ #include "image.h" #include "image_png.h" +/* +#ifdef __cplusplus +#ifdef WIN64 +typedef _JBTYPE *qpng_jmpbuf_t; +#elif defined(MACOSX) || defined(WIN32) +typedef int *qpng_jmpbuf_t; +#else +typedef __jmp_buf_tag *qpng_jmpbuf_t; +#endif +#else +typedef void *qpng_jmpbuf_t; +#endif +*/ +typedef jmp_buf qpng_jmpbuf_t; + static void (*qpng_set_sig_bytes) (void*, int); static int (*qpng_sig_cmp) (const unsigned char*, size_t, size_t); static void* (*qpng_create_read_struct) (const char*, void*, void(*)(void *png, const char *message), void(*)(void *png, const char *message)); @@ -63,7 +78,7 @@ static unsigned int (*qpng_access_version_number) (void); // FIXME is this re static void (*qpng_write_info) (void*, void*); static void (*qpng_write_row) (void*, unsigned char*); static void (*qpng_write_end) (void*, void*); -static void* (*qpng_jmpbuf) (void*); +static qpng_jmpbuf_t (*qpng_jmpbuf) (void*); static dllfunction_t pngfuncs[] = {