aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2018-02-01 09:20:13 -0800
committerPaul Eggert2018-02-01 09:21:39 -0800
commit100e33979b139c007c45f0fd339a76e5a7ef494a (patch)
tree79fb78ba700ac9ccecb4cf4e1133871a74fbf1c8 /lib
parentc85d9e401a686637284752a0eadc52f7a6b439d7 (diff)
downloademacs-100e33979b139c007c45f0fd339a76e5a7ef494a.tar.gz
emacs-100e33979b139c007c45f0fd339a76e5a7ef494a.zip
Update from gnulib
This includes: 2018-01-31 environ: Fix link error on 64-bit Cygwin 2018-01-27 Fix malfunction of socket functions on HP-UX in 64-bit mode 2018-01-26 manywarnings: fix maintainer comment 2018-01-23 Merge strftime.c changes from glibc * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/gnulib.mk.in, lib/nstrftime.c, lib/unistd.in.h, m4/extensions.m4: * m4/manywarnings.m4: Update.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnulib.mk.in1
-rw-r--r--lib/nstrftime.c24
-rw-r--r--lib/unistd.in.h7
3 files changed, 27 insertions, 5 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 49f4d236e44..451c1572fdc 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -44,6 +44,7 @@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
44BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ 44BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
45BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ 45BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
46BLESSMAIL_TARGET = @BLESSMAIL_TARGET@ 46BLESSMAIL_TARGET = @BLESSMAIL_TARGET@
47BREW = @BREW@
47BUILD_DETAILS = @BUILD_DETAILS@ 48BUILD_DETAILS = @BUILD_DETAILS@
48BYTESWAP_H = @BYTESWAP_H@ 49BYTESWAP_H = @BYTESWAP_H@
49CAIRO_CFLAGS = @CAIRO_CFLAGS@ 50CAIRO_CFLAGS = @CAIRO_CFLAGS@
diff --git a/lib/nstrftime.c b/lib/nstrftime.c
index 9e7abddc8a3..46e806e6049 100644
--- a/lib/nstrftime.c
+++ b/lib/nstrftime.c
@@ -91,6 +91,7 @@ extern char *tzname[];
91# define UCHAR_T unsigned char 91# define UCHAR_T unsigned char
92# define L_(Str) Str 92# define L_(Str) Str
93# define NLW(Sym) Sym 93# define NLW(Sym) Sym
94# define ABALTMON_1 _NL_ABALTMON_1
94 95
95# define MEMCPY(d, s, n) memcpy (d, s, n) 96# define MEMCPY(d, s, n) memcpy (d, s, n)
96# define STRLEN(s) strlen (s) 97# define STRLEN(s) strlen (s)
@@ -255,7 +256,7 @@ extern char *tzname[];
255# undef _NL_CURRENT 256# undef _NL_CURRENT
256# define _NL_CURRENT(category, item) \ 257# define _NL_CURRENT(category, item) \
257 (current->values[_NL_ITEM_INDEX (item)].string) 258 (current->values[_NL_ITEM_INDEX (item)].string)
258# define LOCALE_PARAM , __locale_t loc 259# define LOCALE_PARAM , locale_t loc
259# define LOCALE_ARG , loc 260# define LOCALE_ARG , loc
260# define HELPER_LOCALE_ARG , current 261# define HELPER_LOCALE_ARG , current
261#else 262#else
@@ -475,12 +476,19 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
475# define f_month \ 476# define f_month \
476 ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \ 477 ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
477 ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))) 478 ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
479# define a_altmonth \
480 ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
481 ? "?" : _NL_CURRENT (LC_TIME, NLW(ABALTMON_1) + tp->tm_mon)))
482# define f_altmonth \
483 ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
484 ? "?" : _NL_CURRENT (LC_TIME, NLW(ALTMON_1) + tp->tm_mon)))
478# define ampm \ 485# define ampm \
479 ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ 486 ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \
480 ? NLW(PM_STR) : NLW(AM_STR))) 487 ? NLW(PM_STR) : NLW(AM_STR)))
481 488
482# define aw_len STRLEN (a_wkday) 489# define aw_len STRLEN (a_wkday)
483# define am_len STRLEN (a_month) 490# define am_len STRLEN (a_month)
491# define aam_len STRLEN (a_altmonth)
484# define ap_len STRLEN (ampm) 492# define ap_len STRLEN (ampm)
485#endif 493#endif
486#if HAVE_TZNAME 494#if HAVE_TZNAME
@@ -808,17 +816,20 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
808 to_uppcase = true; 816 to_uppcase = true;
809 to_lowcase = false; 817 to_lowcase = false;
810 } 818 }
811 if (modifier != 0) 819 if (modifier == L_('E'))
812 goto bad_format; 820 goto bad_format;
813#ifdef _NL_CURRENT 821#ifdef _NL_CURRENT
814 cpy (am_len, a_month); 822 if (modifier == L_('O'))
823 cpy (aam_len, a_altmonth);
824 else
825 cpy (am_len, a_month);
815 break; 826 break;
816#else 827#else
817 goto underlying_strftime; 828 goto underlying_strftime;
818#endif 829#endif
819 830
820 case L_('B'): 831 case L_('B'):
821 if (modifier != 0) 832 if (modifier == L_('E'))
822 goto bad_format; 833 goto bad_format;
823 if (change_case) 834 if (change_case)
824 { 835 {
@@ -826,7 +837,10 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
826 to_lowcase = false; 837 to_lowcase = false;
827 } 838 }
828#ifdef _NL_CURRENT 839#ifdef _NL_CURRENT
829 cpy (STRLEN (f_month), f_month); 840 if (modifier == L_('O'))
841 cpy (STRLEN (f_altmonth), f_altmonth);
842 else
843 cpy (STRLEN (f_month), f_month);
830 break; 844 break;
831#else 845#else
832 goto underlying_strftime; 846 goto underlying_strftime;
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index ae59cb2e627..13f4bb6cd16 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -400,6 +400,13 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
400 400
401 401
402#if @GNULIB_ENVIRON@ 402#if @GNULIB_ENVIRON@
403# if defined __CYGWIN__
404/* The 'environ' variable is defined in a DLL. Therefore its declaration needs
405 the '__declspec(dllimport)' attribute, but the system's <unistd.h> lacks it.
406 This leads to a link error on 64-bit Cygwin when the option
407 -Wl,--disable-auto-import is in use. */
408_GL_EXTERN_C __declspec(dllimport) char **environ;
409# endif
403# if !@HAVE_DECL_ENVIRON@ 410# if !@HAVE_DECL_ENVIRON@
404/* Set of environment variables and values. An array of strings of the form 411/* Set of environment variables and values. An array of strings of the form
405 "VARIABLE=VALUE", terminated with a NULL. */ 412 "VARIABLE=VALUE", terminated with a NULL. */