summaryrefslogtreecommitdiff
path: root/lib/sys_stat.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-13 10:39:04 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-13 10:39:04 -0700
commit1ef6de0565b2d11481f1f663742d2c0d79e8eb97 (patch)
treebddc8d4c8cc5f904a7ba2e724371309717552678 /lib/sys_stat.in.h
parent3eca4629203c3038f04db312999ca32d8e292e50 (diff)
downloademacs-1ef6de0565b2d11481f1f663742d2c0d79e8eb97.tar.gz
Update for gnulib, adding Solaris 9+10 fixes.
Diffstat (limited to 'lib/sys_stat.in.h')
-rw-r--r--lib/sys_stat.in.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index 61cdcc53928..13fae7b6703 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -355,7 +355,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
#if @GNULIB_FUTIMENS@
-# if @REPLACE_FUTIMENS@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
+ implementation relies on futimesat, which on Solaris 10 makes an invocation
+ to futimens that is meant to invoke the libc's futimens(), not gnulib's
+ futimens(). */
+# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef futimens
# define futimens rpl_futimens
@@ -368,7 +372,9 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
+# if @HAVE_FUTIMENS@
_GL_CXXALIASWARN (futimens);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef futimens
# if HAVE_RAW_DECL_FUTIMENS
@@ -612,7 +618,11 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
#if @GNULIB_UTIMENSAT@
-# if @REPLACE_UTIMENSAT@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
+ implementation relies on futimesat, which on Solaris 10 makes an invocation
+ to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
+ utimensat(). */
+# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef utimensat
# define utimensat rpl_utimensat
@@ -631,7 +641,9 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
struct timespec const times[2], int flag));
# endif
+# if @HAVE_UTIMENSAT@
_GL_CXXALIASWARN (utimensat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef utimensat
# if HAVE_RAW_DECL_UTIMENSAT