summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--libio/iolibio.h8
-rw-r--r--libio/libio.h32
-rw-r--r--libio/libioP.h8
4 files changed, 12 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 64d0cfaa7a..a1ecade870 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-02-21 Zack Weinberg <zackw@panix.com>
+
+ * libio/iolibio.h, libio/libioP.h: Remove extern "C".
+ * libio/libio.h: Remove __BEGIN_DECLS and __END_DECLS.
+ Remove preprocessor conditionals on _LIBC and __USE_GNU,
+ which are always true, and __cplusplus, which is always false.
+
2018-02-21 Joseph Myers <joseph@codesourcery.com>
[BZ #15105]
diff --git a/libio/iolibio.h b/libio/iolibio.h
index 52731b65f9..4d43d0e72d 100644
--- a/libio/iolibio.h
+++ b/libio/iolibio.h
@@ -7,10 +7,6 @@
/* These emulate stdio functionality, but with a different name
(_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
extern int _IO_fclose (_IO_FILE*);
extern int _IO_new_fclose (_IO_FILE*);
extern int _IO_old_fclose (_IO_FILE*);
@@ -95,8 +91,4 @@ extern int __old_pclose (_IO_FILE *) __THROW;
_IO_FILE *__new_freopen (const char *, const char *, _IO_FILE *) __THROW;
_IO_FILE *__old_freopen (const char *, const char *, _IO_FILE *) __THROW;
-#ifdef __cplusplus
-}
-#endif
-
#endif /* iolibio.h. */
diff --git a/libio/libio.h b/libio/libio.h
index 0953120247..7a68e1a3ae 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -73,8 +73,6 @@ typedef union
#include <shlib-compat.h>
-__BEGIN_DECLS
-
/* compatibility defines */
#define _STDIO_USES_IOSTREAM
#define _IO_UNIFIED_JUMPTABLES 1
@@ -119,16 +117,12 @@ __BEGIN_DECLS
#define _IO_FLAGS2_MMAP 1
#define _IO_FLAGS2_NOTCANCEL 2
-#ifdef _LIBC
-# define _IO_FLAGS2_FORTIFY 4
-#endif
+#define _IO_FLAGS2_FORTIFY 4
#define _IO_FLAGS2_USER_WBUF 8
-#ifdef _LIBC
-# define _IO_FLAGS2_SCANF_STD 16
-# define _IO_FLAGS2_NOCLOSE 32
-# define _IO_FLAGS2_CLOEXEC 64
-# define _IO_FLAGS2_NEED_LOCK 128
-#endif
+#define _IO_FLAGS2_SCANF_STD 16
+#define _IO_FLAGS2_NOCLOSE 32
+#define _IO_FLAGS2_CLOEXEC 64
+#define _IO_FLAGS2_NEED_LOCK 128
/* These are "formatting flags" matching the iostream fmtflags enum values. */
#define _IO_SKIPWS 01
@@ -227,29 +221,18 @@ struct _IO_wide_data
const struct _IO_jump_t *_wide_vtable;
};
-
-#ifndef __cplusplus
typedef struct _IO_FILE _IO_FILE;
-#endif
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
-#ifndef _LIBC
-#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_))
-#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_))
-#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_))
-#else
extern _IO_FILE *_IO_stdin attribute_hidden;
extern _IO_FILE *_IO_stdout attribute_hidden;
extern _IO_FILE *_IO_stderr attribute_hidden;
-#endif
-
/* Compatibility names for cookie I/O functions. */
-#ifdef __USE_GNU
typedef cookie_read_function_t __io_read_fn;
typedef cookie_write_function_t __io_write_fn;
typedef cookie_seek_function_t __io_seek_fn;
@@ -261,7 +244,6 @@ struct _IO_cookie_file;
/* Initialize one of those. */
extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
void *__cookie, _IO_cookie_io_functions_t __fns);
-#endif
extern int __underflow (_IO_FILE *);
extern _IO_wint_t __wunderflow (_IO_FILE *);
@@ -342,8 +324,6 @@ extern _IO_wint_t _IO_getwc (_IO_FILE *__fp);
extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp);
extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW;
-/* While compiling glibc we have to handle compatibility with very old
- versions. */
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
# define _IO_fwide_maybe_incompatible \
(__builtin_expect (&_IO_stdin_used == NULL, 0))
@@ -416,6 +396,4 @@ libc_hidden_proto (_IO_vfscanf)
# endif
#endif /* _IO_MTSAFE_IO */
-__END_DECLS
-
#endif /* _LIBIO_H */
diff --git a/libio/libioP.h b/libio/libioP.h
index 58cc9de094..abbf331685 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -52,10 +52,6 @@
adjusts the libio configuration. */
#include <_G_config.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define _IO_seek_set 0
#define _IO_seek_cur 1
#define _IO_seek_end 2
@@ -731,10 +727,6 @@ extern int _IO_vscanf (const char *, _IO_va_list) __THROW;
# define _IO_pos_0 ((_IO_off64_t) 0)
#endif
-#ifdef __cplusplus
-}
-#endif
-
#ifdef _IO_MTSAFE_IO
/* check following! */
# ifdef _IO_USE_OLD_IO_FILE