Added version check for boolean, TRUE and FALSE settings

This commit is contained in:
Robert Osfield
2017-08-17 10:52:59 +01:00
parent af79ad451e
commit 34b4e70015

View File

@@ -70,12 +70,14 @@ namespace osgDBJPEG
static int jpegerror = ERR_NO_ERROR;
/* Some versions of jmorecfg.h define boolean, some don't...
Those that do also define HAVE_BOOLEAN, so we can guard using that. */
#ifndef HAVE_BOOLEAN
typedef int boolean;
#define FALSE 0
#define TRUE 1
#if JPEG_LIB_VERSION < 90
/* Some versions of jmorecfg.h define boolean, some don't...
Those that do also define HAVE_BOOLEAN, so we can guard using that. */
#ifndef HAVE_BOOLEAN
typedef int boolean;
#define FALSE 0
#define TRUE 1
#endif
#endif
/* CODE FOR READING/WRITING JPEG FROM STREAMS