From 59635b60f5829d7d1794a8e7f166bc6e7d12e1f2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 13 Feb 2011 23:44:28 +0100 Subject: [PATCH 2/2] Consistent macro naming for macros that use GCC __attribute__. * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from _ATTRIBUTE_NONNULL_. * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise. * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR. * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from ATTRIBUTE_DEPRECATED. * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from ATTRIBUTE_NORETURN. * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise. (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC. (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE. * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from ATTRIBUTE_SENTINEL. * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from ATTRIBUTE_RETURN_CHECK. * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise. * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from ATTRIBUTE_NORETURN. * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise. Reported by Paul Eggert. --- ChangeLog | 27 +++++++++++++++++++++++++++ lib/di-set.h | 12 ++++++------ lib/hash.h | 10 +++++----- lib/ignore-value.h | 8 ++++---- lib/ino-map.h | 10 +++++----- lib/openat.h | 8 ++++---- lib/safe-alloc.h | 10 +++++----- lib/sigpipe-die.h | 6 +++--- lib/version-etc.h | 8 ++++---- lib/xalloc.h | 38 +++++++++++++++++++------------------- lib/xmemdup0.h | 6 +++--- lib/xstrtol.h | 6 +++--- tests/test-argmatch.c | 6 +++--- tests/test-exclude.c | 6 +++--- tests/test-ignore-value.c | 16 ++++++++-------- 15 files changed, 102 insertions(+), 75 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a363a5..e81347c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,32 @@ 2011-02-13 Bruno Haible + Consistent macro naming for macros that use GCC __attribute__. + * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from + _ATTRIBUTE_NONNULL_. + * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise. + * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR. + * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from + ATTRIBUTE_DEPRECATED. + * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from + ATTRIBUTE_NORETURN. + * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise. + * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise. + * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise. + * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise. + (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC. + (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE. + * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from + ATTRIBUTE_SENTINEL. + * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from + ATTRIBUTE_RETURN_CHECK. + * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise. + * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from + ATTRIBUTE_NORETURN. + * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise. + Reported by Paul Eggert. + +2011-02-13 Bruno Haible + Don't interfere with a program's definition of __attribute__. * lib/argp.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. diff --git a/lib/di-set.h b/lib/di-set.h index 318e9ae..abc3161 100644 --- a/lib/di-set.h +++ b/lib/di-set.h @@ -3,17 +3,17 @@ # include -# undef _ATTRIBUTE_NONNULL_ +# undef _GL_ATTRIBUTE_NONNULL # if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__ -# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m))) +# define _GL_ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m))) # else -# define _ATTRIBUTE_NONNULL_(m) +# define _GL_ATTRIBUTE_NONNULL(m) # endif struct di_set *di_set_alloc (void); -int di_set_insert (struct di_set *, dev_t, ino_t) _ATTRIBUTE_NONNULL_ (1); -void di_set_free (struct di_set *) _ATTRIBUTE_NONNULL_ (1); +int di_set_insert (struct di_set *, dev_t, ino_t) _GL_ATTRIBUTE_NONNULL (1); +void di_set_free (struct di_set *) _GL_ATTRIBUTE_NONNULL (1); int di_set_lookup (struct di_set *dis, dev_t dev, ino_t ino) - _ATTRIBUTE_NONNULL_ (1); + _GL_ATTRIBUTE_NONNULL (1); #endif diff --git a/lib/hash.h b/lib/hash.h index 19671f6..9f694be 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -30,9 +30,9 @@ /* The __attribute__ feature is available in gcc versions 2.5 and later. The warn_unused_result attribute appeared first in gcc-3.4.0. */ # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# define ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) +# define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) # else -# define ATTRIBUTE_WUR /* empty */ +# define _GL_ATTRIBUTE_WUR /* empty */ # endif typedef size_t (*Hash_hasher) (const void *, size_t); @@ -78,13 +78,13 @@ size_t hash_string (const char *, size_t); void hash_reset_tuning (Hash_tuning *); Hash_table *hash_initialize (size_t, const Hash_tuning *, Hash_hasher, Hash_comparator, - Hash_data_freer) ATTRIBUTE_WUR; + Hash_data_freer) _GL_ATTRIBUTE_WUR; void hash_clear (Hash_table *); void hash_free (Hash_table *); /* Insertion and deletion. */ -bool hash_rehash (Hash_table *, size_t) ATTRIBUTE_WUR; -void *hash_insert (Hash_table *, const void *) ATTRIBUTE_WUR; +bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR; +void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR; int hash_insert0 (Hash_table *table, const void *entry, const void **matched_ent); void *hash_delete (Hash_table *, const void *); diff --git a/lib/ignore-value.h b/lib/ignore-value.h index 5e683bb..f021a1a 100644 --- a/lib/ignore-value.h +++ b/lib/ignore-value.h @@ -35,13 +35,13 @@ #ifndef _GL_IGNORE_VALUE_H # define _GL_IGNORE_VALUE_H -# ifndef ATTRIBUTE_DEPRECATED +# ifndef _GL_ATTRIBUTE_DEPRECATED /* The __attribute__((__deprecated__)) feature is available in gcc versions 3.1 and newer. */ # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) -# define ATTRIBUTE_DEPRECATED /* empty */ +# define _GL_ATTRIBUTE_DEPRECATED /* empty */ # else -# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) # endif # endif @@ -56,7 +56,7 @@ /* ignore_value works for scalars, pointers and aggregates; deprecate ignore_ptr. */ -static inline void ATTRIBUTE_DEPRECATED +static inline void _GL_ATTRIBUTE_DEPRECATED ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */ #endif diff --git a/lib/ino-map.h b/lib/ino-map.h index e060af0..b742291 100644 --- a/lib/ino-map.h +++ b/lib/ino-map.h @@ -3,17 +3,17 @@ # include -# undef _ATTRIBUTE_NONNULL_ +# undef _GL_ATTRIBUTE_NONNULL # if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__ -# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m))) +# define _GL_ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m))) # else -# define _ATTRIBUTE_NONNULL_(m) +# define _GL_ATTRIBUTE_NONNULL(m) # endif # define INO_MAP_INSERT_FAILURE ((size_t) -1) struct ino_map *ino_map_alloc (size_t); -void ino_map_free (struct ino_map *) _ATTRIBUTE_NONNULL_ (1); -size_t ino_map_insert (struct ino_map *, ino_t) _ATTRIBUTE_NONNULL_ (1); +void ino_map_free (struct ino_map *) _GL_ATTRIBUTE_NONNULL (1); +size_t ino_map_insert (struct ino_map *, ino_t) _GL_ATTRIBUTE_NONNULL (1); #endif diff --git a/lib/openat.h b/lib/openat.h index 9cf7e0f..5cb1866 100644 --- a/lib/openat.h +++ b/lib/openat.h @@ -28,9 +28,9 @@ #include #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ #endif #if !HAVE_OPENAT @@ -47,8 +47,8 @@ bool openat_needs_fchdir (void); #endif -void openat_restore_fail (int) ATTRIBUTE_NORETURN; -void openat_save_fail (int) ATTRIBUTE_NORETURN; +void openat_restore_fail (int) _GL_ATTRIBUTE_NORETURN; +void openat_save_fail (int) _GL_ATTRIBUTE_NORETURN; /* Using these function names makes application code slightly more readable than it would be with diff --git a/lib/safe-alloc.h b/lib/safe-alloc.h index 1b5ed15..269d1bf 100644 --- a/lib/safe-alloc.h +++ b/lib/safe-alloc.h @@ -31,22 +31,22 @@ # endif #endif -# ifndef ATTRIBUTE_RETURN_CHECK +# ifndef _GL_ATTRIBUTE_RETURN_CHECK # if __GNUC_PREREQ (3, 4) -# define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) +# define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) # else -# define ATTRIBUTE_RETURN_CHECK +# define _GL_ATTRIBUTE_RETURN_CHECK # endif # endif /* Don't call these directly - use the macros below */ int safe_alloc_alloc_n (void *ptrptr, size_t size, size_t count, int zeroed) - ATTRIBUTE_RETURN_CHECK; + _GL_ATTRIBUTE_RETURN_CHECK; int safe_alloc_realloc_n (void *ptrptr, size_t size, size_t count) - ATTRIBUTE_RETURN_CHECK; + _GL_ATTRIBUTE_RETURN_CHECK; /** * ALLOC: diff --git a/lib/sigpipe-die.h b/lib/sigpipe-die.h index 4cbd920..91565bc 100644 --- a/lib/sigpipe-die.h +++ b/lib/sigpipe-die.h @@ -48,14 +48,14 @@ extern "C" { # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ # endif /* Emit an error message indicating a SIGPIPE signal, and terminate the process with an error code. */ -extern void sigpipe_die (void) ATTRIBUTE_NORETURN; +extern void sigpipe_die (void) _GL_ATTRIBUTE_NORETURN; /* Install a SIGPIPE handler that invokes PREPARE_DIE and then emits an error message and exits. PREPARE_DIE may be NULL, meaning a no-op. */ diff --git a/lib/version-etc.h b/lib/version-etc.h index bddaf0a..a9b313d 100644 --- a/lib/version-etc.h +++ b/lib/version-etc.h @@ -23,11 +23,11 @@ # include /* The `sentinel' attribute was added in gcc 4.0. */ -#ifndef ATTRIBUTE_SENTINEL +#ifndef _GL_ATTRIBUTE_SENTINEL # if 4 <= __GNUC__ -# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) +# define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) # else -# define ATTRIBUTE_SENTINEL /* empty */ +# define _GL_ATTRIBUTE_SENTINEL /* empty */ # endif #endif @@ -70,7 +70,7 @@ extern void version_etc (FILE *stream, const char *command_name, const char *package, const char *version, /* const char *author1, ..., NULL */ ...) - ATTRIBUTE_SENTINEL; + _GL_ATTRIBUTE_SENTINEL; /* Display the usual `Report bugs to' stanza */ extern void emit_bug_reporting_address (void); diff --git a/lib/xalloc.h b/lib/xalloc.h index 30823b7..86b9b3e 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -27,21 +27,21 @@ extern "C" { # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ # endif # if __GNUC__ >= 3 -# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else -# define ATTRIBUTE_MALLOC +# define _GL_ATTRIBUTE_MALLOC # endif # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) -# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) # else -# define ATTRIBUTE_ALLOC_SIZE(args) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) # endif /* This function is always triggered when memory is exhausted. @@ -49,21 +49,21 @@ extern "C" { or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ -extern void xalloc_die (void) ATTRIBUTE_NORETURN; +extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN; void *xmalloc (size_t s) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xzalloc (size_t s) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xcalloc (size_t n, size_t s) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1, 2)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xrealloc (void *p, size_t s) - ATTRIBUTE_ALLOC_SIZE ((2)); + _GL_ATTRIBUTE_ALLOC_SIZE ((2)); void *x2realloc (void *p, size_t *pn); void *xmemdup (void const *p, size_t s) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((2)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2)); char *xstrdup (char const *str) - ATTRIBUTE_MALLOC; + _GL_ATTRIBUTE_MALLOC; /* Return 1 if an array of N objects, each of size S, cannot exist due to size arithmetic overflow. S must be positive and N must be @@ -111,12 +111,12 @@ char *xstrdup (char const *str) # define static_inline static inline # else void *xnmalloc (size_t n, size_t s) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1, 2)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xnrealloc (void *p, size_t n, size_t s) - ATTRIBUTE_ALLOC_SIZE ((2, 3)); + _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); void *x2nrealloc (void *p, size_t *pn, size_t s); char *xcharalloc (size_t n) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); # endif # ifdef static_inline @@ -125,7 +125,7 @@ char *xcharalloc (size_t n) dynamically, with error checking. S must be nonzero. */ static_inline void *xnmalloc (size_t n, size_t s) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1, 2)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); static_inline void * xnmalloc (size_t n, size_t s) { @@ -138,7 +138,7 @@ xnmalloc (size_t n, size_t s) objects each of S bytes, with error checking. S must be nonzero. */ static_inline void *xnrealloc (void *p, size_t n, size_t s) - ATTRIBUTE_ALLOC_SIZE ((2, 3)); + _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); static_inline void * xnrealloc (void *p, size_t n, size_t s) { @@ -240,7 +240,7 @@ x2nrealloc (void *p, size_t *pn, size_t s) except it returns char *. */ static_inline char *xcharalloc (size_t n) - ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE ((1)); + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); static_inline char * xcharalloc (size_t n) { diff --git a/lib/xmemdup0.h b/lib/xmemdup0.h index ff118a6..8a64e70 100644 --- a/lib/xmemdup0.h +++ b/lib/xmemdup0.h @@ -26,9 +26,9 @@ extern "C" { # endif # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ # endif /* This function is always triggered when memory is exhausted. @@ -36,7 +36,7 @@ extern "C" { or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ -extern void xalloc_die (void) ATTRIBUTE_NORETURN; +extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN; char *xmemdup0 (void const *p, size_t s); diff --git a/lib/xstrtol.h b/lib/xstrtol.h index f91d864..716a94f 100644 --- a/lib/xstrtol.h +++ b/lib/xstrtol.h @@ -52,9 +52,9 @@ _DECLARE_XSTRTOL (xstrtoull, unsigned long long int) #endif #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ #endif /* Report an error for an invalid integer in an option argument. @@ -74,6 +74,6 @@ _DECLARE_XSTRTOL (xstrtoull, unsigned long long int) void xstrtol_fatal (enum strtol_error, int, char, struct option const *, - char const *) ATTRIBUTE_NORETURN; + char const *) _GL_ATTRIBUTE_NORETURN; #endif /* not XSTRTOL_H_ */ diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c index 57ec0d5..7392f57 100644 --- a/tests/test-argmatch.c +++ b/tests/test-argmatch.c @@ -30,12 +30,12 @@ thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ # endif -ARGMATCH_DIE_DECL ATTRIBUTE_NORETURN; +ARGMATCH_DIE_DECL _GL_ATTRIBUTE_NORETURN; ARGMATCH_DIE_DECL { exit (1); } #endif diff --git a/tests/test-exclude.c b/tests/test-exclude.c index bab4676..f0fb321 100644 --- a/tests/test-exclude.c +++ b/tests/test-exclude.c @@ -64,13 +64,13 @@ ARGMATCH_VERIFY (exclude_keywords, exclude_flags); thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else -# define ATTRIBUTE_NORETURN /* empty */ +# define _GL_ATTRIBUTE_NORETURN /* empty */ # endif #endif -ARGMATCH_DIE_DECL ATTRIBUTE_NORETURN; +ARGMATCH_DIE_DECL _GL_ATTRIBUTE_NORETURN; ARGMATCH_DIE_DECL { exit (1); } #endif diff --git a/tests/test-ignore-value.c b/tests/test-ignore-value.c index a1c86e0..501f79c 100644 --- a/tests/test-ignore-value.c +++ b/tests/test-ignore-value.c @@ -23,20 +23,20 @@ #include -#ifndef ATTRIBUTE_RETURN_CHECK +#ifndef _GL_ATTRIBUTE_RETURN_CHECK # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) -# define ATTRIBUTE_RETURN_CHECK +# define _GL_ATTRIBUTE_RETURN_CHECK # else -# define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) +# define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) # endif #endif struct s { int i; }; -static char doChar (void) ATTRIBUTE_RETURN_CHECK; -static int doInt (void) ATTRIBUTE_RETURN_CHECK; -static off_t doOff (void) ATTRIBUTE_RETURN_CHECK; -static void *doPtr (void) ATTRIBUTE_RETURN_CHECK; -static struct s doStruct (void) ATTRIBUTE_RETURN_CHECK; +static char doChar (void) _GL_ATTRIBUTE_RETURN_CHECK; +static int doInt (void) _GL_ATTRIBUTE_RETURN_CHECK; +static off_t doOff (void) _GL_ATTRIBUTE_RETURN_CHECK; +static void *doPtr (void) _GL_ATTRIBUTE_RETURN_CHECK; +static struct s doStruct (void) _GL_ATTRIBUTE_RETURN_CHECK; static char doChar (void) -- 1.6.3.2