summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-12-17 12:43:43 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-12-17 12:43:43 -0800
commite9ad5665ede9f7599b7b26a7e478fd3e56ddf36e (patch)
treece45512be929919b0c1e0c34bfb6dcb313c645aa /lib
parent2d6b6005bcf3cc4ece90c0d19a645ca3ae1940ea (diff)
downloademacs-e9ad5665ede9f7599b7b26a7e478fd3e56ddf36e.tar.gz
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.c11
-rw-r--r--lib/gnulib.mk3
-rw-r--r--lib/time.in.h33
3 files changed, 42 insertions, 5 deletions
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index bb8bae12861..53ac317c0ba 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 9617452a796..16a4ed8700a 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 8ced7947445..d4c99061464 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>. */