# HG changeset patch # User Jim Meyering # Date 1197657986 -3600 # Node ID 699ecd849255a84afcf7563f1f54a81ae26b441c # Parent 5efaf5e75dd9f314d509d376f904df000af18c47 Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc, which has no openat syscall, yet does define AT_FDCWD. * lib/getcwd.c: Undef AT_FDCWD if there is no openat function. * modules/getcwd (Depends-on): Add openat. Reported by Petr Salinger. diff -r 5efaf5e75dd9 -r 699ecd849255 ChangeLog --- a/ChangeLog Mon Dec 17 12:21:10 2007 +0100 +++ b/ChangeLog Fri Dec 14 19:46:26 2007 +0100 @@ -1,3 +1,11 @@ +2007-12-17 Jim Meyering + + Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc, + which has no openat syscall, yet does define AT_FDCWD. + * lib/getcwd.c: Undef AT_FDCWD if there is no openat function. + * modules/getcwd (Depends-on): Add openat. + Reported by Petr Salinger. + 2007-12-17 Bruno Haible * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Use GL_NOCRASH to diff -r 5efaf5e75dd9 -r 699ecd849255 lib/getcwd.c --- a/lib/getcwd.c Mon Dec 17 12:21:10 2007 +0100 +++ b/lib/getcwd.c Fri Dec 14 19:46:26 2007 +0100 @@ -29,6 +29,11 @@ #include /* For AT_FDCWD on Solaris 9. */ +/* On a system without the openat function, undefine AT_FDCWD. */ +#if ! HAVE_OPENAT +# undef AT_FDCWD +#endif + #ifndef __set_errno # define __set_errno(val) (errno = (val)) #endif diff -r 5efaf5e75dd9 -r 699ecd849255 modules/getcwd --- a/modules/getcwd Mon Dec 17 12:21:10 2007 +0100 +++ b/modules/getcwd Fri Dec 14 19:46:26 2007 +0100 @@ -12,6 +12,7 @@ d-ino dirfd extensions +openat stdbool unistd malloc-posix