stdio_impl.h


    1 /*
    2  * Copyright (c) 1998 by Sun Microsystems, Inc.
    3  * All rights reserved.
    4  */
    5 
    6 #ifndef _STDIO_IMPL_H
    7 #define	_STDIO_IMPL_H
    8 
    9 #pragma ident	"@(#)stdio_impl.h	1.8	99/06/10 SMI"
    10 
    11 #include 
    12 
    13 #ifdef	__cplusplus
    14 extern "C" {
    15 #endif
    16 
    17 #ifndef _SSIZE_T
    18 #define	_SSIZE_T
    19 #if defined(_LP64) || defined(_I32LPx)
    20 typedef long	ssize_t;		/* size of something in bytes or -1 */
    21 #else
    22 typedef int	ssize_t;		/* (historical version) */  <typedef:ssize_t>
    23 #endif
    24 #endif	/* !_SSIZE_T */
    25 
    26 #ifdef	_LP64
    27 
    28 #ifndef	_FILE64_H
    29 
    30 struct __FILE_TAG {
    31 	long	__pad[16];
    32 };
    33 
    34 #endif	/* _FILE64_H */
    35 
    36 #else
    37 
    38 struct __FILE_TAG	/* needs to be binary-compatible with old versions */
    39 {
    40 #ifdef _STDIO_REVERSE
    41 	unsigned char	*_ptr;	/* next character from/to here in buffer */
    42 	ssize_t		_cnt;	/* number of available characters in buffer */
    43 #else
    44 	ssize_t		_cnt;	/* number of available characters in buffer */
    45 	unsigned char	*_ptr;	/* next character from/to here in buffer */
    46 #endif
    47 	unsigned char	*_base;	/* the buffer */
    48 	unsigned char	_flag;	/* the state of the stream */
    49 	unsigned char	_file;	/* UNIX System file descriptor */
    50 	unsigned	__orientation:2; /* the orientation of the stream */
    51 	unsigned	__ionolock:1;	/* turn off implicit locking */
    52 	unsigned	__filler:5;
    53 };
    54 
    55 #endif	/*	_LP64	*/
    56 
    57 #ifdef	__cplusplus
    58 }
    59 #endif
    60 
    61 #endif	/* _STDIO_IMPL_H */