glibc/sysdeps/mach
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
..
bits Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
hurd Fix __getcwd rewinddir namespace (bug 17584). 2014-11-12 16:24:16 +00:00
i386 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sys * hurd/hurdmalloc.c: Remove $ tag $ magic. 2005-12-06 01:24:30 +00:00
_strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
adjtime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
configure Require autoconf 2.69 2014-09-29 07:53:36 -07:00
configure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
getloadavg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getpagesize.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getsysstats.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gettimeofday.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mprotect.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
msync.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
munmap.c hurd: Do not allow unmapping address 0 2014-04-16 23:16:15 +02:00
nanosleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pagecopy.h Fix -Wundef warning on PAGE_COPY_THRESHOLD 2014-07-03 01:49:43 +05:30
readonly-area.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sched_yield.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strerror_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Subdirs * Makefile (subdir-target-args): New variable. 2006-02-28 07:11:04 +00:00
sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
thread_state.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
usleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xpg-strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00