X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-popen-safer.c;h=2293149c1c9619e9ec1eb81de333f4f09e8a5116;hb=fe9ecba865a2015187a862f25ada175a5d3d8aa8;hp=281dae9a7abfa122f7a39af655dae4be30e97964;hpb=ccb9c6798066958dd14c1005a7d5ffc1cbd6edae;p=gnulib.git diff --git a/tests/test-popen-safer.c b/tests/test-popen-safer.c index 281dae9a7..2293149c1 100644 --- a/tests/test-popen-safer.c +++ b/tests/test-popen-safer.c @@ -1,5 +1,5 @@ /* Test of opening a subcommand stream. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 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 @@ -22,7 +22,6 @@ #include "stdio--.h" /* Helpers. */ -#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; int main (int argc, char **argv)