diff options
author | Paul Eggert <[email protected]> | 2013-12-17 12:43:43 -0800 |
---|---|---|
committer | Paul Eggert <[email protected]> | 2013-12-17 12:43:43 -0800 |
commit | e9ad5665ede9f7599b7b26a7e478fd3e56ddf36e (patch) | |
tree | ce45512be929919b0c1e0c34bfb6dcb313c645aa /lib | |
parent | 2d6b6005bcf3cc4ece90c0d19a645ca3ae1940ea (diff) |
Merge from gnulib, incorporating:
2013-12-17 gettimeofday: port recent C++ fix to Emacs
2013-12-17 gettimeofday: fix C++ crosscompilation
2013-12-17 qacl: port to Windows better
* lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/file-has-acl.c | 11 | ||||
-rw-r--r-- | lib/gnulib.mk | 3 | ||||
-rw-r--r-- | lib/time.in.h | 33 |
3 files changed, 42 insertions, 5 deletions
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index bb8bae1286..53ac317c0b 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -75,8 +75,7 @@ acl_access_nontrivial (acl_t acl) } return got_one; -# else /* IRIX, Tru64 */ -# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */ +# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */ /* Don't use acl_get_entry: it is undocumented. */ int count = acl->acl_cnt; @@ -93,8 +92,7 @@ acl_access_nontrivial (acl_t acl) } return 0; -# endif -# if HAVE_ACL_FREE_TEXT /* Tru64 */ +# elif HAVE_ACL_FREE_TEXT /* Tru64 */ /* Don't use acl_get_entry: it takes only one argument and does not work. */ int count = acl->acl_num; @@ -117,7 +115,10 @@ acl_access_nontrivial (acl_t acl) } return 0; -# endif +# else + + errno = ENOSYS; + return -1; # endif } diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 9617452a79..16a4ed8700 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -1573,6 +1573,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ @@ -1582,6 +1583,8 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ + -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ diff --git a/lib/time.in.h b/lib/time.in.h index 8ced794744..d4c9906146 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -187,6 +187,39 @@ _GL_CXXALIASWARN (gmtime_r); # endif # endif +/* Convert TIMER to RESULT, assuming local time and UTC respectively. See + <http://www.opengroup.org/susv3xsh/localtime.html> and + <http://www.opengroup.org/susv3xsh/gmtime.html>. */ +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_LOCALTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime +# define localtime rpl_localtime +# endif +_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (localtime); +# endif + +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GMTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gmtime +# define gmtime rpl_gmtime +# endif +_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (gmtime); +# endif + /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See <http://www.opengroup.org/susv3xsh/strptime.html>. */ |