stdiom.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* stdiom.h - shared guts of stdio
*/
#ifndef _STDIOM_H
#define _STDIOM_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.9 */
#include <thread.h>
#include <synch.h>
#include <mtlib.h>
#include <stdarg.h>
#include "file64.h"
#include <wchar.h>
#include "mse.h"
/*
* The following flags, and the macros that manipulate them, operate upon
* the FILE structure used by stdio. If new flags are required, they should
* be created in this file. The values of the flags must be differnt from
* the currently used values. New macros should be created to use the flags
* so that the compilation mode dependencies can be isolated here.
*/
#ifdef _LP64
#define _BYTE_MODE_FLAG 0400
#define _WC_MODE_FLAG 01000
#define _IONOLOCK 02000
(_BYTE_MODE_FLAG | _WC_MODE_FLAG)))
#else
#define _BYTE_MODE_FLAG 0001
#define _WC_MODE_FLAG 0002
(_BYTE_MODE_FLAG | _WC_MODE_FLAG)))
/* Is iop a member of the _iob array? */
/* Compute the index of an _iob array member */
#endif
typedef unsigned char Uchar;
/*
* The number of actual pushback characters is the value
* of PUSHBACK plus the first byte of the buffer. The FILE buffer must,
* for performance reasons, start on a word aligned boundry so the value
* of PUSHBACK should be a multiple of word.
* At least 4 bytes of PUSHBACK are needed. If sizeof (int) = 1 this breaks.
*/
/* minimum buffer size must be at least 8 or shared library will break */
#if BUFSIZ == 1024
#else
#endif
/*
* Internal data
*/
/*
* Internal routines from flush.c
*/
extern void __cleanup(void);
extern void _flushlbf(void);
/*
* this is to be found in <stdio.h> for 32bit mode
*/
#ifdef _LP64
/*
* Not needed as a function in 64 bit mode.
*/
#else
#endif /* _LP64 */
#ifdef _LP64
extern void close_pid(void);
#endif /* _LP64 */
/*
* Internal routines from fileno.c
*/
/*
* Internal routines from _findbuf.c
*/
/*
* Internal routine used by fopen.c
*/
/*
* Internal routine from ferror.c
*/
extern int _ferror_unlocked(FILE *);
/*
* Internal routine from ferror.c
*/
/*
* Internal routine from getc.c
*/
int _getc_unlocked(FILE *);
/*
* Internal routine from put.c
*/
int _putc_unlocked(int, FILE *);
/*
* Internal routine from ungetc.c
*/
int _ungetc_unlocked(int, FILE *);
/*
* The following macros improve performance of the stdio by reducing the
* number of calls to _bufsync and _wrtchk. _needsync checks whether
* or not _bufsync needs to be called. _WRTCHK has the same effect as
* _wrtchk, but often these functions have no effect, and in those cases
* the macros avoid the expense of calling the functions.
*/
#ifdef _LP64
#else
#endif /* _LP64 */
#endif /* _STDIOM_H */