One more attempt to fix the AIX bug

http://bugzilla.remotesensing.org/show_bug.cgi?id=39
This commit is contained in:
Andrey Kiselev 2005-07-26 10:33:57 +00:00
parent 2b387c08da
commit 356fb99cb6
3 changed files with 51 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* $Id: tiff.h,v 1.37 2005-06-23 11:01:55 dron Exp $ */
/* $Id: tiff.h,v 1.38 2005-07-26 10:33:57 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -26,6 +26,9 @@
#ifndef _TIFF_
#define _TIFF_
#include "tiffconf.h"
/*
* Tag Image File Format (TIFF)
*
@ -48,24 +51,6 @@
#define TIFF_BIGENDIAN 0x4d4d
#define TIFF_LITTLEENDIAN 0x4949
/*
* The so called TIFF types conflict with definitions from inttypes.h
* included from sys/types.h on AIX (at least using VisualAge compiler).
* We try to work around this by detecting this case. Defining
* _TIFF_DATA_TYPEDEFS_ short circuits the later definitions in tiff.h, and
* we will in the holes not provided for by inttypes.h.
*
* See http://bugzilla.remotesensing.org/show_bug.cgi?id=39
*/
#if defined(_H_INTTYPES) && defined(_ALL_SOURCE) && defined(USING_VISUALAGE)
#define _TIFF_DATA_TYPEDEFS_
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
#endif
/*
* Intrinsic data types required by the file format:
*
@ -74,23 +59,27 @@ typedef unsigned int uint32;
* 32-bit quantities int32/uint32
* strings unsigned char*
*/
#ifndef _TIFF_DATA_TYPEDEFS_
#define _TIFF_DATA_TYPEDEFS_
#ifndef HAVE_INT8
typedef signed char int8; /* NB: non-ANSI compilers may not grok */
#endif
typedef unsigned char uint8;
#ifndef HAVE_INT16
typedef short int16;
#endif
typedef unsigned short uint16; /* sizeof (uint16) must == 2 */
#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__) || defined(__sparcv9)
#if SIZEOF_INT == 4
#ifndef HAVE_INT32
typedef int int32;
#endif
typedef unsigned int uint32; /* sizeof (uint32) must == 4 */
#else
#elif SIZEOF_LONG == 4
#ifndef HAVE_INT32
typedef long int32;
#endif
typedef unsigned long uint32; /* sizeof (uint32) must == 4 */
#endif
#endif /* _TIFF_DATA_TYPEDEFS_ */
/* For TIFFReassignTagToIgnore */
enum TIFFIgnoreSense /* IGNORE tag table */
{

View File

@ -6,6 +6,23 @@
#ifndef _TIFFCONF_
#define _TIFFCONF_
/* Define to 1 if the system has the type `int16'. */
#undef HAVE_INT16
/* Define to 1 if the system has the type `int32'. */
#undef HAVE_INT32
/* Define to 1 if the system has the type `int8'. */
#undef HAVE_INT8
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* Compatibility stuff. */
/* Define as 0 or 1 according to the floating point format suported by the
machine */
#undef HAVE_IEEEFP

View File

@ -7,6 +7,23 @@
#ifndef _TIFFCONF_
#define _TIFFCONF_
/* Define to 1 if the system has the type `int16'. */
/* #undef HAVE_INT16 */
/* Define to 1 if the system has the type `int32'. */
/* #undef HAVE_INT32 */
/* Define to 1 if the system has the type `int8'. */
/* #undef HAVE_INT8 */
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* Compatibility stuff. */
/* Define as 0 or 1 according to the floating point format suported by the
machine */
#define HAVE_IEEEFP 1
@ -22,7 +39,7 @@
#define CCITT_SUPPORT 1
/* Support JPEG compression (requires IJG JPEG library) */
#undef JPEG_SUPPORT
/* #undef JPEG_SUPPORT */
/* Support LogLuv high dynamic range encoding */
#define LOGLUV_SUPPORT 1
@ -41,13 +58,13 @@
#define PACKBITS_SUPPORT 1
/* Support Pixar log-format algorithm (requires Zlib) */
#define PIXARLOG_SUPPORT 1
/* #undef PIXARLOG_SUPPORT */
/* Support ThunderScan 4-bit RLE algorithm */
#define THUNDER_SUPPORT 1
/* Support Deflate compression */
#undef ZIP_SUPPORT
/* #undef ZIP_SUPPORT */
/* Support strip chopping (whether or not to convert single-strip uncompressed
images to mutiple strips of ~8Kb to reduce memory usage) */