Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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/. */
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 */
14 #include <stdio.h>
16 #ifdef NO_NSPR_10_SUPPORT
18 /* nothing to do */
19 int main(int argc, char **argv)
20 {
21 printf("PASS\n");
22 return 0;
23 }
25 #else /* NO_NSPR_10_SUPPORT */
27 #include "prtypes.h" /* which includes protypes.h */
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;
47 printf("PASS\n");
48 return 0;
49 }
51 #endif /* NO_NSPR_10_SUPPORT */