summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-02-01 09:20:13 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-02-01 09:21:39 -0800
commit100e33979b139c007c45f0fd339a76e5a7ef494a (patch)
tree79fb78ba700ac9ccecb4cf4e1133871a74fbf1c8 /lib
parentc85d9e401a686637284752a0eadc52f7a6b439d7 (diff)
downloademacs-100e33979b139c007c45f0fd339a76e5a7ef494a.tar.gz
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@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
BLESSMAIL_TARGET = @BLESSMAIL_TARGET@
+BREW = @BREW@
BUILD_DETAILS = @BUILD_DETAILS@
BYTESWAP_H = @BYTESWAP_H@
CAIRO_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[];
# define UCHAR_T unsigned char
# define L_(Str) Str
# define NLW(Sym) Sym
+# define ABALTMON_1 _NL_ABALTMON_1
# define MEMCPY(d, s, n) memcpy (d, s, n)
# define STRLEN(s) strlen (s)
@@ -255,7 +256,7 @@ extern char *tzname[];
# undef _NL_CURRENT
# define _NL_CURRENT(category, item) \
(current->values[_NL_ITEM_INDEX (item)].string)
-# define LOCALE_PARAM , __locale_t loc
+# define LOCALE_PARAM , locale_t loc
# define LOCALE_ARG , loc
# define HELPER_LOCALE_ARG , current
#else
@@ -475,12 +476,19 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
# define f_month \
((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
+# define a_altmonth \
+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABALTMON_1) + tp->tm_mon)))
+# define f_altmonth \
+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \
+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ALTMON_1) + tp->tm_mon)))
# define ampm \
((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \
? NLW(PM_STR) : NLW(AM_STR)))
# define aw_len STRLEN (a_wkday)
# define am_len STRLEN (a_month)
+# define aam_len STRLEN (a_altmonth)
# define ap_len STRLEN (ampm)
#endif
#if HAVE_TZNAME
@@ -808,17 +816,20 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
to_uppcase = true;
to_lowcase = false;
}
- if (modifier != 0)
+ if (modifier == L_('E'))
goto bad_format;
#ifdef _NL_CURRENT
- cpy (am_len, a_month);
+ if (modifier == L_('O'))
+ cpy (aam_len, a_altmonth);
+ else
+ cpy (am_len, a_month);
break;
#else
goto underlying_strftime;
#endif
case L_('B'):
- if (modifier != 0)
+ if (modifier == L_('E'))
goto bad_format;
if (change_case)
{
@@ -826,7 +837,10 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
to_lowcase = false;
}
#ifdef _NL_CURRENT
- cpy (STRLEN (f_month), f_month);
+ if (modifier == L_('O'))
+ cpy (STRLEN (f_altmonth), f_altmonth);
+ else
+ cpy (STRLEN (f_month), f_month);
break;
#else
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 - "
#if @GNULIB_ENVIRON@
+# if defined __CYGWIN__
+/* The 'environ' variable is defined in a DLL. Therefore its declaration needs
+ the '__declspec(dllimport)' attribute, but the system's <unistd.h> lacks it.
+ This leads to a link error on 64-bit Cygwin when the option
+ -Wl,--disable-auto-import is in use. */
+_GL_EXTERN_C __declspec(dllimport) char **environ;
+# endif
# if !@HAVE_DECL_ENVIRON@
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */