aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-12-17 12:43:43 -0800
committerPaul Eggert2013-12-17 12:43:43 -0800
commite9ad5665ede9f7599b7b26a7e478fd3e56ddf36e (patch)
treece45512be929919b0c1e0c34bfb6dcb313c645aa
parent2d6b6005bcf3cc4ece90c0d19a645ca3ae1940ea (diff)
downloademacs-e9ad5665ede9f7599b7b26a7e478fd3e56ddf36e.tar.gz
emacs-e9ad5665ede9f7599b7b26a7e478fd3e56ddf36e.zip
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.
-rw-r--r--ChangeLog10
-rw-r--r--lib/file-has-acl.c11
-rw-r--r--lib/gnulib.mk3
-rw-r--r--lib/time.in.h33
-rw-r--r--m4/gettimeofday.m48
-rw-r--r--m4/time_h.m411
6 files changed, 65 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 1eb90c663b8..9bc922990a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
12013-12-17 Paul Eggert <eggert@cs.ucla.edu>
2
3 Merge from gnulib, incorporating:
4 2013-12-17 gettimeofday: port recent C++ fix to Emacs
5 2013-12-17 gettimeofday: fix C++ crosscompilation
6 2013-12-17 qacl: port to Windows better
7 * lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4:
8 Update from gnulib.
9 * lib/gnulib.mk: Regenerate.
10
12013-12-16 Paul Eggert <eggert@cs.ucla.edu> 112013-12-16 Paul Eggert <eggert@cs.ucla.edu>
2 12
3 * INSTALL: Clarify treatment of image libraries. 13 * INSTALL: Clarify treatment of image libraries.
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)
75 } 75 }
76 return got_one; 76 return got_one;
77 77
78# else /* IRIX, Tru64 */ 78# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */
79# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
80 /* Don't use acl_get_entry: it is undocumented. */ 79 /* Don't use acl_get_entry: it is undocumented. */
81 80
82 int count = acl->acl_cnt; 81 int count = acl->acl_cnt;
@@ -93,8 +92,7 @@ acl_access_nontrivial (acl_t acl)
93 } 92 }
94 return 0; 93 return 0;
95 94
96# endif 95# elif HAVE_ACL_FREE_TEXT /* Tru64 */
97# if HAVE_ACL_FREE_TEXT /* Tru64 */
98 /* Don't use acl_get_entry: it takes only one argument and does not work. */ 96 /* Don't use acl_get_entry: it takes only one argument and does not work. */
99 97
100 int count = acl->acl_num; 98 int count = acl->acl_num;
@@ -117,7 +115,10 @@ acl_access_nontrivial (acl_t acl)
117 } 115 }
118 return 0; 116 return 0;
119 117
120# endif 118# else
119
120 errno = ENOSYS;
121 return -1;
121# endif 122# endif
122} 123}
123 124
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) $(
1573 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1573 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1574 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1574 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1575 -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ 1575 -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
1576 -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
1576 -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ 1577 -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
1577 -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ 1578 -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
1578 -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ 1579 -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) $(
1582 -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ 1583 -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
1583 -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ 1584 -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
1584 -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ 1585 -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
1586 -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
1587 -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
1585 -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ 1588 -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
1586 -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ 1589 -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
1587 -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ 1590 -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);
187# endif 187# endif
188# endif 188# endif
189 189
190/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
191 <http://www.opengroup.org/susv3xsh/localtime.html> and
192 <http://www.opengroup.org/susv3xsh/gmtime.html>. */
193# if @GNULIB_GETTIMEOFDAY@
194# if @REPLACE_LOCALTIME@
195# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
196# undef localtime
197# define localtime rpl_localtime
198# endif
199_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
200 _GL_ARG_NONNULL ((1)));
201_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
202# else
203_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
204# endif
205_GL_CXXALIASWARN (localtime);
206# endif
207
208# if @GNULIB_GETTIMEOFDAY@
209# if @REPLACE_GMTIME@
210# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
211# undef gmtime
212# define gmtime rpl_gmtime
213# endif
214_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
215 _GL_ARG_NONNULL ((1)));
216_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
217# else
218_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
219# endif
220_GL_CXXALIASWARN (gmtime);
221# endif
222
190/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store 223/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
191 the resulting broken-down time into TM. See 224 the resulting broken-down time into TM. See
192 <http://www.opengroup.org/susv3xsh/strptime.html>. */ 225 <http://www.opengroup.org/susv3xsh/strptime.html>. */
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 3c05e59f063..f48ef4365cd 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
1# serial 20 1# serial 21
2 2
3# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc. 3# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
@@ -127,10 +127,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
127]) 127])
128 128
129AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ 129AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
130 AC_DEFINE([gmtime], [rpl_gmtime], 130 REPLACE_GMTIME=1
131 [Define to rpl_gmtime if the replacement function should be used.]) 131 REPLACE_LOCALTIME=1
132 AC_DEFINE([localtime], [rpl_localtime],
133 [Define to rpl_localtime if the replacement function should be used.])
134]) 132])
135 133
136# Prerequisites of lib/gettimeofday.c. 134# Prerequisites of lib/gettimeofday.c.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 3b839005346..3fefb01b215 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
2 2
3# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. 3# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
4 4
5# serial 7 5# serial 8
6 6
7# This file is free software; the Free Software Foundation 7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it, 8# gives unlimited permission to copy and/or distribute it,
@@ -106,4 +106,13 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
106 REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) 106 REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
107 REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) 107 REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
108 REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) 108 REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
109
110 dnl Hack so that the time module doesn't depend on the sys_time module.
111 dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent.
112 : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY])
113 dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME
114 dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier
115 dnl is no longer a big deal.
116 REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME])
117 REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME])
109]) 118])