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