10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*5891Sraf * Common Development and Distribution License (the "License"). 6*5891Sraf * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 21*5891Sraf 220Sstevel@tonic-gate /* 23*5891Sraf * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 280Sstevel@tonic-gate 290Sstevel@tonic-gate /* 300Sstevel@tonic-gate * __xpg6 (C99/SUSv3) was first introduced in Solaris 10. 310Sstevel@tonic-gate * 320Sstevel@tonic-gate * This is the default value that is compiled into libc. 330Sstevel@tonic-gate * 340Sstevel@tonic-gate * The default setting, _C99SUSv3_mode_OFF, means to retain current 350Sstevel@tonic-gate * Solaris behavior which is NOT C99 and SUSv3 compliant. 360Sstevel@tonic-gate * This is normal. libc determines which standard to use based on 370Sstevel@tonic-gate * how applications are compiled. libc at runtime determines which 380Sstevel@tonic-gate * behavior to choose based on the value of __xpg6. 390Sstevel@tonic-gate * But by default libc retains its original Solaris behavior. 400Sstevel@tonic-gate * 410Sstevel@tonic-gate * __xpg6 is used to control certain behaviors between the C99 standard, 420Sstevel@tonic-gate * the SUSv3 standard, and Solaris. More explanation in inc/xpg6.h. 430Sstevel@tonic-gate * The XPG6 C compiler utility (c99) will add an object file that contains an 440Sstevel@tonic-gate * alternate definition for __xpg6. The symbol interposition provided 450Sstevel@tonic-gate * by the linker will allow libc to find that symbol instead. 460Sstevel@tonic-gate * 470Sstevel@tonic-gate * Possible settings are available and documented in inc/xpg6.h. 480Sstevel@tonic-gate */ 490Sstevel@tonic-gate 500Sstevel@tonic-gate #include "xpg6.h" 510Sstevel@tonic-gate 520Sstevel@tonic-gate unsigned int __xpg6 = _C99SUSv3_mode_OFF; 53*5891Sraf 54*5891Sraf unsigned int libc__xpg6; /* copy of __xpg6, private to libc */ 55