2006-04-07 Mike Frysinger * misc/error.h (__attribute__): Rename to __error_attribute__. (__format__): Rename to __error_format__. (__printf__): Rename to __error_printf__. (error): Update prototype to use new names. (error_at_line): Likewise. --- misc/error.h +++ misc/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2003, 2006 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 @@ -20,16 +20,21 @@ #ifndef _ERROR_H #define _ERROR_H 1 -#ifndef __attribute__ +#ifndef __error_attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ -# define __attribute__(Spec) /* empty */ +# define __error_attribute__(Spec) /* empty */ +# else +# define __error_attribute__(Spec) __attribute__(Spec) # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __format__ format -# define __printf__ printf +# define __error_format__ format +# define __error_printf__ printf +# else +# define __error_format__ __format__ +# define __error_printf__ __printf__ # endif #endif @@ -44,11 +49,11 @@ extern "C" { If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ extern void error (int __status, int __errnum, const char *__format, ...) - __attribute__ ((__format__ (__printf__, 3, 4))); + __error_attribute__ ((__error_format__ (__error_printf__, 3, 4))); extern void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __lineno, const char *__format, ...) - __attribute__ ((__format__ (__printf__, 5, 6))); + __error_attribute__ ((__error_format__ (__error_printf__, 5, 6))); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this