Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename bits/stdio-lock.h to stdio-lock.h (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/stdio-lock.h to plain stdio-lock.h to follow
that convention.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	[BZ #14912]
	* bits/stdio-lock.h: Move to ...
	* sysdeps/generic/stdio-lock.h: ...here.
	(_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H.
	* sysdeps/nptl/bits/stdio-lock.h: Move to ...
	* sysdeps/nptl/stdio-lock.h: ...here.
	(_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H.
	* include/libio.h: Include <stdio-lock.h> instead of
	<bits/stdio-lock.h>.
	* sysdeps/nptl/fork.c: Likewise.
	* sysdeps/pthread/flockfile.c: Likewise.
	* sysdeps/pthread/ftrylockfile.c: Likewise.
	* sysdeps/pthread/funlockfile.c: Likewise.
  • Loading branch information
Joseph Myers committed Sep 4, 2015
1 parent 0f4341f commit 81503d1
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 11 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -1,5 +1,19 @@
2015-09-04 Joseph Myers <joseph@codesourcery.com>

[BZ #14912]
* bits/stdio-lock.h: Move to ...
* sysdeps/generic/stdio-lock.h: ...here.
(_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H.
* sysdeps/nptl/bits/stdio-lock.h: Move to ...
* sysdeps/nptl/stdio-lock.h: ...here.
(_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H.
* include/libio.h: Include <stdio-lock.h> instead of
<bits/stdio-lock.h>.
* sysdeps/nptl/fork.c: Likewise.
* sysdeps/pthread/flockfile.c: Likewise.
* sysdeps/pthread/ftrylockfile.c: Likewise.
* sysdeps/pthread/funlockfile.c: Likewise.

[BZ #14912]
* sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Move to ...
* sysdeps/unix/sysv/linux/m68k/m68k-vdso.h: ...here.
Expand Down
2 changes: 1 addition & 1 deletion include/libio.h
@@ -1,5 +1,5 @@
#if !defined _ISOMAC && defined _IO_MTSAFE_IO
# include <bits/stdio-lock.h>
# include <stdio-lock.h>
#endif
#include <libio/libio.h>

Expand Down
6 changes: 3 additions & 3 deletions bits/stdio-lock.h → sysdeps/generic/stdio-lock.h
Expand Up @@ -16,8 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */

#ifndef _BITS_STDIO_LOCK_H
#define _BITS_STDIO_LOCK_H 1
#ifndef _STDIO_LOCK_H
#define _STDIO_LOCK_H 1

#include <bits/libc-lock.h>

Expand Down Expand Up @@ -54,4 +54,4 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
_IO_cleanup_region_end (0)
#endif

#endif /* bits/stdio-lock.h */
#endif /* stdio-lock.h */
2 changes: 1 addition & 1 deletion sysdeps/nptl/fork.c
Expand Up @@ -25,7 +25,7 @@
#include <tls.h>
#include <hp-timing.h>
#include <ldsodefs.h>
#include <bits/stdio-lock.h>
#include <stdio-lock.h>
#include <atomic.h>
#include <nptl/pthreadP.h>
#include <fork.h>
Expand Down
6 changes: 3 additions & 3 deletions sysdeps/nptl/bits/stdio-lock.h → sysdeps/nptl/stdio-lock.h
Expand Up @@ -16,8 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */

#ifndef _BITS_STDIO_LOCK_H
#define _BITS_STDIO_LOCK_H 1
#ifndef _STDIO_LOCK_H
#define _STDIO_LOCK_H 1

#include <bits/libc-lock.h>
#include <lowlevellock.h>
Expand Down Expand Up @@ -107,4 +107,4 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t;

#endif

#endif /* bits/stdio-lock.h */
#endif /* stdio-lock.h */
2 changes: 1 addition & 1 deletion sysdeps/pthread/flockfile.c
Expand Up @@ -19,7 +19,7 @@
#include <pthread.h>
#include <stdio.h>
#include <libio.h>
#include <bits/stdio-lock.h>
#include <stdio-lock.h>


void
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/pthread/ftrylockfile.c
Expand Up @@ -19,7 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <bits/stdio-lock.h>
#include <stdio-lock.h>


int
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/pthread/funlockfile.c
Expand Up @@ -19,7 +19,7 @@
#include <pthread.h>
#include <stdio.h>
#include <libio.h>
#include <bits/stdio-lock.h>
#include <stdio-lock.h>


void
Expand Down

0 comments on commit 81503d1

Please sign in to comment.