summaryrefslogtreecommitdiff
path: root/lib/fribidi-types.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fribidi-types.h')
-rw-r--r--lib/fribidi-types.h96
1 files changed, 20 insertions, 76 deletions
diff --git a/lib/fribidi-types.h b/lib/fribidi-types.h
index f95742a..de144c4 100644
--- a/lib/fribidi-types.h
+++ b/lib/fribidi-types.h
@@ -33,87 +33,31 @@
#ifndef _FRIBIDI_TYPES_H
#define _FRIBIDI_TYPES_H
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "fribidi-common.h"
#include "fribidi-begindecls.h"
-# if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
-# ifndef __FRIBIDI_DOC
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# elif HAVE_STDINT_H
-# include <stdint.h>
-# endif /* !HAVE_STDINT_H */
-# endif /* !__FRIBIDI_DOC */
-# define FRIBIDI_INT8_LOCAL int8_t
-# define FRIBIDI_INT16_LOCAL int16_t
-# define FRIBIDI_INT32_LOCAL int32_t
-# define FRIBIDI_UINT8_LOCAL uint8_t
-# define FRIBIDI_UINT16_LOCAL uint16_t
-# define FRIBIDI_UINT32_LOCAL uint32_t
-# else /* no int types */
-# define FRIBIDI_INT8_LOCAL signed char
-# define FRIBIDI_UINT8_LOCAL unsigned char
-# if !defined(FRIBIDI_SIZEOF_INT) || FRIBIDI_SIZEOF_INT >= 4
-# define FRIBIDI_INT16_LOCAL signed short
-# define FRIBIDI_UINT16_LOCAL unsigned short
-# define FRIBIDI_INT32_LOCAL signed int
-# define FRIBIDI_UINT32_LOCAL unsigned int
-# else /* SIZEOF_INT < 4 */
-# define FRIBIDI_INT16_LOCAL signed int
-# define FRIBIDI_UINT16_LOCAL unsigned int
-# define FRIBIDI_INT32_LOCAL signed long
-# define FRIBIDI_UINT32_LOCAL unsigned long
-# endif /* SIZEOF_INT < 4 */
-# endif /* no int types */
-# define FRIBIDI_BOOLEAN_LOCAL int
-# if SIZEOF_WCHAR_T >= 4
-# ifndef __FRIBIDI_DOC
-# if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-# else /* !STDC_HEADERS */
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif /* !HAVE_STDLIB_H */
-# endif /* !STDC_HEADERS */
-# endif /* !__FRIBIDI_DOC */
-# define FRIBIDI_UNICHAR_LOCAL wchar_t
-# else /* SIZEOF_WCHAR_T < 4 */
-# define FRIBIDI_UNICHAR_LOCAL fribidi_uint32
-# endif /* SIZEOF_WCHAR_T < 4 */
-
-#if FRIBIDI_INT_TYPES+0
-#else
-# define FRIBIDI_INT8 FRIBIDI_INT8_LOCAL
-# define FRIBIDI_INT16 FRIBIDI_INT16_LOCAL
-# define FRIBIDI_INT32 FRIBIDI_INT32_LOCAL
-# define FRIBIDI_UINT8 FRIBIDI_UINT8_LOCAL
-# define FRIBIDI_UINT16 FRIBIDI_UINT16_LOCAL
-# define FRIBIDI_UINT32 FRIBIDI_UINT32_LOCAL
-#endif /* !FRIBIDI_INT_TYPES */
-#ifndef FRIBIDI_BOOLEAN
-# define FRIBIDI_BOOLEAN FRIBIDI_BOOLEAN_LOCAL
-#endif /* !FRIBIDI_BOOLEAN */
-#ifndef FRIBIDI_UNICHAR
-# define FRIBIDI_UNICHAR FRIBIDI_UNICHAR_LOCAL
-#endif /* !FRIBIDI_UNICHAR */
-#ifndef FRIBIDI_STR_INDEX
-# define FRIBIDI_STR_INDEX int
-#endif /* FRIBIDI_STR_INDEX */
-
-
-typedef FRIBIDI_INT8 fribidi_int8;
-typedef FRIBIDI_INT16 fribidi_int16;
-typedef FRIBIDI_INT32 fribidi_int32;
-typedef FRIBIDI_UINT8 fribidi_uint8;
-typedef FRIBIDI_UINT16 fribidi_uint16;
-typedef FRIBIDI_UINT32 fribidi_uint32;
-typedef FRIBIDI_BOOLEAN fribidi_boolean;
-
-typedef FRIBIDI_UNICHAR FriBidiChar;
-typedef FRIBIDI_STR_INDEX FriBidiStrIndex;
+#ifndef __FRIBIDI_DOC
+# if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
+ defined (_sgi) || defined (__sun) || defined (sun) || \
+ defined (__digital__) || defined (__HP_cc)
+# include <inttypes.h>
+# elif defined (_AIX)
+# include <sys/inttypes.h>
+# else
+# include <stdint.h>
+# endif
+#endif
+
+typedef int fribidi_boolean;
+
+typedef uint32_t FriBidiChar;
+typedef int FriBidiStrIndex;
/* The MSB is used to indicate an opening bracket */
typedef FriBidiChar FriBidiBracketType;