From: Gianluca Guida Date: Tue, 22 Feb 2011 09:08:24 +0000 (+0000) Subject: Simplify (and fix) NBSD libc's weak references of getcwd. X-Git-Tag: v3.2.0~652 X-Git-Url: http://zhaoyanbai.com/repos/doc/man.3.txt?a=commitdiff_plain;h=8aa9382e582cb577387bb61678ba1f8462d57bd4;p=minix.git Simplify (and fix) NBSD libc's weak references of getcwd. --- diff --git a/lib/nbsd_libc/gen/getcwd.c b/lib/nbsd_libc/gen/getcwd.c index ed12f714d..75a8bb6a1 100644 --- a/lib/nbsd_libc/gen/getcwd.c +++ b/lib/nbsd_libc/gen/getcwd.c @@ -54,8 +54,12 @@ __RCSID("$NetBSD: getcwd.c,v 1.47 2011/01/20 02:57:00 christos Exp $"); #include "extern.h" #ifdef __weak_alias +#ifdef __minix +__weak_alias(getcwd,_getcwd) +#else __weak_alias(getcwd,_sys_getcwd) __weak_alias(_getcwd,_sys_getcwd) +#endif __weak_alias(realpath,_realpath) #if defined(_FORTIFY_SOURCE) && !defined(__lint__) diff --git a/lib/nbsd_libc/minix-port.patch b/lib/nbsd_libc/minix-port.patch index 23360b552..5a5a3b6fb 100644 --- a/lib/nbsd_libc/minix-port.patch +++ b/lib/nbsd_libc/minix-port.patch @@ -457,6 +457,22 @@ diff -ru /home/netbsd/src/lib/libc/gen/fts.c ./gen/fts.c static FTSENT *fts_alloc(FTS *, const char *, size_t); static FTSENT *fts_build(FTS *, int); +diff -ru /home/netbsd/src/lib/libc/gen/getcwd.c ./gen/getcwd.c +--- /home/netbsd/src/lib/libc/gen/getcwd.c 2011-01-20 03:02:11.000000000 +0000 ++++ ./gen/getcwd.c 2011-02-21 14:27:44.000000000 +0000 +@@ -54,8 +54,12 @@ + #include "extern.h" + + #ifdef __weak_alias ++#ifdef __minix ++__weak_alias(getcwd,_getcwd) ++#else + __weak_alias(getcwd,_sys_getcwd) + __weak_alias(_getcwd,_sys_getcwd) ++#endif + __weak_alias(realpath,_realpath) + + #if defined(_FORTIFY_SOURCE) && !defined(__lint__) diff -ru /home/netbsd/src/lib/libc/gen/getgrent.c ./gen/getgrent.c --- /home/netbsd/src/lib/libc/gen/getgrent.c 2008-04-28 20:22:59.000000000 +0000 +++ ./gen/getgrent.c 2011-02-15 10:00:10.000000000 +0000