diff m4/fcntl_h.m4 @ 12047:21ec8b9a3f27

openat: fix openat bugs on Solaris 9 openat(fd,"file/",O_RDONLY) mistakenly succeeded. * lib/openat.c (rpl_openat): Work around Solaris 9 bug. * m4/openat.m4 (gl_FUNC_OPENAT): Also replace openat on Solaris. * modules/openat (Depends-on): Add open. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide new default. * modules/fcntl-h (Makefile.am): Substitute it. * lib/fcntl.in.h (openat): Declare replacement. * doc/posix-functions/openat.texi (openat): Document this. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Sat, 19 Sep 2009 11:16:58 -0600
parents 715fd167345f
children 01c9ffd58a51
line wrap: on
line diff
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,4 +1,4 @@
-# serial 3
+# serial 4
 # Configure fcntl.h.
 dnl Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -91,9 +91,10 @@
 
 AC_DEFUN([gl_FCNTL_H_DEFAULTS],
 [
-  GNULIB_OPEN=0;   AC_SUBST([GNULIB_OPEN])
-  GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
+  GNULIB_OPEN=0;    AC_SUBST([GNULIB_OPEN])
+  GNULIB_OPENAT=0;  AC_SUBST([GNULIB_OPENAT])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  HAVE_OPENAT=1;  AC_SUBST([HAVE_OPENAT])
-  REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
+  HAVE_OPENAT=1;    AC_SUBST([HAVE_OPENAT])
+  REPLACE_OPEN=0;   AC_SUBST([REPLACE_OPEN])
+  REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
 ])