nsprpub/pr/tests/obsints.c

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:4f99c4f67bad
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 /*
7 * Test: obsints.c
8 *
9 * Description: make sure that protypes.h defines the obsolete integer
10 * types intn, uintn, uint, int8, uint8, int16, uint16, int32, uint32,
11 * int64, and uint64.
12 */
13
14 #include <stdio.h>
15
16 #ifdef NO_NSPR_10_SUPPORT
17
18 /* nothing to do */
19 int main(int argc, char **argv)
20 {
21 printf("PASS\n");
22 return 0;
23 }
24
25 #else /* NO_NSPR_10_SUPPORT */
26
27 #include "prtypes.h" /* which includes protypes.h */
28
29 int main(int argc, char **argv)
30 {
31 /*
32 * Compilation fails if any of these integer types are not
33 * defined by protypes.h.
34 */
35 intn in;
36 uintn uin;
37 uint ui;
38 int8 i8;
39 uint8 ui8;
40 int16 i16;
41 uint16 ui16;
42 int32 i32;
43 uint32 ui32;
44 int64 i64;
45 uint64 ui64;
46
47 printf("PASS\n");
48 return 0;
49 }
50
51 #endif /* NO_NSPR_10_SUPPORT */

mercurial