X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-argmatch.c;h=bf4a22f92249c968f0fd0b3ae5e6c0d95be0af4d;hb=fcdbbe0069c767a03f42f7615175ac03494de93a;hp=6aa5fd8382b0f12bbbbc912ac15414b0690727dc;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c index 6aa5fd838..bf4a22f92 100644 --- a/tests/test-argmatch.c +++ b/tests/test-argmatch.c @@ -1,5 +1,5 @@ /* Test of exact or abbreviated match search. - Copyright (C) 1990, 1998-1999, 2001-2007 Free Software Foundation, Inc. + Copyright (C) 1990, 1998-1999, 2001-2010 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 @@ -21,21 +21,27 @@ #include "argmatch.h" -#include #include #include "progname.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" + +/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in , 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 */ +# endif +#endif + +#ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +#endif + +ARGMATCH_DIE_DECL ATTRIBUTE_NORETURN; +ARGMATCH_DIE_DECL { exit (1); } +#endif enum backup_type {