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 /lib | |
| 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.
Diffstat (limited to 'lib')
| -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 |
12 files changed, 131 insertions, 36 deletions
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 | ||