stdio_iso.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 (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <stdio.h>.
*/
/*
* User-visible pieces of the ANSI C standard I/O package.
*/
#ifndef _ISO_STDIO_ISO_H
#define _ISO_STDIO_ISO_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/feature_tests.h>
#include <stdio_tag.h>
#include <stdio_impl.h>
/*
* If feature test macros are set that enable interfaces that use types
*
* Note that in asking for the interfaces associated with this feature test
* macro one also asks for definitions of the POSIX types.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* underscores added to avoid polluting the ANSI C name space). See the
* commentary there for further explanation.
*/
#if defined(_LONGLONG_TYPE)
typedef long long __longlong_t;
#else
/* used to reserve space and generate alignment */
typedef union {
double _d;
int _l[2];
} __longlong_t;
#endif
#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 || defined(_LARGEFILE64_SOURCE) */
#if __cplusplus >= 199711L
#endif
#define _FILEDEFED
#endif
#define _SIZE_T
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
typedef long fpos_t;
#else
typedef __longlong_t fpos_t;
#endif
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifndef NULL
#if defined(_LP64)
#define NULL 0L
#else
#define NULL 0
#endif
#endif
#define BUFSIZ 1024
/*
* The value of _NFILE is defined in the Processor Specific ABI. The value
* is chosen for historical reasons rather than for truly processor related
* attribute. Note that the SPARC Processor Specific ABI uses the common
* UNIX historical value of 20 so it is allowed to fall through.
*/
#if defined(__i386)
#else
#endif
#define _IOFBF 0000 /* full buffered */
#ifndef EOF
#define EOF (-1)
#endif
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#if defined(__STDC__)
#else
#endif /* __STDC__ */
#if __cplusplus >= 199711L
#endif
#if !defined(_LP64) && !defined(_LONGLONG_TYPE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#define fprintf _fprintf_c89
#define printf _printf_c89
#define sprintf _sprintf_c89
#define vfprintf _vfprintf_c89
#define vprintf _vprintf_c89
#define vsprintf _vsprintf_c89
#define fscanf _fscanf_c89
#define scanf _scanf_c89
#define sscanf _sscanf_c89
#endif
#endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
#if defined(__STDC__)
extern int remove(const char *);
extern int rename(const char *, const char *);
extern char *tmpnam(char *);
size_t);
/* PRINTFLIKE2 */
/* SCANFLIKE2 */
/* PRINTFLIKE1 */
extern int printf(const char *_RESTRICT_KYWD, ...);
/* SCANFLIKE1 */
extern int scanf(const char *_RESTRICT_KYWD, ...);
/* PRINTFLIKE2 */
/* SCANFLIKE2 */
extern int sscanf(const char *_RESTRICT_KYWD,
const char *_RESTRICT_KYWD, ...);
__cplusplus < 199711L
#endif
__cplusplus < 199711L
extern int getchar(void);
extern int putchar(int);
#endif
extern char *gets(char *);
extern int puts(const char *);
#endif
__cplusplus < 199711L
#endif
extern void perror(const char *);
#ifndef _LP64
#endif /* _LP64 */
#else /* !defined __STDC__ */
extern int remove();
extern int rename();
extern char *tmpnam();
extern int fclose();
extern int fflush();
extern void setbuf();
extern int setvbuf();
extern int fprintf();
extern int fscanf();
extern int printf();
extern int scanf();
extern int sprintf();
extern int sscanf();
extern int vfprintf();
extern int vprintf();
extern int vsprintf();
extern int fgetc();
extern char *fgets();
extern int fputc();
extern int fputs();
extern int getc();
extern int getchar();
extern char *gets();
extern int putc();
extern int putchar();
extern int puts();
extern int ungetc();
extern int fgetpos();
extern int fseek();
extern int fsetpos();
extern long ftell();
extern void rewind();
extern void clearerr();
extern int feof();
extern int ferror();
extern void perror();
#ifndef _LP64
extern int _filbuf();
extern int _flsbuf();
#endif /* _LP64 */
#endif /* __STDC__ */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#if !defined(__lint)
#ifndef _REENTRANT
#ifndef _LP64
#ifdef __STDC__
#if __cplusplus >= 199711L
}
#else /* __cplusplus >= 199711L */
: (int)(*(p)->_ptr++ = (unsigned char) (x)))
#endif /* __cplusplus >= 199711L */
#else /* __STDC__ */
(int)(*(p)->_ptr++ = (unsigned char) (x)))
#endif /* __STDC__ */
#endif /* _LP64 */
#if __cplusplus >= 199711L
}
#else
#endif /* __cplusplus >= 199711L */
#ifndef _LP64
#if __cplusplus >= 199711L
}
#else /* __cplusplus >= 199711L */
#endif /* __cplusplus >= 199711L */
#endif /* _LP64 */
#endif /* _REENTRANT */
#endif /* !defined(__lint) */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDIO_ISO_H */