glibc/dirent
Joseph Myers 2f5c1b000a Fix __getcwd rewinddir namespace (bug 17584).
__getcwd is called from dcigettext.o (brought in by various ISO C
functionality), but calls rewinddir, which is not an ISO C function.
This patch makes __getcwd call __rewinddir instead and makes rewinddir
a weak alias for __rewinddir.

Since getcwd.c is shared with gnulib (albeit not merged in either
direction for a long time, and omitted from gnulib's
config/srclist.txt list of shared files) I put in a #ifndef _LIBC
define of __rewinddir to rewinddir, although a future merged version
of getcwd could end up looking significantly different.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by this patch).

	[BZ #17584]
	* dirent/rewinddir.c (rewinddir): Rename to __rewinddir and define
	as weak alias of __rewinddir.  Don't use libc_hidden_def.
	(__rewinddir): Use libc_hidden_def.
	* sysdeps/mach/hurd/rewinddir.c: Rename to __rewinddir and define
	as weak alias of __rewinddir.  Don't use libc_hidden_def.
	(__rewinddir): Use libc_hidden_def.
	* sysdeps/posix/rewinddir.c: Rename to __rewinddir and define as
	weak alias of __rewinddir.  Don't use libc_hidden_def.
	(__rewinddir): Use libc_hidden_def.
	* include/dirent.h (rewinddir): Don't use libc_hidden_proto.
	(__rewinddir): Use libc_hidden_proto.
	* sysdeps/posix/getcwd.c [!_LIBC] (__rewinddir): Define to
	rewinddir.
	(__getcwd): Use __rewinddir instead of rewinddir.
2014-11-12 16:24:16 +00:00
..
alphasort64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
alphasort.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bug-readdir1.c Update. 2002-12-14 19:49:13 +00:00
closedir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dirent.h Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
dirfd.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fdopendir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getdents64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getdents.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
list.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile Consistently include Makeconfig after defining subdir. 2014-02-26 23:12:03 +00:00
opendir-tst1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
opendir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readdir64_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readdir64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readdir_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readdir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rewinddir.c Fix __getcwd rewinddir namespace (bug 17584). 2014-11-12 16:24:16 +00:00
scandir64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
scandir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
scandirat64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
scandirat.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
seekdir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
telldir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-fdopendir2.c * sysdeps/unix/fdopendir.c (fdopendir): If O_DIRECTORY is 2006-01-20 21:12:34 +00:00
tst-fdopendir.c * dirent/dirent.h: Declare fdopendir. 2005-09-28 21:19:53 +00:00
tst-seekdir.c * sysdeps/unix/rewinddir.c: Reset filepos. 2005-01-16 06:26:38 +00:00
Versions Implement scandirat function 2011-08-09 09:57:55 -04:00
versionsort64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
versionsort.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00