* lib/sys_stat.in.h (futimens, utimensat): Define with rpl_ prefix on
Solaris.
Reported by Ben Walton <bwalton@artsci.utoronto.ca> via Eric Blake
in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8230>.
+2011-03-12 Bruno Haible <bruno@clisp.org>
+
+ futimens, utimensat: Avoid endless recursion on Solaris 10.
+ * lib/sys_stat.in.h (futimens, utimensat): Define with rpl_ prefix on
+ Solaris.
+ Reported by Ben Walton <bwalton@artsci.utoronto.ca> via Eric Blake
+ in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8230>.
+
2011-03-11 Jim Meyering <meyering@redhat.com>
maint.mk: relax a regexp to accommodate other formatting styles
2011-03-11 Jim Meyering <meyering@redhat.com>
maint.mk: relax a regexp to accommodate other formatting styles
+/* 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@ || defined __sun
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef futimens
# define futimens rpl_futimens
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef futimens
# define futimens rpl_futimens
# endif
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
# endif
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
_GL_CXXALIASWARN (futimens);
_GL_CXXALIASWARN (futimens);
#elif defined GNULIB_POSIXCHECK
# undef futimens
# if HAVE_RAW_DECL_FUTIMENS
#elif defined GNULIB_POSIXCHECK
# undef futimens
# if HAVE_RAW_DECL_FUTIMENS
-# 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@ || defined __sun
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef utimensat
# define utimensat rpl_utimensat
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef utimensat
# define utimensat rpl_utimensat
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
struct timespec const times[2], int flag));
# endif
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
struct timespec const times[2], int flag));
# endif
_GL_CXXALIASWARN (utimensat);
_GL_CXXALIASWARN (utimensat);
#elif defined GNULIB_POSIXCHECK
# undef utimensat
# if HAVE_RAW_DECL_UTIMENSAT
#elif defined GNULIB_POSIXCHECK
# undef utimensat
# if HAVE_RAW_DECL_UTIMENSAT