diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/error.c | 13 | ||||
-rw-r--r-- | misc/sys/cdefs.h | 7 |
2 files changed, 19 insertions, 1 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 diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index e90dd0f220..f9dcce4c8d 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -102,4 +102,9 @@ #define __attribute__(xyz) /* Ignore. */ #endif + +/* For now no version of gcc knows the `restrict' keyword. Define it + for now unconditionally to the empty string. */ +#define __restrict + #endif /* sys/cdefs.h */ |