libkate
0.3.8
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
include
kate
kate_config.h
1
/* Copyright (C) 2008 Vincent Penquerc'h.
2
This file is part of the Kate codec library.
3
Written by Vincent Penquerc'h.
4
5
Use, distribution and reproduction of this library is governed
6
by a BSD style source license included with this source in the
7
file 'COPYING'. Please read these terms before distributing. */
8
9
#ifndef KATE_kate_config_h_GUARD
10
#define KATE_kate_config_h_GUARD
11
12
#ifdef HAVE_CONFIG_H
13
#include "config.h"
14
#endif
15
16
#include <stddef.h>
17
#include <limits.h>
18
#include <sys/types.h>
19
20
#ifdef HAVE_INTTYPES_H
21
#include <inttypes.h>
22
#endif
23
24
#ifdef HAVE_STDINT_H
25
#include <stdint.h>
26
#endif
27
28
#ifdef KATE_INTERNAL
29
#define kate_const
30
#else
31
#define kate_const const
32
#endif
33
34
#ifndef kate_malloc
35
#define kate_malloc malloc
36
#endif
37
#ifndef kate_realloc
38
#define kate_realloc realloc
39
#endif
40
#ifndef kate_free
41
#define kate_free free
42
#endif
43
44
#if defined HAVE_STDINT_H || defined HAVE_INTTYPES_H
45
typedef
int32_t kate_int32_t;
46
#elif defined int32_t
47
typedef
int32_t kate_int32_t;
48
#elif defined INT_MAX && INT_MAX==2147483647
49
typedef
int
kate_int32_t;
50
#elif defined SHRT_MAX && SHRT_MAX==2147483647
51
typedef
short
int
kate_int32_t;
52
#elif defined LONG_MAX && LONG_MAX==2147483647
53
typedef
long
int
kate_int32_t;
54
#elif defined LLONG_MAX && LLONG_MAX==2147483647
55
typedef
long
long
int
kate_int32_t;
56
#else
57
#error No 32 bit signed integer found
58
#endif
59
60
#if defined HAVE_STDINT_H || defined HAVE_INTTYPES_H
61
typedef
uint32_t kate_uint32_t;
62
#elif defined uint32_t
63
typedef
uint32_t kate_uint32_t;
64
#elif defined UINT_MAX && UINT_MAX==4294967295u
65
typedef
unsigned
int
kate_uint32_t;
66
#elif defined USHRT_MAX && USHRT_MAX==4294967295u
67
typedef
short
unsigned
int
kate_uint32_t;
68
#elif defined ULONG_MAX && ULONG_MAX==4294967295ul
69
typedef
long
unsigned
int
kate_uint32_t;
70
#elif defined ULLONG_MAX && ULLONG_MAX==4294967295ull
71
typedef
long
long
unsigned
int
kate_uint32_t;
72
#else
73
#error No 32 bit unsigned integer found
74
#endif
75
76
#if defined HAVE_STDINT_H || defined HAVE_INTTYPES_H
77
typedef
int64_t kate_int64_t;
78
#elif defined int64_t
79
typedef
int64_t kate_int64_t;
80
#elif defined INT_MAX && INT_MAX>2147483647
81
typedef
int
kate_int64_t;
82
#elif defined SHRT_MAX && SHRT_MAX>2147483647
83
typedef
short
int
kate_int64_t;
84
#elif defined LONG_MAX && LONG_MAX>2147483647
85
typedef
long
int
kate_int64_t;
86
#elif defined LLONG_MAX && LLONG_MAX>2147483647
87
typedef
long
long
int
kate_int64_t;
88
#elif defined LONG_LONG_MAX && LONG_LONG_MAX>2147483647
89
typedef
long
long
int
kate_int64_t;
90
#elif defined __GNUC__ && __GNUC__>=4 && defined __WORDSIZE && __WORDSIZE==64
91
/* this case matches glibc, check conservative GCC version just in case */
92
typedef
long
int
kate_int64_t;
93
#elif defined __GNUC__ && __GNUC__>=4 && defined __WORDSIZE && __WORDSIZE==32
94
/* this case matches glibc, check conservative GCC version just in case */
95
typedef
long
long
int
kate_int64_t;
96
#else
97
#error No 64 bit signed integer found
98
#endif
99
100
#if defined HAVE_STDINT_H || defined HAVE_INTTYPES_H
101
typedef
uint64_t kate_uint64_t;
102
#elif defined uint64_t
103
typedef
uint64_t kate_uint64_t;
104
#elif defined UINT_MAX && UINT_MAX>2147483647
105
typedef
unsigned
int
kate_uint64_t;
106
#elif defined USHRT_MAX && USHRT_MAX>2147483647
107
typedef
unsigned
short
int
kate_uint64_t;
108
#elif defined ULONG_MAX && ULONG_MAX>2147483647
109
typedef
unsigned
long
int
kate_uint64_t;
110
#elif defined ULLONG_MAX && ULLONG_MAX>2147483647
111
typedef
unsigned
long
long
int
kate_uint64_t;
112
#elif defined ULONG_LONG_MAX && ULONG_LONG_MAX>2147483647
113
typedef
unsigned
long
long
int
kate_uint64_t;
114
#elif defined __GNUC__ && __GNUC__>=4 && defined __WORDSIZE && __WORDSIZE==64
115
/* this case matches glibc, check conservative GCC version just in case */
116
typedef
unsigned
long
int
kate_uint64_t;
117
#elif defined __GNUC__ && __GNUC__>=4 && defined __WORDSIZE && __WORDSIZE==32
118
/* this case matches glibc, check conservative GCC version just in case */
119
typedef
unsigned
long
long
int
kate_uint64_t;
120
#else
121
#error No 64 bit unsigned signed integer found
122
#endif
123
124
#if defined HAVE_STDINT_H || defined HAVE_INTTYPES_H
125
typedef
uintptr_t kate_uintptr_t;
126
#elif defined uintptr_t
127
typedef
uintptr_t kate_uintptr_t;
128
#else
129
typedef
size_t
kate_uintptr_t;
130
#endif
131
132
typedef
float
kate_float;
133
134
#endif
135
Generated by
1.8.3.1