xref: /onnv-gate/usr/src/head/stdio_impl.h (revision 1846:376b8b33ed65)
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*1846Scraigm  * Common Development and Distribution License (the "License").
6*1846Scraigm  * 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*1846Scraigm 
220Sstevel@tonic-gate /*
23*1846Scraigm  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef _STDIO_IMPL_H
280Sstevel@tonic-gate #define	_STDIO_IMPL_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #include <sys/isa_defs.h>
330Sstevel@tonic-gate 
340Sstevel@tonic-gate #ifdef	__cplusplus
350Sstevel@tonic-gate extern "C" {
360Sstevel@tonic-gate #endif
370Sstevel@tonic-gate 
380Sstevel@tonic-gate #ifdef	_LP64
390Sstevel@tonic-gate 
400Sstevel@tonic-gate #ifndef	_FILE64_H
410Sstevel@tonic-gate 
420Sstevel@tonic-gate struct __FILE_TAG {
430Sstevel@tonic-gate 	long	__pad[16];
440Sstevel@tonic-gate };
450Sstevel@tonic-gate 
460Sstevel@tonic-gate #endif	/* _FILE64_H */
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #else
490Sstevel@tonic-gate 
500Sstevel@tonic-gate struct __FILE_TAG	/* needs to be binary-compatible with old versions */
510Sstevel@tonic-gate {
520Sstevel@tonic-gate #ifdef _STDIO_REVERSE
530Sstevel@tonic-gate 	unsigned char	*_ptr;	/* next character from/to here in buffer */
540Sstevel@tonic-gate 	int		_cnt;	/* number of available characters in buffer */
550Sstevel@tonic-gate #else
560Sstevel@tonic-gate 	int		_cnt;	/* number of available characters in buffer */
570Sstevel@tonic-gate 	unsigned char	*_ptr;	/* next character from/to here in buffer */
580Sstevel@tonic-gate #endif
590Sstevel@tonic-gate 	unsigned char	*_base;	/* the buffer */
600Sstevel@tonic-gate 	unsigned char	_flag;	/* the state of the stream */
61*1846Scraigm 	unsigned char	_magic; /* Old home of the file descriptor */
62*1846Scraigm 				/* Only fileno(3C) can retrieve the value now */
630Sstevel@tonic-gate 	unsigned	__orientation:2; /* the orientation of the stream */
640Sstevel@tonic-gate 	unsigned	__ionolock:1;	/* turn off implicit locking */
650Sstevel@tonic-gate 	unsigned	__seekable:1;	/* is file seekable? */
66*1846Scraigm 	unsigned	__extendedfd:1;	/* enable extended FILE */
67*1846Scraigm 	unsigned	__xf_nocheck:1;	/* no extended FILE runtime check */
68*1846Scraigm 	unsigned	__filler:10;
690Sstevel@tonic-gate };
700Sstevel@tonic-gate 
710Sstevel@tonic-gate #endif	/*	_LP64	*/
720Sstevel@tonic-gate 
730Sstevel@tonic-gate #ifdef	__cplusplus
740Sstevel@tonic-gate }
750Sstevel@tonic-gate #endif
760Sstevel@tonic-gate 
770Sstevel@tonic-gate #endif	/* _STDIO_IMPL_H */
78