aboutsummaryrefslogtreecommitdiff
path: root/include/stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdio.h')
-rw-r--r--include/stdio.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/include/stdio.h b/include/stdio.h
index fe7a6f7d6f82..b0190d25eb4f 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -238,6 +238,21 @@ __END_DECLS
#define stdout __stdoutp
#define stderr __stderrp
+/*
+ * Functions defined in all versions of POSIX 1003.1.
+ */
+#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506)
+#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */
+#endif
+
+#if __POSIX_VISIBLE
+#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */
+#endif /* __POSIX_VISIBLE */
+
+#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#include <ssp/stdio.h>
+#endif
+
__BEGIN_DECLS
#ifdef _XLOCALE_H_
#include <xlocale/_stdio.h>
@@ -252,7 +267,7 @@ int ferror(FILE *);
int fflush(FILE *);
int fgetc(FILE *);
int fgetpos(FILE * __restrict, fpos_t * __restrict);
-char *fgets(char * __restrict, int, FILE * __restrict);
+char *(fgets)(char * __restrict, int, FILE * __restrict);
FILE *fopen(const char * __restrict, const char * __restrict);
int fprintf(FILE * __restrict, const char * __restrict, ...);
int fputc(int, FILE *);
@@ -280,7 +295,7 @@ void rewind(FILE *);
int scanf(const char * __restrict, ...);
void setbuf(FILE * __restrict, char * __restrict);
int setvbuf(FILE * __restrict, char * __restrict, int, size_t);
-int sprintf(char * __restrict, const char * __restrict, ...);
+int (sprintf)(char * __restrict, const char * __restrict, ...);
int sscanf(const char * __restrict, const char * __restrict, ...);
FILE *tmpfile(void);
char *tmpnam(char *);
@@ -288,13 +303,13 @@ int ungetc(int, FILE *);
int vfprintf(FILE * __restrict, const char * __restrict,
__va_list);
int vprintf(const char * __restrict, __va_list);
-int vsprintf(char * __restrict, const char * __restrict,
+int (vsprintf)(char * __restrict, const char * __restrict,
__va_list);
#if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 199506
-int snprintf(char * __restrict, size_t, const char * __restrict,
+int (snprintf)(char * __restrict, size_t, const char * __restrict,
...) __printflike(3, 4);
-int vsnprintf(char * __restrict, size_t, const char * __restrict,
+int (vsnprintf)(char * __restrict, size_t, const char * __restrict,
__va_list) __printflike(3, 0);
#endif
#if __ISO_C_VISIBLE >= 1999
@@ -305,16 +320,7 @@ int vsscanf(const char * __restrict, const char * __restrict, __va_list)
__scanflike(2, 0);
#endif
-/*
- * Functions defined in all versions of POSIX 1003.1.
- */
-#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506)
-#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */
-#endif
-
#if __POSIX_VISIBLE
-#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */
-
char *ctermid(char *);
FILE *fdopen(int, const char *);
int fileno(FILE *);