/* Test that directory streams leave standard fds alone.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
gnulib version of fdopendir is unable to guarantee that
dirfd(fdopendir(fd))==fd, but we can at least guarantee that if
they are not equal, the fd returned by dirfd is safe. */
-#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
int dfd;
#endif
|| (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
return 2;
-#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
dfd = open (".", O_RDONLY);
ASSERT (STDERR_FILENO < dfd);
#endif
ASSERT (dirfd (dp) == -1 || STDERR_FILENO < dirfd (dp));
ASSERT (closedir (dp) == 0);
-#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
{
int fd = dup_safer (dfd);
ASSERT (STDERR_FILENO < fd);
#endif
}
-#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR
+#if HAVE_FDOPENDIR || GNULIB_TEST_FDOPENDIR
ASSERT (close (dfd) == 0);
#endif