Define HAVE_BOOLEAN on Windows

Without this define newer versions of jpeg define a type "bool" as char,
while the MinGW headers define it as "unsigned short". Automake should
have detected that, but...
This commit is contained in:
Yamagi Burmeister 2014-01-27 17:28:59 +01:00
parent 93b38c6312
commit 5e1419e6ba

View file

@ -28,6 +28,10 @@
#include "../header/local.h"
#ifdef _WIN32
#define HAVE_BOOLEAN
#endif
#ifdef __APPLE__
#include <libjpeg/jpeglib.h>
#include <libjpeg/jerror.h>
@ -36,9 +40,7 @@
#include <jerror.h>
#endif
void jpeg_memory_src(j_decompress_ptr cinfo,
unsigned char *inbuffer,
unsigned long insize);
void jpeg_memory_src(j_decompress_ptr cinfo, unsigned char *inbuffer, unsigned long insize);
void
jpg_null(j_decompress_ptr cinfo)
@ -62,10 +64,8 @@ jpg_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
void
jpeg_mem_src(j_decompress_ptr cinfo, unsigned char *mem, unsigned long len)
{
cinfo->src =
(struct jpeg_source_mgr *)(*cinfo->mem->alloc_small)((j_common_ptr)
cinfo,
JPOOL_PERMANENT, sizeof(struct jpeg_source_mgr));
cinfo->src = (struct jpeg_source_mgr *)(*cinfo->mem->alloc_small)((j_common_ptr)
cinfo, JPOOL_PERMANENT, sizeof(struct jpeg_source_mgr));
cinfo->src->init_source = jpg_null;
cinfo->src->fill_input_buffer = jpg_fill_input_buffer;
cinfo->src->skip_input_data = jpg_skip_input_data;