~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to lib/stdint.in.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc.
 
1
/* -*- buffer-read-only: t -*- vi: set ro: */
 
2
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 
3
/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
2
4
   Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
3
5
   This file is part of gnulib.
4
6
 
21
23
 * <http://www.opengroup.org/susv3xbd/stdint.h.html>
22
24
 */
23
25
 
24
 
#ifndef _GL_STDINT_H
 
26
#ifndef _@GUARD_PREFIX@_STDINT_H
 
27
 
 
28
#if __GNUC__ >= 3
 
29
@PRAGMA_SYSTEM_HEADER@
 
30
#endif
 
31
@PRAGMA_COLUMNS@
25
32
 
26
33
/* When including a system file that in turn includes <inttypes.h>,
27
34
   use the system <inttypes.h>, not our substitute.  This avoids
47
54
  /* Other systems may have an incomplete or buggy <stdint.h>.
48
55
     Include it before <inttypes.h>, since any "#include <stdint.h>"
49
56
     in <inttypes.h> would reinclude us, skipping our contents because
50
 
     _GL_STDINT_H is defined.
 
57
     _@GUARD_PREFIX@_STDINT_H is defined.
51
58
     The include_next requires a split double-inclusion guard.  */
52
 
# if __GNUC__ >= 3
53
 
@PRAGMA_SYSTEM_HEADER@
54
 
# endif
55
59
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
56
60
#endif
57
61
 
58
 
#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
59
 
#define _GL_STDINT_H
 
62
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 
63
#define _@GUARD_PREFIX@_STDINT_H
60
64
 
61
65
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
62
66
   IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
91
95
 
92
96
#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
93
97
 
94
 
/* Minimum and maximum values for a integer type under the usual assumption.
 
98
/* Minimum and maximum values for an integer type under the usual assumption.
95
99
   Return an unspecified value if BITS == 0, adding a check to pacify
96
100
   picky compilers.  */
97
101
 
