summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-02-13 23:44:28 +0100
committerBruno Haible <bruno@clisp.org>2011-02-15 02:31:03 +0100
commit59b191ed5bcff4198c9c89d0d52cec1880b9568d (patch)
treecba5b114df46cf45177aaaecbae5f03cc10ca8dd /tests
parentf6a5a124d0cb326acd4dfa9ce3276baa26734b16 (diff)
downloadgnulib-59b191ed5bcff4198c9c89d0d52cec1880b9568d.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-argmatch.c6
-rw-r--r--tests/test-exclude.c6
-rw-r--r--tests/test-ignore-value.c16
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c
index 57ec0d56e0..7392f571ea 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 bab4676329..f0fb321ce2 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 a1c86e0148..501f79c271 100644
--- a/tests/test-ignore-value.c
+++ b/tests/test-ignore-value.c
@@ -23,20 +23,20 @@
#include <stdio.h>
-#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)