X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-dirent-safer.c;h=1a83eeac7b2031b41dfab20f3f1d46382012a0fc;hb=94012b4fafb086f608e12e3f44ddf0202f418e6d;hp=aeb8342d9ecba8e547f0268e5ae09fd88b0853bf;hpb=4f1227bdeac3e4e18c9b3efb27623875e02d681d;p=gnulib.git diff --git a/tests/test-dirent-safer.c b/tests/test-dirent-safer.c index aeb8342d9..1a83eeac7 100644 --- a/tests/test-dirent-safer.c +++ b/tests/test-dirent-safer.c @@ -1,5 +1,5 @@ /* Test that directory streams leave standard fds alone. - 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 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "unistd-safer.h" @@ -33,22 +32,13 @@ 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 () +main (void) { int i; DIR *dp;