]> Savannah Git Hosting - gnulib.git/commitdiff
renameat: Ensure declaration in <stdio.h> on NetBSD.
authorBruno Haible <bruno@clisp.org>
Tue, 15 Aug 2017 20:03:48 +0000 (22:03 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 15 Aug 2017 20:03:48 +0000 (22:03 +0200)
* lib/stdio.in.h: Include <unistd,h> also on NetBSD.
* doc/posix-functions/renameat.texi: Mention this problem.

ChangeLog
doc/posix-functions/renameat.texi
lib/stdio.in.h

index a9896aa5042990d97b57b309c6616a46ae8936f4..b07825ff938c7dd10fbaddfdfdf037fcef9eefb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-15  Bruno Haible  <bruno@clisp.org>
+
+       renameat: Ensure declaration in <stdio.h> on NetBSD.
+       * lib/stdio.in.h: Include <unistd,h> also on NetBSD.
+       * doc/posix-functions/renameat.texi: Mention this problem.
+
 2017-08-15  Bruno Haible  <bruno@clisp.org>
 
        duplocale: Work around NetBSD 7.0 bug.
index 46b25b1b3d0e55f729607892218e7372cd9fc5e1..ee01b89401bf98af7deedec1aee20b84f2f4912d 100644 (file)
@@ -19,7 +19,7 @@ Solaris 9.
 @item
 This function is declared in @code{<unistd.h>} instead of @code{<stdio.h>}
 on some platforms:
-Solaris 11 2011-11.
+NetBSD 7.0, Solaris 11 2011-11.
 @item
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
index 5329b9df33580f7dc6549ef7d55225a467d158fd..5ca8a2394238bea1d3d9174512e6fb9c202bd770 100644 (file)
 #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
   _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
 
-/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>.  */
+/* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>.  */
 /* But in any case avoid namespace pollution on glibc systems.  */
-#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \
     && ! defined __GLIBC__
 # include <unistd.h>
 #endif