X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fchdir.c;h=145cafb9d250dedc1f542ccd783afdb9068928a7;hb=3b905e0ad791b750d0a471c90ecaacf2345a39c3;hp=7ec675e7da75945fbf01cbfeb0a9f2918fa1d962;hpb=89ae4589dd58d12e7cbcf0e92c1d828c1e430f97;p=gnulib.git diff --git a/tests/test-fchdir.c b/tests/test-fchdir.c index 7ec675e7d..145cafb9d 100644 --- a/tests/test-fchdir.c +++ b/tests/test-fchdir.c @@ -1,5 +1,5 @@ /* Test changing to a directory named by a file descriptor. - 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 @@ -25,23 +25,11 @@ SIGNATURE_CHECK (fchdir, int, (int)); #include #include -#include #include #include #include "cloexec.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" int main (void) @@ -96,7 +84,7 @@ main (void) ASSERT (close (fd) == 0); ASSERT (fcntl (new_fd, F_DUPFD, fd) == fd); ASSERT (close (new_fd) == 0); -#if GNULIB_DUP3 +#if GNULIB_TEST_DUP3 ASSERT (dup3 (fd, new_fd, 0) == new_fd); ASSERT (dup3 (new_fd, fd, 0) == fd); ASSERT (close (new_fd) == 0);