From 15834b98efed40c82ee182c367b636e1769cb62a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 13 Jan 2008 16:51:48 +0100 Subject: [PATCH] Don't redefine __attribute__ without a need. --- ChangeLog | 18 ++++++++++++++++++ lib/argp-fmtstream.h | 4 ++-- lib/argp.h | 4 ++-- lib/c-stack.c | 4 ++-- lib/error.h | 4 ++-- lib/fts.c | 4 ++-- lib/openat.h | 4 ++-- lib/stdio.in.h | 4 ++-- lib/string.in.h | 2 +- lib/utimens.c | 4 ++-- lib/vasnprintf.h | 4 ++-- lib/xalloc.h | 4 ++-- lib/xprintf.h | 4 ++-- lib/xstrtol.h | 6 +++--- lib/xvasprintf.h | 4 ++-- 15 files changed, 46 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd3a69956..28118d645 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-01-13 Bruno Haible + + * lib/argp-fmtstream.h (__attribute__): Don't redefine if + __STRICT_ANSI__ is set: it's not needed by any version of gcc. + * lib/argp.h (__attribute__): Likewise. + * lib/c-stack.c (__attribute__): Likewise. + * lib/error.h (__attribute__): Likewise. + * lib/fts.c (__attribute__): Likewise. + * lib/openat.h (__attribute__): Likewise. + * lib/stdio.in.h (__attribute__): Likewise. + * lib/string.in.h (__attribute__): Likewise. + * lib/utimens.c (__attribute__): Likewise. + * lib/vasnprintf.h (__attribute__): Likewise. + * lib/xalloc.h (__attribute__): Likewise. + * lib/xprintf.h (__attribute__): Likewise. + * lib/xstrtol.h (__attribute__): Likewise. + * lib/xvasprintf.h (__attribute__): Likewise. + 2008-01-12 Bruno Haible * doc/gnulib.texi (Glibc Header File Substitutes): New chapter. diff --git a/lib/argp-fmtstream.h b/lib/argp-fmtstream.h index 50f1387f4..1cd6eac6d 100644 --- a/lib/argp-fmtstream.h +++ b/lib/argp-fmtstream.h @@ -1,5 +1,5 @@ /* Word-wrapping and line-truncating streams. - Copyright (C) 1997, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 1997, 2006-2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -30,7 +30,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/argp.h b/lib/argp.h index aa76eb4e4..90c452831 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -1,5 +1,5 @@ /* Hierarchial argument parsing, layered over getopt. - Copyright (C) 1995-1999,2003-2007 Free Software Foundation, Inc. + Copyright (C) 1995-1999,2003-2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -36,7 +36,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/c-stack.c b/lib/c-stack.c index 9bf19ff56..e5d8c5ab6 100644 --- a/lib/c-stack.c +++ b/lib/c-stack.c @@ -1,6 +1,6 @@ /* Stack overflow handling. - Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2006, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ #include #ifndef __attribute__ -# if __GNUC__ < 3 || __STRICT_ANSI__ +# if __GNUC__ < 3 # define __attribute__(x) # endif #endif diff --git a/lib/error.h b/lib/error.h index 8c215a7fd..6d4968114 100644 --- a/lib/error.h +++ b/lib/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/fts.c b/lib/fts.c index 82ea8f688..36ccf683d 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -1,6 +1,6 @@ /* Traverse a file hierarchy. - Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -120,7 +120,7 @@ enum Fts_stat #endif #ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) /* empty */ # endif #endif diff --git a/lib/openat.h b/lib/openat.h index b5e4f116c..68c7df0b7 100644 --- a/lib/openat.h +++ b/lib/openat.h @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ #include #ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) /* empty */ # endif #endif diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 772709cbd..5fd27ff65 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/string.in.h b/lib/string.in.h index 4d68cd9d4..706873393 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -27,7 +27,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The attribute __pure__ was added in gcc 2.96. */ diff --git a/lib/utimens.c b/lib/utimens.c index bca3685be..e12821962 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -1,6 +1,6 @@ /* Set file access and modification times. - Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it @@ -54,7 +54,7 @@ struct utimbuf #endif #ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif #endif diff --git a/lib/vasnprintf.h b/lib/vasnprintf.h index 7a0c01f4b..c56353e9f 100644 --- a/lib/vasnprintf.h +++ b/lib/vasnprintf.h @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2007-2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/xalloc.h b/lib/xalloc.h index 9c40d7264..40dcf4bd5 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -1,7 +1,7 @@ /* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. + 1999, 2000, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ extern "C" { # ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif # endif diff --git a/lib/xprintf.h b/lib/xprintf.h index 5340aa3b2..d11e270e9 100644 --- a/lib/xprintf.h +++ b/lib/xprintf.h @@ -1,5 +1,5 @@ /* printf wrappers that fail immediately for non-file-related errors - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/xstrtol.h b/lib/xstrtol.h index d96e34a06..9ac168bf3 100644 --- a/lib/xstrtol.h +++ b/lib/xstrtol.h @@ -1,7 +1,7 @@ /* A more useful interface to strtol. - Copyright (C) 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006, 2007 - Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006, 2007, + 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ _DECLARE_XSTRTOL (xstrtoimax, intmax_t) _DECLARE_XSTRTOL (xstrtoumax, uintmax_t) #ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif #endif diff --git a/lib/xvasprintf.h b/lib/xvasprintf.h index b37125128..42b032a48 100644 --- a/lib/xvasprintf.h +++ b/lib/xvasprintf.h @@ -1,5 +1,5 @@ /* vasprintf and asprintf with out-of-memory checking. - Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes -- 2.11.0