X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-freopen-safer.c;h=bcd32862bdcca4ab803b7332f4b635e6cb1df29e;hb=5bf73fbe89c75118e5e9a53e4b88a57729d26964;hp=40ba8872d448b45574f4cf4c80a0f5f3ea39c45c;hpb=b72fe29b144b3cc850cd0fb39a7de10a011e35cb;p=gnulib.git diff --git a/tests/test-freopen-safer.c b/tests/test-freopen-safer.c index 40ba8872d..bcd32862b 100644 --- a/tests/test-freopen-safer.c +++ b/tests/test-freopen-safer.c @@ -1,5 +1,5 @@ /* Test of reopening a stream. - 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 "stdio--.h" /* Helpers. */ -#include #include /* This test intentionally closes stderr. So, we arrange to have fd 10 @@ -30,19 +29,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; int main (void)