~ubuntu-branches/ubuntu/trusty/rhash/trusty

« back to all changes in this revision

Viewing changes to librhash/test_hashes.h

  • Committer: Bazaar Package Importer
  • Author(s): Aleksey Kravchenko
  • Date: 2011-08-14 20:35:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110814203500-rvnovipwcpqkm91u
Tags: 1.2.7-1
* New upstream release version 1.2.7
 - Fixes security issue (Closes: #632280)
 - changed author/mantainer name to the way I prefer s/Alexey S/Aleksey/
 - simplified desriptions of binary packages
 - wriiten rules in more now standard way, using CFLAGS/LDFLAGS
 - reworded README.Debian a bit
 - aplied patch from upstream to fix possible segfault
 - aplied patch from upstream to fix glibc runtime warning
 - aplied patch from upstream to repair -openssl option handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* test_hashes.h - detect compiler defines */
 
2
 
 
3
/* first some magic to convert a macro value to a string */
 
4
#define STRINGIZE_ARG(x) #x
 
5
#define EXPAND_TO_STRING(x) STRINGIZE_ARG(x)
 
6
 
 
7
/* the string containing defined macros */
 
8
char* compiler_flags = "Compile-time flags:"
 
9
#ifdef i386
 
10
        " i386"
 
11
#endif
 
12
#ifdef __i386__
 
13
        " __i386__"
 
14
#endif
 
15
#ifdef __i486__
 
16
        " __i486__"
 
17
#endif
 
18
#ifdef __i586__
 
19
        " __i586__"
 
20
#endif
 
21
#ifdef __i686__
 
22
        " __i686__"
 
23
#endif
 
24
#ifdef __pentium__
 
25
        " __pentium__"
 
26
#endif
 
27
#ifdef __pentiumpro__
 
28
        " __pentiumpro__"
 
29
#endif
 
30
#ifdef __pentium4__
 
31
        " __pentium4__"
 
32
#endif
 
33
#ifdef __nocona__
 
34
        " __nocona__"
 
35
#endif
 
36
#ifdef prescott
 
37
        " prescott"
 
38
#endif
 
39
#ifdef __core2__
 
40
        " __core2__"
 
41
#endif
 
42
#ifdef __k6__
 
43
        " __k6__"
 
44
#endif
 
45
#ifdef __k8__
 
46
        " __k8__"
 
47
#endif
 
48
#ifdef __athlon__
 
49
        " __athlon__"
 
50
#endif
 
51
#ifdef __amd64
 
52
        " __amd64"
 
53
#endif
 
54
#ifdef __amd64__
 
55
        " __amd64__"
 
56
#endif
 
57
#ifdef __x86_64
 
58
        " __x86_64"
 
59
#endif
 
60
#ifdef __x86_64__
 
61
        " __x86_64__"
 
62
#endif
 
63
#ifdef _M_IX86
 
64
        " _M_IX86"
 
65
#endif
 
66
#ifdef _M_AMD64
 
67
        " _M_AMD64"
 
68
#endif
 
69
#ifdef _M_IA64
 
70
        " _M_IA64"
 
71
#endif
 
72
#ifdef _M_X64
 
73
        " _M_X64"
 
74
#endif
 
75
#ifdef _LP64
 
76
        " _LP64"
 
77
#endif
 
78
#ifdef __LP64__
 
79
        " __LP64__"
 
80
#endif
 
81
#ifdef __x86_64
 
82
        " __x86_64"
 
83
#endif
 
84
#ifdef __x86_64__
 
85
        " __x86_64__"
 
86
#endif
 
87
#ifdef _M_AMD64
 
88
        " _M_AMD64"
 
89
#endif
 
90
#ifdef _M_X64
 
91
        " _M_X64"
 
92
#endif
 
93
#ifdef CPU_X64
 
94
        " CPU_X64"
 
95
#endif
 
96
#ifdef CPU_IA32
 
97
        " CPU_IA32"
 
98
#endif
 
99
#ifdef __ia64
 
100
        " __ia64"
 
101
#endif
 
102
#ifdef __ia64__
 
103
        " __ia64__"
 
104
#endif
 
105
#ifdef __alpha__
 
106
        " __alpha__"
 
107
#endif
 
108
#ifdef _M_ALPHA
 
109
        " _M_ALPHA"
 
110
#endif
 
111
#ifdef vax
 
112
        " vax"
 
113
#endif
 
114
#ifdef MIPSEL
 
115
        " MIPSEL"
 
116
#endif
 
117
#ifdef _ARM_
 
118
        " _ARM_"
 
119
#endif
 
120
#ifdef __sparc
 
121
        " __sparc"
 
122
#endif
 
123
#ifdef __sparc__
 
124
        " __sparc__"
 
125
#endif
 
126
#ifdef sparc
 
127
        " sparc"
 
128
#endif
 
129
#ifdef _ARCH_PPC
 
130
        " _ARCH_PPC"
 
131
#endif
 
132
#ifdef _ARCH_PPC64
 
133
        " _ARCH_PPC64"
 
134
#endif
 
135
#ifdef _POWER
 
136
        " _POWER"
 
137
#endif
 
138
#ifdef __POWERPC__
 
139
        " __POWERPC__"
 
140
#endif
 
141
#ifdef POWERPC
 
142
        " POWERPC"
 
143
#endif
 
144
#ifdef __powerpc
 
145
        " __powerpc"
 
146
#endif
 
147
#ifdef __powerpc__
 
148
        " __powerpc__"
 
149
#endif
 
150
#ifdef __powerpc64__
 
151
        " __powerpc64__"
 
152
#endif
 
153
#ifdef __ppc__
 
154
        " __ppc__"
 
155
#endif
 
156
#ifdef __hpux
 
157
        " __hpux"
 
158
#endif
 
159
#ifdef _MIPSEB
 
160
        " _MIPSEB"
 
161
#endif
 
162
#ifdef mc68000
 
163
        " mc68000"
 
164
#endif
 
165
#ifdef __s390__
 
166
        " __s390__"
 
167
#endif
 
168
#ifdef __s390x__
 
169
        " __s390x__"
 
170
#endif
 
171
#ifdef sel
 
172
        " sel"
 
173
#endif
 
174
 
 
175
/* detect compiler and OS */
 
176
#ifdef _MSC_VER
 
177
        " _MSC_VER=" EXPAND_TO_STRING(_MSC_VER)
 
178
#endif
 
179
#ifdef __BORLANDC__
 
180
        " __BORLANDC__"
 
181
#endif
 
182
#if defined(__GNUC__) && defined(__VERSION__)
 
183
        " GCC=" __VERSION__
 
184
#endif
 
185
#ifdef __INTEL_COMPILER
 
186
        " __INTEL_COMPILER=" EXPAND_TO_STRING(__INTEL_COMPILER)
 
187
#endif
 
188
#ifdef __clang__
 
189
        " __clang__"
 
190
#endif
 
191
#ifdef __llvm__
 
192
        " __llvm__"
 
193
#endif
 
194
#ifdef __TINYC__ /* tcc */
 
195
        " __TINYC__"
 
196
#endif
 
197
#ifdef __MINGW32__
 
198
        " __MINGW32__"
 
199
#endif
 
200
#ifdef _WIN32
 
201
        " _WIN32"
 
202
#endif
 
203
#ifdef _WIN64
 
204
        " _WIN64"
 
205
#endif
 
206
#ifdef __linux
 
207
        " __linux"
 
208
#endif
 
209
#ifdef __sun /* Solaris */
 
210
        " __sun"
 
211
#endif
 
212
#ifdef __FreeBSD__
 
213
        " __FreeBSD__"
 
214
#endif
 
215
#ifdef __OpenBSD__
 
216
        " __OpenBSD__"
 
217
#endif
 
218
#ifdef __NetBSD__
 
219
        " __NetBSD__"
 
220
#endif
 
221
#ifdef __APPLE__
 
222
        " __APPLE__"
 
223
#endif
 
224
#ifdef __MACH__ /* Mac OS X = __APPLE__ & __MACH__ on gcc/icc */
 
225
        " __MACH__"
 
226
#endif
 
227
 
 
228
#include <limits.h>
 
229
#ifdef __GLIBC__ /* GLIBC >= 6 */
 
230
        " __GLIBC__"
 
231
#endif
 
232
#ifdef __UCLIBC__
 
233
        " __UCLIBC__"
 
234
#endif
 
235
 
 
236
 
 
237
 
 
238
/* other defines */
 
239
#ifdef __STDC_VERSION__
 
240
        " __STDC_VERSION__=" EXPAND_TO_STRING(__STDC_VERSION__)
 
241
#endif
 
242
#ifdef _UNICODE
 
243
        " _UNICODE"
 
244
#endif
 
245
#ifdef __STRICT_ANSI__
 
246
        " __STRICT_ANSI__"
 
247
#endif
 
248
#ifdef __PIC__
 
249
        " __PIC__"
 
250
#endif
 
251
#ifdef USE_RHASH_DLL
 
252
        " USE_RHASH_DLL"
 
253
#endif
 
254
#ifdef USE_OPENSSL
 
255
        " USE_OPENSSL"
 
256
#endif
 
257
 
 
258
/* detect endianness */
 
259
#ifdef CPU_LITTLE_ENDIAN
 
260
        " CPU_LITTLE_ENDIAN"
 
261
#endif
 
262
#ifdef CPU_BIG_ENDIAN
 
263
        " CPU_BIG_ENDIAN"
 
264
#endif
 
265
#if defined(__BYTE_ORDER)
 
266
#if (__BYTE_ORDER==__LITTLE_ENDIAN)
 
267
        " (__BYTE_ORDER==__LITTLE_ENDIAN)"
 
268
#elif (__BYTE_ORDER==__BIG_ENDIAN)
 
269
        " (__BYTE_ORDER==__BIG_ENDIAN)"
 
270
#endif
 
271
#endif
 
272
        "\n";