about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--include/libio.h3
-rw-r--r--libio/libio.h6
-rw-r--r--stdio-common/scanf15.c1
-rw-r--r--stdio-common/scanf17.c1
5 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cbcccac6e0..bd2152e58c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-09-03  Joseph Myers  <joseph@codesourcery.com>
+
+	* libio/libio.h [_IO_MTSAFE_IO]: Remove include of
+	<bits/stdio-lock.h> and commented-out include of <comthread.h>.
+	* include/libio.h [!_ISOMAC && _IO_MTSAFE_IO]: Include
+	<bits/stdio-lock.h>.
+	* stdio-common/scanf15.c (_IO_MTSAFE_IO): Undefine.
+	* stdio-common/scanf17.c (_IO_MTSAFE_IO): Likewise.
+
 2015-09-01  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
 	[BZ #18757]
diff --git a/include/libio.h b/include/libio.h
index 735941d230..f8a346a09a 100644
--- a/include/libio.h
+++ b/include/libio.h
@@ -1,3 +1,6 @@
+#if !defined _ISOMAC && defined _IO_MTSAFE_IO
+# include <bits/stdio-lock.h>
+#endif
 #include <libio/libio.h>
 
 #ifndef _ISOMAC
diff --git a/libio/libio.h b/libio/libio.h
index 08e0347147..bddfd8dd9b 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -145,11 +145,7 @@ struct _IO_jump_t;  struct _IO_FILE;
 
 /* Handle lock.  */
 #ifdef _IO_MTSAFE_IO
-# if defined __GLIBC__ && __GLIBC__ >= 2
-#  include <bits/stdio-lock.h>
-# else
-/*# include <comthread.h>*/
-# endif
+/* _IO_lock_t defined in internal headers during the glibc build.  */
 #else
 typedef void _IO_lock_t;
 #endif
diff --git a/stdio-common/scanf15.c b/stdio-common/scanf15.c
index 851466b3a9..a3ab15dea2 100644
--- a/stdio-common/scanf15.c
+++ b/stdio-common/scanf15.c
@@ -1,6 +1,7 @@
 #undef _GNU_SOURCE
 #define _XOPEN_SOURCE 600
 #undef _LIBC
+#undef _IO_MTSAFE_IO
 /* The following macro definitions are a hack.  They word around disabling
    the GNU extension while still using a few internal headers.  */
 #define u_char unsigned char
diff --git a/stdio-common/scanf17.c b/stdio-common/scanf17.c
index 4478a7022f..b6c0e63ab0 100644
--- a/stdio-common/scanf17.c
+++ b/stdio-common/scanf17.c
@@ -1,6 +1,7 @@
 #undef _GNU_SOURCE
 #define _XOPEN_SOURCE 600
 #undef _LIBC
+#undef _IO_MTSAFE_IO
 /* The following macro definitions are a hack.  They word around disabling
    the GNU extension while still using a few internal headers.  */
 #define u_char unsigned char