diff options
| author | Paul Eggert | 2019-01-27 16:20:03 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-01-27 16:20:40 -0800 |
| commit | d81aa8516ef6df79d6d602d4f732d8a65bf1677c (patch) | |
| tree | c384271af4f60e82ab204d020e7e6e3367e87877 | |
| parent | cc1c46e4122a08657a7c75495115d1c60efb1b31 (diff) | |
| download | emacs-d81aa8516ef6df79d6d602d4f732d8a65bf1677c.tar.gz emacs-d81aa8516ef6df79d6d602d4f732d8a65bf1677c.zip | |
Update from Gnulib
This incorporates:
2019-01-26 getloadavg: Add support for Android
2019-01-24 fchownat: Fix compilation error on Android 4.3
2019-01-24 mbtowc: Fix compilation error on Android 4.3
2019-01-24 random: Fix compilation error on Android 4.3
2019-01-24 renameat: Fix compilation error on Android 4.3
2019-01-24 unlinkat: Fix compilation error on Android 4.3
2019-01-19 gettext: support disabling use of VLAs
2019-01-17 sys_stat: Fix warning on OS/2 kLIBC
2019-01-17 fcntl: Fix syntax error (regression from 2018-10-05)
2019-01-10 verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++
2018-12-22 stdioext: port to newer 32-bit Android
2018-12-16 libc-config: Support HP-UX cc in C99 mode.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/cdefs.h, lib/fcntl.c, lib/getloadavg.c, lib/gettext.h:
* lib/regexec.c, lib/stdio-impl.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/sys_stat.in.h, lib/unistd.in.h, lib/verify.h, m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
| -rwxr-xr-x | build-aux/config.guess | 2 | ||||
| -rwxr-xr-x | build-aux/config.sub | 20 | ||||
| -rw-r--r-- | doc/misc/texinfo.tex | 7 | ||||
| -rw-r--r-- | lib/cdefs.h | 2 | ||||
| -rw-r--r-- | lib/fcntl.c | 2 | ||||
| -rw-r--r-- | lib/getloadavg.c | 21 | ||||
| -rw-r--r-- | lib/gettext.h | 13 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 15 | ||||
| -rw-r--r-- | lib/regexec.c | 2 | ||||
| -rw-r--r-- | lib/stdio-impl.h | 9 | ||||
| -rw-r--r-- | lib/stdio.in.h | 7 | ||||
| -rw-r--r-- | lib/stdlib.in.h | 68 | ||||
| -rw-r--r-- | lib/sys_stat.in.h | 9 | ||||
| -rw-r--r-- | lib/unistd.in.h | 13 | ||||
| -rw-r--r-- | lib/verify.h | 6 | ||||
| -rw-r--r-- | m4/stdlib_h.m4 | 10 |
16 files changed, 156 insertions, 50 deletions
diff --git a/build-aux/config.guess b/build-aux/config.guess index 0f9b29c8848..a81aa505ba8 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Attempt to guess a canonical system name. | 2 | # Attempt to guess a canonical system name. |
| 3 | # Copyright 1992-2019 Free Software Foundation, Inc. | 3 | # Copyright 1992-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | timestamp='2019-01-01' | 5 | timestamp='2019-01-15' |
| 6 | 6 | ||
| 7 | # This file is free software; you can redistribute it and/or modify it | 7 | # This file is free software; you can redistribute it and/or modify it |
| 8 | # under the terms of the GNU General Public License as published by | 8 | # under the terms of the GNU General Public License as published by |
diff --git a/build-aux/config.sub b/build-aux/config.sub index a8f3f7e7cde..3b4c7624b68 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Configuration validation subroutine script. | 2 | # Configuration validation subroutine script. |
| 3 | # Copyright 1992-2019 Free Software Foundation, Inc. | 3 | # Copyright 1992-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | timestamp='2019-01-01' | 5 | timestamp='2019-01-05' |
| 6 | 6 | ||
| 7 | # This file is free software; you can redistribute it and/or modify it | 7 | # This file is free software; you can redistribute it and/or modify it |
| 8 | # under the terms of the GNU General Public License as published by | 8 | # under the terms of the GNU General Public License as published by |
| @@ -111,6 +111,7 @@ case $# in | |||
| 111 | esac | 111 | esac |
| 112 | 112 | ||
| 113 | # Split fields of configuration type | 113 | # Split fields of configuration type |
| 114 | # shellcheck disable=SC2162 | ||
| 114 | IFS="-" read field1 field2 field3 field4 <<EOF | 115 | IFS="-" read field1 field2 field3 field4 <<EOF |
| 115 | $1 | 116 | $1 |
| 116 | EOF | 117 | EOF |
| @@ -918,6 +919,7 @@ case $basic_machine in | |||
| 918 | ;; | 919 | ;; |
| 919 | 920 | ||
| 920 | *-*) | 921 | *-*) |
| 922 | # shellcheck disable=SC2162 | ||
| 921 | IFS="-" read cpu vendor <<EOF | 923 | IFS="-" read cpu vendor <<EOF |
| 922 | $basic_machine | 924 | $basic_machine |
| 923 | EOF | 925 | EOF |
| @@ -1183,13 +1185,13 @@ case $cpu-$vendor in | |||
| 1183 | | le32 | le64 \ | 1185 | | le32 | le64 \ |
| 1184 | | lm32 \ | 1186 | | lm32 \ |
| 1185 | | m32c | m32r | m32rle \ | 1187 | | m32c | m32r | m32rle \ |
| 1186 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ | 1188 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ |
| 1187 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ | 1189 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ |
| 1188 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ | 1190 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ |
| 1189 | | microblaze | microblazeel \ | 1191 | | microblaze | microblazeel \ |
| 1190 | | mips | mipsbe | mipseb | mipsel | mipsle \ | 1192 | | mips | mipsbe | mipseb | mipsel | mipsle \ |
| 1191 | | mips16 \ | 1193 | | mips16 \ |
| 1192 | | mips64 | mips64el \ | 1194 | | mips64 | mips64eb | mips64el \ |
| 1193 | | mips64octeon | mips64octeonel \ | 1195 | | mips64octeon | mips64octeonel \ |
| 1194 | | mips64orion | mips64orionel \ | 1196 | | mips64orion | mips64orionel \ |
| 1195 | | mips64r5900 | mips64r5900el \ | 1197 | | mips64r5900 | mips64r5900el \ |
| @@ -1216,11 +1218,12 @@ case $cpu-$vendor in | |||
| 1216 | | nds32 | nds32le | nds32be \ | 1218 | | nds32 | nds32le | nds32be \ |
| 1217 | | nfp \ | 1219 | | nfp \ |
| 1218 | | nios | nios2 | nios2eb | nios2el \ | 1220 | | nios | nios2 | nios2eb | nios2el \ |
| 1219 | | none | np1 | ns16k | ns32k \ | 1221 | | none | np1 | ns16k | ns32k | nvptx \ |
| 1220 | | open8 \ | 1222 | | open8 \ |
| 1221 | | or1k* \ | 1223 | | or1k* \ |
| 1222 | | or32 \ | 1224 | | or32 \ |
| 1223 | | orion \ | 1225 | | orion \ |
| 1226 | | picochip \ | ||
| 1224 | | pdp10 | pdp11 | pj | pjl | pn | power \ | 1227 | | pdp10 | pdp11 | pj | pjl | pn | power \ |
| 1225 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | 1228 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ |
| 1226 | | pru \ | 1229 | | pru \ |
| @@ -1228,7 +1231,8 @@ case $cpu-$vendor in | |||
| 1228 | | riscv | riscv32 | riscv64 \ | 1231 | | riscv | riscv32 | riscv64 \ |
| 1229 | | rl78 | romp | rs6000 | rx \ | 1232 | | rl78 | romp | rs6000 | rx \ |
| 1230 | | score \ | 1233 | | score \ |
| 1231 | | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | 1234 | | sh | shl \ |
| 1235 | | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | ||
| 1232 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | 1236 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ |
| 1233 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | 1237 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ |
| 1234 | | sparclite \ | 1238 | | sparclite \ |
| @@ -1238,10 +1242,10 @@ case $cpu-$vendor in | |||
| 1238 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | 1242 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ |
| 1239 | | tron \ | 1243 | | tron \ |
| 1240 | | ubicom32 \ | 1244 | | ubicom32 \ |
| 1241 | | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | 1245 | | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ |
| 1242 | | vax \ | 1246 | | vax \ |
| 1243 | | visium \ | 1247 | | visium \ |
| 1244 | | wasm32 \ | 1248 | | w65 | wasm32 \ |
| 1245 | | we32k \ | 1249 | | we32k \ |
| 1246 | | x86 | x86_64 | xc16x | xgate | xps100 \ | 1250 | | x86 | x86_64 | xc16x | xgate | xps100 \ |
| 1247 | | xstormy16 | xtensa* \ | 1251 | | xstormy16 | xtensa* \ |
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 66a832e0b4f..48d532bc626 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex | |||
| @@ -3,7 +3,8 @@ | |||
| 3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
| 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
| 5 | % | 5 | % |
| 6 | \def\texinfoversion{2018-12-28.17} | 6 | \def\texinfoversion{2019-01-03-15} |
| 7 | |||
| 7 | % | 8 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990-2018 Free Software Foundation, Inc. | 9 | % Copyright 1985, 1986, 1988, 1990-2018 Free Software Foundation, Inc. |
| 9 | % | 10 | % |
| @@ -5043,8 +5044,8 @@ end | |||
| 5043 | \commondummyword\xref | 5044 | \commondummyword\xref |
| 5044 | } | 5045 | } |
| 5045 | 5046 | ||
| 5046 | % For testing: output @{ and @} in index sort strings as \{ and \}. | 5047 | % This does nothing, but for a time it was recommended to use |
| 5047 | \newif\ifusebracesinindexes | 5048 | % \usebracesinindexestrue to be able to use braces in index entries. |
| 5048 | 5049 | ||
| 5049 | \let\indexlbrace\relax | 5050 | \let\indexlbrace\relax |
| 5050 | \let\indexrbrace\relax | 5051 | \let\indexrbrace\relax |
diff --git a/lib/cdefs.h b/lib/cdefs.h index f7a10644064..96d26164199 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h | |||
| @@ -340,7 +340,7 @@ | |||
| 340 | semantics. | 340 | semantics. |
| 341 | 341 | ||
| 342 | clang++ identifies itself as gcc-4.2, but has support for GNU inlining | 342 | clang++ identifies itself as gcc-4.2, but has support for GNU inlining |
| 343 | semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and | 343 | semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and |
| 344 | __GNUC_GNU_INLINE__ macro definitions. */ | 344 | __GNUC_GNU_INLINE__ macro definitions. */ |
| 345 | #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ | 345 | #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ |
| 346 | || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ | 346 | || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ |
diff --git a/lib/fcntl.c b/lib/fcntl.c index f602fad6285..51f62ef78a8 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c | |||
| @@ -545,7 +545,7 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | |||
| 545 | #ifdef __KLIBC__ | 545 | #ifdef __KLIBC__ |
| 546 | 546 | ||
| 547 | static int | 547 | static int |
| 548 | klibc_fcntl (int fd, int action, /* arg */...); | 548 | klibc_fcntl (int fd, int action, /* arg */...) |
| 549 | { | 549 | { |
| 550 | va_list arg_ptr; | 550 | va_list arg_ptr; |
| 551 | int arg; | 551 | int arg; |
diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 0ed697f57cb..353664777fb 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c | |||
| @@ -47,8 +47,8 @@ | |||
| 47 | N_NAME_POINTER The nlist n_name element is a pointer, | 47 | N_NAME_POINTER The nlist n_name element is a pointer, |
| 48 | not an array. | 48 | not an array. |
| 49 | HAVE_STRUCT_NLIST_N_UN_N_NAME 'n_un.n_name' is member of 'struct nlist'. | 49 | HAVE_STRUCT_NLIST_N_UN_N_NAME 'n_un.n_name' is member of 'struct nlist'. |
| 50 | LINUX_LDAV_FILE [__linux__, __CYGWIN__]: File containing | 50 | LINUX_LDAV_FILE [__linux__, __ANDROID__, __CYGWIN__]: File |
| 51 | load averages. | 51 | containing load averages. |
| 52 | 52 | ||
| 53 | Specific system predefines this file uses, aside from setting | 53 | Specific system predefines this file uses, aside from setting |
| 54 | default values if not emacs: | 54 | default values if not emacs: |
| @@ -65,7 +65,7 @@ | |||
| 65 | UMAX4_3 | 65 | UMAX4_3 |
| 66 | VMS | 66 | VMS |
| 67 | _WIN32 Native Windows (possibly also defined on Cygwin) | 67 | _WIN32 Native Windows (possibly also defined on Cygwin) |
| 68 | __linux__ Linux: assumes /proc file system mounted. | 68 | __linux__, __ANDROID__ Linux: assumes /proc file system mounted. |
| 69 | Support from Michael K. Johnson. | 69 | Support from Michael K. Johnson. |
| 70 | __CYGWIN__ Cygwin emulates linux /proc/loadavg. | 70 | __CYGWIN__ Cygwin emulates linux /proc/loadavg. |
| 71 | __NetBSD__ NetBSD: assumes /kern file system mounted. | 71 | __NetBSD__ NetBSD: assumes /kern file system mounted. |
| @@ -263,7 +263,7 @@ | |||
| 263 | # ifdef LOAD_AVE_TYPE | 263 | # ifdef LOAD_AVE_TYPE |
| 264 | 264 | ||
| 265 | # ifndef __VMS | 265 | # ifndef __VMS |
| 266 | # ifndef __linux__ | 266 | # if !(defined __linux__ || defined __ANDROID__) |
| 267 | # ifndef NLIST_STRUCT | 267 | # ifndef NLIST_STRUCT |
| 268 | # include <a.out.h> | 268 | # include <a.out.h> |
| 269 | # else /* NLIST_STRUCT */ | 269 | # else /* NLIST_STRUCT */ |
| @@ -286,7 +286,7 @@ | |||
| 286 | # ifndef LDAV_SYMBOL | 286 | # ifndef LDAV_SYMBOL |
| 287 | # define LDAV_SYMBOL "_avenrun" | 287 | # define LDAV_SYMBOL "_avenrun" |
| 288 | # endif /* LDAV_SYMBOL */ | 288 | # endif /* LDAV_SYMBOL */ |
| 289 | # endif /* __linux__ */ | 289 | # endif /* __linux__ || __ANDROID__ */ |
| 290 | 290 | ||
| 291 | # else /* __VMS */ | 291 | # else /* __VMS */ |
| 292 | 292 | ||
| @@ -359,7 +359,8 @@ | |||
| 359 | # include <sys/dg_sys_info.h> | 359 | # include <sys/dg_sys_info.h> |
| 360 | # endif | 360 | # endif |
| 361 | 361 | ||
| 362 | # if (defined __linux__ || defined __CYGWIN__ || defined SUNOS_5 \ | 362 | # if (defined __linux__ || defined __ANDROID__ \ |
| 363 | || defined __CYGWIN__ || defined SUNOS_5 \ | ||
| 363 | || (defined LOAD_AVE_TYPE && ! defined __VMS)) | 364 | || (defined LOAD_AVE_TYPE && ! defined __VMS)) |
| 364 | # include <fcntl.h> | 365 | # include <fcntl.h> |
| 365 | # endif | 366 | # endif |
| @@ -388,7 +389,7 @@ static bool getloadavg_initialized; | |||
| 388 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ | 389 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ |
| 389 | static long offset; | 390 | static long offset; |
| 390 | 391 | ||
| 391 | # if ! defined __VMS && ! defined sgi && ! defined __linux__ | 392 | # if ! defined __VMS && ! defined sgi && ! (defined __linux__ || defined __ANDROID__) |
| 392 | static struct nlist name_list[2]; | 393 | static struct nlist name_list[2]; |
| 393 | # endif | 394 | # endif |
| 394 | 395 | ||
| @@ -498,8 +499,8 @@ getloadavg (double loadavg[], int nelem) | |||
| 498 | } | 499 | } |
| 499 | # endif | 500 | # endif |
| 500 | 501 | ||
| 501 | # if !defined (LDAV_DONE) && (defined (__linux__) || defined (__CYGWIN__)) | 502 | # if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__ || defined __CYGWIN__) |
| 502 | /* Linux without glibc, Cygwin */ | 503 | /* Linux without glibc, Android, Cygwin */ |
| 503 | # define LDAV_DONE | 504 | # define LDAV_DONE |
| 504 | # undef LOAD_AVE_TYPE | 505 | # undef LOAD_AVE_TYPE |
| 505 | 506 | ||
| @@ -554,7 +555,7 @@ getloadavg (double loadavg[], int nelem) | |||
| 554 | 555 | ||
| 555 | return elem; | 556 | return elem; |
| 556 | 557 | ||
| 557 | # endif /* __linux__ || __CYGWIN__ */ | 558 | # endif /* __linux__ || __ANDROID__ || __CYGWIN__ */ |
| 558 | 559 | ||
| 559 | # if !defined (LDAV_DONE) && defined (__NetBSD__) /* NetBSD < 0.9 */ | 560 | # if !defined (LDAV_DONE) && defined (__NetBSD__) /* NetBSD < 0.9 */ |
| 560 | # define LDAV_DONE | 561 | # define LDAV_DONE |
diff --git a/lib/gettext.h b/lib/gettext.h index 89f53d917bb..c7c0fdb5311 100644 --- a/lib/gettext.h +++ b/lib/gettext.h | |||
| @@ -184,9 +184,16 @@ npgettext_aux (const char *domain, | |||
| 184 | 184 | ||
| 185 | #include <string.h> | 185 | #include <string.h> |
| 186 | 186 | ||
| 187 | #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ | 187 | /* GNULIB_NO_VLA can be defined to disable use of VLAs even if supported. |
| 188 | /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) | 188 | This relates to the -Wvla and -Wvla-larger-than warnings, enabled in |
| 189 | || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) | 189 | the default GCC many warnings set. This allows programs to disable use |
| 190 | of VLAs, which may be unintended, or may be awkward to support portably, | ||
| 191 | or may have security implications due to non-deterministic stack usage. */ | ||
| 192 | |||
| 193 | #if (!defined GNULIB_NO_VLA \ | ||
| 194 | && (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ | ||
| 195 | /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) | ||
| 196 | || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )) | ||
| 190 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 | 197 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 |
| 191 | #else | 198 | #else |
| 192 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 | 199 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 |
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 9666cd4e3e8..fdf45d61c4c 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -197,6 +197,7 @@ DBUS_OBJ = @DBUS_OBJ@ | |||
| 197 | DEFS = @DEFS@ | 197 | DEFS = @DEFS@ |
| 198 | DESLIB = @DESLIB@ | 198 | DESLIB = @DESLIB@ |
| 199 | DOCMISC_W32 = @DOCMISC_W32@ | 199 | DOCMISC_W32 = @DOCMISC_W32@ |
| 200 | DUMPING = @DUMPING@ | ||
| 200 | ECHO_C = @ECHO_C@ | 201 | ECHO_C = @ECHO_C@ |
| 201 | ECHO_N = @ECHO_N@ | 202 | ECHO_N = @ECHO_N@ |
| 202 | ECHO_T = @ECHO_T@ | 203 | ECHO_T = @ECHO_T@ |
| @@ -556,6 +557,7 @@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ | |||
| 556 | HAVE_GRANTPT = @HAVE_GRANTPT@ | 557 | HAVE_GRANTPT = @HAVE_GRANTPT@ |
| 557 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ | 558 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ |
| 558 | HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ | 559 | HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ |
| 560 | HAVE_INITSTATE = @HAVE_INITSTATE@ | ||
| 559 | HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ | 561 | HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ |
| 560 | HAVE_LCHMOD = @HAVE_LCHMOD@ | 562 | HAVE_LCHMOD = @HAVE_LCHMOD@ |
| 561 | HAVE_LCHOWN = @HAVE_LCHOWN@ | 563 | HAVE_LCHOWN = @HAVE_LCHOWN@ |
| @@ -566,6 +568,7 @@ HAVE_LSTAT = @HAVE_LSTAT@ | |||
| 566 | HAVE_MAKEINFO = @HAVE_MAKEINFO@ | 568 | HAVE_MAKEINFO = @HAVE_MAKEINFO@ |
| 567 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ | 569 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ |
| 568 | HAVE_MBSLEN = @HAVE_MBSLEN@ | 570 | HAVE_MBSLEN = @HAVE_MBSLEN@ |
| 571 | HAVE_MBTOWC = @HAVE_MBTOWC@ | ||
| 569 | HAVE_MEMCHR = @HAVE_MEMCHR@ | 572 | HAVE_MEMCHR = @HAVE_MEMCHR@ |
| 570 | HAVE_MEMPCPY = @HAVE_MEMPCPY@ | 573 | HAVE_MEMPCPY = @HAVE_MEMPCPY@ |
| 571 | HAVE_MKDIRAT = @HAVE_MKDIRAT@ | 574 | HAVE_MKDIRAT = @HAVE_MKDIRAT@ |
| @@ -613,6 +616,7 @@ HAVE_SCANDIR = @HAVE_SCANDIR@ | |||
| 613 | HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ | 616 | HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ |
| 614 | HAVE_SETENV = @HAVE_SETENV@ | 617 | HAVE_SETENV = @HAVE_SETENV@ |
| 615 | HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ | 618 | HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ |
| 619 | HAVE_SETSTATE = @HAVE_SETSTATE@ | ||
| 616 | HAVE_SIGACTION = @HAVE_SIGACTION@ | 620 | HAVE_SIGACTION = @HAVE_SIGACTION@ |
| 617 | HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ | 621 | HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ |
| 618 | HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ | 622 | HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ |
| @@ -859,6 +863,7 @@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ | |||
| 859 | REPLACE_GETPASS = @REPLACE_GETPASS@ | 863 | REPLACE_GETPASS = @REPLACE_GETPASS@ |
| 860 | REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ | 864 | REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ |
| 861 | REPLACE_GMTIME = @REPLACE_GMTIME@ | 865 | REPLACE_GMTIME = @REPLACE_GMTIME@ |
| 866 | REPLACE_INITSTATE = @REPLACE_INITSTATE@ | ||
| 862 | REPLACE_ISATTY = @REPLACE_ISATTY@ | 867 | REPLACE_ISATTY = @REPLACE_ISATTY@ |
| 863 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ | 868 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ |
| 864 | REPLACE_LINK = @REPLACE_LINK@ | 869 | REPLACE_LINK = @REPLACE_LINK@ |
| @@ -894,6 +899,7 @@ REPLACE_PUTENV = @REPLACE_PUTENV@ | |||
| 894 | REPLACE_PWRITE = @REPLACE_PWRITE@ | 899 | REPLACE_PWRITE = @REPLACE_PWRITE@ |
| 895 | REPLACE_QSORT_R = @REPLACE_QSORT_R@ | 900 | REPLACE_QSORT_R = @REPLACE_QSORT_R@ |
| 896 | REPLACE_RAISE = @REPLACE_RAISE@ | 901 | REPLACE_RAISE = @REPLACE_RAISE@ |
| 902 | REPLACE_RANDOM = @REPLACE_RANDOM@ | ||
| 897 | REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ | 903 | REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ |
| 898 | REPLACE_READ = @REPLACE_READ@ | 904 | REPLACE_READ = @REPLACE_READ@ |
| 899 | REPLACE_READLINK = @REPLACE_READLINK@ | 905 | REPLACE_READLINK = @REPLACE_READLINK@ |
| @@ -906,6 +912,7 @@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ | |||
| 906 | REPLACE_RMDIR = @REPLACE_RMDIR@ | 912 | REPLACE_RMDIR = @REPLACE_RMDIR@ |
| 907 | REPLACE_SELECT = @REPLACE_SELECT@ | 913 | REPLACE_SELECT = @REPLACE_SELECT@ |
| 908 | REPLACE_SETENV = @REPLACE_SETENV@ | 914 | REPLACE_SETENV = @REPLACE_SETENV@ |
| 915 | REPLACE_SETSTATE = @REPLACE_SETSTATE@ | ||
| 909 | REPLACE_SLEEP = @REPLACE_SLEEP@ | 916 | REPLACE_SLEEP = @REPLACE_SLEEP@ |
| 910 | REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ | 917 | REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ |
| 911 | REPLACE_SPRINTF = @REPLACE_SPRINTF@ | 918 | REPLACE_SPRINTF = @REPLACE_SPRINTF@ |
| @@ -952,7 +959,6 @@ REPLACE_WRITE = @REPLACE_WRITE@ | |||
| 952 | RSVG_CFLAGS = @RSVG_CFLAGS@ | 959 | RSVG_CFLAGS = @RSVG_CFLAGS@ |
| 953 | RSVG_LIBS = @RSVG_LIBS@ | 960 | RSVG_LIBS = @RSVG_LIBS@ |
| 954 | SEPCHAR = @SEPCHAR@ | 961 | SEPCHAR = @SEPCHAR@ |
| 955 | SETFATTR = @SETFATTR@ | ||
| 956 | SETTINGS_CFLAGS = @SETTINGS_CFLAGS@ | 962 | SETTINGS_CFLAGS = @SETTINGS_CFLAGS@ |
| 957 | SETTINGS_LIBS = @SETTINGS_LIBS@ | 963 | SETTINGS_LIBS = @SETTINGS_LIBS@ |
| 958 | SHELL = @SHELL@ | 964 | SHELL = @SHELL@ |
| @@ -1009,6 +1015,7 @@ XMKMF = @XMKMF@ | |||
| 1009 | XOBJ = @XOBJ@ | 1015 | XOBJ = @XOBJ@ |
| 1010 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ | 1016 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ |
| 1011 | XRANDR_LIBS = @XRANDR_LIBS@ | 1017 | XRANDR_LIBS = @XRANDR_LIBS@ |
| 1018 | XRENDER_LIBS = @XRENDER_LIBS@ | ||
| 1012 | XWIDGETS_OBJ = @XWIDGETS_OBJ@ | 1019 | XWIDGETS_OBJ = @XWIDGETS_OBJ@ |
| 1013 | X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ | 1020 | X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ |
| 1014 | ac_ct_CC = @ac_ct_CC@ | 1021 | ac_ct_CC = @ac_ct_CC@ |
| @@ -2552,7 +2559,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2552 | -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ | 2559 | -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ |
| 2553 | -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ | 2560 | -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ |
| 2554 | -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ | 2561 | -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ |
| 2562 | -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \ | ||
| 2555 | -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ | 2563 | -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ |
| 2564 | -e 's|@''HAVE_MBTOWC''@|$(HAVE_MBTOWC)|g' \ | ||
| 2556 | -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ | 2565 | -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ |
| 2557 | -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ | 2566 | -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ |
| 2558 | -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ | 2567 | -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ |
| @@ -2570,6 +2579,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2570 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ | 2579 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ |
| 2571 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ | 2580 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ |
| 2572 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ | 2581 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ |
| 2582 | -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \ | ||
| 2573 | -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ | 2583 | -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ |
| 2574 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ | 2584 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ |
| 2575 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ | 2585 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ |
| @@ -2580,6 +2590,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2580 | -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ | 2590 | -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ |
| 2581 | -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ | 2591 | -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ |
| 2582 | -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ | 2592 | -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ |
| 2593 | -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \ | ||
| 2583 | -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ | 2594 | -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ |
| 2584 | -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ | 2595 | -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ |
| 2585 | -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ | 2596 | -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ |
| @@ -2587,10 +2598,12 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2587 | -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ | 2598 | -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ |
| 2588 | -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ | 2599 | -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ |
| 2589 | -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ | 2600 | -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ |
| 2601 | -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ | ||
| 2590 | -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ | 2602 | -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ |
| 2591 | -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ | 2603 | -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ |
| 2592 | -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ | 2604 | -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ |
| 2593 | -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ | 2605 | -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ |
| 2606 | -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \ | ||
| 2594 | -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ | 2607 | -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ |
| 2595 | -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ | 2608 | -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ |
| 2596 | -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ | 2609 | -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ |
diff --git a/lib/regexec.c b/lib/regexec.c index 21cf7915f7c..2f7cb5dcb1f 100644 --- a/lib/regexec.c +++ b/lib/regexec.c | |||
| @@ -2207,7 +2207,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, | |||
| 2207 | dfa->nexts[node_idx])) | 2207 | dfa->nexts[node_idx])) |
| 2208 | /* The node can't accept the "multi byte", or the | 2208 | /* The node can't accept the "multi byte", or the |
| 2209 | destination was already thrown away, then the node | 2209 | destination was already thrown away, then the node |
| 2210 | could't accept the current input "multi byte". */ | 2210 | couldn't accept the current input "multi byte". */ |
| 2211 | naccepted = 0; | 2211 | naccepted = 0; |
| 2212 | /* Otherwise, it is sure that the node could accept | 2212 | /* Otherwise, it is sure that the node could accept |
| 2213 | 'naccepted' bytes input. */ | 2213 | 'naccepted' bytes input. */ |
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index b2b2971f2ff..4260468b612 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h | |||
| @@ -61,6 +61,11 @@ | |||
| 61 | # define _r pub._r | 61 | # define _r pub._r |
| 62 | # define _w pub._w | 62 | # define _w pub._w |
| 63 | # elif defined __ANDROID__ /* Android */ | 63 | # elif defined __ANDROID__ /* Android */ |
| 64 | # ifdef __LP64__ | ||
| 65 | # define _gl_flags_file_t int | ||
| 66 | # else | ||
| 67 | # define _gl_flags_file_t short | ||
| 68 | # endif | ||
| 64 | /* Up to this commit from 2015-10-12 | 69 | /* Up to this commit from 2015-10-12 |
| 65 | <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a> | 70 | <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a> |
| 66 | the innards of FILE were public, and fp_ub could be defined like for OpenBSD, | 71 | the innards of FILE were public, and fp_ub could be defined like for OpenBSD, |
| @@ -70,8 +75,8 @@ | |||
| 70 | # define fp_ ((struct { unsigned char *_p; \ | 75 | # define fp_ ((struct { unsigned char *_p; \ |
| 71 | int _r; \ | 76 | int _r; \ |
| 72 | int _w; \ | 77 | int _w; \ |
| 73 | int _flags; \ | 78 | _gl_flags_file_t _flags; \ |
| 74 | int _file; \ | 79 | _gl_flags_file_t _file; \ |
| 75 | struct { unsigned char *_base; size_t _size; } _bf; \ | 80 | struct { unsigned char *_base; size_t _size; } _bf; \ |
| 76 | int _lbfsize; \ | 81 | int _lbfsize; \ |
| 77 | void *_cookie; \ | 82 | void *_cookie; \ |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index acf29c4be09..4a8aa55528b 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -118,6 +118,13 @@ | |||
| 118 | # include <unistd.h> | 118 | # include <unistd.h> |
| 119 | #endif | 119 | #endif |
| 120 | 120 | ||
| 121 | /* Android 4.3 declares renameat in <sys/stat.h>, not in <stdio.h>. */ | ||
| 122 | /* But in any case avoid namespace pollution on glibc systems. */ | ||
| 123 | #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ | ||
| 124 | && ! defined __GLIBC__ | ||
| 125 | # include <sys/stat.h> | ||
| 126 | #endif | ||
| 127 | |||
| 121 | /* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include | 128 | /* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include |
| 122 | it before we #define perror rpl_perror. */ | 129 | it before we #define perror rpl_perror. */ |
| 123 | /* But in any case avoid namespace pollution on glibc systems. */ | 130 | /* But in any case avoid namespace pollution on glibc systems. */ |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index d80d7ec6b05..be8ab3b86c2 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -306,9 +306,18 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " | |||
| 306 | _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | 306 | _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); |
| 307 | _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | 307 | _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); |
| 308 | # else | 308 | # else |
| 309 | # if !@HAVE_MBTOWC@ | ||
| 310 | _GL_FUNCDECL_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | ||
| 311 | # endif | ||
| 309 | _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | 312 | _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); |
| 310 | # endif | 313 | # endif |
| 311 | _GL_CXXALIASWARN (mbtowc); | 314 | _GL_CXXALIASWARN (mbtowc); |
| 315 | #elif defined GNULIB_POSIXCHECK | ||
| 316 | # undef mbtowc | ||
| 317 | # if HAVE_RAW_DECL_MBTOWC | ||
| 318 | _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " | ||
| 319 | "use gnulib module mbtowc for portability"); | ||
| 320 | # endif | ||
| 312 | #endif | 321 | #endif |
| 313 | 322 | ||
| 314 | #if @GNULIB_MKDTEMP@ | 323 | #if @GNULIB_MKDTEMP@ |
| @@ -573,10 +582,19 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " | |||
| 573 | 582 | ||
| 574 | 583 | ||
| 575 | #if @GNULIB_RANDOM@ | 584 | #if @GNULIB_RANDOM@ |
| 576 | # if !@HAVE_RANDOM@ | 585 | # if @REPLACE_RANDOM@ |
| 586 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 587 | # undef random | ||
| 588 | # define random rpl_random | ||
| 589 | # endif | ||
| 590 | _GL_FUNCDECL_RPL (random, long, (void)); | ||
| 591 | _GL_CXXALIAS_RPL (random, long, (void)); | ||
| 592 | # else | ||
| 593 | # if !@HAVE_RANDOM@ | ||
| 577 | _GL_FUNCDECL_SYS (random, long, (void)); | 594 | _GL_FUNCDECL_SYS (random, long, (void)); |
| 578 | # endif | 595 | # endif |
| 579 | _GL_CXXALIAS_SYS (random, long, (void)); | 596 | _GL_CXXALIAS_SYS (random, long, (void)); |
| 597 | # endif | ||
| 580 | _GL_CXXALIASWARN (random); | 598 | _GL_CXXALIASWARN (random); |
| 581 | #elif defined GNULIB_POSIXCHECK | 599 | #elif defined GNULIB_POSIXCHECK |
| 582 | # undef random | 600 | # undef random |
| @@ -587,10 +605,19 @@ _GL_WARN_ON_USE (random, "random is unportable - " | |||
| 587 | #endif | 605 | #endif |
| 588 | 606 | ||
| 589 | #if @GNULIB_RANDOM@ | 607 | #if @GNULIB_RANDOM@ |
| 590 | # if !@HAVE_RANDOM@ | 608 | # if @REPLACE_RANDOM@ |
| 609 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 610 | # undef srandom | ||
| 611 | # define srandom rpl_srandom | ||
| 612 | # endif | ||
| 613 | _GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); | ||
| 614 | _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); | ||
| 615 | # else | ||
| 616 | # if !@HAVE_RANDOM@ | ||
| 591 | _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); | 617 | _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); |
| 592 | # endif | 618 | # endif |
| 593 | _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); | 619 | _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); |
| 620 | # endif | ||
| 594 | _GL_CXXALIASWARN (srandom); | 621 | _GL_CXXALIASWARN (srandom); |
| 595 | #elif defined GNULIB_POSIXCHECK | 622 | #elif defined GNULIB_POSIXCHECK |
| 596 | # undef srandom | 623 | # undef srandom |
| @@ -601,31 +628,52 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - " | |||
| 601 | #endif | 628 | #endif |
| 602 | 629 | ||
| 603 | #if @GNULIB_RANDOM@ | 630 | #if @GNULIB_RANDOM@ |
| 604 | # if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ | 631 | # if @REPLACE_INITSTATE@ |
| 632 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 633 | # undef initstate | ||
| 634 | # define initstate rpl_initstate | ||
| 635 | # endif | ||
| 636 | _GL_FUNCDECL_RPL (initstate, char *, | ||
| 637 | (unsigned int seed, char *buf, size_t buf_size) | ||
| 638 | _GL_ARG_NONNULL ((2))); | ||
| 639 | _GL_CXXALIAS_RPL (initstate, char *, | ||
| 640 | (unsigned int seed, char *buf, size_t buf_size)); | ||
| 641 | # else | ||
| 642 | # if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@ | ||
| 605 | _GL_FUNCDECL_SYS (initstate, char *, | 643 | _GL_FUNCDECL_SYS (initstate, char *, |
| 606 | (unsigned int seed, char *buf, size_t buf_size) | 644 | (unsigned int seed, char *buf, size_t buf_size) |
| 607 | _GL_ARG_NONNULL ((2))); | 645 | _GL_ARG_NONNULL ((2))); |
| 608 | # endif | 646 | # endif |
| 609 | _GL_CXXALIAS_SYS (initstate, char *, | 647 | _GL_CXXALIAS_SYS (initstate, char *, |
| 610 | (unsigned int seed, char *buf, size_t buf_size)); | 648 | (unsigned int seed, char *buf, size_t buf_size)); |
| 649 | # endif | ||
| 611 | _GL_CXXALIASWARN (initstate); | 650 | _GL_CXXALIASWARN (initstate); |
| 612 | #elif defined GNULIB_POSIXCHECK | 651 | #elif defined GNULIB_POSIXCHECK |
| 613 | # undef initstate | 652 | # undef initstate |
| 614 | # if HAVE_RAW_DECL_INITSTATE_R | 653 | # if HAVE_RAW_DECL_INITSTATE |
| 615 | _GL_WARN_ON_USE (initstate, "initstate is unportable - " | 654 | _GL_WARN_ON_USE (initstate, "initstate is unportable - " |
| 616 | "use gnulib module random for portability"); | 655 | "use gnulib module random for portability"); |
| 617 | # endif | 656 | # endif |
| 618 | #endif | 657 | #endif |
| 619 | 658 | ||
| 620 | #if @GNULIB_RANDOM@ | 659 | #if @GNULIB_RANDOM@ |
| 621 | # if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ | 660 | # if @REPLACE_SETSTATE@ |
| 661 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 662 | # undef setstate | ||
| 663 | # define setstate rpl_setstate | ||
| 664 | # endif | ||
| 665 | _GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); | ||
| 666 | _GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); | ||
| 667 | # else | ||
| 668 | # if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@ | ||
| 622 | _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); | 669 | _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
| 623 | # endif | 670 | # endif |
| 624 | _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); | 671 | _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); |
| 672 | # endif | ||
| 625 | _GL_CXXALIASWARN (setstate); | 673 | _GL_CXXALIASWARN (setstate); |
| 626 | #elif defined GNULIB_POSIXCHECK | 674 | #elif defined GNULIB_POSIXCHECK |
| 627 | # undef setstate | 675 | # undef setstate |
| 628 | # if HAVE_RAW_DECL_SETSTATE_R | 676 | # if HAVE_RAW_DECL_SETSTATE |
| 629 | _GL_WARN_ON_USE (setstate, "setstate is unportable - " | 677 | _GL_WARN_ON_USE (setstate, "setstate is unportable - " |
| 630 | "use gnulib module random for portability"); | 678 | "use gnulib module random for portability"); |
| 631 | # endif | 679 | # endif |
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 58fa93fd0ad..9ddd1a8d004 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -54,9 +54,16 @@ | |||
| 54 | 54 | ||
| 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
| 56 | 56 | ||
| 57 | /* Before doing "#define mknod rpl_mknod" below, we need to include all | ||
| 58 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in | ||
| 59 | <unistd.h>, not in <sys/stat.h>. */ | ||
| 60 | #ifdef __KLIBC__ | ||
| 61 | # include <unistd.h> | ||
| 62 | #endif | ||
| 63 | |||
| 57 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all | 64 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all |
| 58 | headers that may declare mkdir(). Native Windows platforms declare mkdir | 65 | headers that may declare mkdir(). Native Windows platforms declare mkdir |
| 59 | in <io.h> and/or <direct.h>, not in <unistd.h>. */ | 66 | in <io.h> and/or <direct.h>, not in <sys/stat.h>. */ |
| 60 | #if defined _WIN32 && ! defined __CYGWIN__ | 67 | #if defined _WIN32 && ! defined __CYGWIN__ |
| 61 | # include <io.h> /* mingw32, mingw64 */ | 68 | # include <io.h> /* mingw32, mingw64 */ |
| 62 | # include <direct.h> /* mingw64, MSVC 9 */ | 69 | # include <direct.h> /* mingw64, MSVC 9 */ |
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index a10ca28a532..7778d25dc7e 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -68,9 +68,11 @@ | |||
| 68 | # include <stdio.h> | 68 | # include <stdio.h> |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */ | 71 | /* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in |
| 72 | <unistd.h>. */ | ||
| 72 | /* But avoid namespace pollution on glibc systems. */ | 73 | /* But avoid namespace pollution on glibc systems. */ |
| 73 | #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ | 74 | #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \ |
| 75 | && (defined __CYGWIN__ || defined __ANDROID__) \ | ||
| 74 | && ! defined __GLIBC__ | 76 | && ! defined __GLIBC__ |
| 75 | # include <fcntl.h> | 77 | # include <fcntl.h> |
| 76 | #endif | 78 | #endif |
| @@ -113,6 +115,13 @@ | |||
| 113 | # include <netdb.h> | 115 | # include <netdb.h> |
| 114 | #endif | 116 | #endif |
| 115 | 117 | ||
| 118 | /* Android 4.3 declares fchownat in <sys/stat.h>, not in <unistd.h>. */ | ||
| 119 | /* But avoid namespace pollution on glibc systems. */ | ||
| 120 | #if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ | ||
| 121 | && !defined __GLIBC__ | ||
| 122 | # include <sys/stat.h> | ||
| 123 | #endif | ||
| 124 | |||
| 116 | /* MSVC defines off_t in <sys/types.h>. | 125 | /* MSVC defines off_t in <sys/types.h>. |
| 117 | May also define off_t to a 64-bit type on native Windows. */ | 126 | May also define off_t to a 64-bit type on native Windows. */ |
| 118 | #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ | 127 | #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ |
diff --git a/lib/verify.h b/lib/verify.h index b2e5f6446e1..6930645a350 100644 --- a/lib/verify.h +++ b/lib/verify.h | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | here generates easier-to-read diagnostics when verify (R) fails. | 26 | here generates easier-to-read diagnostics when verify (R) fails. |
| 27 | 27 | ||
| 28 | Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. | 28 | Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. |
| 29 | This will likely be supported by future GCC versions, in C++ mode. | 29 | This is supported by GCC 6.1.0 and later, in C++ mode. |
| 30 | 30 | ||
| 31 | Use this only with GCC. If we were willing to slow 'configure' | 31 | Use this only with GCC. If we were willing to slow 'configure' |
| 32 | down we could also use it with other compilers, but since this | 32 | down we could also use it with other compilers, but since this |
| @@ -36,9 +36,7 @@ | |||
| 36 | && !defined __cplusplus) | 36 | && !defined __cplusplus) |
| 37 | # define _GL_HAVE__STATIC_ASSERT 1 | 37 | # define _GL_HAVE__STATIC_ASSERT 1 |
| 38 | #endif | 38 | #endif |
| 39 | /* The condition (99 < __GNUC__) is temporary, until we know about the | 39 | #if (6 <= __GNUC__) && defined __cplusplus |
| 40 | first G++ release that supports static_assert. */ | ||
| 41 | #if (99 < __GNUC__) && defined __cplusplus | ||
| 42 | # define _GL_HAVE_STATIC_ASSERT 1 | 40 | # define _GL_HAVE_STATIC_ASSERT 1 |
| 43 | #endif | 41 | #endif |
| 44 | 42 | ||
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index cf064284b64..c5db804e4d6 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdlib_h.m4 serial 45 | 1 | # stdlib_h.m4 serial 47 |
| 2 | dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -23,7 +23,7 @@ AC_DEFUN([gl_STDLIB_H], | |||
| 23 | # include <random.h> | 23 | # include <random.h> |
| 24 | #endif | 24 | #endif |
| 25 | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt | 25 | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt |
| 26 | initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps | 26 | initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps |
| 27 | posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray | 27 | posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray |
| 28 | realpath rpmatch secure_getenv setenv setstate setstate_r srandom | 28 | realpath rpmatch secure_getenv setenv setstate setstate_r srandom |
| 29 | srandom_r strtod strtoll strtoull unlockpt unsetenv]) | 29 | srandom_r strtod strtoll strtoull unlockpt unsetenv]) |
| @@ -81,7 +81,9 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 81 | HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) | 81 | HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) |
| 82 | HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) | 82 | HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) |
| 83 | HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) | 83 | HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) |
| 84 | HAVE_INITSTATE=1; AC_SUBST([HAVE_INITSTATE]) | ||
| 84 | HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE]) | 85 | HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE]) |
| 86 | HAVE_MBTOWC=1; AC_SUBST([HAVE_MBTOWC]) | ||
| 85 | HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) | 87 | HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) |
| 86 | HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) | 88 | HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) |
| 87 | HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) | 89 | HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) |
| @@ -100,6 +102,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 100 | HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) | 102 | HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) |
| 101 | HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) | 103 | HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) |
| 102 | HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) | 104 | HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) |
| 105 | HAVE_SETSTATE=1; AC_SUBST([HAVE_SETSTATE]) | ||
| 103 | HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE]) | 106 | HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE]) |
| 104 | HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) | 107 | HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) |
| 105 | HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) | 108 | HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) |
| @@ -110,6 +113,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 110 | HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) | 113 | HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) |
| 111 | REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) | 114 | REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) |
| 112 | REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) | 115 | REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) |
| 116 | REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE]) | ||
| 113 | REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) | 117 | REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) |
| 114 | REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) | 118 | REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) |
| 115 | REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) | 119 | REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) |
| @@ -117,10 +121,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 117 | REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) | 121 | REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) |
| 118 | REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) | 122 | REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) |
| 119 | REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) | 123 | REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) |
| 124 | REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM]) | ||
| 120 | REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) | 125 | REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) |
| 121 | REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) | 126 | REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) |
| 122 | REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) | 127 | REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) |
| 123 | REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) | 128 | REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) |
| 129 | REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE]) | ||
| 124 | REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) | 130 | REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) |
| 125 | REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) | 131 | REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) |
| 126 | REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) | 132 | REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) |