summaryrefslogtreecommitdiff
path: root/libio/bits/stdio2.h
diff options
context:
space:
mode:
Diffstat (limited to 'libio/bits/stdio2.h')
-rw-r--r--libio/bits/stdio2.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/libio/bits/stdio2.h b/libio/bits/stdio2.h
index fa3be79a66..11651506a6 100644
--- a/libio/bits/stdio2.h
+++ b/libio/bits/stdio2.h
@@ -1,5 +1,5 @@
/* Checking macros for stdio functions.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _BITS_STDIO2_H
+#define _BITS_STDIO2_H 1
+
#ifndef _STDIO_H
# error "Never include <bits/stdio2.h> directly; use <stdio.h> instead."
#endif
@@ -24,7 +27,7 @@ extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
const char *__restrict __format, ...) __THROW;
extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
const char *__restrict __format,
- _G_va_list __ap) __THROW;
+ __gnuc_va_list __ap) __THROW;
#ifdef __va_arg_pack
__fortify_function int
@@ -41,7 +44,7 @@ __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
__fortify_function int
__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
- _G_va_list __ap))
+ __gnuc_va_list __ap))
{
return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
__bos (__s), __fmt, __ap);
@@ -54,7 +57,7 @@ extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
...) __THROW;
extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
size_t __slen, const char *__restrict __format,
- _G_va_list __ap) __THROW;
+ __gnuc_va_list __ap) __THROW;
# ifdef __va_arg_pack
__fortify_function int
@@ -72,7 +75,7 @@ __NTH (snprintf (char *__restrict __s, size_t __n,
__fortify_function int
__NTH (vsnprintf (char *__restrict __s, size_t __n,
- const char *__restrict __fmt, _G_va_list __ap))
+ const char *__restrict __fmt, __gnuc_va_list __ap))
{
return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
__bos (__s), __fmt, __ap);
@@ -86,9 +89,9 @@ extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
const char *__restrict __format, ...);
extern int __printf_chk (int __flag, const char *__restrict __format, ...);
extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
- const char *__restrict __format, _G_va_list __ap);
+ const char *__restrict __format, __gnuc_va_list __ap);
extern int __vprintf_chk (int __flag, const char *__restrict __format,
- _G_va_list __ap);
+ __gnuc_va_list __ap);
# ifdef __va_arg_pack
__fortify_function int
@@ -111,7 +114,7 @@ printf (const char *__restrict __fmt, ...)
# endif
__fortify_function int
-vprintf (const char *__restrict __fmt, _G_va_list __ap)
+vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
{
#ifdef __USE_EXTERN_INLINES
return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
@@ -122,7 +125,7 @@ vprintf (const char *__restrict __fmt, _G_va_list __ap)
__fortify_function int
vfprintf (FILE *__restrict __stream,
- const char *__restrict __fmt, _G_va_list __ap)
+ const char *__restrict __fmt, __gnuc_va_list __ap)
{
return __vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
@@ -131,7 +134,7 @@ vfprintf (FILE *__restrict __stream,
extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
...) __attribute__ ((__format__ (__printf__, 3, 4)));
extern int __vdprintf_chk (int __fd, int __flag,
- const char *__restrict __fmt, _G_va_list __arg)
+ const char *__restrict __fmt, __gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 3, 0)));
# ifdef __va_arg_pack
@@ -147,7 +150,7 @@ dprintf (int __fd, const char *__restrict __fmt, ...)
# endif
__fortify_function int
-vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
+vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
{
return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
@@ -159,7 +162,7 @@ extern int __asprintf_chk (char **__restrict __ptr, int __flag,
const char *__restrict __fmt, ...)
__THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
- const char *__restrict __fmt, _G_va_list __arg)
+ const char *__restrict __fmt, __gnuc_va_list __arg)
__THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
int __flag, const char *__restrict __format,
@@ -168,7 +171,7 @@ extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
int __flag,
const char *__restrict __format,
- _G_va_list __args)
+ __gnuc_va_list __args)
__THROW __attribute__ ((__format__ (__printf__, 3, 0)));
# ifdef __va_arg_pack
@@ -205,14 +208,14 @@ __NTH (obstack_printf (struct obstack *__restrict __obstack,
__fortify_function int
__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
- _G_va_list __ap))
+ __gnuc_va_list __ap))
{
return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
__fortify_function int
__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
- const char *__restrict __fmt, _G_va_list __ap))
+ const char *__restrict __fmt, __gnuc_va_list __ap))
{
return __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
__ap);
@@ -222,8 +225,7 @@ __NTH (obstack_vprintf (struct obstack *__restrict __obstack,
#endif
-#if !defined __USE_ISOC11 \
- || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
+#if __GLIBC_USE (DEPRECATED_GETS)
extern char *__gets_chk (char *__str, size_t) __wur;
extern char *__REDIRECT (__gets_warn, (char *__str), gets)
__wur __warnattr ("please use fgets or getline instead, gets can't "
@@ -369,7 +371,7 @@ fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
for (; __cnt > 0; --__cnt)
{
- int __c = _IO_getc_unlocked (__stream);
+ int __c = getc_unlocked (__stream);
if (__c == EOF)
break;
*__cptr++ = __c;
@@ -380,3 +382,5 @@ fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
return __fread_unlocked_alias (__ptr, __size, __n, __stream);
}
#endif
+
+#endif /* bits/stdio2.h. */