102
106
  ((signed) \
103
107
   ? ~ _STDINT_MIN (signed, bits, zero) \
104
108
   : /* The expression for the unsigned case.  The subtraction of (signed) \
105
 
        is a nop in the unsigned case and avoids "signed integer overflow" \
106
 
        warnings in the signed case.  */ \
 
109
        is a nop in the unsigned case and avoids "signed integer overflow" \
 
110
        warnings in the signed case.  */ \
107
111
     ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
108
112
 
 
113
#if !GNULIB_defined_stdint_types
 
114
 
109
115
/* 7.18.1.1. Exact-width integer types */
110
116
 
111
117
/* Here we assume a standard architecture where the hardware integer
132
138
#define int32_t gl_int32_t
133
139
#define uint32_t gl_uint32_t
134
140
 
 
141
/* If the system defines INT64_MAX, assume int64_t works.  That way,
 
142
   if the underlying platform defines int64_t to be a 64-bit long long
 
143
   int, the code below won't mistakenly define it to be a 64-bit long
 
144
   int, which would mess up C++ name mangling.  We must use #ifdef
 
145
   rather than #if, to avoid an error with HP-UX 10.20 cc.  */
 
146
 
 
147
#ifdef INT64_MAX
 
148
# define GL_INT64_T
 
149
#else
135
150
/* Do not undefine int64_t if gnulib is not being used with 64-bit
136
151
   types, since otherwise it breaks platforms like Tandem/NSK.  */
137
 
#if LONG_MAX >> 31 >> 31 == 1
138
 
# undef int64_t
 
152
# if LONG_MAX >> 31 >> 31 == 1
 
153
#  undef int64_t
139
154
typedef long int gl_int64_t;
140
 
# define int64_t gl_int64_t
141
 
# define GL_INT64_T
142
 
#elif defined _MSC_VER
143
 
# undef int64_t
 
155
#  define int64_t gl_int64_t
 
156
#  define GL_INT64_T
 
157
# elif defined _MSC_VER
 
158
#  undef int64_t
144
159
typedef __int64 gl_int64_t;
145
 
# define int64_t gl_int64_t
146
 
# define GL_INT64_T
147
 
#elif @HAVE_LONG_LONG_INT@
148
 
# undef int64_t
 
160
#  define int64_t gl_int64_t
 
161
#  define GL_INT64_T
 
162
# elif @HAVE_LONG_LONG_INT@
 
163
#  undef int64_t
149
164
typedef long long int gl_int64_t;
150
 
# define int64_t gl_int64_t
151
 
# define GL_INT64_T
 
165
#  define int64_t gl_int64_t
 
166
#  define GL_INT64_T
 
167
# endif
152
168
#endif
153
169
 
154
 
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
155
 
# undef uint64_t
 
170
#ifdef UINT64_MAX
 
171
# define GL_UINT64_T
 
172
#else
 
173
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
 
174
#  undef uint64_t
156
175
typedef unsigned long int gl_uint64_t;
157
 
# define uint64_t gl_uint64_t
158
 
# define GL_UINT64_T
159
 
#elif defined _MSC_VER
160
 
# undef uint64_t
 
176
#  define uint64_t gl_uint64_t
 
177
#  define GL_UINT64_T
 
178
# elif defined _MSC_VER
 
179
#  undef uint64_t
161
180
typedef unsigned __int64 gl_uint64_t;
162
 
# define uint64_t gl_uint64_t
163
 
# define GL_UINT64_T
164
 
#elif @HAVE_UNSIGNED_LONG_LONG_INT@
165
 
# undef uint64_t
 
181
#  define uint64_t gl_uint64_t
 
182
#  define GL_UINT64_T
 
183
# elif @HAVE_UNSIGNED_LONG_LONG_INT@
 
184
#  undef uint64_t
166
185
typedef unsigned long long int gl_uint64_t;
167
 
# define uint64_t gl_uint64_t
168
 
# define GL_UINT64_T
 
186
#  define uint64_t gl_uint64_t
 
187
#  define GL_UINT64_T
 
188
# endif
169
189
#endif
170
190
 
171
191
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc.  */
252
272
/* Note: These types are compiler dependent. It may be unwise to use them in
253
273
   public header files. */
254
274
 
255
 
#undef intmax_t
256
 
#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
 
275
/* If the system defines INTMAX_MAX, assume that intmax_t works, and
 
276
   similarly for UINTMAX_MAX and uintmax_t.  This avoids problems with
 
277
   assuming one type where another is used by the system.  */
 
278
 
 
279
#ifndef INTMAX_MAX
 
280
# undef INTMAX_C
 
281
# undef intmax_t
 
282
# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
257
283
typedef long long int gl_intmax_t;
258
 
# define intmax_t gl_intmax_t
259
 
#elif defined GL_INT64_T
260
 
# define intmax_t int64_t
261
 
#else
 
284
#  define intmax_t gl_intmax_t
 
285
# elif defined GL_INT64_T
 
286
#  define intmax_t int64_t
 
287
# else
262
288
typedef long int gl_intmax_t;
263
 
# define intmax_t gl_intmax_t
 
289
#  define intmax_t gl_intmax_t
 
290
# endif
264
291
#endif
265
292
 
266
 
#undef uintmax_t
267
 
#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
 
293
#ifndef UINTMAX_MAX
 
294
# undef UINTMAX_C
 
295
# undef uintmax_t
 
296
# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
268
297
typedef unsigned long long int gl_uintmax_t;
269
 
# define uintmax_t gl_uintmax_t
270
 
#elif defined GL_UINT64_T
271
 
# define uintmax_t uint64_t
272
 
#else
 
298
#  define uintmax_t gl_uintmax_t
 
299
# elif defined GL_UINT64_T
 
300
#  define uintmax_t uint64_t
 
301
# else
273
302
typedef unsigned long int gl_uintmax_t;
274
 
# define uintmax_t gl_uintmax_t
 
303
#  define uintmax_t gl_uintmax_t
 
304
# endif
275
305
#endif
276
306
 
277
307
/* Verify that intmax_t and uintmax_t have the same size.  Too much code
278
308
   breaks if this is not the case.  If this check fails, the reason is likely
279
309
   to be found in the autoconf macros.  */
280
 
typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
 
310
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 
311
                                ? 1 : -1];
 
312
 
 
313
#define GNULIB_defined_stdint_types 1
 
314
#endif /* !GNULIB_defined_stdint_types */
281
315
 
282
316
/* 7.18.2. Limits of specified-width integer types */
283
317
 
309
343
#define INT32_MAX  2147483647
310
344
#define UINT32_MAX  4294967295U
311
345
 
312
 
#undef INT64_MIN
313
 
#undef INT64_MAX
314
 
#ifdef GL_INT64_T
 
346
#if defined GL_INT64_T && ! defined INT64_MAX
315
347
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
316
348
   evaluates the latter incorrectly in preprocessor expressions.  */
317
349
# define INT64_MIN  (- INTMAX_C (1) << 63)
318
350
# define INT64_MAX  INTMAX_C (9223372036854775807)
319
351
#endif
320
352
 
321
 
#undef UINT64_MAX
322
 
#ifdef GL_UINT64_T
 
