X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-openat-safer.c;h=1c6774f62e3ecdcb15c4a520f44bca00c807f056;hb=2f681c52f62c1bb9c9dd3fe5cd7a32ec384c34c7;hp=f7091807d3466820823bb3ebcdce2adc9e58d49b;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/tests/test-openat-safer.c b/tests/test-openat-safer.c index f7091807d..1c6774f62 100644 --- a/tests/test-openat-safer.c +++ b/tests/test-openat-safer.c @@ -1,5 +1,5 @@ /* Test that openat_safer leave standard fds alone. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2011 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,6 @@ #include #include -#include #include #include @@ -31,19 +30,10 @@ duplicate the original stderr. */ #define BACKUP_STDERR_FILENO 10 -static FILE *myerr; +#define ASSERT_STREAM myerr +#include "macros.h" -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (myerr); \ - abort (); \ - } \ - } \ - while (0) +static FILE *myerr; #define witness "test-openat-safer.txt"