From: Jim Meyering Date: Fri, 14 Dec 2007 18:46:26 +0000 (+0100) Subject: Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc, X-Git-Tag: v0.1~7919 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=fecc3363511ec92cdb862a17d1c62413cb2a04af;p=gnulib.git 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 --git a/ChangeLog b/ChangeLog index f9159cbd4..a8f8b4c57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 --git a/lib/getcwd.c b/lib/getcwd.c index b8e9989b9..98df8bf99 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -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 --git a/modules/getcwd b/modules/getcwd index 17687e7ad..46ecb03d4 100644 --- a/modules/getcwd +++ b/modules/getcwd @@ -12,6 +12,7 @@ mempcpy d-ino dirfd extensions +openat stdbool unistd malloc-posix