1 0 stevel /* 2 0 stevel * CDDL HEADER START 3 0 stevel * 4 0 stevel * The contents of this file are subject to the terms of the 5 5891 raf * Common Development and Distribution License (the "License"). 6 5891 raf * You may not use this file except in compliance with the License. 7 0 stevel * 8 0 stevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 0 stevel * or http://www.opensolaris.org/os/licensing. 10 0 stevel * See the License for the specific language governing permissions 11 0 stevel * and limitations under the License. 12 0 stevel * 13 0 stevel * When distributing Covered Code, include this CDDL HEADER in each 14 0 stevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 0 stevel * If applicable, add the following below this CDDL HEADER, with the 16 0 stevel * fields enclosed by brackets "[]" replaced with your own identifying 17 0 stevel * information: Portions Copyright [yyyy] [name of copyright owner] 18 0 stevel * 19 0 stevel * CDDL HEADER END 20 0 stevel */ 21 5891 raf 22 0 stevel /* 23 5891 raf * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 0 stevel * Use is subject to license terms. 25 0 stevel */ 26 0 stevel 27 0 stevel #pragma ident "%Z%%M% %I% %E% SMI" 28 0 stevel 29 0 stevel /* 30 0 stevel * __xpg6 (C99/SUSv3) was first introduced in Solaris 10. 31 0 stevel * 32 0 stevel * This is the default value that is compiled into libc. 33 0 stevel * 34 0 stevel * The default setting, _C99SUSv3_mode_OFF, means to retain current 35 0 stevel * Solaris behavior which is NOT C99 and SUSv3 compliant. 36 0 stevel * This is normal. libc determines which standard to use based on 37 0 stevel * how applications are compiled. libc at runtime determines which 38 0 stevel * behavior to choose based on the value of __xpg6. 39 0 stevel * But by default libc retains its original Solaris behavior. 40 0 stevel * 41 0 stevel * __xpg6 is used to control certain behaviors between the C99 standard, 42 0 stevel * the SUSv3 standard, and Solaris. More explanation in inc/xpg6.h. 43 0 stevel * The XPG6 C compiler utility (c99) will add an object file that contains an 44 0 stevel * alternate definition for __xpg6. The symbol interposition provided 45 0 stevel * by the linker will allow libc to find that symbol instead. 46 0 stevel * 47 0 stevel * Possible settings are available and documented in inc/xpg6.h. 48 0 stevel */ 49 0 stevel 50 0 stevel #include "xpg6.h" 51 0 stevel 52 0 stevel unsigned int __xpg6 = _C99SUSv3_mode_OFF; 53 5891 raf 54 5891 raf unsigned int libc__xpg6; /* copy of __xpg6, private to libc */ 55