128,7 → 128,7 |
#define L_tmpnam FILENAME_MAX |
#endif |
|
#ifndef __STRICT_ANSI__ |
#if __BSD_VISIBLE || __XSI_VISIBLE |
#define P_tmpdir "/tmp" |
#endif |
|
230,7 → 230,7 |
int _EXFUN(_rename, (const char *, const char *)); |
#endif |
#endif |
#if !defined(__STRICT_ANSI__) || defined(__USE_XOPEN2K) |
#if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112 |
#ifdef _COMPILING_NEWLIB |
int _EXFUN(fseeko, (FILE *, _off_t, int)); |
_off_t _EXFUN(ftello, ( FILE *)); |
242,8 → 242,26 |
#if __GNU_VISIBLE |
int _EXFUN(fcloseall, (_VOID)); |
#endif |
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L) |
#ifndef _REENT_ONLY |
#if __ISO_C_VISIBLE >= 1999 |
int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) |
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
int _EXFUN(vscanf, (const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
#endif |
#if __GNU_VISIBLE |
int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) |
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
int _EXFUN(vasprintf, (char **, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
#endif |
#if __MISC_VISIBLE /* Newlib-specific */ |
int _EXFUN(asiprintf, (char **, const char *, ...) |
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...) |
250,8 → 268,6 |
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...) |
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) |
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
#ifndef diprintf |
int _EXFUN(diprintf, (int, const char *, ...) |
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
268,8 → 284,6 |
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
int _EXFUN(siscanf, (const char *, const char *, ...) |
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); |
int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) |
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
int _EXFUN(sniprintf, (char *, size_t, const char *, ...) |
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
int _EXFUN(vasiprintf, (char **, const char *, __VALIST) |
278,8 → 292,6 |
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
int _EXFUN(vasprintf, (char **, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
int _EXFUN(vdiprintf, (int, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST) |
286,14 → 298,10 |
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
int _EXFUN(viprintf, (const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 1, 0)))); |
int _EXFUN(viscanf, (const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
int _EXFUN(vscanf, (const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
int _EXFUN(vsiprintf, (char *, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
int _EXFUN(vsiscanf, (const char *, const char *, __VALIST) |
300,28 → 308,34 |
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
#endif /* __MISC_VISIBLE */ |
#endif /* !_REENT_ONLY */ |
#endif /* !__STRICT_ANSI__ */ |
|
/* |
* Routines in POSIX 1003.1:2001. |
*/ |
|
#ifndef __STRICT_ANSI__ |
#if __POSIX_VISIBLE |
#ifndef _REENT_ONLY |
FILE * _EXFUN(fdopen, (int, const char *)); |
#endif |
int _EXFUN(fileno, (FILE *)); |
int _EXFUN(getw, (FILE *)); |
#endif |
#if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209 |
int _EXFUN(pclose, (FILE *)); |
FILE * _EXFUN(popen, (const char *, const char *)); |
int _EXFUN(putw, (int, FILE *)); |
#endif |
|
#if __BSD_VISIBLE |
void _EXFUN(setbuffer, (FILE *, char *, int)); |
int _EXFUN(setlinebuf, (FILE *)); |
#endif |
|
#if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) |
int _EXFUN(getw, (FILE *)); |
int _EXFUN(putw, (int, FILE *)); |
#endif |
#if __MISC_VISIBLE || __POSIX_VISIBLE |
int _EXFUN(getc_unlocked, (FILE *)); |
int _EXFUN(getchar_unlocked, (void)); |
void _EXFUN(flockfile, (FILE *)); |
329,13 → 343,13 |
void _EXFUN(funlockfile, (FILE *)); |
int _EXFUN(putc_unlocked, (int, FILE *)); |
int _EXFUN(putchar_unlocked, (int)); |
#endif /* ! __STRICT_ANSI__ */ |
#endif |
|
/* |
* Routines in POSIX 1003.1:200x. |
*/ |
|
#ifndef __STRICT_ANSI__ |
#if __POSIX_VISIBLE >= 200809 |
# ifndef _REENT_ONLY |
# ifndef dprintf |
int _EXFUN(dprintf, (int, const char *__restrict, ...) |
345,13 → 359,13 |
/* getdelim - see __getdelim for now */ |
/* getline - see __getline for now */ |
FILE * _EXFUN(open_memstream, (char **, size_t *)); |
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 |
int _EXFUN(renameat, (int, const char *, int, const char *)); |
#endif |
int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST) |
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
# endif |
#endif |
#if __ATFILE_VISIBLE |
int _EXFUN(renameat, (int, const char *, int, const char *)); |
#endif |
|
/* |
* Recursive versions of the above. |
495,7 → 509,7 |
ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); |
ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); |
|
#if __BSD_VISIBLE |
#if __MISC_VISIBLE |
void _EXFUN(clearerr_unlocked, (FILE *)); |
int _EXFUN(feof_unlocked, (FILE *)); |
int _EXFUN(ferror_unlocked, (FILE *)); |
545,7 → 559,7 |
* Stdio function-access interface. |
*/ |
|
#ifndef __STRICT_ANSI__ |
#if __BSD_VISIBLE |
# ifdef __LARGE64_FILES |
FILE *_EXFUN(funopen,(const _PTR __cookie, |
int (*__readfn)(_PTR __c, char *__buf, |
582,7 → 596,9 |
(fpos_t (*)())0, (int (*)())0) |
# define fwopen(__cookie, __fn) funopen(__cookie, (int (*)())0, __fn, \ |
(fpos_t (*)())0, (int (*)())0) |
#endif /* __BSD_VISIBLE */ |
|
#if __GNU_VISIBLE |
typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n); |
typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf, |
size_t __n); |
606,7 → 622,7 |
const char *__mode, cookie_io_functions_t __functions)); |
FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, |
const char *__mode, cookie_io_functions_t __functions)); |
#endif /* ! __STRICT_ANSI__ */ |
#endif /* __GNU_VISIBLE */ |
|
#ifndef __CUSTOM_FILE_IO__ |
/* |
645,10 → 661,12 |
#define __sgetc_r(__ptr, __p) __sgetc_raw_r(__ptr, __p) |
#endif |
|
#ifdef _never /* __GNUC__ */ |
/* If this inline is actually used, then systems using coff debugging |
info get hopelessly confused. 21sept93 rich@cygnus.com. */ |
#ifdef __GNUC__ |
_ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { |
#ifdef __SCLE |
if ((_p->_flags & __SCLE) && _c == '\n') |
__sputc_r (_ptr, '\r', _p); |
#endif |
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) |
return (*_p->_p++ = _c); |
else |
686,14 → 704,14 |
#define ferror(p) __sferror(p) |
#define clearerr(p) __sclearerr(p) |
|
#if __BSD_VISIBLE |
#if __MISC_VISIBLE |
#define feof_unlocked(p) __sfeof(p) |
#define ferror_unlocked(p) __sferror(p) |
#define clearerr_unlocked(p) __sclearerr(p) |
#endif /* __BSD_VISIBLE */ |
#endif /* __MISC_VISIBLE */ |
#endif /* _REENT_SMALL */ |
|
#if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */ |
#if 0 /* __POSIX_VISIBLE - FIXME: must initialize stdio first, use fn */ |
#define fileno(p) __sfileno(p) |
#endif |
|
704,11 → 722,13 |
#endif /* lint */ |
#endif /* __CYGWIN__ */ |
|
#ifndef __STRICT_ANSI__ |
#if __MISC_VISIBLE |
/* fast always-buffered version, true iff error */ |
#define fast_putc(x,p) (--(p)->_w < 0 ? \ |
__swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0)) |
#endif |
|
#if __XSI_VISIBLE |
#define L_cuserid 9 /* posix says it goes in stdio.h :( */ |
#ifdef __CYGWIN__ |
#define L_ctermid 16 |
720,7 → 740,7 |
#define getchar() getc(stdin) |
#define putchar(x) putc(x, stdout) |
|
#ifndef __STRICT_ANSI__ |
#if __MISC_VISIBLE || __POSIX_VISIBLE |
#define getchar_unlocked() getc_unlocked(stdin) |
#define putchar_unlocked(x) putc_unlocked(x, stdout) |
#endif |