353
#if defined GL_UINT64_T && ! defined UINT64_MAX
323
354
# define UINT64_MAX  UINTMAX_C (18446744073709551615)
324
355
#endif
325
356
 
412
443
 
413
444
/* 7.18.2.5. Limits of greatest-width integer types */
414
445
 
415
 
#undef INTMAX_MIN
416
 
#undef INTMAX_MAX
417
 
#ifdef INT64_MAX
418
 
# define INTMAX_MIN  INT64_MIN
419
 
# define INTMAX_MAX  INT64_MAX
420
 
#else
421
 
# define INTMAX_MIN  INT32_MIN
422
 
# define INTMAX_MAX  INT32_MAX
 
446
#ifndef INTMAX_MAX
 
447
# undef INTMAX_MIN
 
448
# ifdef INT64_MAX
 
449
#  define INTMAX_MIN  INT64_MIN
 
450
#  define INTMAX_MAX  INT64_MAX
 
451
# else
 
452
#  define INTMAX_MIN  INT32_MIN
 
453
#  define INTMAX_MAX  INT32_MAX
 
454
# endif
423
455
#endif
424
456
 
425
 
#undef UINTMAX_MAX
426
 
#ifdef UINT64_MAX
427
 
# define UINTMAX_MAX  UINT64_MAX
428
 
#else
429
 
# define UINTMAX_MAX  UINT32_MAX
 
457
#ifndef UINTMAX_MAX
 
458
# ifdef UINT64_MAX
 
459
#  define UINTMAX_MAX  UINT64_MAX
 
460
# else
 
461
#  define UINTMAX_MAX  UINT32_MAX
 
462
# endif
430
463
#endif
431
464
 
432
465
/* 7.18.3. Limits of other integer types */
454
487
#undef SIG_ATOMIC_MAX
455
488
#define SIG_ATOMIC_MIN  \
456
489
   _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
457
 
                0@SIG_ATOMIC_T_SUFFIX@)
 
490
                0@SIG_ATOMIC_T_SUFFIX@)
458
491
#define SIG_ATOMIC_MAX  \
459
492
   _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
460
 
                0@SIG_ATOMIC_T_SUFFIX@)
 
493
                0@SIG_ATOMIC_T_SUFFIX@)
461
494
 
462
495
 
463
496
/* size_t limit */
474
507
 
475
508
/* wchar_t limits */
476
509
/* Get WCHAR_MIN, WCHAR_MAX.
477
 
   This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
478
 
   includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
 
510
   This include is not on the top, above, because on OSF/1 4.0 we have a
 
511
   sequence of nested includes
 
512
   <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
479
513
   <stdint.h> and assumes its types are already defined.  */
480
 
#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
 
514
#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
 
515
  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
 
516
     included before <wchar.h>.  */
 
517
# include <stddef.h>
 
518
# include <stdio.h>
 
519
# include <time.h>
481
520
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
482
521
# include <wchar.h>
483
522
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
543
582
 
544
583
/* 7.18.4.2. Macros for greatest-width integer constants */
545
584
 
546
 
#undef INTMAX_C
547
 
#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
548
 
# define INTMAX_C(x)   x##LL
549
 
#elif defined GL_INT64_T
550
 
# define INTMAX_C(x)   INT64_C(x)
551
 
#else
552
 
# define INTMAX_C(x)   x##L
 
585
#ifndef INTMAX_C
 
586
# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
 
587
#  define INTMAX_C(x)   x##LL
 
588
# elif defined GL_INT64_T
 
589
#  define INTMAX_C(x)   INT64_C(x)
 
590
# else
 
591
#  define INTMAX_C(x)   x##L
 
592
# endif
553
593
#endif
554
594
 
555
 
#undef UINTMAX_C
556
 
#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
557
 
# define UINTMAX_C(x)  x##ULL
558
 
#elif defined GL_UINT64_T
559
 
# define UINTMAX_C(x)  UINT64_C(x)
560
 
#else
561
 
# define UINTMAX_C(x)  x##UL
 
595
#ifndef UINTMAX_C
 
596
# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
 
597
#  define UINTMAX_C(x)  x##ULL
 
598
# elif defined GL_UINT64_T
 
599
#  define UINTMAX_C(x)  UINT64_C(x)
 
600
# else
 
601
#  define UINTMAX_C(x)  x##UL
 
602
# endif
562
603
#endif
563
604
 
564
605
#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
565
606
 
566
 
#endif /* _GL_STDINT_H */
567
 
#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
 
607
#endif /* _@GUARD_PREFIX@_STDINT_H */
 
608
#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */