From 863d5d126e582a5f41a69792ba1240089f22d17e Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 19 Jan 2010 23:07:12 +0000 Subject: [PATCH] Revert r202447 by re-exposing the old uname(3) function. It makes hardly any sense to expose a symbol which should only be provided for binary compatibility, but it seems we don't have a lot of choice here. There are many autoconf scripts out there that try to create a binary that links against the old symbol to see whether uname(3) is present. These scripts fail to detect uname(3) now. It should be noted that the behaviour we implement is not against the standards: | The following shall be declared as a function and may also be defined | as a macro: | | int uname(struct utsname *); --- lib/libc/gen/Symbol.map | 1 + lib/libc/gen/uname.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index c21e93696a87..42404bcc277c 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -296,6 +296,7 @@ FBSD_1.0 { tcflow; ualarm; ulimit; + uname; unvis; strunvis; strunvisx; diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c index 5f8422ae78e6..5a7baf7c3210 100644 --- a/lib/libc/gen/uname.c +++ b/lib/libc/gen/uname.c @@ -33,15 +33,15 @@ static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94"; #include __FBSDID("$FreeBSD$"); +#define uname wrapped_uname #include #include #include #include +#undef uname int -__uname(struct utsname *name) +uname(struct utsname *name) { return __xuname(32, name); } - -__sym_compat(uname, __uname, FBSD_1.0);