obsints.c (1049B)
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 printf("PASS\n"); 21 return 0; 22 } 23 24 #else /* NO_NSPR_10_SUPPORT */ 25 26 # include "prtypes.h" /* which includes protypes.h */ 27 28 int main(int argc, char** argv) { 29 /* 30 * Compilation fails if any of these integer types are not 31 * defined by protypes.h. 32 */ 33 intn in; 34 uintn uin; 35 uint ui; 36 int8 i8; 37 uint8 ui8; 38 int16 i16; 39 uint16 ui16; 40 int32 i32; 41 uint32 ui32; 42 int64 i64; 43 uint64 ui64; 44 45 printf("PASS\n"); 46 return 0; 47 } 48 49 #endif /* NO_NSPR_10_SUPPORT */