Blame os_types.h

Packit 3f21c4
/* Copyright (C) 2001-2012 Artifex Software, Inc.
Packit 3f21c4
   All Rights Reserved.
Packit 3f21c4
Packit 3f21c4
   This software is provided AS-IS with no warranty, either express or
Packit 3f21c4
   implied.
Packit 3f21c4
Packit 3f21c4
   This software is distributed under license and may not be copied,
Packit 3f21c4
   modified or distributed except as expressly authorized under the terms
Packit 3f21c4
   of the license contained in the file LICENSE in this distribution.
Packit 3f21c4
Packit 3f21c4
   Refer to licensing information at http://www.artifex.com or contact
Packit 3f21c4
   Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
Packit 3f21c4
   CA  94903, U.S.A., +1(415)492-9861, for further information.
Packit 3f21c4
*/
Packit 3f21c4
Packit 3f21c4
/*
Packit 3f21c4
    jbig2dec
Packit 3f21c4
*/
Packit 3f21c4
Packit 3f21c4
/*
Packit 3f21c4
   indirection layer for build and platform-specific definitions
Packit 3f21c4
Packit 3f21c4
   in general, this header should ensure that the stdint types are
Packit 3f21c4
   available, and that any optional compile flags are defined if
Packit 3f21c4
   the build system doesn't pass them directly.
Packit 3f21c4
*/
Packit 3f21c4
Packit 3f21c4
#ifndef _JBIG2_OS_TYPES_H
Packit 3f21c4
#define _JBIG2_OS_TYPES_H
Packit 3f21c4
Packit 3f21c4
#if defined(__CYGWIN__) && !defined(HAVE_STDINT_H)
Packit 3f21c4
# include <sys/types.h>
Packit 3f21c4
# if defined(OLD_CYGWIN_SYS_TYPES)
Packit 3f21c4
/*
Packit 3f21c4
 * Old versions of Cygwin have no stdint.h but define "MS types". Some of
Packit 3f21c4
 * them conflict with a standard type emulation provided by config_types.h
Packit 3f21c4
 * so we do a fixup here.
Packit 3f21c4
 */
Packit 3f21c4
typedef u_int8_t uint8_t;
Packit 3f21c4
typedef u_int16_t uint16_t;
Packit 3f21c4
typedef u_int32_t uint32_t;
Packit 3f21c4
#endif
Packit 3f21c4
#elif defined(HAVE_CONFIG_H)
Packit 3f21c4
# include "config_types.h"
Packit 3f21c4
#elif defined(_WIN32) || defined(__WIN32__)
Packit 3f21c4
# include "config_win32.h"
Packit 3f21c4
#elif defined (STD_INT_USE_SYS_TYPES_H)
Packit 3f21c4
# include <sys/types.h>
Packit 3f21c4
#elif defined (STD_INT_USE_INTTYPES_H)
Packit 3f21c4
# include <inttypes.h>
Packit 3f21c4
#elif defined (STD_INT_USE_SYS_INTTYPES_H)
Packit 3f21c4
# include <sys/inttypes.h>
Packit 3f21c4
#elif defined (STD_INT_USE_SYS_INT_TYPES_H)
Packit 3f21c4
# include <sys/int_types.h>
Packit 3f21c4
#elif !defined(HAVE_STDINT_H)
Packit 3f21c4
typedef unsigned char uint8_t;
Packit 3f21c4
typedef unsigned short uint16_t;
Packit 3f21c4
typedef unsigned int uint32_t;
Packit 3f21c4
typedef signed char int8_t;
Packit 3f21c4
typedef signed short int16_t;
Packit 3f21c4
typedef signed int int32_t;
Packit 3f21c4
#endif
Packit 3f21c4
Packit 3f21c4
#if defined(HAVE_STDINT_H) || defined(__MACOS__)
Packit 3f21c4
# include <stdint.h>
Packit 3f21c4
#elif defined(__VMS) || defined(__osf__)
Packit 3f21c4
# include <inttypes.h>
Packit 3f21c4
#endif
Packit 3f21c4
Packit 3f21c4
#ifdef __hpux
Packit 3f21c4
#include <sys/_inttypes.h>
Packit 3f21c4
#endif
Packit 3f21c4
Packit 3f21c4
#endif /* _JBIG2_OS_TYPES_H */