projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't interfere with a program's definition of __attribute__.
[gnulib.git]
/
tests
/
test-argmatch.c
diff --git
a/tests/test-argmatch.c
b/tests/test-argmatch.c
index
4ec5fec
..
57ec0d5
100644
(file)
--- a/
tests/test-argmatch.c
+++ b/
tests/test-argmatch.c
@@
-29,15
+29,11
@@
/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
thus must link with a definition of that function. Provide it here. */
#ifdef ARGMATCH_DIE_DECL
/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
thus must link with a definition of that function. Provide it here. */
#ifdef ARGMATCH_DIE_DECL
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
-# define __attribute__(x) /* empty */
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# else
+# define ATTRIBUTE_NORETURN /* empty */
# endif
# endif
-#endif
-
-#ifndef ATTRIBUTE_NORETURN
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif
ARGMATCH_DIE_DECL ATTRIBUTE_NORETURN;
ARGMATCH_DIE_DECL { exit (1); }
ARGMATCH_DIE_DECL ATTRIBUTE_NORETURN;
ARGMATCH_DIE_DECL { exit (1); }