This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.22-205-gacf0cb6


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  acf0cb6f249a051cf342784d4bca9558b3d1b651 (commit)
      from  2d8e36e691f460aeeb3362fd44c71cafc7bb5852 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=acf0cb6f249a051cf342784d4bca9558b3d1b651

commit acf0cb6f249a051cf342784d4bca9558b3d1b651
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Sep 3 20:24:54 2015 +0000

    Don't include <bits/stdio-lock.h> from installed <libio.h>.
    
    Every so often someone gets confused by the fact that the installed
    <bits/stdio-lock.h> header includes the non-installed <lowlevellock.h>
    header.
    
    This inclusion is not in fact a bug, because <bits/stdio-lock.h> only
    gets included by any header that users should include directly if
    _IO_MTSAFE_IO is defined, and that's an internal define used when
    building libio, not a feature test macro it's valid for users to
    define.  However, on general principles it's best to have as little as
    possible in the installed headers that is inapplicable for valid uses
    of the installed glibc.
    
    This patch moves the include of <bits/stdio-lock.h> to the internal
    header include/libio.h, so that even if someone defines _IO_MTSAFE_IO
    it won't get included.  This is intended as preparation for stopping
    <bits/stdio-lock.h> and <bits/libc-lock.h> from being installed at all
    (after this patch they aren't used in any installed header; formally
    of course they don't need to be installed even before this patch, but
    stopping them being installed before removing the #include would just
    exacerbate the confusion described above), and then moving those out
    of the bits/ namespace in accordance with the principle that that
    namespace is only for installed headers.
    
    The tests scanf15.c and scanf17.c avoid the internal headers; after
    this patch that means they need to undefine _IO_MTSAFE_IO as well as
    _LIBC so as to get a working _IO_lock_t definition for libio.h.  This
    brings them closer to using the headers as an installed program would,
    which clearly accords with the intent of those tests.
    
    Tested for x86_64 (testsuite, and that installed stripped shared
    libraries are unchanged by the patch).
    
    	* 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.

diff --git a/ChangeLog b/ChangeLog
index cbcccac..bd2152e 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 735941d..f8a346a 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 08e0347..bddfd8d 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 851466b..a3ab15d 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 4478a70..b6c0e63 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

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    9 +++++++++
 include/libio.h        |    3 +++
 libio/libio.h          |    6 +-----
 stdio-common/scanf15.c |    1 +
 stdio-common/scanf17.c |    1 +
 5 files changed, 15 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]