tst.inttypes.d revision 178476
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*
28 * ASSERTION:
29 *	Verify integer type aliases
30 *
31 * SECTION: Types, Operators, and Expressions/Data Types and Sizes
32 */
33
34#pragma	ident	"%Z%%M%	%I%	%E% SMI"
35
36
37BEGIN
38{
39	printf("sizeof (int8_t) = %u\n", sizeof (int8_t));
40	printf("sizeof (int16_t) = %u\n", sizeof (int16_t));
41	printf("sizeof (int32_t) = %u\n", sizeof (int32_t));
42	printf("sizeof (int64_t) = %u\n", sizeof (int64_t));
43	printf("sizeof (intptr_t) = %u\n", sizeof (intptr_t));
44	printf("sizeof (uint8_t) = %u\n", sizeof (uint8_t));
45	printf("sizeof (uint16_t) = %u\n", sizeof (uint16_t));
46	printf("sizeof (uint32_t) = %u\n", sizeof (uint32_t));
47	printf("sizeof (uint64_t) = %u\n", sizeof (uint64_t));
48	printf("sizeof (uintptr_t) = %u\n", sizeof (uintptr_t));
49
50	exit(0);
51}
52
53