Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/stdio.h')
-rw-r--r--newlib/libc/include/stdio.h54
1 files changed, 7 insertions, 47 deletions
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
index e336ee6eb..c2418fa31 100644
--- a/newlib/libc/include/stdio.h
+++ b/newlib/libc/include/stdio.h
@@ -32,7 +32,6 @@
#define __need_size_t
#define __need_NULL
-#include <sys/cdefs.h>
#include <stddef.h>
#define __need___va_list
@@ -83,7 +82,6 @@ typedef _fpos64_t fpos64_t;
#define __SL64 0x8000 /* is 64-bit offset large file */
/* _flags2 flags */
-#define __SNLK 0x0001 /* stdio functions do not lock streams themselves */
#define __SWID 0x2000 /* true => stream orientation wide, false => byte, only valid if __SORD in _flags is true */
/*
@@ -163,9 +161,6 @@ typedef _fpos64_t fpos64_t;
FILE * _EXFUN(tmpfile, (void));
char * _EXFUN(tmpnam, (char *));
-#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
-char * _EXFUN(tempnam, (const char *, const char *));
-#endif
int _EXFUN(fclose, (FILE *));
int _EXFUN(fflush, (FILE *));
FILE * _EXFUN(freopen, (const char *__restrict, const char *__restrict, FILE *__restrict));
@@ -236,10 +231,7 @@ int _EXFUN(fseeko, (FILE *, off_t, int));
off_t _EXFUN(ftello, ( FILE *));
#endif
#endif
-#if __GNU_VISIBLE
-int _EXFUN(fcloseall, (_VOID));
-#endif
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
+#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
#ifndef _REENT_ONLY
int _EXFUN(asiprintf, (char **, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
@@ -253,6 +245,7 @@ int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...)
int _EXFUN(diprintf, (int, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
#endif
+int _EXFUN(fcloseall, (_VOID));
int _EXFUN(fiprintf, (FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
int _EXFUN(fiscanf, (FILE *, const char *, ...)
@@ -269,6 +262,7 @@ 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))));
+char * _EXFUN(tempnam, (const char *, const char *));
int _EXFUN(vasiprintf, (char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST)
@@ -342,7 +336,7 @@ FILE * _EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict));
/* getdelim - see __getdelim for now */
/* getline - see __getline for now */
FILE * _EXFUN(open_memstream, (char **, size_t *));
-#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
+#if defined (__CYGWIN__)
int _EXFUN(renameat, (int, const char *, int, const char *));
#endif
int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST)
@@ -371,9 +365,7 @@ int _EXFUN(_fcloseall_r, (struct _reent *));
FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *));
int _EXFUN(_fflush_r, (struct _reent *, FILE *));
int _EXFUN(_fgetc_r, (struct _reent *, FILE *));
-int _EXFUN(_fgetc_unlocked_r, (struct _reent *, FILE *));
char * _EXFUN(_fgets_r, (struct _reent *, char *__restrict, int, FILE *__restrict));
-char * _EXFUN(_fgets_unlocked_r, (struct _reent *, char *__restrict, int, FILE *__restrict));
#ifdef _COMPILING_NEWLIB
int _EXFUN(_fgetpos_r, (struct _reent *, FILE *__restrict, _fpos_t *__restrict));
int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const _fpos_t *));
@@ -392,11 +384,8 @@ int _EXFUN(_fprintf_r, (struct _reent *, FILE *__restrict, const char *__restric
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_fpurge_r, (struct _reent *, FILE *));
int _EXFUN(_fputc_r, (struct _reent *, int, FILE *));
-int _EXFUN(_fputc_unlocked_r, (struct _reent *, int, FILE *));
int _EXFUN(_fputs_r, (struct _reent *, const char *__restrict, FILE *__restrict));
-int _EXFUN(_fputs_unlocked_r, (struct _reent *, const char *__restrict, FILE *__restrict));
size_t _EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
-size_t _EXFUN(_fread_unlocked_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int));
@@ -405,7 +394,6 @@ long _EXFUN(_ftell_r, (struct _reent *, FILE *));
_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *));
void _EXFUN(_rewind_r, (struct _reent *, FILE *));
size_t _EXFUN(_fwrite_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
-size_t _EXFUN(_fwrite_unlocked_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
int _EXFUN(_getc_r, (struct _reent *, FILE *));
int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *));
int _EXFUN(_getchar_r, (struct _reent *));
@@ -492,23 +480,6 @@ int _EXFUN(fpurge, (FILE *));
ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *));
ssize_t _EXFUN(__getline, (char **, size_t *, FILE *));
-#if __BSD_VISIBLE
-void _EXFUN(clearerr_unlocked, (FILE *));
-int _EXFUN(feof_unlocked, (FILE *));
-int _EXFUN(ferror_unlocked, (FILE *));
-int _EXFUN(fileno_unlocked, (FILE *));
-int _EXFUN(fflush_unlocked, (FILE *));
-int _EXFUN(fgetc_unlocked, (FILE *));
-int _EXFUN(fputc_unlocked, (int, FILE *));
-size_t _EXFUN(fread_unlocked, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
-size_t _EXFUN(fwrite_unlocked, (const _PTR __restrict , size_t _size, size_t _n, FILE *));
-#endif
-
-#if __GNU_VISIBLE
-char * _EXFUN(fgets_unlocked, (char *__restrict, int, FILE *__restrict));
-int _EXFUN(fputs_unlocked, (const char *__restrict, FILE *__restrict));
-#endif
-
#ifdef __LARGE64_FILES
#if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB)
FILE * _EXFUN(fdopen64, (int, const char *));
@@ -673,8 +644,8 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#endif
#endif
-#define __sfeof(p) ((int)(((p)->_flags & __SEOF) != 0))
-#define __sferror(p) ((int)(((p)->_flags & __SERR) != 0))
+#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
#define __sfileno(p) ((p)->_file)
@@ -682,13 +653,7 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#define feof(p) __sfeof(p)
#define ferror(p) __sferror(p)
#define clearerr(p) __sclearerr(p)
-
-#if __BSD_VISIBLE
-#define feof_unlocked(p) __sfeof(p)
-#define ferror_unlocked(p) __sferror(p)
-#define clearerr_unlocked(p) __sclearerr(p)
-#endif /* __BSD_VISIBLE */
-#endif /* _REENT_SMALL */
+#endif
#if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */
#define fileno(p) __sfileno(p)
@@ -717,11 +682,6 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#define getchar() getc(stdin)
#define putchar(x) putc(x, stdout)
-#ifndef __STRICT_ANSI__
-#define getchar_unlocked() getc_unlocked(stdin)
-#define putchar_unlocked(x) putc_unlocked(x, stdout)
-#endif
-
_END_STD_C
#endif /* _STDIO_H_ */