2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * 32-bit shadow function _vsnprintf_c89() is included here. 2N/A * When using the c89 compiler to build 32-bit applications, the size 2N/A * of intmax_t is 32-bits, otherwise the size of intmax_t is 64-bits. 2N/A * The shadow function uses 32-bit size of intmax_t for j conversion. 2N/A * The #pragma redefine_extname in <stdio.h> selects the proper routine 2N/A * at compile time for the user application. 2N/A * NOTE: the shadow function only exists in the 32-bit library. 2N/A unsigned char tmpbuf[
1];
/* dummy buffer for _doprnt() if NULL string */ 2N/A * _bufend() (_realbufend()) should return NULL for v/snprintf, 2N/A * so PUT() macro in _doprnt() will bounds check. For 32-bit, 2N/A * there is no _end field, and _realbufend() will return NULL 2N/A * since it cannot find the dummy FILE structure in the linked 2N/A * list of FILE strucutres. See bug 4274368. 2N/A * When n==0, string may be NULL, so always use tmpbuf to 2N/A * guard for this case. No bytes should be transmitted to 2N/A * the buffer when n==0, so using tmpbuf instead of string 2N/A * (ie, if string is not NULL) should not matter. 2N/A#
endif /* _C89_INTMAX32 */ 2N/A *
siop.
_ptr =
'\0';
/* plant terminating null character */ 2N/A /* overflow check */