summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-02-26 01:06:05 +0000
committerUlrich Drepper <drepper@redhat.com>1997-02-26 01:06:05 +0000
commit4f72518358f9c217d00b8655cae01ad6bf77d9fa (patch)
tree2a3120a10d54d481695c794f68fe7f1f92573048 /misc
parent655fe3107058017a6d4e618be03b91b119457354 (diff)
update from main archive 970226
Diffstat (limited to 'misc')
-rw-r--r--misc/error.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/error.c b/misc/error.c
index 2a7df0210d..f49e4a7983 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -71,6 +71,11 @@ unsigned int error_message_count;
#define program_name program_invocation_name
#include <errno.h>
+/* In GNU libc we want do not want to use the common name `error' directly.
+ Instead make it a weak alias. */
+#define error __error
+#define error_at_line __error_at_line
+
#else
/* The calling program should define program_name and set it to the
@@ -230,3 +235,11 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
if (status)
exit (status);
}
+
+#ifdef _LIBC
+/* Make the weak alias. */
+#undef error
+#undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif