summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-tests/test-getcwd.c')
-rw-r--r--gnulib-tests/test-getcwd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnulib-tests/test-getcwd.c b/gnulib-tests/test-getcwd.c
index 2ddcd206..756f932f 100644
--- a/gnulib-tests/test-getcwd.c
+++ b/gnulib-tests/test-getcwd.c
@@ -1,5 +1,5 @@
/* Test of getcwd() function.
- Copyright (C) 2009-2014 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015 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
@@ -153,7 +153,13 @@ test_long_name (void)
while (1)
{
+# ifdef HAVE_GETCWD_SHORTER
+ /* On OS/X <= 10.9 for example, we're restricted to shorter paths
+ as lstat() doesn't support more than PATH_MAX. */
+ size_t dotdot_max = PATH_MAX * 2;
+# else
size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
+# endif
char *c = NULL;
cwd_len += DIR_NAME_SIZE;
@@ -202,7 +208,7 @@ test_long_name (void)
fail = 6;
break;
}
- if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
+ if (HAVE_OPENAT_SUPPORT || errno == ERANGE || errno == ENOENT)
{
fail = 7;
break;