Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc,
authorJim Meyering <meyering@redhat.com>
Fri, 14 Dec 2007 18:46:26 +0000 (19:46 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 17 Dec 2007 13:18:15 +0000 (14:18 +0100)
which has no openat syscall, yet <fcntl.h> 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.

ChangeLog
lib/getcwd.c
modules/getcwd

index f9159cb..a8f8b4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-12-17  Jim Meyering  <meyering@redhat.com>
+
+       Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc,
+       which has no openat syscall, yet <fcntl.h> 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  <bruno@clisp.org>
 
        * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Use GL_NOCRASH to
index b8e9989..98df8bf 100644 (file)
 
 #include <fcntl.h> /* 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
index 17687e7..46ecb03 100644 (file)
@@ -12,6 +12,7 @@ mempcpy
 d-ino
 dirfd
 extensions
+openat
 stdbool
 unistd
 malloc-posix