summaryrefslogtreecommitdiff
path: root/gl/lib
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-01-05 12:02:12 +0000
committerColin Watson <cjwatson@debian.org>2019-01-05 12:02:12 +0000
commit182141146d0ad9c735949840504bdfc66332da4e (patch)
treed8cbbf520eb4b5c656a54b2e36947008dcb751ad /gl/lib
parent68d15a97e215a4b7927039421566bbb1f74e5460 (diff)
parent033354546dc61e8a996d281aa2da2c440ac95c9f (diff)
Import man-db_2.8.5.orig.tar.xz
Diffstat (limited to 'gl/lib')
-rw-r--r--gl/lib/Makefile.am99
-rw-r--r--gl/lib/Makefile.in918
-rw-r--r--gl/lib/_Noreturn.h12
-rw-r--r--gl/lib/alloca.in.h2
-rw-r--r--gl/lib/areadlink-with-size.c2
-rw-r--r--gl/lib/areadlink.h2
-rw-r--r--gl/lib/arg-nonnull.h2
-rw-r--r--gl/lib/argp-ba.c2
-rw-r--r--gl/lib/argp-eexst.c2
-rw-r--r--gl/lib/argp-fmtstream.c2
-rw-r--r--gl/lib/argp-fmtstream.h2
-rw-r--r--gl/lib/argp-fs-xinl.c2
-rw-r--r--gl/lib/argp-help.c2
-rw-r--r--gl/lib/argp-namefrob.h2
-rw-r--r--gl/lib/argp-parse.c2
-rw-r--r--gl/lib/argp-pin.c2
-rw-r--r--gl/lib/argp-pv.c2
-rw-r--r--gl/lib/argp-pvh.c2
-rw-r--r--gl/lib/argp-xinl.c2
-rw-r--r--gl/lib/argp.h2
-rw-r--r--gl/lib/asnprintf.c2
-rw-r--r--gl/lib/asprintf.c2
-rw-r--r--gl/lib/assure.h4
-rw-r--r--gl/lib/at-func.c2
-rw-r--r--gl/lib/basename-lgpl.c2
-rw-r--r--gl/lib/basename.c2
-rw-r--r--gl/lib/bitrotate.h2
-rw-r--r--gl/lib/btowc.c2
-rw-r--r--gl/lib/c++defs.h2
-rw-r--r--gl/lib/canonicalize-lgpl.c2
-rw-r--r--gl/lib/canonicalize.c2
-rw-r--r--gl/lib/canonicalize.h2
-rw-r--r--gl/lib/cdefs.h10
-rw-r--r--gl/lib/chdir-long.c2
-rw-r--r--gl/lib/chdir-long.h2
-rw-r--r--gl/lib/cloexec.c2
-rw-r--r--gl/lib/cloexec.h2
-rw-r--r--gl/lib/close.c2
-rw-r--r--gl/lib/closedir.c2
-rw-r--r--gl/lib/dirent-private.h2
-rw-r--r--gl/lib/dirent.in.h2
-rw-r--r--gl/lib/dirfd.c2
-rw-r--r--gl/lib/dirname-lgpl.c2
-rw-r--r--gl/lib/dirname.c2
-rw-r--r--gl/lib/dirname.h2
-rw-r--r--gl/lib/dosname.h2
-rw-r--r--gl/lib/dup-safer-flag.c2
-rw-r--r--gl/lib/dup-safer.c2
-rw-r--r--gl/lib/dup.c2
-rw-r--r--gl/lib/dup2.c2
-rw-r--r--gl/lib/errno.in.h2
-rw-r--r--gl/lib/error.c2
-rw-r--r--gl/lib/error.h2
-rw-r--r--gl/lib/exitfail.c2
-rw-r--r--gl/lib/exitfail.h2
-rw-r--r--gl/lib/fchdir.c2
-rw-r--r--gl/lib/fcntl.c554
-rw-r--r--gl/lib/fcntl.in.h2
-rw-r--r--gl/lib/fd-hook.c2
-rw-r--r--gl/lib/fd-hook.h2
-rw-r--r--gl/lib/fd-safer-flag.c2
-rw-r--r--gl/lib/fd-safer.c2
-rw-r--r--gl/lib/fdopendir.c2
-rw-r--r--gl/lib/file-set.c2
-rw-r--r--gl/lib/filename.h2
-rw-r--r--gl/lib/filenamecat-lgpl.c2
-rw-r--r--gl/lib/filenamecat.h2
-rw-r--r--gl/lib/flexmember.h2
-rw-r--r--gl/lib/float+.h2
-rw-r--r--gl/lib/float.c2
-rw-r--r--gl/lib/float.in.h2
-rw-r--r--gl/lib/flock.c2
-rw-r--r--gl/lib/fnmatch.c2
-rw-r--r--gl/lib/fnmatch.in.h69
-rw-r--r--gl/lib/fnmatch_loop.c2
-rw-r--r--gl/lib/fstat.c2
-rw-r--r--gl/lib/fstatat.c2
-rw-r--r--gl/lib/futimens.c2
-rw-r--r--gl/lib/getcwd-lgpl.c2
-rw-r--r--gl/lib/getcwd.c2
-rw-r--r--gl/lib/getdelim.c2
-rw-r--r--gl/lib/getdtablesize.c2
-rw-r--r--gl/lib/getline.c2
-rw-r--r--gl/lib/getlogin_r.c2
-rw-r--r--gl/lib/getopt-cdefs.in.h2
-rw-r--r--gl/lib/getopt-core.h2
-rw-r--r--gl/lib/getopt-ext.h2
-rw-r--r--gl/lib/getopt-pfx-core.h2
-rw-r--r--gl/lib/getopt-pfx-ext.h2
-rw-r--r--gl/lib/getopt.c2
-rw-r--r--gl/lib/getopt.in.h2
-rw-r--r--gl/lib/getopt1.c2
-rw-r--r--gl/lib/getopt_int.h2
-rw-r--r--gl/lib/getprogname.c72
-rw-r--r--gl/lib/getprogname.h2
-rw-r--r--gl/lib/gettext.h4
-rw-r--r--gl/lib/gettime.c31
-rw-r--r--gl/lib/gettimeofday.c6
-rw-r--r--gl/lib/glob-libc.h2
-rw-r--r--gl/lib/glob.c12
-rw-r--r--gl/lib/glob.in.h103
-rw-r--r--gl/lib/glob_internal.h2
-rw-r--r--gl/lib/glob_pattern_p.c4
-rw-r--r--gl/lib/globfree.c4
-rw-r--r--gl/lib/glthread/lock.c2
-rw-r--r--gl/lib/glthread/lock.h5
-rw-r--r--gl/lib/glthread/threadlib.c2
-rw-r--r--gl/lib/hard-locale.c2
-rw-r--r--gl/lib/hard-locale.h2
-rw-r--r--gl/lib/hash-pjw.c2
-rw-r--r--gl/lib/hash-pjw.h2
-rw-r--r--gl/lib/hash-triple.c2
-rw-r--r--gl/lib/hash.c2
-rw-r--r--gl/lib/hash.h2
-rw-r--r--gl/lib/idpriv-drop.c2
-rw-r--r--gl/lib/idpriv-droptemp.c2
-rw-r--r--gl/lib/idpriv.h2
-rw-r--r--gl/lib/intprops.h18
-rw-r--r--gl/lib/ioctl.c2
-rw-r--r--gl/lib/itold.c2
-rw-r--r--gl/lib/langinfo.in.h2
-rw-r--r--gl/lib/libc-config.h2
-rw-r--r--gl/lib/limits.in.h46
-rw-r--r--gl/lib/localcharset.c2
-rw-r--r--gl/lib/localcharset.h2
-rw-r--r--gl/lib/locale.in.h57
-rw-r--r--gl/lib/localeconv.c2
-rw-r--r--gl/lib/localtime-buffer.c4
-rw-r--r--gl/lib/localtime-buffer.h2
-rw-r--r--gl/lib/lstat.c2
-rw-r--r--gl/lib/malloc.c2
-rw-r--r--gl/lib/malloc/scratch_buffer.h2
-rw-r--r--gl/lib/malloc/scratch_buffer_grow.c2
-rw-r--r--gl/lib/malloc/scratch_buffer_grow_preserve.c2
-rw-r--r--gl/lib/malloc/scratch_buffer_set_array_size.c2
-rw-r--r--gl/lib/malloca.c2
-rw-r--r--gl/lib/malloca.h2
-rw-r--r--gl/lib/mbrtowc.c2
-rw-r--r--gl/lib/mbsinit.c2
-rw-r--r--gl/lib/mbsrtowcs-impl.h2
-rw-r--r--gl/lib/mbsrtowcs-state.c2
-rw-r--r--gl/lib/mbsrtowcs.c2
-rw-r--r--gl/lib/mbtowc-impl.h2
-rw-r--r--gl/lib/mbtowc.c2
-rw-r--r--gl/lib/memchr.c2
-rw-r--r--gl/lib/memmem.c2
-rw-r--r--gl/lib/mempcpy.c2
-rw-r--r--gl/lib/memrchr.c4
-rw-r--r--gl/lib/minmax.h2
-rw-r--r--gl/lib/mkdir.c93
-rw-r--r--gl/lib/mkdtemp.c2
-rw-r--r--gl/lib/mkstemp.c2
-rw-r--r--gl/lib/msvc-inval.c2
-rw-r--r--gl/lib/msvc-inval.h2
-rw-r--r--gl/lib/msvc-nothrow.c2
-rw-r--r--gl/lib/msvc-nothrow.h2
-rw-r--r--gl/lib/nanosleep.c2
-rw-r--r--gl/lib/nl_langinfo.c2
-rw-r--r--gl/lib/nonblocking.c2
-rw-r--r--gl/lib/nonblocking.h2
-rw-r--r--gl/lib/open.c2
-rw-r--r--gl/lib/openat-die.c2
-rw-r--r--gl/lib/openat-priv.h2
-rw-r--r--gl/lib/openat-proc.c2
-rw-r--r--gl/lib/openat.c2
-rw-r--r--gl/lib/openat.h2
-rw-r--r--gl/lib/opendir.c2
-rw-r--r--gl/lib/pathmax.h2
-rw-r--r--gl/lib/pipe-safer.c2
-rw-r--r--gl/lib/printf-args.c2
-rw-r--r--gl/lib/printf-args.h2
-rw-r--r--gl/lib/printf-parse.c2
-rw-r--r--gl/lib/printf-parse.h2
-rw-r--r--gl/lib/progname.c2
-rw-r--r--gl/lib/progname.h2
-rw-r--r--gl/lib/raise.c50
-rw-r--r--gl/lib/rawmemchr.c2
-rw-r--r--gl/lib/readdir.c2
-rw-r--r--gl/lib/readlink.c2
-rw-r--r--gl/lib/realloc.c2
-rw-r--r--gl/lib/regcomp.c350
-rw-r--r--gl/lib/regex.c8
-rw-r--r--gl/lib/regex.h2
-rw-r--r--gl/lib/regex_internal.c154
-rw-r--r--gl/lib/regex_internal.h47
-rw-r--r--gl/lib/regexec.c374
-rw-r--r--gl/lib/rename.c2
-rw-r--r--gl/lib/rewinddir.c2
-rw-r--r--gl/lib/rmdir.c2
-rw-r--r--gl/lib/same-inode.h2
-rw-r--r--gl/lib/same.c2
-rw-r--r--gl/lib/same.h2
-rw-r--r--gl/lib/save-cwd.c2
-rw-r--r--gl/lib/save-cwd.h2
-rw-r--r--gl/lib/scratch_buffer.h7
-rw-r--r--gl/lib/select.c6
-rw-r--r--gl/lib/setenv.c2
-rw-r--r--gl/lib/sig-handler.h2
-rw-r--r--gl/lib/sigaction.c2
-rw-r--r--gl/lib/signal.in.h2
-rw-r--r--gl/lib/sigprocmask.c2
-rw-r--r--gl/lib/size_max.h2
-rw-r--r--gl/lib/sleep.c2
-rw-r--r--gl/lib/sockets.c2
-rw-r--r--gl/lib/sockets.h2
-rw-r--r--gl/lib/stat-time.h10
-rw-r--r--gl/lib/stat-w32.c6
-rw-r--r--gl/lib/stat-w32.h2
-rw-r--r--gl/lib/stat.c2
-rw-r--r--gl/lib/stdalign.in.h2
-rw-r--r--gl/lib/stdarg.in.h2
-rw-r--r--gl/lib/stdbool.in.h2
-rw-r--r--gl/lib/stddef.in.h2
-rw-r--r--gl/lib/stdint.in.h2
-rw-r--r--gl/lib/stdio-read.c2
-rw-r--r--gl/lib/stdio-write.c2
-rw-r--r--gl/lib/stdio.in.h2
-rw-r--r--gl/lib/stdlib.in.h5
-rw-r--r--gl/lib/str-two-way.h2
-rw-r--r--gl/lib/strcasecmp.c2
-rw-r--r--gl/lib/strcasestr.c2
-rw-r--r--gl/lib/strchrnul.c2
-rw-r--r--gl/lib/strdup.c2
-rw-r--r--gl/lib/streq.h2
-rw-r--r--gl/lib/strerror-override.c2
-rw-r--r--gl/lib/strerror-override.h2
-rw-r--r--gl/lib/strerror.c2
-rw-r--r--gl/lib/string.in.h2
-rw-r--r--gl/lib/strings.in.h2
-rw-r--r--gl/lib/stripslash.c2
-rw-r--r--gl/lib/strncasecmp.c2
-rw-r--r--gl/lib/strndup.c2
-rw-r--r--gl/lib/strnlen.c2
-rw-r--r--gl/lib/strnlen1.c2
-rw-r--r--gl/lib/strnlen1.h2
-rw-r--r--gl/lib/strsep.c2
-rw-r--r--gl/lib/sys_file.in.h2
-rw-r--r--gl/lib/sys_ioctl.in.h2
-rw-r--r--gl/lib/sys_select.in.h2
-rw-r--r--gl/lib/sys_socket.in.h2
-rw-r--r--gl/lib/sys_stat.in.h2
-rw-r--r--gl/lib/sys_time.in.h2
-rw-r--r--gl/lib/sys_types.in.h2
-rw-r--r--gl/lib/sys_uio.in.h2
-rw-r--r--gl/lib/sysexits.in.h2
-rw-r--r--gl/lib/tempname.c2
-rw-r--r--gl/lib/tempname.h2
-rw-r--r--gl/lib/time.in.h4
-rw-r--r--gl/lib/timespec.h30
-rw-r--r--gl/lib/unistd--.h2
-rw-r--r--gl/lib/unistd-safer.h2
-rw-r--r--gl/lib/unistd.in.h36
-rw-r--r--gl/lib/unsetenv.c2
-rw-r--r--gl/lib/utime.c2
-rw-r--r--gl/lib/utime.in.h2
-rw-r--r--gl/lib/utimens.c6
-rw-r--r--gl/lib/utimens.h2
-rw-r--r--gl/lib/vasnprintf.c10
-rw-r--r--gl/lib/vasnprintf.h2
-rw-r--r--gl/lib/vasprintf.c2
-rw-r--r--gl/lib/verify.h5
-rw-r--r--gl/lib/vsnprintf.c2
-rw-r--r--gl/lib/w32sock.h2
-rw-r--r--gl/lib/warn-on-use.h66
-rw-r--r--gl/lib/wchar.in.h2
-rw-r--r--gl/lib/wcrtomb.c2
-rw-r--r--gl/lib/wctype.in.h2
-rw-r--r--gl/lib/xalloc-die.c2
-rw-r--r--gl/lib/xalloc-oversized.h2
-rw-r--r--gl/lib/xalloc.h2
-rw-r--r--gl/lib/xasprintf.c2
-rw-r--r--gl/lib/xgetcwd.c2
-rw-r--r--gl/lib/xgetcwd.h2
-rw-r--r--gl/lib/xmalloc.c2
-rw-r--r--gl/lib/xsize.h2
-rw-r--r--gl/lib/xstrndup.c2
-rw-r--r--gl/lib/xstrndup.h2
-rw-r--r--gl/lib/xvasprintf.c2
-rw-r--r--gl/lib/xvasprintf.h2
279 files changed, 2471 insertions, 1310 deletions
diff --git a/gl/lib/Makefile.am b/gl/lib/Makefile.am
index 988e60e2..6ae85232 100644
--- a/gl/lib/Makefile.am
+++ b/gl/lib/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2019 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -84,7 +84,7 @@
# xstrndup \
# xvasprintf
-AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects
+AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects
SUBDIRS =
noinst_HEADERS =
@@ -560,29 +560,46 @@ EXTRA_libgnu_la_SOURCES += flock.c
## begin gnulib module fnmatch
+
+EXTRA_DIST += fnmatch.c fnmatch_loop.c
+
+EXTRA_libgnu_la_SOURCES += fnmatch.c fnmatch_loop.c
+
+## end gnulib module fnmatch
+
+## begin gnulib module fnmatch-h
+
BUILT_SOURCES += $(FNMATCH_H)
-# We need the following in order to create <fnmatch.h> when the system
-# doesn't have one that supports the required API.
+# We need the following in order to create <fnmatch.h>.
if GL_GENERATE_FNMATCH_H
-fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \
+ -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \
+ -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \
+ -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/fnmatch.in.h; \
} > $@-t && \
- mv -f $@-t $@
+ mv $@-t $@
else
fnmatch.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
-EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c
+EXTRA_DIST += fnmatch.in.h
-EXTRA_libgnu_la_SOURCES += fnmatch.c fnmatch_loop.c
-
-## end gnulib module fnmatch
+## end gnulib module fnmatch-h
## begin gnulib module fstat
@@ -671,7 +688,7 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(top_builddir)/config.status
+getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -737,29 +754,48 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
## begin gnulib module glob
-BUILT_SOURCES += glob.h
+
+EXTRA_DIST += glob.c glob_internal.h glob_pattern_p.c globfree.c
+
+EXTRA_libgnu_la_SOURCES += glob.c glob_pattern_p.c globfree.c
+
+## end gnulib module glob
+
+## begin gnulib module glob-h
+
+BUILT_SOURCES += $(GLOB_H)
# We need the following in order to create <glob.h>.
-glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H)
+if GL_GENERATE_GLOB_H
+glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''REPLACE_GLOB''@|$(REPLACE_GLOB)|g' \
+ -e 's|@''HAVE_GLOB_H''@|$(HAVE_GLOB_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_GLOB_H''@|$(NEXT_GLOB_H)|g' \
+ -e 's/@''GNULIB_GLOB''@/$(GNULIB_GLOB)/g' \
+ -e 's|@''HAVE_GLOB''@|$(HAVE_GLOB)|g' \
+ -e 's|@''HAVE_GLOB_PATTERN_P''@|$(HAVE_GLOB_PATTERN_P)|g' \
+ -e 's|@''REPLACE_GLOB''@|$(REPLACE_GLOB)|g' \
+ -e 's|@''REPLACE_GLOB_PATTERN_P''@|$(REPLACE_GLOB_PATTERN_P)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/glob.in.h; \
} > $@-t && \
- mv -f $@-t $@
+ mv $@-t $@
+else
+glob.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += glob.h glob.h-t
-EXTRA_DIST += glob-libc.h glob.c glob.in.h glob_internal.h glob_pattern_p.c globfree.c
+EXTRA_DIST += glob-libc.h glob.in.h
-EXTRA_libgnu_la_SOURCES += glob.c glob_pattern_p.c globfree.c
-
-## end gnulib module glob
+## end gnulib module glob-h
## begin gnulib module gnupload
@@ -931,11 +967,16 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
-e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
-e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
-e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
-e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
-e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
-e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+ -e 's|@''REPLACE_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \
-e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
@@ -1086,6 +1127,15 @@ libgnu_la_SOURCES += minmax.h
## end gnulib module minmax
+## begin gnulib module mkdir
+
+
+EXTRA_DIST += mkdir.c
+
+EXTRA_libgnu_la_SOURCES += mkdir.c
+
+## end gnulib module mkdir
+
## begin gnulib module mkdtemp
@@ -2548,6 +2598,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+ -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
@@ -2591,6 +2642,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
@@ -2634,6 +2686,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
-e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
@@ -2700,7 +2753,7 @@ BUILT_SOURCES += $(UTIME_H)
# We need the following in order to create <utime.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_UTIME_H
-utime.h: utime.in.h $(top_builddir)/config.status
+utime.h: utime.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
diff --git a/gl/lib/Makefile.in b/gl/lib/Makefile.in
index 390f1360..f95eca35 100644
--- a/gl/lib/Makefile.in
+++ b/gl/lib/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2019 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -187,6 +187,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/m4/man-arg-override-dir.m4 \
$(top_srcdir)/m4/man-arg-sections.m4 \
$(top_srcdir)/m4/man-arg-setuid.m4 \
+ $(top_srcdir)/m4/man-arg-systemdsystemunitdir.m4 \
$(top_srcdir)/m4/man-arg-systemdtmpfilesdir.m4 \
$(top_srcdir)/m4/man-arg-undoc.m4 $(top_srcdir)/m4/man-bdb.m4 \
$(top_srcdir)/m4/man-check-progs.m4 \
@@ -195,6 +196,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/m4/man-heirloom-nroff.m4 \
$(top_srcdir)/m4/man-libseccomp.m4 \
$(top_srcdir)/m4/man-linguas.m4 $(top_srcdir)/m4/man-po4a.m4 \
+ $(top_srcdir)/m4/man-tar-sort-name.m4 \
$(top_srcdir)/m4/man-trans-subst.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 \
$(top_srcdir)/gl/m4/__inline.m4 \
@@ -223,7 +225,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/filenamecat.m4 \
$(top_srcdir)/gl/m4/flexmember.m4 \
$(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/flock.m4 \
- $(top_srcdir)/gl/m4/fnmatch.m4 $(top_srcdir)/gl/m4/fstat.m4 \
+ $(top_srcdir)/gl/m4/fnmatch.m4 \
+ $(top_srcdir)/gl/m4/fnmatch_h.m4 $(top_srcdir)/gl/m4/fstat.m4 \
$(top_srcdir)/gl/m4/fstatat.m4 $(top_srcdir)/gl/m4/futimens.m4 \
$(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \
$(top_srcdir)/gl/m4/getcwd-path-max.m4 \
@@ -237,6 +240,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \
$(top_srcdir)/gl/m4/gettimeofday.m4 \
$(top_srcdir)/gl/m4/glibc21.m4 $(top_srcdir)/gl/m4/glob.m4 \
+ $(top_srcdir)/gl/m4/glob_h.m4 \
$(top_srcdir)/gl/m4/gnulib-common.m4 \
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/gl/m4/host-cpu-c-abi.m4 \
@@ -269,8 +273,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
$(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/memmem.m4 \
$(top_srcdir)/gl/m4/mempcpy.m4 $(top_srcdir)/gl/m4/memrchr.m4 \
- $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mkdtemp.m4 \
- $(top_srcdir)/gl/m4/mkstemp.m4 \
+ $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mkdir.m4 \
+ $(top_srcdir)/gl/m4/mkdtemp.m4 $(top_srcdir)/gl/m4/mkstemp.m4 \
$(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \
$(top_srcdir)/gl/m4/msvc-inval.m4 \
$(top_srcdir)/gl/m4/msvc-nothrow.m4 \
@@ -279,7 +283,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \
$(top_srcdir)/gl/m4/nocrash.m4 \
$(top_srcdir)/gl/m4/nonblocking.m4 \
- $(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/onceonly.m4 \
+ $(top_srcdir)/gl/m4/off_t.m4 \
$(top_srcdir)/gl/m4/open-cloexec.m4 \
$(top_srcdir)/gl/m4/open.m4 $(top_srcdir)/gl/m4/openat.m4 \
$(top_srcdir)/gl/m4/opendir.m4 $(top_srcdir)/gl/m4/pathmax.m4 \
@@ -391,7 +395,92 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/alloca.Plo \
+ ./$(DEPDIR)/areadlink-with-size.Plo ./$(DEPDIR)/argp-ba.Plo \
+ ./$(DEPDIR)/argp-eexst.Plo ./$(DEPDIR)/argp-fmtstream.Plo \
+ ./$(DEPDIR)/argp-fs-xinl.Plo ./$(DEPDIR)/argp-help.Plo \
+ ./$(DEPDIR)/argp-parse.Plo ./$(DEPDIR)/argp-pin.Plo \
+ ./$(DEPDIR)/argp-pv.Plo ./$(DEPDIR)/argp-pvh.Plo \
+ ./$(DEPDIR)/argp-xinl.Plo ./$(DEPDIR)/asnprintf.Plo \
+ ./$(DEPDIR)/asprintf.Plo ./$(DEPDIR)/at-func.Plo \
+ ./$(DEPDIR)/basename-lgpl.Plo ./$(DEPDIR)/basename.Plo \
+ ./$(DEPDIR)/bitrotate.Plo ./$(DEPDIR)/btowc.Plo \
+ ./$(DEPDIR)/canonicalize-lgpl.Plo ./$(DEPDIR)/canonicalize.Plo \
+ ./$(DEPDIR)/chdir-long.Plo ./$(DEPDIR)/cloexec.Plo \
+ ./$(DEPDIR)/close.Plo ./$(DEPDIR)/closedir.Plo \
+ ./$(DEPDIR)/dirfd.Plo ./$(DEPDIR)/dirname-lgpl.Plo \
+ ./$(DEPDIR)/dirname.Plo ./$(DEPDIR)/dup-safer-flag.Plo \
+ ./$(DEPDIR)/dup-safer.Plo ./$(DEPDIR)/dup.Plo \
+ ./$(DEPDIR)/dup2.Plo ./$(DEPDIR)/error.Plo \
+ ./$(DEPDIR)/exitfail.Plo ./$(DEPDIR)/fchdir.Plo \
+ ./$(DEPDIR)/fcntl.Plo ./$(DEPDIR)/fd-hook.Plo \
+ ./$(DEPDIR)/fd-safer-flag.Plo ./$(DEPDIR)/fd-safer.Plo \
+ ./$(DEPDIR)/fdopendir.Plo ./$(DEPDIR)/file-set.Plo \
+ ./$(DEPDIR)/filenamecat-lgpl.Plo ./$(DEPDIR)/float.Plo \
+ ./$(DEPDIR)/flock.Plo ./$(DEPDIR)/fnmatch.Plo \
+ ./$(DEPDIR)/fnmatch_loop.Plo ./$(DEPDIR)/fstat.Plo \
+ ./$(DEPDIR)/fstatat.Plo ./$(DEPDIR)/futimens.Plo \
+ ./$(DEPDIR)/getcwd-lgpl.Plo ./$(DEPDIR)/getcwd.Plo \
+ ./$(DEPDIR)/getdelim.Plo ./$(DEPDIR)/getdtablesize.Plo \
+ ./$(DEPDIR)/getline.Plo ./$(DEPDIR)/getlogin_r.Plo \
+ ./$(DEPDIR)/getopt.Plo ./$(DEPDIR)/getopt1.Plo \
+ ./$(DEPDIR)/getprogname.Plo ./$(DEPDIR)/gettime.Plo \
+ ./$(DEPDIR)/gettimeofday.Plo ./$(DEPDIR)/glob.Plo \
+ ./$(DEPDIR)/glob_pattern_p.Plo ./$(DEPDIR)/globfree.Plo \
+ ./$(DEPDIR)/hard-locale.Plo ./$(DEPDIR)/hash-pjw.Plo \
+ ./$(DEPDIR)/hash-triple.Plo ./$(DEPDIR)/hash.Plo \
+ ./$(DEPDIR)/idpriv-drop.Plo ./$(DEPDIR)/idpriv-droptemp.Plo \
+ ./$(DEPDIR)/ioctl.Plo ./$(DEPDIR)/itold.Plo \
+ ./$(DEPDIR)/localcharset.Plo ./$(DEPDIR)/localeconv.Plo \
+ ./$(DEPDIR)/localtime-buffer.Plo ./$(DEPDIR)/lstat.Plo \
+ ./$(DEPDIR)/malloc.Plo ./$(DEPDIR)/malloca.Plo \
+ ./$(DEPDIR)/mbrtowc.Plo ./$(DEPDIR)/mbsinit.Plo \
+ ./$(DEPDIR)/mbsrtowcs-state.Plo ./$(DEPDIR)/mbsrtowcs.Plo \
+ ./$(DEPDIR)/mbtowc.Plo ./$(DEPDIR)/memchr.Plo \
+ ./$(DEPDIR)/memmem.Plo ./$(DEPDIR)/mempcpy.Plo \
+ ./$(DEPDIR)/memrchr.Plo ./$(DEPDIR)/mkdir.Plo \
+ ./$(DEPDIR)/mkdtemp.Plo ./$(DEPDIR)/mkstemp.Plo \
+ ./$(DEPDIR)/msvc-inval.Plo ./$(DEPDIR)/msvc-nothrow.Plo \
+ ./$(DEPDIR)/nanosleep.Plo ./$(DEPDIR)/nl_langinfo.Plo \
+ ./$(DEPDIR)/nonblocking.Plo ./$(DEPDIR)/open.Plo \
+ ./$(DEPDIR)/openat-die.Plo ./$(DEPDIR)/openat-proc.Plo \
+ ./$(DEPDIR)/openat.Plo ./$(DEPDIR)/opendir.Plo \
+ ./$(DEPDIR)/pipe-safer.Plo ./$(DEPDIR)/printf-args.Plo \
+ ./$(DEPDIR)/printf-parse.Plo ./$(DEPDIR)/progname.Plo \
+ ./$(DEPDIR)/raise.Plo ./$(DEPDIR)/rawmemchr.Plo \
+ ./$(DEPDIR)/readdir.Plo ./$(DEPDIR)/readlink.Plo \
+ ./$(DEPDIR)/realloc.Plo ./$(DEPDIR)/regcomp.Plo \
+ ./$(DEPDIR)/regex.Plo ./$(DEPDIR)/regex_internal.Plo \
+ ./$(DEPDIR)/regexec.Plo ./$(DEPDIR)/rename.Plo \
+ ./$(DEPDIR)/rewinddir.Plo ./$(DEPDIR)/rmdir.Plo \
+ ./$(DEPDIR)/same.Plo ./$(DEPDIR)/save-cwd.Plo \
+ ./$(DEPDIR)/select.Plo ./$(DEPDIR)/setenv.Plo \
+ ./$(DEPDIR)/sig-handler.Plo ./$(DEPDIR)/sigaction.Plo \
+ ./$(DEPDIR)/sigprocmask.Plo ./$(DEPDIR)/sleep.Plo \
+ ./$(DEPDIR)/sockets.Plo ./$(DEPDIR)/stat-time.Plo \
+ ./$(DEPDIR)/stat-w32.Plo ./$(DEPDIR)/stat.Plo \
+ ./$(DEPDIR)/stdio-read.Plo ./$(DEPDIR)/stdio-write.Plo \
+ ./$(DEPDIR)/strcasecmp.Plo ./$(DEPDIR)/strcasestr.Plo \
+ ./$(DEPDIR)/strchrnul.Plo ./$(DEPDIR)/strdup.Plo \
+ ./$(DEPDIR)/strerror-override.Plo ./$(DEPDIR)/strerror.Plo \
+ ./$(DEPDIR)/stripslash.Plo ./$(DEPDIR)/strncasecmp.Plo \
+ ./$(DEPDIR)/strndup.Plo ./$(DEPDIR)/strnlen.Plo \
+ ./$(DEPDIR)/strnlen1.Plo ./$(DEPDIR)/strsep.Plo \
+ ./$(DEPDIR)/sys_socket.Plo ./$(DEPDIR)/tempname.Plo \
+ ./$(DEPDIR)/timespec.Plo ./$(DEPDIR)/unistd.Plo \
+ ./$(DEPDIR)/unsetenv.Plo ./$(DEPDIR)/utime.Plo \
+ ./$(DEPDIR)/utimens.Plo ./$(DEPDIR)/vasnprintf.Plo \
+ ./$(DEPDIR)/vasprintf.Plo ./$(DEPDIR)/vsnprintf.Plo \
+ ./$(DEPDIR)/wcrtomb.Plo ./$(DEPDIR)/wctype-h.Plo \
+ ./$(DEPDIR)/xalloc-die.Plo ./$(DEPDIR)/xasprintf.Plo \
+ ./$(DEPDIR)/xgetcwd.Plo ./$(DEPDIR)/xmalloc.Plo \
+ ./$(DEPDIR)/xsize.Plo ./$(DEPDIR)/xstrndup.Plo \
+ ./$(DEPDIR)/xvasprintf.Plo glthread/$(DEPDIR)/lock.Plo \
+ glthread/$(DEPDIR)/threadlib.Plo \
+ malloc/$(DEPDIR)/scratch_buffer_grow.Plo \
+ malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Plo \
+ malloc/$(DEPDIR)/scratch_buffer_set_array_size.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -434,7 +523,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
+ distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -533,6 +622,7 @@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
+GLOB_H = @GLOB_H@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_ACCEPT = @GNULIB_ACCEPT@
@@ -574,6 +664,7 @@ GNULIB_FFSLL = @GNULIB_FFSLL@
GNULIB_FGETC = @GNULIB_FGETC@
GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOCK = @GNULIB_FLOCK@
+GNULIB_FNMATCH = @GNULIB_FNMATCH@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
@@ -606,12 +697,14 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETPASS = @GNULIB_GETPASS@
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GLOB = @GNULIB_GLOB@
GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
@@ -625,6 +718,7 @@ GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LISTEN = @GNULIB_LISTEN@
GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -890,6 +984,9 @@ HAVE_FFS = @HAVE_FFS@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
HAVE_FLOCK = @HAVE_FLOCK@
+HAVE_FNMATCH = @HAVE_FNMATCH@
+HAVE_FNMATCH_H = @HAVE_FNMATCH_H@
+HAVE_FREELOCALE = @HAVE_FREELOCALE@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -902,8 +999,12 @@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETPASS = @HAVE_GETPASS@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GLOB = @HAVE_GLOB@
+HAVE_GLOB_H = @HAVE_GLOB_H@
+HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -942,6 +1043,7 @@ HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OPENDIR = @HAVE_OPENDIR@
@@ -1076,8 +1178,6 @@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
-HOST_CPU = @HOST_CPU@
-HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
IGNORE_UNUSED_LIBRARIES_CFLAGS = @IGNORE_UNUSED_LIBRARIES_CFLAGS@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
@@ -1138,6 +1238,7 @@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_GLOB_H = @NEXT_AS_FIRST_DIRECTIVE_GLOB_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
@@ -1169,6 +1270,7 @@ NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_GLOB_H = @NEXT_GLOB_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
@@ -1239,9 +1341,11 @@ REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FDOPEN = @REPLACE_FDOPEN@
REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FNMATCH = @REPLACE_FNMATCH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -1259,8 +1363,10 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETPASS = @REPLACE_GETPASS@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GLOB = @REPLACE_GLOB@
+REPLACE_GLOB_PATTERN_P = @REPLACE_GLOB_PATTERN_P@
REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_IOCTL = @REPLACE_IOCTL@
REPLACE_ISATTY = @REPLACE_ISATTY@
@@ -1291,6 +1397,7 @@ REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
@@ -1515,6 +1622,7 @@ sections = @sections@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
systemdtmpfilesdir = @systemdtmpfilesdir@
target_alias = @target_alias@
tbl = @tbl@
@@ -1529,7 +1637,7 @@ unlzma = @unlzma@
unxz = @unxz@
vgrind = @vgrind@
xz = @xz@
-AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects
+AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects
SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
@@ -1541,23 +1649,23 @@ EXTRA_DIST = alloca.c alloca.in.h areadlink.h assure.h openat-priv.h \
dosname.h dup.c dup2.c errno.in.h error.c error.h exitfail.h \
fchdir.c fcntl.c fcntl.in.h fd-hook.h fdopendir.c file-set.h \
filename.h filenamecat.h flexmember.h float.c float.in.h \
- itold.c flock.c fnmatch.c fnmatch.in.h fnmatch_loop.c fstat.c \
+ itold.c flock.c fnmatch.c fnmatch_loop.c fnmatch.in.h fstat.c \
stat-w32.c stat-w32.h at-func.c fstatat.c futimens.c getcwd.c \
getcwd-lgpl.c getdelim.c getdtablesize.c getline.c \
getlogin_r.c getopt-cdefs.in.h getopt-core.h getopt-ext.h \
getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h \
getopt1.c getopt_int.h gettimeofday.c \
- $(top_srcdir)/build-aux/gitlog-to-changelog glob-libc.h glob.c \
- glob.in.h glob_internal.h glob_pattern_p.c globfree.c \
- $(top_srcdir)/build-aux/gnupload hard-locale.h hash.h \
- hash-triple.h $(top_srcdir)/build-aux/config.rpath idpriv.h \
- idpriv.h intprops.h ioctl.c w32sock.h langinfo.in.h cdefs.h \
- libc-config.h limits.in.h localcharset.h locale.in.h \
+ $(top_srcdir)/build-aux/gitlog-to-changelog glob.c \
+ glob_internal.h glob_pattern_p.c globfree.c glob-libc.h \
+ glob.in.h $(top_srcdir)/build-aux/gnupload hard-locale.h \
+ hash.h hash-triple.h $(top_srcdir)/build-aux/config.rpath \
+ idpriv.h idpriv.h intprops.h ioctl.c w32sock.h langinfo.in.h \
+ cdefs.h libc-config.h limits.in.h localcharset.h locale.in.h \
localeconv.c localtime-buffer.c localtime-buffer.h lstat.c \
malloc.c malloc.c malloca.h mbrtowc.c mbsinit.c \
mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h \
mbtowc.c memchr.c memchr.valgrind memmem.c str-two-way.h \
- mempcpy.c memrchr.c mkdtemp.c mkstemp.c msvc-inval.c \
+ mempcpy.c memrchr.c mkdir.c mkdtemp.c mkstemp.c msvc-inval.c \
msvc-inval.h msvc-nothrow.c msvc-nothrow.h nanosleep.c \
nl_langinfo.c nonblocking.h stdio-read.c stdio-write.c open.c \
openat.c openat.h dirent-private.h opendir.c pathmax.h raise.c \
@@ -1585,12 +1693,13 @@ EXTRA_DIST = alloca.c alloca.in.h areadlink.h assure.h openat-priv.h \
wchar.in.h wcrtomb.c wctype.in.h xalloc.h xalloc-oversized.h \
xgetcwd.h xalloc.h
BUILT_SOURCES = $(ALLOCA_H) dirent.h $(ERRNO_H) fcntl.h $(FLOAT_H) \
- $(FNMATCH_H) $(GETOPT_H) $(GETOPT_CDEFS_H) glob.h langinfo.h \
- $(LIMITS_H) locale.h signal.h $(STDALIGN_H) $(STDARG_H) \
- $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \
- strings.h sys/file.h sys/ioctl.h sys/select.h sys/socket.h \
- sys/stat.h sys/time.h sys/types.h sys/uio.h $(SYSEXITS_H) \
- time.h unistd.h $(UTIME_H) wchar.h wctype.h
+ $(FNMATCH_H) $(GETOPT_H) $(GETOPT_CDEFS_H) $(GLOB_H) \
+ langinfo.h $(LIMITS_H) locale.h signal.h $(STDALIGN_H) \
+ $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \
+ stdlib.h string.h strings.h sys/file.h sys/ioctl.h \
+ sys/select.h sys/socket.h sys/stat.h sys/time.h sys/types.h \
+ sys/uio.h $(SYSEXITS_H) time.h unistd.h $(UTIME_H) wchar.h \
+ wctype.h
SUFFIXES =
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \
dirent.h-t errno.h errno.h-t fcntl.h fcntl.h-t float.h \
@@ -1646,10 +1755,10 @@ EXTRA_libgnu_la_SOURCES = alloca.c openat-proc.c btowc.c \
glob_pattern_p.c globfree.c ioctl.c localeconv.c \
localtime-buffer.c lstat.c malloc.c malloc.c mbrtowc.c \
mbsinit.c mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c \
- memmem.c mempcpy.c memrchr.c mkdtemp.c mkstemp.c msvc-inval.c \
- msvc-nothrow.c nanosleep.c nl_langinfo.c stdio-read.c \
- stdio-write.c open.c openat.c opendir.c raise.c rawmemchr.c \
- readdir.c readlink.c realloc.c regcomp.c regex.c \
+ memmem.c mempcpy.c memrchr.c mkdir.c mkdtemp.c mkstemp.c \
+ msvc-inval.c msvc-nothrow.c nanosleep.c nl_langinfo.c \
+ stdio-read.c stdio-write.c open.c openat.c opendir.c raise.c \
+ rawmemchr.c readdir.c readlink.c realloc.c regcomp.c regex.c \
regex_internal.c regexec.c rename.c rewinddir.c rmdir.c \
select.c setenv.c sigaction.c sigprocmask.c sleep.c stat-w32.c \
stat.c strcasecmp.c strncasecmp.c strcasestr.c strchrnul.c \
@@ -1707,8 +1816,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -1769,170 +1878,177 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink-with-size.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-ba.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-eexst.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-fmtstream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-fs-xinl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-help.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-parse.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pin.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pvh.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-xinl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitrotate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-set.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimens.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlogin_r.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob_pattern_p.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globfree.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-triple.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idpriv-drop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idpriv-droptemp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblocking.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewinddir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/same.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-read.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimens.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_set_array_size.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink-with-size.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-ba.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-eexst.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-fmtstream.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-fs-xinl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-help.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-parse.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pin.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pv.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pvh.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-xinl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitrotate.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-set.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimens.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlogin_r.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob_pattern_p.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globfree.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-triple.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idpriv-drop.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idpriv-droptemp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblocking.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewinddir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/same.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-read.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimens.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_set_array_size.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -2065,7 +2181,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -2172,7 +2291,171 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
- -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) malloc/$(DEPDIR)
+ -rm -f ./$(DEPDIR)/alloca.Plo
+ -rm -f ./$(DEPDIR)/areadlink-with-size.Plo
+ -rm -f ./$(DEPDIR)/argp-ba.Plo
+ -rm -f ./$(DEPDIR)/argp-eexst.Plo
+ -rm -f ./$(DEPDIR)/argp-fmtstream.Plo
+ -rm -f ./$(DEPDIR)/argp-fs-xinl.Plo
+ -rm -f ./$(DEPDIR)/argp-help.Plo
+ -rm -f ./$(DEPDIR)/argp-parse.Plo
+ -rm -f ./$(DEPDIR)/argp-pin.Plo
+ -rm -f ./$(DEPDIR)/argp-pv.Plo
+ -rm -f ./$(DEPDIR)/argp-pvh.Plo
+ -rm -f ./$(DEPDIR)/argp-xinl.Plo
+ -rm -f ./$(DEPDIR)/asnprintf.Plo
+ -rm -f ./$(DEPDIR)/asprintf.Plo
+ -rm -f ./$(DEPDIR)/at-func.Plo
+ -rm -f ./$(DEPDIR)/basename-lgpl.Plo
+ -rm -f ./$(DEPDIR)/basename.Plo
+ -rm -f ./$(DEPDIR)/bitrotate.Plo
+ -rm -f ./$(DEPDIR)/btowc.Plo
+ -rm -f ./$(DEPDIR)/canonicalize-lgpl.Plo
+ -rm -f ./$(DEPDIR)/canonicalize.Plo
+ -rm -f ./$(DEPDIR)/chdir-long.Plo
+ -rm -f ./$(DEPDIR)/cloexec.Plo
+ -rm -f ./$(DEPDIR)/close.Plo
+ -rm -f ./$(DEPDIR)/closedir.Plo
+ -rm -f ./$(DEPDIR)/dirfd.Plo
+ -rm -f ./$(DEPDIR)/dirname-lgpl.Plo
+ -rm -f ./$(DEPDIR)/dirname.Plo
+ -rm -f ./$(DEPDIR)/dup-safer-flag.Plo
+ -rm -f ./$(DEPDIR)/dup-safer.Plo
+ -rm -f ./$(DEPDIR)/dup.Plo
+ -rm -f ./$(DEPDIR)/dup2.Plo
+ -rm -f ./$(DEPDIR)/error.Plo
+ -rm -f ./$(DEPDIR)/exitfail.Plo
+ -rm -f ./$(DEPDIR)/fchdir.Plo
+ -rm -f ./$(DEPDIR)/fcntl.Plo
+ -rm -f ./$(DEPDIR)/fd-hook.Plo
+ -rm -f ./$(DEPDIR)/fd-safer-flag.Plo
+ -rm -f ./$(DEPDIR)/fd-safer.Plo
+ -rm -f ./$(DEPDIR)/fdopendir.Plo
+ -rm -f ./$(DEPDIR)/file-set.Plo
+ -rm -f ./$(DEPDIR)/filenamecat-lgpl.Plo
+ -rm -f ./$(DEPDIR)/float.Plo
+ -rm -f ./$(DEPDIR)/flock.Plo
+ -rm -f ./$(DEPDIR)/fnmatch.Plo
+ -rm -f ./$(DEPDIR)/fnmatch_loop.Plo
+ -rm -f ./$(DEPDIR)/fstat.Plo
+ -rm -f ./$(DEPDIR)/fstatat.Plo
+ -rm -f ./$(DEPDIR)/futimens.Plo
+ -rm -f ./$(DEPDIR)/getcwd-lgpl.Plo
+ -rm -f ./$(DEPDIR)/getcwd.Plo
+ -rm -f ./$(DEPDIR)/getdelim.Plo
+ -rm -f ./$(DEPDIR)/getdtablesize.Plo
+ -rm -f ./$(DEPDIR)/getline.Plo
+ -rm -f ./$(DEPDIR)/getlogin_r.Plo
+ -rm -f ./$(DEPDIR)/getopt.Plo
+ -rm -f ./$(DEPDIR)/getopt1.Plo
+ -rm -f ./$(DEPDIR)/getprogname.Plo
+ -rm -f ./$(DEPDIR)/gettime.Plo
+ -rm -f ./$(DEPDIR)/gettimeofday.Plo
+ -rm -f ./$(DEPDIR)/glob.Plo
+ -rm -f ./$(DEPDIR)/glob_pattern_p.Plo
+ -rm -f ./$(DEPDIR)/globfree.Plo
+ -rm -f ./$(DEPDIR)/hard-locale.Plo
+ -rm -f ./$(DEPDIR)/hash-pjw.Plo
+ -rm -f ./$(DEPDIR)/hash-triple.Plo
+ -rm -f ./$(DEPDIR)/hash.Plo
+ -rm -f ./$(DEPDIR)/idpriv-drop.Plo
+ -rm -f ./$(DEPDIR)/idpriv-droptemp.Plo
+ -rm -f ./$(DEPDIR)/ioctl.Plo
+ -rm -f ./$(DEPDIR)/itold.Plo
+ -rm -f ./$(DEPDIR)/localcharset.Plo
+ -rm -f ./$(DEPDIR)/localeconv.Plo
+ -rm -f ./$(DEPDIR)/localtime-buffer.Plo
+ -rm -f ./$(DEPDIR)/lstat.Plo
+ -rm -f ./$(DEPDIR)/malloc.Plo
+ -rm -f ./$(DEPDIR)/malloca.Plo
+ -rm -f ./$(DEPDIR)/mbrtowc.Plo
+ -rm -f ./$(DEPDIR)/mbsinit.Plo
+ -rm -f ./$(DEPDIR)/mbsrtowcs-state.Plo
+ -rm -f ./$(DEPDIR)/mbsrtowcs.Plo
+ -rm -f ./$(DEPDIR)/mbtowc.Plo
+ -rm -f ./$(DEPDIR)/memchr.Plo
+ -rm -f ./$(DEPDIR)/memmem.Plo
+ -rm -f ./$(DEPDIR)/mempcpy.Plo
+ -rm -f ./$(DEPDIR)/memrchr.Plo
+ -rm -f ./$(DEPDIR)/mkdir.Plo
+ -rm -f ./$(DEPDIR)/mkdtemp.Plo
+ -rm -f ./$(DEPDIR)/mkstemp.Plo
+ -rm -f ./$(DEPDIR)/msvc-inval.Plo
+ -rm -f ./$(DEPDIR)/msvc-nothrow.Plo
+ -rm -f ./$(DEPDIR)/nanosleep.Plo
+ -rm -f ./$(DEPDIR)/nl_langinfo.Plo
+ -rm -f ./$(DEPDIR)/nonblocking.Plo
+ -rm -f ./$(DEPDIR)/open.Plo
+ -rm -f ./$(DEPDIR)/openat-die.Plo
+ -rm -f ./$(DEPDIR)/openat-proc.Plo
+ -rm -f ./$(DEPDIR)/openat.Plo
+ -rm -f ./$(DEPDIR)/opendir.Plo
+ -rm -f ./$(DEPDIR)/pipe-safer.Plo
+ -rm -f ./$(DEPDIR)/printf-args.Plo
+ -rm -f ./$(DEPDIR)/printf-parse.Plo
+ -rm -f ./$(DEPDIR)/progname.Plo
+ -rm -f ./$(DEPDIR)/raise.Plo
+ -rm -f ./$(DEPDIR)/rawmemchr.Plo
+ -rm -f ./$(DEPDIR)/readdir.Plo
+ -rm -f ./$(DEPDIR)/readlink.Plo
+ -rm -f ./$(DEPDIR)/realloc.Plo
+ -rm -f ./$(DEPDIR)/regcomp.Plo
+ -rm -f ./$(DEPDIR)/regex.Plo
+ -rm -f ./$(DEPDIR)/regex_internal.Plo
+ -rm -f ./$(DEPDIR)/regexec.Plo
+ -rm -f ./$(DEPDIR)/rename.Plo
+ -rm -f ./$(DEPDIR)/rewinddir.Plo
+ -rm -f ./$(DEPDIR)/rmdir.Plo
+ -rm -f ./$(DEPDIR)/same.Plo
+ -rm -f ./$(DEPDIR)/save-cwd.Plo
+ -rm -f ./$(DEPDIR)/select.Plo
+ -rm -f ./$(DEPDIR)/setenv.Plo
+ -rm -f ./$(DEPDIR)/sig-handler.Plo
+ -rm -f ./$(DEPDIR)/sigaction.Plo
+ -rm -f ./$(DEPDIR)/sigprocmask.Plo
+ -rm -f ./$(DEPDIR)/sleep.Plo
+ -rm -f ./$(DEPDIR)/sockets.Plo
+ -rm -f ./$(DEPDIR)/stat-time.Plo
+ -rm -f ./$(DEPDIR)/stat-w32.Plo
+ -rm -f ./$(DEPDIR)/stat.Plo
+ -rm -f ./$(DEPDIR)/stdio-read.Plo
+ -rm -f ./$(DEPDIR)/stdio-write.Plo
+ -rm -f ./$(DEPDIR)/strcasecmp.Plo
+ -rm -f ./$(DEPDIR)/strcasestr.Plo
+ -rm -f ./$(DEPDIR)/strchrnul.Plo
+ -rm -f ./$(DEPDIR)/strdup.Plo
+ -rm -f ./$(DEPDIR)/strerror-override.Plo
+ -rm -f ./$(DEPDIR)/strerror.Plo
+ -rm -f ./$(DEPDIR)/stripslash.Plo
+ -rm -f ./$(DEPDIR)/strncasecmp.Plo
+ -rm -f ./$(DEPDIR)/strndup.Plo
+ -rm -f ./$(DEPDIR)/strnlen.Plo
+ -rm -f ./$(DEPDIR)/strnlen1.Plo
+ -rm -f ./$(DEPDIR)/strsep.Plo
+ -rm -f ./$(DEPDIR)/sys_socket.Plo
+ -rm -f ./$(DEPDIR)/tempname.Plo
+ -rm -f ./$(DEPDIR)/timespec.Plo
+ -rm -f ./$(DEPDIR)/unistd.Plo
+ -rm -f ./$(DEPDIR)/unsetenv.Plo
+ -rm -f ./$(DEPDIR)/utime.Plo
+ -rm -f ./$(DEPDIR)/utimens.Plo
+ -rm -f ./$(DEPDIR)/vasnprintf.Plo
+ -rm -f ./$(DEPDIR)/vasprintf.Plo
+ -rm -f ./$(DEPDIR)/vsnprintf.Plo
+ -rm -f ./$(DEPDIR)/wcrtomb.Plo
+ -rm -f ./$(DEPDIR)/wctype-h.Plo
+ -rm -f ./$(DEPDIR)/xalloc-die.Plo
+ -rm -f ./$(DEPDIR)/xasprintf.Plo
+ -rm -f ./$(DEPDIR)/xgetcwd.Plo
+ -rm -f ./$(DEPDIR)/xmalloc.Plo
+ -rm -f ./$(DEPDIR)/xsize.Plo
+ -rm -f ./$(DEPDIR)/xstrndup.Plo
+ -rm -f ./$(DEPDIR)/xvasprintf.Plo
+ -rm -f glthread/$(DEPDIR)/lock.Plo
+ -rm -f glthread/$(DEPDIR)/threadlib.Plo
+ -rm -f malloc/$(DEPDIR)/scratch_buffer_grow.Plo
+ -rm -f malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Plo
+ -rm -f malloc/$(DEPDIR)/scratch_buffer_set_array_size.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -2218,7 +2501,171 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) malloc/$(DEPDIR)
+ -rm -f ./$(DEPDIR)/alloca.Plo
+ -rm -f ./$(DEPDIR)/areadlink-with-size.Plo
+ -rm -f ./$(DEPDIR)/argp-ba.Plo
+ -rm -f ./$(DEPDIR)/argp-eexst.Plo
+ -rm -f ./$(DEPDIR)/argp-fmtstream.Plo
+ -rm -f ./$(DEPDIR)/argp-fs-xinl.Plo
+ -rm -f ./$(DEPDIR)/argp-help.Plo
+ -rm -f ./$(DEPDIR)/argp-parse.Plo
+ -rm -f ./$(DEPDIR)/argp-pin.Plo
+ -rm -f ./$(DEPDIR)/argp-pv.Plo
+ -rm -f ./$(DEPDIR)/argp-pvh.Plo
+ -rm -f ./$(DEPDIR)/argp-xinl.Plo
+ -rm -f ./$(DEPDIR)/asnprintf.Plo
+ -rm -f ./$(DEPDIR)/asprintf.Plo
+ -rm -f ./$(DEPDIR)/at-func.Plo
+ -rm -f ./$(DEPDIR)/basename-lgpl.Plo
+ -rm -f ./$(DEPDIR)/basename.Plo
+ -rm -f ./$(DEPDIR)/bitrotate.Plo
+ -rm -f ./$(DEPDIR)/btowc.Plo
+ -rm -f ./$(DEPDIR)/canonicalize-lgpl.Plo
+ -rm -f ./$(DEPDIR)/canonicalize.Plo
+ -rm -f ./$(DEPDIR)/chdir-long.Plo
+ -rm -f ./$(DEPDIR)/cloexec.Plo
+ -rm -f ./$(DEPDIR)/close.Plo
+ -rm -f ./$(DEPDIR)/closedir.Plo
+ -rm -f ./$(DEPDIR)/dirfd.Plo
+ -rm -f ./$(DEPDIR)/dirname-lgpl.Plo
+ -rm -f ./$(DEPDIR)/dirname.Plo
+ -rm -f ./$(DEPDIR)/dup-safer-flag.Plo
+ -rm -f ./$(DEPDIR)/dup-safer.Plo
+ -rm -f ./$(DEPDIR)/dup.Plo
+ -rm -f ./$(DEPDIR)/dup2.Plo
+ -rm -f ./$(DEPDIR)/error.Plo
+ -rm -f ./$(DEPDIR)/exitfail.Plo
+ -rm -f ./$(DEPDIR)/fchdir.Plo
+ -rm -f ./$(DEPDIR)/fcntl.Plo
+ -rm -f ./$(DEPDIR)/fd-hook.Plo
+ -rm -f ./$(DEPDIR)/fd-safer-flag.Plo
+ -rm -f ./$(DEPDIR)/fd-safer.Plo
+ -rm -f ./$(DEPDIR)/fdopendir.Plo
+ -rm -f ./$(DEPDIR)/file-set.Plo
+ -rm -f ./$(DEPDIR)/filenamecat-lgpl.Plo
+ -rm -f ./$(DEPDIR)/float.Plo
+ -rm -f ./$(DEPDIR)/flock.Plo
+ -rm -f ./$(DEPDIR)/fnmatch.Plo
+ -rm -f ./$(DEPDIR)/fnmatch_loop.Plo
+ -rm -f ./$(DEPDIR)/fstat.Plo
+ -rm -f ./$(DEPDIR)/fstatat.Plo
+ -rm -f ./$(DEPDIR)/futimens.Plo
+ -rm -f ./$(DEPDIR)/getcwd-lgpl.Plo
+ -rm -f ./$(DEPDIR)/getcwd.Plo
+ -rm -f ./$(DEPDIR)/getdelim.Plo
+ -rm -f ./$(DEPDIR)/getdtablesize.Plo
+ -rm -f ./$(DEPDIR)/getline.Plo
+ -rm -f ./$(DEPDIR)/getlogin_r.Plo
+ -rm -f ./$(DEPDIR)/getopt.Plo
+ -rm -f ./$(DEPDIR)/getopt1.Plo
+ -rm -f ./$(DEPDIR)/getprogname.Plo
+ -rm -f ./$(DEPDIR)/gettime.Plo
+ -rm -f ./$(DEPDIR)/gettimeofday.Plo
+ -rm -f ./$(DEPDIR)/glob.Plo
+ -rm -f ./$(DEPDIR)/glob_pattern_p.Plo
+ -rm -f ./$(DEPDIR)/globfree.Plo
+ -rm -f ./$(DEPDIR)/hard-locale.Plo
+ -rm -f ./$(DEPDIR)/hash-pjw.Plo
+ -rm -f ./$(DEPDIR)/hash-triple.Plo
+ -rm -f ./$(DEPDIR)/hash.Plo
+ -rm -f ./$(DEPDIR)/idpriv-drop.Plo
+ -rm -f ./$(DEPDIR)/idpriv-droptemp.Plo
+ -rm -f ./$(DEPDIR)/ioctl.Plo
+ -rm -f ./$(DEPDIR)/itold.Plo
+ -rm -f ./$(DEPDIR)/localcharset.Plo
+ -rm -f ./$(DEPDIR)/localeconv.Plo
+ -rm -f ./$(DEPDIR)/localtime-buffer.Plo
+ -rm -f ./$(DEPDIR)/lstat.Plo
+ -rm -f ./$(DEPDIR)/malloc.Plo
+ -rm -f ./$(DEPDIR)/malloca.Plo
+ -rm -f ./$(DEPDIR)/mbrtowc.Plo
+ -rm -f ./$(DEPDIR)/mbsinit.Plo
+ -rm -f ./$(DEPDIR)/mbsrtowcs-state.Plo
+ -rm -f ./$(DEPDIR)/mbsrtowcs.Plo
+ -rm -f ./$(DEPDIR)/mbtowc.Plo
+ -rm -f ./$(DEPDIR)/memchr.Plo
+ -rm -f ./$(DEPDIR)/memmem.Plo
+ -rm -f ./$(DEPDIR)/mempcpy.Plo
+ -rm -f ./$(DEPDIR)/memrchr.Plo
+ -rm -f ./$(DEPDIR)/mkdir.Plo
+ -rm -f ./$(DEPDIR)/mkdtemp.Plo
+ -rm -f ./$(DEPDIR)/mkstemp.Plo
+ -rm -f ./$(DEPDIR)/msvc-inval.Plo
+ -rm -f ./$(DEPDIR)/msvc-nothrow.Plo
+ -rm -f ./$(DEPDIR)/nanosleep.Plo
+ -rm -f ./$(DEPDIR)/nl_langinfo.Plo
+ -rm -f ./$(DEPDIR)/nonblocking.Plo
+ -rm -f ./$(DEPDIR)/open.Plo
+ -rm -f ./$(DEPDIR)/openat-die.Plo
+ -rm -f ./$(DEPDIR)/openat-proc.Plo
+ -rm -f ./$(DEPDIR)/openat.Plo
+ -rm -f ./$(DEPDIR)/opendir.Plo
+ -rm -f ./$(DEPDIR)/pipe-safer.Plo
+ -rm -f ./$(DEPDIR)/printf-args.Plo
+ -rm -f ./$(DEPDIR)/printf-parse.Plo
+ -rm -f ./$(DEPDIR)/progname.Plo
+ -rm -f ./$(DEPDIR)/raise.Plo
+ -rm -f ./$(DEPDIR)/rawmemchr.Plo
+ -rm -f ./$(DEPDIR)/readdir.Plo
+ -rm -f ./$(DEPDIR)/readlink.Plo
+ -rm -f ./$(DEPDIR)/realloc.Plo
+ -rm -f ./$(DEPDIR)/regcomp.Plo
+ -rm -f ./$(DEPDIR)/regex.Plo
+ -rm -f ./$(DEPDIR)/regex_internal.Plo
+ -rm -f ./$(DEPDIR)/regexec.Plo
+ -rm -f ./$(DEPDIR)/rename.Plo
+ -rm -f ./$(DEPDIR)/rewinddir.Plo
+ -rm -f ./$(DEPDIR)/rmdir.Plo
+ -rm -f ./$(DEPDIR)/same.Plo
+ -rm -f ./$(DEPDIR)/save-cwd.Plo
+ -rm -f ./$(DEPDIR)/select.Plo
+ -rm -f ./$(DEPDIR)/setenv.Plo
+ -rm -f ./$(DEPDIR)/sig-handler.Plo
+ -rm -f ./$(DEPDIR)/sigaction.Plo
+ -rm -f ./$(DEPDIR)/sigprocmask.Plo
+ -rm -f ./$(DEPDIR)/sleep.Plo
+ -rm -f ./$(DEPDIR)/sockets.Plo
+ -rm -f ./$(DEPDIR)/stat-time.Plo
+ -rm -f ./$(DEPDIR)/stat-w32.Plo
+ -rm -f ./$(DEPDIR)/stat.Plo
+ -rm -f ./$(DEPDIR)/stdio-read.Plo
+ -rm -f ./$(DEPDIR)/stdio-write.Plo
+ -rm -f ./$(DEPDIR)/strcasecmp.Plo
+ -rm -f ./$(DEPDIR)/strcasestr.Plo
+ -rm -f ./$(DEPDIR)/strchrnul.Plo
+ -rm -f ./$(DEPDIR)/strdup.Plo
+ -rm -f ./$(DEPDIR)/strerror-override.Plo
+ -rm -f ./$(DEPDIR)/strerror.Plo
+ -rm -f ./$(DEPDIR)/stripslash.Plo
+ -rm -f ./$(DEPDIR)/strncasecmp.Plo
+ -rm -f ./$(DEPDIR)/strndup.Plo
+ -rm -f ./$(DEPDIR)/strnlen.Plo
+ -rm -f ./$(DEPDIR)/strnlen1.Plo
+ -rm -f ./$(DEPDIR)/strsep.Plo
+ -rm -f ./$(DEPDIR)/sys_socket.Plo
+ -rm -f ./$(DEPDIR)/tempname.Plo
+ -rm -f ./$(DEPDIR)/timespec.Plo
+ -rm -f ./$(DEPDIR)/unistd.Plo
+ -rm -f ./$(DEPDIR)/unsetenv.Plo
+ -rm -f ./$(DEPDIR)/utime.Plo
+ -rm -f ./$(DEPDIR)/utimens.Plo
+ -rm -f ./$(DEPDIR)/vasnprintf.Plo
+ -rm -f ./$(DEPDIR)/vasprintf.Plo
+ -rm -f ./$(DEPDIR)/vsnprintf.Plo
+ -rm -f ./$(DEPDIR)/wcrtomb.Plo
+ -rm -f ./$(DEPDIR)/wctype-h.Plo
+ -rm -f ./$(DEPDIR)/xalloc-die.Plo
+ -rm -f ./$(DEPDIR)/xasprintf.Plo
+ -rm -f ./$(DEPDIR)/xgetcwd.Plo
+ -rm -f ./$(DEPDIR)/xmalloc.Plo
+ -rm -f ./$(DEPDIR)/xsize.Plo
+ -rm -f ./$(DEPDIR)/xstrndup.Plo
+ -rm -f ./$(DEPDIR)/xvasprintf.Plo
+ -rm -f glthread/$(DEPDIR)/lock.Plo
+ -rm -f glthread/$(DEPDIR)/threadlib.Plo
+ -rm -f malloc/$(DEPDIR)/scratch_buffer_grow.Plo
+ -rm -f malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Plo
+ -rm -f malloc/$(DEPDIR)/scratch_buffer_set_array_size.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -2240,8 +2687,8 @@ uninstall-am:
.MAKE: $(am__recursive_targets) all check install install-am \
install-strip
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
- check-am clean clean-generic clean-libtool \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-am clean clean-generic clean-libtool \
clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
@@ -2373,21 +2820,31 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
@GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status
@GL_GENERATE_FLOAT_H_FALSE@ rm -f $@
-# We need the following in order to create <fnmatch.h> when the system
-# doesn't have one that supports the required API.
-@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+# We need the following in order to create <fnmatch.h>.
+@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@GL_GENERATE_FNMATCH_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_FNMATCH_H_TRUE@ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_FNMATCH_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@GL_GENERATE_FNMATCH_H_TRUE@ < $(srcdir)/fnmatch.in.h; \
@GL_GENERATE_FNMATCH_H_TRUE@ } > $@-t && \
-@GL_GENERATE_FNMATCH_H_TRUE@ mv -f $@-t $@
+@GL_GENERATE_FNMATCH_H_TRUE@ mv $@-t $@
@GL_GENERATE_FNMATCH_H_FALSE@fnmatch.h: $(top_builddir)/config.status
@GL_GENERATE_FNMATCH_H_FALSE@ rm -f $@
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(top_builddir)/config.status
+getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -2410,19 +2867,28 @@ getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
mv -f $@-t $@
# We need the following in order to create <glob.h>.
-glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''REPLACE_GLOB''@|$(REPLACE_GLOB)|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_GLOB_H''@|$(NEXT_GLOB_H)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- < $(srcdir)/glob.in.h; \
- } > $@-t && \
- mv -f $@-t $@
+@GL_GENERATE_GLOB_H_TRUE@glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+@GL_GENERATE_GLOB_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_GLOB_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_GLOB_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''HAVE_GLOB_H''@|$(HAVE_GLOB_H)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''NEXT_GLOB_H''@|$(NEXT_GLOB_H)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's/@''GNULIB_GLOB''@/$(GNULIB_GLOB)/g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''HAVE_GLOB''@|$(HAVE_GLOB)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''HAVE_GLOB_PATTERN_P''@|$(HAVE_GLOB_PATTERN_P)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''REPLACE_GLOB''@|$(REPLACE_GLOB)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''REPLACE_GLOB_PATTERN_P''@|$(REPLACE_GLOB_PATTERN_P)|g' \
+@GL_GENERATE_GLOB_H_TRUE@ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+@GL_GENERATE_GLOB_H_TRUE@ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+@GL_GENERATE_GLOB_H_TRUE@ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+@GL_GENERATE_GLOB_H_TRUE@ < $(srcdir)/glob.in.h; \
+@GL_GENERATE_GLOB_H_TRUE@ } > $@-t && \
+@GL_GENERATE_GLOB_H_TRUE@ mv $@-t $@
+@GL_GENERATE_GLOB_H_FALSE@glob.h: $(top_builddir)/config.status
+@GL_GENERATE_GLOB_H_FALSE@ rm -f $@
# We need the following in order to create an empty placeholder for
# <langinfo.h> when the system doesn't have one.
@@ -2478,11 +2944,16 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
-e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
-e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
-e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
-e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
-e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
-e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+ -e 's|@''REPLACE_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \
-e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
@@ -3271,6 +3742,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+ -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
@@ -3314,6 +3786,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
@@ -3357,6 +3830,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
-e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
@@ -3387,7 +3861,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
# We need the following in order to create <utime.h> when the system
# doesn't have one that works with the given compiler.
-@GL_GENERATE_UTIME_H_TRUE@utime.h: utime.in.h $(top_builddir)/config.status
+@GL_GENERATE_UTIME_H_TRUE@utime.h: utime.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@GL_GENERATE_UTIME_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_UTIME_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@GL_GENERATE_UTIME_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
diff --git a/gl/lib/_Noreturn.h b/gl/lib/_Noreturn.h
index c44ad89b..94fdfaf0 100644
--- a/gl/lib/_Noreturn.h
+++ b/gl/lib/_Noreturn.h
@@ -1,8 +1,12 @@
-#if !defined _Noreturn && __STDC_VERSION__ < 201112
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
+#ifndef _Noreturn
+# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# define _Noreturn [[noreturn]]
+# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+ /* _Noreturn works as-is. */
+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= _MSC_VER
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn
diff --git a/gl/lib/alloca.in.h b/gl/lib/alloca.in.h
index 5ad8af8b..ec81e119 100644
--- a/gl/lib/alloca.in.h
+++ b/gl/lib/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2018 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2019 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
diff --git a/gl/lib/areadlink-with-size.c b/gl/lib/areadlink-with-size.c
index abf4186c..eacad3f6 100644
--- a/gl/lib/areadlink-with-size.c
+++ b/gl/lib/areadlink-with-size.c
@@ -1,7 +1,7 @@
/* readlink wrapper to return the link name in malloc'd storage.
Unlike xreadlink and xreadlink_with_size, don't ever call exit.
- Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/areadlink.h b/gl/lib/areadlink.h
index 9ab139d6..ddcd06d7 100644
--- a/gl/lib/areadlink.h
+++ b/gl/lib/areadlink.h
@@ -1,6 +1,6 @@
/* Read symbolic links without size limitation.
- Copyright (C) 2001, 2003-2004, 2007, 2009-2018 Free Software Foundation,
+ Copyright (C) 2001, 2003-2004, 2007, 2009-2019 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/arg-nonnull.h b/gl/lib/arg-nonnull.h
index 5f034083..ad8c26c2 100644
--- a/gl/lib/arg-nonnull.h
+++ b/gl/lib/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gl/lib/argp-ba.c b/gl/lib/argp-ba.c
index 7474356b..fcf60c82 100644
--- a/gl/lib/argp-ba.c
+++ b/gl/lib/argp-ba.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
- Copyright (C) 1996-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-eexst.c b/gl/lib/argp-eexst.c
index 6a5efde6..06b025d4 100644
--- a/gl/lib/argp-eexst.c
+++ b/gl/lib/argp-eexst.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_ERR_EXIT_STATUS
- Copyright (C) 1997, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-fmtstream.c b/gl/lib/argp-fmtstream.c
index 13c6bf98..ba6a407f 100644
--- a/gl/lib/argp-fmtstream.c
+++ b/gl/lib/argp-fmtstream.c
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-fmtstream.h b/gl/lib/argp-fmtstream.h
index 2e1976dd..0cc88525 100644
--- a/gl/lib/argp-fmtstream.h
+++ b/gl/lib/argp-fmtstream.h
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-fs-xinl.c b/gl/lib/argp-fs-xinl.c
index b8d8342a..a2e843c8 100644
--- a/gl/lib/argp-fs-xinl.c
+++ b/gl/lib/argp-fs-xinl.c
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp-fmtstream.h
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-help.c b/gl/lib/argp-help.c
index 09a716e6..febd5477 100644
--- a/gl/lib/argp-help.c
+++ b/gl/lib/argp-help.c
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing help output
- Copyright (C) 1995-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-namefrob.h b/gl/lib/argp-namefrob.h
index 526cd529..2fb9ac49 100644
--- a/gl/lib/argp-namefrob.h
+++ b/gl/lib/argp-namefrob.h
@@ -1,5 +1,5 @@
/* Name frobnication for compiling argp outside of glibc
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-parse.c b/gl/lib/argp-parse.c
index 3f8b0ba6..35c4074c 100644
--- a/gl/lib/argp-parse.c
+++ b/gl/lib/argp-parse.c
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt
- Copyright (C) 1995-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-pin.c b/gl/lib/argp-pin.c
index e68691c2..ece7423e 100644
--- a/gl/lib/argp-pin.c
+++ b/gl/lib/argp-pin.c
@@ -1,5 +1,5 @@
/* Full and short program names for argp module
- Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/argp-pv.c b/gl/lib/argp-pv.c
index fc4c4d50..f76b365a 100644
--- a/gl/lib/argp-pv.c
+++ b/gl/lib/argp-pv.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION.
- Copyright (C) 1996-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-pvh.c b/gl/lib/argp-pvh.c
index 9114d8e1..be73e335 100644
--- a/gl/lib/argp-pvh.c
+++ b/gl/lib/argp-pvh.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
- Copyright (C) 1996-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-xinl.c b/gl/lib/argp-xinl.c
index 6ee111e7..ebc032f6 100644
--- a/gl/lib/argp-xinl.c
+++ b/gl/lib/argp-xinl.c
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp.h
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp.h b/gl/lib/argp.h
index 1019fb3c..317ac034 100644
--- a/gl/lib/argp.h
+++ b/gl/lib/argp.h
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt.
- Copyright (C) 1995-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/asnprintf.c b/gl/lib/asnprintf.c
index 2298455b..d2a8c097 100644
--- a/gl/lib/asnprintf.c
+++ b/gl/lib/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/asprintf.c b/gl/lib/asprintf.c
index 061072fb..6cbd0629 100644
--- a/gl/lib/asprintf.c
+++ b/gl/lib/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2018 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2019 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/assure.h b/gl/lib/assure.h
index de6c38db..c21b6a6b 100644
--- a/gl/lib/assure.h
+++ b/gl/lib/assure.h
@@ -1,6 +1,6 @@
/* Run-time assert-like macros.
- Copyright (C) 2014-2018 Free Software Foundation, Inc.
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
#include <assert.h>
/* Check E's value at runtime, and report an error and abort if not.
- However, do nothng if NDEBUG is defined.
+ However, do nothing if NDEBUG is defined.
Unlike standard 'assert', this macro always compiles E even when NDEBUG
is defined, so as to catch typos and avoid some GCC warnings. */
diff --git a/gl/lib/at-func.c b/gl/lib/at-func.c
index 55e4b8c0..d2e63191 100644
--- a/gl/lib/at-func.c
+++ b/gl/lib/at-func.c
@@ -1,5 +1,5 @@
/* Define at-style functions like fstatat, unlinkat, fchownat, etc.
- Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/basename-lgpl.c b/gl/lib/basename-lgpl.c
index 33f9994f..0ae04ee5 100644
--- a/gl/lib/basename-lgpl.c
+++ b/gl/lib/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/basename.c b/gl/lib/basename.c
index 02adb8c3..1b6e0ea5 100644
--- a/gl/lib/basename.c
+++ b/gl/lib/basename.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/bitrotate.h b/gl/lib/bitrotate.h
index 9eb6a6f4..862331e2 100644
--- a/gl/lib/bitrotate.h
+++ b/gl/lib/bitrotate.h
@@ -1,5 +1,5 @@
/* bitrotate.h - Rotate bits in integers
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/btowc.c b/gl/lib/btowc.c
index 54124b28..9e2496d4 100644
--- a/gl/lib/btowc.c
+++ b/gl/lib/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/c++defs.h b/gl/lib/c++defs.h
index 72ff1ffa..87d07167 100644
--- a/gl/lib/c++defs.h
+++ b/gl/lib/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gl/lib/canonicalize-lgpl.c b/gl/lib/canonicalize-lgpl.c
index 7831b3f1..4d1be6dc 100644
--- a/gl/lib/canonicalize-lgpl.c
+++ b/gl/lib/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/canonicalize.c b/gl/lib/canonicalize.c
index 443ae393..273cc27d 100644
--- a/gl/lib/canonicalize.c
+++ b/gl/lib/canonicalize.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/canonicalize.h b/gl/lib/canonicalize.h
index 345d8e15..2ffa1f68 100644
--- a/gl/lib/canonicalize.h
+++ b/gl/lib/canonicalize.h
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/cdefs.h b/gl/lib/cdefs.h
index 235ca62c..f7a10644 100644
--- a/gl/lib/cdefs.h
+++ b/gl/lib/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -139,7 +139,7 @@
Headers that should use flexible arrays only if they're "real"
(e.g. only if they won't affect sizeof()) should test
#if __glibc_c99_flexarr_available. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
# define __flexarr []
# define __glibc_c99_flexarr_available 1
#elif __GNUC_PREREQ (2,97)
@@ -409,6 +409,12 @@
# define __glibc_likely(cond) (cond)
#endif
+#ifdef __has_attribute
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+
#if (!defined _Noreturn \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
&& !__GNUC_PREREQ (4,7))
diff --git a/gl/lib/chdir-long.c b/gl/lib/chdir-long.c
index d70f0b20..febdf59d 100644
--- a/gl/lib/chdir-long.c
+++ b/gl/lib/chdir-long.c
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/chdir-long.h b/gl/lib/chdir-long.h
index 34d24bce..43259d1b 100644
--- a/gl/lib/chdir-long.h
+++ b/gl/lib/chdir-long.h
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2005, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2005, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/cloexec.c b/gl/lib/cloexec.c
index 238ab188..db425766 100644
--- a/gl/lib/cloexec.c
+++ b/gl/lib/cloexec.c
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/cloexec.h b/gl/lib/cloexec.h
index 59028058..06ad945d 100644
--- a/gl/lib/cloexec.h
+++ b/gl/lib/cloexec.h
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/close.c b/gl/lib/close.c
index 01c326a2..40ce845b 100644
--- a/gl/lib/close.c
+++ b/gl/lib/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/closedir.c b/gl/lib/closedir.c
index 562a3ec0..017fb682 100644
--- a/gl/lib/closedir.c
+++ b/gl/lib/closedir.c
@@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dirent-private.h b/gl/lib/dirent-private.h
index 69edcc52..1eb1b357 100644
--- a/gl/lib/dirent-private.h
+++ b/gl/lib/dirent-private.h
@@ -1,5 +1,5 @@
/* Private details of the DIR type.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dirent.in.h b/gl/lib/dirent.in.h
index 2ab25af6..a3c8eb34 100644
--- a/gl/lib/dirent.in.h
+++ b/gl/lib/dirent.in.h
@@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dirfd.c b/gl/lib/dirfd.c
index 19c80468..bc858fd0 100644
--- a/gl/lib/dirfd.c
+++ b/gl/lib/dirfd.c
@@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
- Copyright (C) 2001, 2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dirname-lgpl.c b/gl/lib/dirname-lgpl.c
index a40f6a90..7cf89d8c 100644
--- a/gl/lib/dirname-lgpl.c
+++ b/gl/lib/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/dirname.c b/gl/lib/dirname.c
index 766f8625..1e042a5c 100644
--- a/gl/lib/dirname.c
+++ b/gl/lib/dirname.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/dirname.h b/gl/lib/dirname.h
index 8b511116..57916594 100644
--- a/gl/lib/dirname.h
+++ b/gl/lib/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2018 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2019 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/dosname.h b/gl/lib/dosname.h
index fef3b6da..c0ab6848 100644
--- a/gl/lib/dosname.h
+++ b/gl/lib/dosname.h
@@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
- Copyright (C) 2000-2001, 2004-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dup-safer-flag.c b/gl/lib/dup-safer-flag.c
index aa28194d..485f7411 100644
--- a/gl/lib/dup-safer-flag.c
+++ b/gl/lib/dup-safer-flag.c
@@ -1,7 +1,7 @@
/* Duplicate a file descriptor result, avoiding clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2001, 2004-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dup-safer.c b/gl/lib/dup-safer.c
index 1f1679ea..c0c5f2a9 100644
--- a/gl/lib/dup-safer.c
+++ b/gl/lib/dup-safer.c
@@ -1,6 +1,6 @@
/* Invoke dup, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dup.c b/gl/lib/dup.c
index 51136db8..d37f920d 100644
--- a/gl/lib/dup.c
+++ b/gl/lib/dup.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/dup2.c b/gl/lib/dup2.c
index c7d17672..d3aafa45 100644
--- a/gl/lib/dup2.c
+++ b/gl/lib/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/errno.in.h b/gl/lib/errno.in.h
index b95c4e9c..3bd27f1c 100644
--- a/gl/lib/errno.in.h
+++ b/gl/lib/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/error.c b/gl/lib/error.c
index adc87339..7e532f0e 100644
--- a/gl/lib/error.c
+++ b/gl/lib/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/error.h b/gl/lib/error.h
index 36401e1a..3759f8ad 100644
--- a/gl/lib/error.h
+++ b/gl/lib/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2018 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2019 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/exitfail.c b/gl/lib/exitfail.c
index 19c5cba0..69b35137 100644
--- a/gl/lib/exitfail.c
+++ b/gl/lib/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/exitfail.h b/gl/lib/exitfail.h
index a42057b1..480ad1a1 100644
--- a/gl/lib/exitfail.h
+++ b/gl/lib/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fchdir.c b/gl/lib/fchdir.c
index 6b0f97e7..38ab802e 100644
--- a/gl/lib/fchdir.c
+++ b/gl/lib/fchdir.c
@@ -1,5 +1,5 @@
/* fchdir replacement.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fcntl.c b/gl/lib/fcntl.c
index be658356..f602fad6 100644
--- a/gl/lib/fcntl.c
+++ b/gl/lib/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,10 +27,10 @@
#include <stdarg.h>
#include <unistd.h>
-#if !HAVE_FCNTL
-# define rpl_fcntl fcntl
+#ifdef __KLIBC__
+# define INCL_DOS
+# include <os2.h>
#endif
-#undef fcntl
#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
@@ -166,93 +166,18 @@ dupfd (int oldfd, int newfd, int flags)
}
#endif /* W32 */
+/* Forward declarations, because we '#undef fcntl' in the middle of this
+ compilation unit. */
+/* Our implementation of fcntl (fd, F_DUPFD, target). */
+static int rpl_fcntl_DUPFD (int fd, int target);
+/* Our implementation of fcntl (fd, F_DUPFD_CLOEXEC, target). */
+static int rpl_fcntl_DUPFD_CLOEXEC (int fd, int target);
#ifdef __KLIBC__
-
-# define INCL_DOS
-# include <os2.h>
-
-static int
-klibc_fcntl (int fd, int action, /* arg */...)
-{
- va_list arg_ptr;
- int arg;
- struct stat sbuf;
- int result = -1;
-
- va_start (arg_ptr, action);
- arg = va_arg (arg_ptr, int);
- result = fcntl (fd, action, arg);
- /* EPERM for F_DUPFD, ENOTSUP for others */
- if (result == -1 && (errno == EPERM || errno == ENOTSUP)
- && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
- {
- ULONG ulMode;
-
- switch (action)
- {
- case F_DUPFD:
- /* Find available fd */
- while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
- arg++;
-
- result = dup2 (fd, arg);
- break;
-
- /* Using underlying APIs is right ? */
- case F_GETFD:
- if (DosQueryFHState (fd, &ulMode))
- break;
-
- result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
- break;
-
- case F_SETFD:
- if (arg & ~FD_CLOEXEC)
- break;
-
- if (DosQueryFHState (fd, &ulMode))
- break;
-
- if (arg & FD_CLOEXEC)
- ulMode |= OPEN_FLAGS_NOINHERIT;
- else
- ulMode &= ~OPEN_FLAGS_NOINHERIT;
-
- /* Filter supported flags. */
- ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
- | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
-
- if (DosSetFHState (fd, ulMode))
- break;
-
- result = 0;
- break;
-
- case F_GETFL:
- result = 0;
- break;
-
- case F_SETFL:
- if (arg != 0)
- break;
-
- result = 0;
- break;
-
- default :
- errno = EINVAL;
- break;
- }
- }
-
- va_end (arg_ptr);
-
- return result;
-}
-
-# define fcntl klibc_fcntl
+/* Adds support for fcntl on directories. */
+static int klibc_fcntl (int fd, int action, /* arg */...);
#endif
+
/* Perform the specified ACTION on the file descriptor FD, possibly
using the argument ARG further described below. This replacement
handles the following actions, and forwards all others on to the
@@ -273,105 +198,30 @@ klibc_fcntl (int fd, int action, /* arg */...)
return -1 and set errno. */
int
-rpl_fcntl (int fd, int action, /* arg */...)
+fcntl (int fd, int action, /* arg */...)
+#undef fcntl
+#ifdef __KLIBC__
+# define fcntl klibc_fcntl
+#endif
{
va_list arg;
int result = -1;
va_start (arg, action);
switch (action)
{
-
-#if !HAVE_FCNTL
case F_DUPFD:
{
int target = va_arg (arg, int);
- result = dupfd (fd, target, 0);
+ result = rpl_fcntl_DUPFD (fd, target);
break;
}
-#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
- case F_DUPFD:
- {
- int target = va_arg (arg, int);
- /* Detect invalid target; needed for cygwin 1.5.x. */
- if (target < 0 || getdtablesize () <= target)
- errno = EINVAL;
- else
- {
- /* Haiku alpha 2 loses fd flags on original. */
- int flags = fcntl (fd, F_GETFD);
- if (flags < 0)
- {
- result = -1;
- break;
- }
- result = fcntl (fd, action, target);
- if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
- {
- int saved_errno = errno;
- close (result);
- result = -1;
- errno = saved_errno;
- }
-# if REPLACE_FCHDIR
- if (0 <= result)
- result = _gl_register_dup (fd, result);
-# endif
- }
- break;
- } /* F_DUPFD */
-#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
case F_DUPFD_CLOEXEC:
{
int target = va_arg (arg, int);
-
-#if !HAVE_FCNTL
- result = dupfd (fd, target, O_CLOEXEC);
- break;
-#else /* HAVE_FCNTL */
- /* Try the system call first, if the headers claim it exists
- (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
- may be running with a glibc that has the macro but with an
- older kernel that does not support it. Cache the
- information on whether the system call really works, but
- avoid caching failure if the corresponding F_DUPFD fails
- for any reason. 0 = unknown, 1 = yes, -1 = no. */
- static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
- if (0 <= have_dupfd_cloexec)
- {
- result = fcntl (fd, action, target);
- if (0 <= result || errno != EINVAL)
- {
- have_dupfd_cloexec = 1;
-# if REPLACE_FCHDIR
- if (0 <= result)
- result = _gl_register_dup (fd, result);
-# endif
- }
- else
- {
- result = rpl_fcntl (fd, F_DUPFD, target);
- if (result < 0)
- break;
- have_dupfd_cloexec = -1;
- }
- }
- else
- result = rpl_fcntl (fd, F_DUPFD, target);
- if (0 <= result && have_dupfd_cloexec == -1)
- {
- int flags = fcntl (result, F_GETFD);
- if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
- {
- int saved_errno = errno;
- close (result);
- errno = saved_errno;
- result = -1;
- }
- }
+ result = rpl_fcntl_DUPFD_CLOEXEC (fd, target);
break;
-#endif /* HAVE_FCNTL */
- } /* F_DUPFD_CLOEXEC */
+ }
#if !HAVE_FCNTL
case F_GETFD:
@@ -405,8 +255,183 @@ rpl_fcntl (int fd, int action, /* arg */...)
default:
{
#if HAVE_FCNTL
- void *p = va_arg (arg, void *);
- result = fcntl (fd, action, p);
+ switch (action)
+ {
+ #ifdef F_BARRIERFSYNC /* macOS */
+ case F_BARRIERFSYNC:
+ #endif
+ #ifdef F_CHKCLEAN /* macOS */
+ case F_CHKCLEAN:
+ #endif
+ #ifdef F_CLOSEM /* NetBSD, HP-UX */
+ case F_CLOSEM:
+ #endif
+ #ifdef F_FLUSH_DATA /* macOS */
+ case F_FLUSH_DATA:
+ #endif
+ #ifdef F_FREEZE_FS /* macOS */
+ case F_FREEZE_FS:
+ #endif
+ #ifdef F_FULLFSYNC /* macOS */
+ case F_FULLFSYNC:
+ #endif
+ #ifdef F_GETCONFINED /* macOS */
+ case F_GETCONFINED:
+ #endif
+ #ifdef F_GETDEFAULTPROTLEVEL /* macOS */
+ case F_GETDEFAULTPROTLEVEL:
+ #endif
+ #ifdef F_GETFD /* POSIX */
+ case F_GETFD:
+ #endif
+ #ifdef F_GETFL /* POSIX */
+ case F_GETFL:
+ #endif
+ #ifdef F_GETLEASE /* Linux */
+ case F_GETLEASE:
+ #endif
+ #ifdef F_GETNOSIGPIPE /* macOS */
+ case F_GETNOSIGPIPE:
+ #endif
+ #ifdef F_GETOWN /* POSIX */
+ case F_GETOWN:
+ #endif
+ #ifdef F_GETPIPE_SZ /* Linux */
+ case F_GETPIPE_SZ:
+ #endif
+ #ifdef F_GETPROTECTIONCLASS /* macOS */
+ case F_GETPROTECTIONCLASS:
+ #endif
+ #ifdef F_GETPROTECTIONLEVEL /* macOS */
+ case F_GETPROTECTIONLEVEL:
+ #endif
+ #ifdef F_GET_SEALS /* Linux */
+ case F_GET_SEALS:
+ #endif
+ #ifdef F_GETSIG /* Linux */
+ case F_GETSIG:
+ #endif
+ #ifdef F_MAXFD /* NetBSD */
+ case F_MAXFD:
+ #endif
+ #ifdef F_RECYCLE /* macOS */
+ case F_RECYCLE:
+ #endif
+ #ifdef F_SETFIFOENH /* HP-UX */
+ case F_SETFIFOENH:
+ #endif
+ #ifdef F_THAW_FS /* macOS */
+ case F_THAW_FS:
+ #endif
+ /* These actions take no argument. */
+ result = fcntl (fd, action);
+ break;
+
+ #ifdef F_ADD_SEALS /* Linux */
+ case F_ADD_SEALS:
+ #endif
+ #ifdef F_BADFD /* Solaris */
+ case F_BADFD:
+ #endif
+ #ifdef F_CHECK_OPENEVT /* macOS */
+ case F_CHECK_OPENEVT:
+ #endif
+ #ifdef F_DUP2FD /* FreeBSD, AIX, Solaris */
+ case F_DUP2FD:
+ #endif
+ #ifdef F_DUP2FD_CLOEXEC /* FreeBSD, Solaris */
+ case F_DUP2FD_CLOEXEC:
+ #endif
+ #ifdef F_DUP2FD_CLOFORK /* Solaris */
+ case F_DUP2FD_CLOFORK:
+ #endif
+ #ifdef F_DUPFD /* POSIX */
+ case F_DUPFD:
+ #endif
+ #ifdef F_DUPFD_CLOEXEC /* POSIX */
+ case F_DUPFD_CLOEXEC:
+ #endif
+ #ifdef F_DUPFD_CLOFORK /* Solaris */
+ case F_DUPFD_CLOFORK:
+ #endif
+ #ifdef F_GETXFL /* Solaris */
+ case F_GETXFL:
+ #endif
+ #ifdef F_GLOBAL_NOCACHE /* macOS */
+ case F_GLOBAL_NOCACHE:
+ #endif
+ #ifdef F_MAKECOMPRESSED /* macOS */
+ case F_MAKECOMPRESSED:
+ #endif
+ #ifdef F_MOVEDATAEXTENTS /* macOS */
+ case F_MOVEDATAEXTENTS:
+ #endif
+ #ifdef F_NOCACHE /* macOS */
+ case F_NOCACHE:
+ #endif
+ #ifdef F_NODIRECT /* macOS */
+ case F_NODIRECT:
+ #endif
+ #ifdef F_NOTIFY /* Linux */
+ case F_NOTIFY:
+ #endif
+ #ifdef F_OPLKACK /* IRIX */
+ case F_OPLKACK:
+ #endif
+ #ifdef F_OPLKREG /* IRIX */
+ case F_OPLKREG:
+ #endif
+ #ifdef F_RDAHEAD /* macOS */
+ case F_RDAHEAD:
+ #endif
+ #ifdef F_SETBACKINGSTORE /* macOS */
+ case F_SETBACKINGSTORE:
+ #endif
+ #ifdef F_SETCONFINED /* macOS */
+ case F_SETCONFINED:
+ #endif
+ #ifdef F_SETFD /* POSIX */
+ case F_SETFD:
+ #endif
+ #ifdef F_SETFL /* POSIX */
+ case F_SETFL:
+ #endif
+ #ifdef F_SETLEASE /* Linux */
+ case F_SETLEASE:
+ #endif
+ #ifdef F_SETNOSIGPIPE /* macOS */
+ case F_SETNOSIGPIPE:
+ #endif
+ #ifdef F_SETOWN /* POSIX */
+ case F_SETOWN:
+ #endif
+ #ifdef F_SETPIPE_SZ /* Linux */
+ case F_SETPIPE_SZ:
+ #endif
+ #ifdef F_SETPROTECTIONCLASS /* macOS */
+ case F_SETPROTECTIONCLASS:
+ #endif
+ #ifdef F_SETSIG /* Linux */
+ case F_SETSIG:
+ #endif
+ #ifdef F_SINGLE_WRITER /* macOS */
+ case F_SINGLE_WRITER:
+ #endif
+ /* These actions take an 'int' argument. */
+ {
+ int x = va_arg (arg, int);
+ result = fcntl (fd, action, x);
+ }
+ break;
+
+ default:
+ /* Other actions take a pointer argument. */
+ {
+ void *p = va_arg (arg, void *);
+ result = fcntl (fd, action, p);
+ }
+ break;
+ }
#else
errno = EINVAL;
#endif
@@ -416,3 +441,186 @@ rpl_fcntl (int fd, int action, /* arg */...)
va_end (arg);
return result;
}
+
+static int
+rpl_fcntl_DUPFD (int fd, int target)
+{
+ int result;
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, 0);
+#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+ /* Detect invalid target; needed for cygwin 1.5.x. */
+ if (target < 0 || getdtablesize () <= target)
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ else
+ {
+ /* Haiku alpha 2 loses fd flags on original. */
+ int flags = fcntl (fd, F_GETFD);
+ if (flags < 0)
+ result = -1;
+ else
+ {
+ result = fcntl (fd, F_DUPFD, target);
+ if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ result = -1;
+ errno = saved_errno;
+ }
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ }
+#else
+ result = fcntl (fd, F_DUPFD, target);
+#endif
+ return result;
+}
+
+static int
+rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
+{
+ int result;
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, O_CLOEXEC);
+#else /* HAVE_FCNTL */
+# if defined __HAIKU__
+ /* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets
+ the FD_CLOEXEC flag on fd, not on target. Therefore avoid the
+ system fcntl in this case. */
+# define have_dupfd_cloexec -1
+# else
+ /* Try the system call first, if the headers claim it exists
+ (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
+ may be running with a glibc that has the macro but with an
+ older kernel that does not support it. Cache the
+ information on whether the system call really works, but
+ avoid caching failure if the corresponding F_DUPFD fails
+ for any reason. 0 = unknown, 1 = yes, -1 = no. */
+ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
+ if (0 <= have_dupfd_cloexec)
+ {
+ result = fcntl (fd, F_DUPFD_CLOEXEC, target);
+ if (0 <= result || errno != EINVAL)
+ {
+ have_dupfd_cloexec = 1;
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ else
+ {
+ result = rpl_fcntl_DUPFD (fd, target);
+ if (result >= 0)
+ have_dupfd_cloexec = -1;
+ }
+ }
+ else
+# endif
+ result = rpl_fcntl_DUPFD (fd, target);
+ if (0 <= result && have_dupfd_cloexec == -1)
+ {
+ int flags = fcntl (result, F_GETFD);
+ if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ errno = saved_errno;
+ result = -1;
+ }
+ }
+#endif /* HAVE_FCNTL */
+ return result;
+}
+
+#undef fcntl
+
+#ifdef __KLIBC__
+
+static int
+klibc_fcntl (int fd, int action, /* arg */...);
+{
+ va_list arg_ptr;
+ int arg;
+ struct stat sbuf;
+ int result;
+
+ va_start (arg_ptr, action);
+ arg = va_arg (arg_ptr, int);
+ result = fcntl (fd, action, arg);
+ /* EPERM for F_DUPFD, ENOTSUP for others */
+ if (result == -1 && (errno == EPERM || errno == ENOTSUP)
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ ULONG ulMode;
+
+ switch (action)
+ {
+ case F_DUPFD:
+ /* Find available fd */
+ while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
+ arg++;
+
+ result = dup2 (fd, arg);
+ break;
+
+ /* Using underlying APIs is right ? */
+ case F_GETFD:
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
+ break;
+
+ case F_SETFD:
+ if (arg & ~FD_CLOEXEC)
+ break;
+
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ if (arg & FD_CLOEXEC)
+ ulMode |= OPEN_FLAGS_NOINHERIT;
+ else
+ ulMode &= ~OPEN_FLAGS_NOINHERIT;
+
+ /* Filter supported flags. */
+ ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
+ | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
+
+ if (DosSetFHState (fd, ulMode))
+ break;
+
+ result = 0;
+ break;
+
+ case F_GETFL:
+ result = 0;
+ break;
+
+ case F_SETFL:
+ if (arg != 0)
+ break;
+
+ result = 0;
+ break;
+
+ default:
+ errno = EINVAL;
+ break;
+ }
+ }
+
+ va_end (arg_ptr);
+
+ return result;
+}
+
+#endif
diff --git a/gl/lib/fcntl.in.h b/gl/lib/fcntl.in.h
index a1e7d35c..eb70dc61 100644
--- a/gl/lib/fcntl.in.h
+++ b/gl/lib/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fd-hook.c b/gl/lib/fd-hook.c
index 95a0662b..78791198 100644
--- a/gl/lib/fd-hook.c
+++ b/gl/lib/fd-hook.c
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it
diff --git a/gl/lib/fd-hook.h b/gl/lib/fd-hook.h
index dbc5b67a..bf07f006 100644
--- a/gl/lib/fd-hook.h
+++ b/gl/lib/fd-hook.h
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gl/lib/fd-safer-flag.c b/gl/lib/fd-safer-flag.c
index b7574848..7c026ef5 100644
--- a/gl/lib/fd-safer-flag.c
+++ b/gl/lib/fd-safer-flag.c
@@ -1,7 +1,7 @@
/* Adjust a file descriptor result so that it avoids clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fd-safer.c b/gl/lib/fd-safer.c
index 1ea9a498..b5113e13 100644
--- a/gl/lib/fd-safer.c
+++ b/gl/lib/fd-safer.c
@@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fdopendir.c b/gl/lib/fdopendir.c
index 9adefd21..b65588ac 100644
--- a/gl/lib/fdopendir.c
+++ b/gl/lib/fdopendir.c
@@ -1,5 +1,5 @@
/* provide a replacement fdopendir function
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/file-set.c b/gl/lib/file-set.c
index c1db3e33..5916a178 100644
--- a/gl/lib/file-set.c
+++ b/gl/lib/file-set.c
@@ -1,5 +1,5 @@
/* Specialized functions to manipulate a set of files.
- Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/filename.h b/gl/lib/filename.h
index a7ad7e7e..3ba31059 100644
--- a/gl/lib/filename.h
+++ b/gl/lib/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2004, 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/filenamecat-lgpl.c b/gl/lib/filenamecat-lgpl.c
index f50ecc13..98b105a1 100644
--- a/gl/lib/filenamecat-lgpl.c
+++ b/gl/lib/filenamecat-lgpl.c
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/filenamecat.h b/gl/lib/filenamecat.h
index fee61532..67b46b0a 100644
--- a/gl/lib/filenamecat.h
+++ b/gl/lib/filenamecat.h
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2018 Free Software
+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/flexmember.h b/gl/lib/flexmember.h
index 7e3f5983..0d65f6da 100644
--- a/gl/lib/flexmember.h
+++ b/gl/lib/flexmember.h
@@ -1,6 +1,6 @@
/* Sizes of structs with flexible array members.
- Copyright 2016-2018 Free Software Foundation, Inc.
+ Copyright 2016-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/float+.h b/gl/lib/float+.h
index 2cb858f6..5af861f7 100644
--- a/gl/lib/float+.h
+++ b/gl/lib/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/float.c b/gl/lib/float.c
index 7caca837..8872deb5 100644
--- a/gl/lib/float.c
+++ b/gl/lib/float.c
@@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/float.in.h b/gl/lib/float.in.h
index 2cdbd122..ba094a8e 100644
--- a/gl/lib/float.in.h
+++ b/gl/lib/float.in.h
@@ -1,6 +1,6 @@
/* A correct <float.h>.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/flock.c b/gl/lib/flock.c
index 4c7285cf..d804e571 100644
--- a/gl/lib/flock.c
+++ b/gl/lib/flock.c
@@ -6,7 +6,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com>
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
diff --git a/gl/lib/fnmatch.c b/gl/lib/fnmatch.c
index 0fa0a3db..dbcd2906 100644
--- a/gl/lib/fnmatch.c
+++ b/gl/lib/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-2007, 2009-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fnmatch.in.h b/gl/lib/fnmatch.in.h
index 2464449b..2ead7828 100644
--- a/gl/lib/fnmatch.in.h
+++ b/gl/lib/fnmatch.in.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2018 Free
+/* Substitute for and wrapper around <fnmatch.h>.
+ Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2019 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,15 +17,29 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>. */
-#ifndef _FNMATCH_H
-#define _FNMATCH_H 1
+#ifndef _@GUARD_PREFIX@_FNMATCH_H
-/* The definition of _GL_ARG_NONNULL is copied here. */
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
-#ifdef __cplusplus
-extern "C" {
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_FNMATCH_H@ && !@REPLACE_FNMATCH@
+# @INCLUDE_NEXT@ @NEXT_FNMATCH_H@
#endif
+#ifndef _@GUARD_PREFIX@_FNMATCH_H
+#define _@GUARD_PREFIX@_FNMATCH_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#if !@HAVE_FNMATCH_H@ || @REPLACE_FNMATCH@
+
/* We #undef these before defining them because some losing systems
(HP-UX A.08.07 for example) define these in <unistd.h>. */
#undef FNM_PATHNAME
@@ -54,14 +69,42 @@ extern "C" {
# define FNM_NOSYS (-1)
#endif
+#endif
+
+
+#if @GNULIB_FNMATCH@
/* Match NAME against the file name pattern PATTERN,
returning zero if it matches, FNM_NOMATCH if not. */
-extern int fnmatch (const char *__pattern, const char *__name,
- int __flags)
- _GL_ARG_NONNULL ((1, 2));
-
-#ifdef __cplusplus
-}
+# if @REPLACE_FNMATCH@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define fnmatch rpl_fnmatch
+# endif
+_GL_FUNCDECL_RPL (fnmatch, int,
+ (const char *pattern, const char *name, int flags)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fnmatch, int,
+ (const char *pattern, const char *name, int flags));
+# else
+# if !@HAVE_FNMATCH@
+_GL_FUNCDECL_SYS (fnmatch, int,
+ (const char *pattern, const char *name, int flags)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (fnmatch, int,
+ (const char *pattern, const char *name, int flags));
+# endif
+# if !GNULIB_FNMATCH_GNU
+_GL_CXXALIASWARN (fnmatch);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fnmatch
+# if HAVE_RAW_DECL_FNMATCH
+_GL_WARN_ON_USE (fnmatch,
+ "fnmatch does not portably work - "
+ "use gnulib module fnmatch for portability or gnulib module fnmatch-gnu for a glibc compatible implementation");
+# endif
#endif
-#endif /* fnmatch.h */
+
+#endif /* _@GUARD_PREFIX@_FNMATCH_H */
+#endif /* _@GUARD_PREFIX@_FNMATCH_H */
diff --git a/gl/lib/fnmatch_loop.c b/gl/lib/fnmatch_loop.c
index dcf5a151..82a7ceed 100644
--- a/gl/lib/fnmatch_loop.c
+++ b/gl/lib/fnmatch_loop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-2006, 2009-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2006, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/fstat.c b/gl/lib/fstat.c
index 41ee7618..4f0e6188 100644
--- a/gl/lib/fstat.c
+++ b/gl/lib/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/fstatat.c b/gl/lib/fstatat.c
index 63ceceb6..515b5693 100644
--- a/gl/lib/fstatat.c
+++ b/gl/lib/fstatat.c
@@ -1,6 +1,6 @@
/* Work around an fstatat bug on Solaris 9.
- Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/futimens.c b/gl/lib/futimens.c
index abcba9ee..cc03796c 100644
--- a/gl/lib/futimens.c
+++ b/gl/lib/futimens.c
@@ -1,5 +1,5 @@
/* Set the access and modification time of an open fd.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/getcwd-lgpl.c b/gl/lib/getcwd-lgpl.c
index 9f0e0072..b224cfc9 100644
--- a/gl/lib/getcwd-lgpl.c
+++ b/gl/lib/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/getcwd.c b/gl/lib/getcwd.c
index 71043ab2..41eedb70 100644
--- a/gl/lib/getcwd.c
+++ b/gl/lib/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2004-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2004-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/getdelim.c b/gl/lib/getdelim.c
index cc1e9fe3..528678c2 100644
--- a/gl/lib/getdelim.c
+++ b/gl/lib/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2018 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or
diff --git a/gl/lib/getdtablesize.c b/gl/lib/getdtablesize.c
index ac05bc48..03a92435 100644
--- a/gl/lib/getdtablesize.c
+++ b/gl/lib/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/getline.c b/gl/lib/getline.c
index 59397ea6..40882fb2 100644
--- a/gl/lib/getline.c
+++ b/gl/lib/getline.c
@@ -1,5 +1,5 @@
/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
diff --git a/gl/lib/getlogin_r.c b/gl/lib/getlogin_r.c
index 0fa10377..a94282ca 100644
--- a/gl/lib/getlogin_r.c
+++ b/gl/lib/getlogin_r.c
@@ -1,6 +1,6 @@
/* Provide a working getlogin_r for systems which lack it.
- Copyright (C) 2005-2007, 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2010-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/getopt-cdefs.in.h b/gl/lib/getopt-cdefs.in.h
index 12b5a877..049145b3 100644
--- a/gl/lib/getopt-cdefs.in.h
+++ b/gl/lib/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
/* getopt-on-non-glibc compatibility macros.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/lib/getopt-core.h b/gl/lib/getopt-core.h
index e51b6c78..6360ad69 100644
--- a/gl/lib/getopt-core.h
+++ b/gl/lib/getopt-core.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (basic, portable features only).
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt-ext.h b/gl/lib/getopt-ext.h
index cb41206f..13cb0077 100644
--- a/gl/lib/getopt-ext.h
+++ b/gl/lib/getopt-ext.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (GNU extensions).
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt-pfx-core.h b/gl/lib/getopt-pfx-core.h
index c62f9e26..8fac2691 100644
--- a/gl/lib/getopt-pfx-core.h
+++ b/gl/lib/getopt-pfx-core.h
@@ -1,5 +1,5 @@
/* getopt (basic, portable features) gnulib wrapper header.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/lib/getopt-pfx-ext.h b/gl/lib/getopt-pfx-ext.h
index 753f1290..0e21aefb 100644
--- a/gl/lib/getopt-pfx-ext.h
+++ b/gl/lib/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
/* getopt (GNU extensions) gnulib wrapper header.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/lib/getopt.c b/gl/lib/getopt.c
index 11e36eef..8ee075a8 100644
--- a/gl/lib/getopt.c
+++ b/gl/lib/getopt.c
@@ -1,5 +1,5 @@
/* Getopt for GNU.
- Copyright (C) 1987-2018 Free Software Foundation, Inc.
+ Copyright (C) 1987-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt.in.h b/gl/lib/getopt.in.h
index 5fb58ddb..c77f34ce 100644
--- a/gl/lib/getopt.in.h
+++ b/gl/lib/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library, which supplies a different version of
diff --git a/gl/lib/getopt1.c b/gl/lib/getopt1.c
index 9c7fff4c..883aa6bb 100644
--- a/gl/lib/getopt1.c
+++ b/gl/lib/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-2018 Free Software Foundation, Inc.
+ Copyright (C) 1987-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt_int.h b/gl/lib/getopt_int.h
index b0e9a6d0..e63706f6 100644
--- a/gl/lib/getopt_int.h
+++ b/gl/lib/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getprogname.c b/gl/lib/getprogname.c
index c824b47c..96fa7596 100644
--- a/gl/lib/getprogname.c
+++ b/gl/lib/getprogname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ Copyright (C) 2016-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -110,9 +110,73 @@ getprogname (void)
first = 0;
pid_t pid = getpid ();
struct pst_status status;
- p = (0 < pstat_getproc (&status, sizeof status, 0, pid)
- ? strdup (status.pst_ucomm)
- : NULL);
+ if (pstat_getproc (&status, sizeof status, 0, pid) > 0)
+ {
+ char *ucomm = status.pst_ucomm;
+ char *cmd = status.pst_cmd;
+ if (strlen (ucomm) < PST_UCOMMLEN - 1)
+ p = ucomm;
+ else
+ {
+ /* ucomm is truncated to length PST_UCOMMLEN - 1.
+ Look at cmd instead. */
+ char *space = strchr (cmd, ' ');
+ if (space != NULL)
+ *space = '\0';
+ p = strrchr (cmd, '/');
+ if (p != NULL)
+ p++;
+ else
+ p = cmd;
+ if (strlen (p) > PST_UCOMMLEN - 1
+ && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0)
+ /* p is less truncated than ucomm. */
+ ;
+ else
+ p = ucomm;
+ }
+ p = strdup (p);
+ }
+ else
+ {
+# if !defined __LP64__
+ /* Support for 32-bit programs running in 64-bit HP-UX.
+ The documented way to do this is to use the same source code
+ as above, but in a compilation unit where '#define _PSTAT64 1'
+ is in effect. I prefer a single compilation unit; the struct
+ size and the offsets are not going to change. */
+ char status64[1216];
+ if (__pstat_getproc64 (status64, sizeof status64, 0, pid) > 0)
+ {
+ char *ucomm = status64 + 288;
+ char *cmd = status64 + 168;
+ if (strlen (ucomm) < PST_UCOMMLEN - 1)
+ p = ucomm;
+ else
+ {
+ /* ucomm is truncated to length PST_UCOMMLEN - 1.
+ Look at cmd instead. */
+ char *space = strchr (cmd, ' ');
+ if (space != NULL)
+ *space = '\0';
+ p = strrchr (cmd, '/');
+ if (p != NULL)
+ p++;
+ else
+ p = cmd;
+ if (strlen (p) > PST_UCOMMLEN - 1
+ && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0)
+ /* p is less truncated than ucomm. */
+ ;
+ else
+ p = ucomm;
+ }
+ p = strdup (p);
+ }
+ else
+# endif
+ p = NULL;
+ }
if (!p)
p = "?";
}
diff --git a/gl/lib/getprogname.h b/gl/lib/getprogname.h
index ee6688fc..1590b38d 100644
--- a/gl/lib/getprogname.h
+++ b/gl/lib/getprogname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ Copyright (C) 2016-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/gettext.h b/gl/lib/gettext.h
index f2d7458f..89f53d91 100644
--- a/gl/lib/gettext.h
+++ b/gl/lib/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -185,7 +185,7 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ == 199901L
+ /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc)
|| (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
diff --git a/gl/lib/gettime.c b/gl/lib/gettime.c
index 9a4e342f..1fd153f6 100644
--- a/gl/lib/gettime.c
+++ b/gl/lib/gettime.c
@@ -1,6 +1,6 @@
/* gettime -- get the system clock
- Copyright (C) 2002, 2004-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,21 +28,22 @@
void
gettime (struct timespec *ts)
{
-#if HAVE_NANOTIME
- nanotime (ts);
+#if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
+ clock_gettime (CLOCK_REALTIME, ts);
#else
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ ts->tv_sec = tv.tv_sec;
+ ts->tv_nsec = tv.tv_usec * 1000;
+#endif
+}
-# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
- if (clock_gettime (CLOCK_REALTIME, ts) == 0)
- return;
-# endif
-
- {
- struct timeval tv;
- gettimeofday (&tv, NULL);
- ts->tv_sec = tv.tv_sec;
- ts->tv_nsec = tv.tv_usec * 1000;
- }
+/* Return the current system time as a struct timespec. */
-#endif
+struct timespec
+current_timespec (void)
+{
+ struct timespec ts;
+ gettime (&ts);
+ return ts;
}
diff --git a/gl/lib/gettimeofday.c b/gl/lib/gettimeofday.c
index fd44f45c..360cdc4d 100644
--- a/gl/lib/gettimeofday.c
+++ b/gl/lib/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,6 +33,10 @@
#ifdef WINDOWS_NATIVE
+/* Avoid warnings from gcc -Wcast-function-type. */
+# define GetProcAddress \
+ (void *) GetProcAddress
+
/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */
typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime);
static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL;
diff --git a/gl/lib/glob-libc.h b/gl/lib/glob-libc.h
index 564ef172..9b7f93e8 100644
--- a/gl/lib/glob-libc.h
+++ b/gl/lib/glob-libc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/glob.c b/gl/lib/glob.c
index a5e4e932..c558d17b 100644
--- a/gl/lib/glob.c
+++ b/gl/lib/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,6 +15,16 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#ifndef _LIBC
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the pattern == NULL test below. */
+# define _GL_ARG_NONNULL(params)
+
+# include <config.h>
+
+#endif
+
#include <glob.h>
#include <errno.h>
diff --git a/gl/lib/glob.in.h b/gl/lib/glob.in.h
index c4f5f66a..597979b7 100644
--- a/gl/lib/glob.in.h
+++ b/gl/lib/glob.in.h
@@ -1,6 +1,6 @@
/* glob.h -- Find a path matching a pattern.
- Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
@@ -25,7 +25,7 @@
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
-#if !@REPLACE_GLOB@
+#if @HAVE_GLOB_H@ && !@REPLACE_GLOB@
# @INCLUDE_NEXT@ @NEXT_GLOB_H@
#endif
@@ -34,6 +34,10 @@
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
/* GCC 2.95 and later have "__restrict"; C99 compilers have
"restrict", and "configure" may have defined "restrict".
Other compilers use __restrict, __restrict__, and _Restrict, and
@@ -58,7 +62,7 @@ typedef int (*_gl_glob_errfunc_fn) (const char *, int);
#endif
-#if @REPLACE_GLOB@
+#if !@HAVE_GLOB_H@ || @REPLACE_GLOB@
/* Preparations for including the standard GNU C Library header. */
@@ -76,9 +80,17 @@ typedef int (*_gl_glob_errfunc_fn) (const char *, int);
# define __USE_GNU 1
# endif
-# define glob rpl_glob
-# define globfree rpl_globfree
-# define glob_pattern_p rpl_glob_pattern_p
+# if @REPLACE_GLOB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define glob rpl_glob
+# define globfree rpl_globfree
+# endif
+# endif
+# if @REPLACE_GLOB_PATTERN_P@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define glob_pattern_p rpl_glob_pattern_p
+# endif
+# endif
# define __glob_pattern_p glob_pattern_p
# define __GLOB_GNULIB 1
@@ -88,32 +100,81 @@ typedef int (*_gl_glob_errfunc_fn) (const char *, int);
# include "glob-libc.h"
-# if defined __cplusplus && defined GNULIB_NAMESPACE
-# undef glob
-# undef globfree
-# undef glob_pattern_p
+#endif
+
+
+#if @GNULIB_GLOB@
+# if @REPLACE_GLOB@
+_GL_FUNCDECL_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
+ _gl_glob_errfunc_fn __errfunc,
+ glob_t *_Restrict_ __pglob)
+ _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
_gl_glob_errfunc_fn __errfunc,
glob_t *_Restrict_ __pglob));
-_GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
-_GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
-# endif
-
-#else
-
+# else
+# if !@HAVE_GLOB@
+_GL_FUNCDECL_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
+ _gl_glob_errfunc_fn __errfunc,
+ glob_t *_Restrict_ __pglob)
+ _GL_ARG_NONNULL ((1)));
+# endif
_GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
_gl_glob_errfunc_fn __errfunc,
glob_t *_Restrict_ __pglob));
-_GL_CXXALIAS_SYS (globfree, void, (glob_t *__pglob));
-_GL_CXXALIAS_SYS (glob_pattern_p, int, (const char *__pattern, int __quote));
-
+# endif
+_GL_CXXALIASWARN (glob);
+#elif defined GNULIB_POSIXCHECK
+# undef glob
+# if HAVE_RAW_DECL_GLOB
+_GL_WARN_ON_USE (glob,
+ "glob is unportable - "
+ "use gnulib module glob for portability");
+# endif
#endif
-#if 0 /* The C function name is rpl_glob in some cases, not glob. */
-_GL_CXXALIASWARN (glob);
+#if @GNULIB_GLOB@
+# if @REPLACE_GLOB@
+_GL_FUNCDECL_RPL (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
+# else
+# if !@HAVE_GLOB@
+_GL_FUNCDECL_SYS (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (globfree, void, (glob_t *__pglob));
+# endif
_GL_CXXALIASWARN (globfree);
+#elif defined GNULIB_POSIXCHECK
+# undef globfree
+# if HAVE_RAW_DECL_GLOBFREE
+_GL_WARN_ON_USE (globfree,
+ "globfree is unportable - "
+ "use gnulib module glob for portability");
+# endif
+#endif
+
+#if @GNULIB_GLOB@
+# if @REPLACE_GLOB_PATTERN_P@
+_GL_FUNCDECL_RPL (glob_pattern_p, int, (const char *__pattern, int __quote)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
+# else
+# if !@HAVE_GLOB_PATTERN_P@
+_GL_FUNCDECL_SYS (glob_pattern_p, int, (const char *__pattern, int __quote)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (glob_pattern_p, int, (const char *__pattern, int __quote));
+# endif
_GL_CXXALIASWARN (glob_pattern_p);
+#elif defined GNULIB_POSIXCHECK
+# undef glob_pattern_p
+# if HAVE_RAW_DECL_GLOB_PATTERN_P
+_GL_WARN_ON_USE (glob_pattern_p,
+ "glob_pattern_p is unportable - "
+ "use gnulib module glob for portability");
+# endif
#endif
+
#endif /* _@GUARD_PREFIX@_GLOB_H */
#endif /* _@GUARD_PREFIX@_GLOB_H */
diff --git a/gl/lib/glob_internal.h b/gl/lib/glob_internal.h
index 7cb06077..469d4d92 100644
--- a/gl/lib/glob_internal.h
+++ b/gl/lib/glob_internal.h
@@ -1,5 +1,5 @@
/* Shared definition for glob and glob_pattern_p.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/glob_pattern_p.c b/gl/lib/glob_pattern_p.c
index 1688ec9d..163ce758 100644
--- a/gl/lib/glob_pattern_p.c
+++ b/gl/lib/glob_pattern_p.c
@@ -1,5 +1,5 @@
/* Return nonzero if PATTERN contains any metacharacters.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
#endif
#include <glob.h>
diff --git a/gl/lib/globfree.c b/gl/lib/globfree.c
index 88bac40b..77a1ccaa 100644
--- a/gl/lib/globfree.c
+++ b/gl/lib/globfree.c
@@ -1,5 +1,5 @@
/* Frees the dynamically allocated storage from an earlier call to glob.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
#endif
#include <glob.h>
diff --git a/gl/lib/glthread/lock.c b/gl/lib/glthread/lock.c
index f166d7ca..a4498cbd 100644
--- a/gl/lib/glthread/lock.c
+++ b/gl/lib/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/glthread/lock.h b/gl/lib/glthread/lock.h
index 30aa730b..636b0895 100644
--- a/gl/lib/glthread/lock.h
+++ b/gl/lib/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -416,6 +416,9 @@ extern "C" {
# pragma weak pth_rwlock_acquire
# pragma weak pth_rwlock_release
# pragma weak pth_once
+# pragma weak pth_cond_init
+# pragma weak pth_cond_await
+# pragma weak pth_cond_notify
# pragma weak pth_cancel
# define pth_in_use() (pth_cancel != NULL)
diff --git a/gl/lib/glthread/threadlib.c b/gl/lib/glthread/threadlib.c
index e8b484a0..a5ebd9bf 100644
--- a/gl/lib/glthread/threadlib.c
+++ b/gl/lib/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/hard-locale.c b/gl/lib/hard-locale.c
index 49bc6caf..dcfcad62 100644
--- a/gl/lib/hard-locale.c
+++ b/gl/lib/hard-locale.c
@@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
- Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2018 Free Software
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/hard-locale.h b/gl/lib/hard-locale.h
index 22eecc5e..8f1da96e 100644
--- a/gl/lib/hard-locale.h
+++ b/gl/lib/hard-locale.h
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003-2004, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003-2004, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/hash-pjw.c b/gl/lib/hash-pjw.c
index 02eca8ac..74f8b1c7 100644
--- a/gl/lib/hash-pjw.c
+++ b/gl/lib/hash-pjw.c
@@ -1,6 +1,6 @@
/* hash-pjw.c -- compute a hash value from a NUL-terminated string.
- Copyright (C) 2001, 2003, 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/hash-pjw.h b/gl/lib/hash-pjw.h
index 7c3db22f..69717649 100644
--- a/gl/lib/hash-pjw.h
+++ b/gl/lib/hash-pjw.h
@@ -1,5 +1,5 @@
/* hash-pjw.h -- declaration for a simple hash function
- Copyright (C) 2001, 2003, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/hash-triple.c b/gl/lib/hash-triple.c
index 1c60e88f..372f19e8 100644
--- a/gl/lib/hash-triple.c
+++ b/gl/lib/hash-triple.c
@@ -1,5 +1,5 @@
/* Hash functions for file-related triples: name, device, inode.
- Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/hash.c b/gl/lib/hash.c
index 98a8ea3d..9e1f8e84 100644
--- a/gl/lib/hash.c
+++ b/gl/lib/hash.c
@@ -1,6 +1,6 @@
/* hash - hashing table processing.
- Copyright (C) 1998-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2004, 2006-2007, 2009-2019 Free Software Foundation, Inc.
Written by Jim Meyering, 1992.
diff --git a/gl/lib/hash.h b/gl/lib/hash.h
index 562f5e67..a1a483a3 100644
--- a/gl/lib/hash.h
+++ b/gl/lib/hash.h
@@ -1,5 +1,5 @@
/* hash - hashing table processing.
- Copyright (C) 1998-1999, 2001, 2003, 2009-2018 Free Software Foundation,
+ Copyright (C) 1998-1999, 2001, 2003, 2009-2019 Free Software Foundation,
Inc.
Written by Jim Meyering <meyering@ascend.com>, 1998.
diff --git a/gl/lib/idpriv-drop.c b/gl/lib/idpriv-drop.c
index a22b2b13..c7c32151 100644
--- a/gl/lib/idpriv-drop.c
+++ b/gl/lib/idpriv-drop.c
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process permanently.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/idpriv-droptemp.c b/gl/lib/idpriv-droptemp.c
index 6fe1bf98..55ff5910 100644
--- a/gl/lib/idpriv-droptemp.c
+++ b/gl/lib/idpriv-droptemp.c
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process temporarily.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/idpriv.h b/gl/lib/idpriv.h
index 3bf7293e..4a1f70d8 100644
--- a/gl/lib/idpriv.h
+++ b/gl/lib/idpriv.h
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/intprops.h b/gl/lib/intprops.h
index 15e470cb..1a44ae55 100644
--- a/gl/lib/intprops.h
+++ b/gl/lib/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@@ -22,12 +22,13 @@
#include <limits.h>
-/* Return a value with the common real type of E and V and the value of V. */
-#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+/* Return a value with the common real type of E and V and the value of V.
+ Do not evaluate E. */
+#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
<https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
-#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
@@ -40,13 +41,14 @@
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* Return 1 if the real expression E, after promotion, has a
- signed or floating type. */
+ signed or floating type. Do not evaluate E. */
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
/* Minimum and maximum values for integer types and expressions. */
/* The width in bits of the integer type or expression T.
+ Do not evaluate T.
Padding bits are not supported; this is checked at compile-time below. */
#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
@@ -58,7 +60,7 @@
: ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
/* The maximum and minimum values for the type of the expression E,
- after integer promotion. E should not have side effects. */
+ after integer promotion. E is not evaluated. */
#define _GL_INT_MINIMUM(e) \
(EXPR_SIGNED (e) \
? ~ _GL_SIGNED_INT_MAXIMUM (e) \
@@ -340,8 +342,8 @@
Arguments should be free of side effects. */
#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
op_result_overflow (a, b, \
- _GL_INT_MINIMUM (0 * (b) + (a)), \
- _GL_INT_MAXIMUM (0 * (b) + (a)))
+ _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)), \
+ _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b)))
/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
Return 1 if the result overflows. See above for restrictions. */
diff --git a/gl/lib/ioctl.c b/gl/lib/ioctl.c
index 140c7b66..c4e388d9 100644
--- a/gl/lib/ioctl.c
+++ b/gl/lib/ioctl.c
@@ -1,6 +1,6 @@
/* ioctl.c --- wrappers for Windows ioctl function
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/itold.c b/gl/lib/itold.c
index 6a43bd8d..bca01eb5 100644
--- a/gl/lib/itold.c
+++ b/gl/lib/itold.c
@@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/langinfo.in.h b/gl/lib/langinfo.in.h
index 96c237ae..6d406350 100644
--- a/gl/lib/langinfo.in.h
+++ b/gl/lib/langinfo.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/libc-config.h b/gl/lib/libc-config.h
index d7b40935..57c69661 100644
--- a/gl/lib/libc-config.h
+++ b/gl/lib/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2018 Free Software Foundation, Inc.
+ Copyright 2017-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
diff --git a/gl/lib/limits.in.h b/gl/lib/limits.in.h
index 2c809d97..39750b38 100644
--- a/gl/lib/limits.in.h
+++ b/gl/lib/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- Copyright 2016-2018 Free Software Foundation, Inc.
+ Copyright 2016-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -28,15 +28,32 @@
#ifndef _@GUARD_PREFIX@_LIMITS_H
#define _@GUARD_PREFIX@_LIMITS_H
-/* For HP-UX 11.31. */
-#if defined LONG_LONG_MIN && !defined LLONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
+#ifndef LLONG_MIN
+# if defined LONG_LONG_MIN /* HP-UX 11.31 */
+# define LLONG_MIN LONG_LONG_MIN
+# elif defined LONGLONG_MIN /* IRIX 6.5 */
+# define LLONG_MIN LONGLONG_MIN
+# elif defined __GNUC__
+# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL)
+# endif
#endif
-#if defined LONG_LONG_MAX && !defined LLONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
+#ifndef LLONG_MAX
+# if defined LONG_LONG_MAX /* HP-UX 11.31 */
+# define LLONG_MAX LONG_LONG_MAX
+# elif defined LONGLONG_MAX /* IRIX 6.5 */
+# define LLONG_MAX LONGLONG_MAX
+# elif defined __GNUC__
+# define LLONG_MAX __LONG_LONG_MAX__
+# endif
#endif
-#if defined ULONG_LONG_MAX && !defined ULLONG_MAX
-# define ULLONG_MAX ULONG_LONG_MAX
+#ifndef ULLONG_MAX
+# if defined ULONG_LONG_MAX /* HP-UX 11.31 */
+# define ULLONG_MAX ULONG_LONG_MAX
+# elif defined ULONGLONG_MAX /* IRIX 6.5 */
+# define ULLONG_MAX ULONGLONG_MAX
+# elif defined __GNUC__
+# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
+# endif
#endif
/* The number of usable bits in an unsigned or signed integer type
@@ -53,6 +70,19 @@
#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
+#ifndef WORD_BIT
+/* Assume 'int' is 32 bits wide. */
+# define WORD_BIT 32
+#endif
+#ifndef LONG_BIT
+/* Assume 'long' is 32 or 64 bits wide. */
+# if LONG_MAX == INT_MAX
+# define LONG_BIT 32
+# else
+# define LONG_BIT 64
+# endif
+#endif
+
/* Macros specified by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
diff --git a/gl/lib/localcharset.c b/gl/lib/localcharset.c
index 58c5718c..38e27e6f 100644
--- a/gl/lib/localcharset.c
+++ b/gl/lib/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/localcharset.h b/gl/lib/localcharset.h
index e4ba2960..7d0d7711 100644
--- a/gl/lib/localcharset.h
+++ b/gl/lib/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/locale.in.h b/gl/lib/locale.in.h
index 804261dc..5f33ed17 100644
--- a/gl/lib/locale.in.h
+++ b/gl/lib/locale.in.h
@@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -190,11 +190,40 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
# endif
#endif
-#if @GNULIB_DUPLOCALE@
+#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@)
+# if @REPLACE_NEWLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef newlocale
+# define newlocale rpl_newlocale
+# define GNULIB_defined_newlocale 1
+# endif
+_GL_FUNCDECL_RPL (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base));
+# else
+# if @HAVE_NEWLOCALE@
+_GL_CXXALIAS_SYS (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base));
+# endif
+# endif
+# if @HAVE_NEWLOCALE@
+_GL_CXXALIASWARN (newlocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef newlocale
+# if HAVE_RAW_DECL_NEWLOCALE
+_GL_WARN_ON_USE (newlocale, "newlocale is not portable");
+# endif
+#endif
+
+#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@)
# if @REPLACE_DUPLOCALE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef duplocale
# define duplocale rpl_duplocale
+# define GNULIB_defined_duplocale 1
# endif
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
@@ -214,6 +243,30 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
# endif
#endif
+#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@)
+# if @REPLACE_FREELOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef freelocale
+# define freelocale rpl_freelocale
+# define GNULIB_defined_freelocale 1
+# endif
+_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
+# else
+# if @HAVE_FREELOCALE@
+_GL_CXXALIAS_SYS (freelocale, void, (locale_t locale));
+# endif
+# endif
+# if @HAVE_FREELOCALE@
+_GL_CXXALIASWARN (freelocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef freelocale
+# if HAVE_RAW_DECL_FREELOCALE
+_GL_WARN_ON_USE (freelocale, "freelocale is not portable");
+# endif
+#endif
+
#endif /* _@GUARD_PREFIX@_LOCALE_H */
#endif /* _@GUARD_PREFIX@_LOCALE_H */
#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */
diff --git a/gl/lib/localeconv.c b/gl/lib/localeconv.c
index 87cfacee..b5a965f3 100644
--- a/gl/lib/localeconv.c
+++ b/gl/lib/localeconv.c
@@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012-2018 Free Software Foundation, Inc.
+ Copyright (C) 2012-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/localtime-buffer.c b/gl/lib/localtime-buffer.c
index df11f432..b65ea45a 100644
--- a/gl/lib/localtime-buffer.c
+++ b/gl/lib/localtime-buffer.c
@@ -1,6 +1,6 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
- Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@ struct tm *localtime_buffer_addr = &tm_zero_buffer;
struct tm *
rpl_localtime (time_t const *timep)
+#undef localtime
{
struct tm *tm = localtime (timep);
@@ -46,6 +47,7 @@ rpl_localtime (time_t const *timep)
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (time_t const *timep)
+#undef gmtime
{
struct tm *tm = gmtime (timep);
diff --git a/gl/lib/localtime-buffer.h b/gl/lib/localtime-buffer.h
index f381ff0e..031111a7 100644
--- a/gl/lib/localtime-buffer.h
+++ b/gl/lib/localtime-buffer.h
@@ -1,6 +1,6 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
- Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/lstat.c b/gl/lib/lstat.c
index 5873bbd6..d57ca105 100644
--- a/gl/lib/lstat.c
+++ b/gl/lib/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/malloc.c b/gl/lib/malloc.c
index 471c3abb..76e6ff76 100644
--- a/gl/lib/malloc.c
+++ b/gl/lib/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/malloc/scratch_buffer.h b/gl/lib/malloc/scratch_buffer.h
index e511b812..29c00fbc 100644
--- a/gl/lib/malloc/scratch_buffer.h
+++ b/gl/lib/malloc/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ Copyright (C) 2015-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/malloc/scratch_buffer_grow.c b/gl/lib/malloc/scratch_buffer_grow.c
index d108cb7e..baeac4af 100644
--- a/gl/lib/malloc/scratch_buffer_grow.c
+++ b/gl/lib/malloc/scratch_buffer_grow.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ Copyright (C) 2015-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/malloc/scratch_buffer_grow_preserve.c b/gl/lib/malloc/scratch_buffer_grow_preserve.c
index 5221ede2..73bc1a28 100644
--- a/gl/lib/malloc/scratch_buffer_grow_preserve.c
+++ b/gl/lib/malloc/scratch_buffer_grow_preserve.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ Copyright (C) 2015-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/malloc/scratch_buffer_set_array_size.c b/gl/lib/malloc/scratch_buffer_set_array_size.c
index 4e43e7c0..7ad188b3 100644
--- a/gl/lib/malloc/scratch_buffer_set_array_size.c
+++ b/gl/lib/malloc/scratch_buffer_set_array_size.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ Copyright (C) 2015-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/malloca.c b/gl/lib/malloca.c
index c54e1e0f..f60c5fb5 100644
--- a/gl/lib/malloca.c
+++ b/gl/lib/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/malloca.h b/gl/lib/malloca.h
index 1e47813f..d80c316c 100644
--- a/gl/lib/malloca.h
+++ b/gl/lib/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/mbrtowc.c b/gl/lib/mbrtowc.c
index 2f6df287..bbe3f7a3 100644
--- a/gl/lib/mbrtowc.c
+++ b/gl/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbsinit.c b/gl/lib/mbsinit.c
index e23a5ad3..5ecaef77 100644
--- a/gl/lib/mbsinit.c
+++ b/gl/lib/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbsrtowcs-impl.h b/gl/lib/mbsrtowcs-impl.h
index 2588a888..110d692e 100644
--- a/gl/lib/mbsrtowcs-impl.h
+++ b/gl/lib/mbsrtowcs-impl.h
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbsrtowcs-state.c b/gl/lib/mbsrtowcs-state.c
index 2ab2618b..59525e72 100644
--- a/gl/lib/mbsrtowcs-state.c
+++ b/gl/lib/mbsrtowcs-state.c
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbsrtowcs.c b/gl/lib/mbsrtowcs.c
index 1da1ce5a..14f241e3 100644
--- a/gl/lib/mbsrtowcs.c
+++ b/gl/lib/mbsrtowcs.c
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbtowc-impl.h b/gl/lib/mbtowc-impl.h
index 633832f5..f4ab9818 100644
--- a/gl/lib/mbtowc-impl.h
+++ b/gl/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbtowc.c b/gl/lib/mbtowc.c
index a212b221..77a84724 100644
--- a/gl/lib/mbtowc.c
+++ b/gl/lib/mbtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/memchr.c b/gl/lib/memchr.c
index 0b475465..4e0c5f9d 100644
--- a/gl/lib/memchr.c
+++ b/gl/lib/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2018
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2019
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gl/lib/memmem.c b/gl/lib/memmem.c
index 260848d6..12ae24f4 100644
--- a/gl/lib/memmem.c
+++ b/gl/lib/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2018 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2019 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/mempcpy.c b/gl/lib/mempcpy.c
index a9ed1121..d0220e10 100644
--- a/gl/lib/mempcpy.c
+++ b/gl/lib/mempcpy.c
@@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/memrchr.c b/gl/lib/memrchr.c
index 99acfd9c..96022835 100644
--- a/gl/lib/memrchr.c
+++ b/gl/lib/memrchr.c
@@ -1,6 +1,6 @@
/* memrchr -- find the last occurrence of a byte in a memory block
- Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2018 Free Software
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2019 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
@@ -68,7 +68,7 @@ __memrchr (void const *s, int c_in, size_t n)
if (*--char_ptr == c)
return (void *) char_ptr;
- longword_ptr = (const longword *) char_ptr;
+ longword_ptr = (const void *) char_ptr;
/* All these elucidatory comments refer to 4-byte longwords,
but the theory applies equally well to any size longwords. */
diff --git a/gl/lib/minmax.h b/gl/lib/minmax.h
index 33a5305f..d7f6bea0 100644
--- a/gl/lib/minmax.h
+++ b/gl/lib/minmax.h
@@ -1,5 +1,5 @@
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2018 Free Software
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/mkdir.c b/gl/lib/mkdir.c
new file mode 100644
index 00000000..b8320d00
--- /dev/null
+++ b/gl/lib/mkdir.c
@@ -0,0 +1,93 @@
+/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
+ slash. On those systems, this wrapper removes the trailing slash.
+
+ Copyright (C) 2001, 2003, 2006, 2008-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification. */
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "dirname.h"
+
+/* Disable the definition of mkdir to rpl_mkdir (from the <sys/stat.h>
+ substitute) in this file. Otherwise, we'd get an endless recursion. */
+#undef mkdir
+
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
+ Additionally, it declares _mkdir (and depending on compile flags, an
+ alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+ which are included in the <sys/stat.h> override. */
+#if defined _WIN32 && ! defined __CYGWIN__
+# define mkdir(name,mode) _mkdir (name)
+# define maybe_unused _GL_UNUSED
+#else
+# define maybe_unused /* empty */
+#endif
+
+/* This function is required at least for NetBSD 1.5.2. */
+
+int
+rpl_mkdir (char const *dir, mode_t mode maybe_unused)
+{
+ int ret_val;
+ char *tmp_dir;
+ size_t len = strlen (dir);
+
+ if (len && dir[len - 1] == '/')
+ {
+ tmp_dir = strdup (dir);
+ if (!tmp_dir)
+ {
+ /* Rather than rely on strdup-posix, we set errno ourselves. */
+ errno = ENOMEM;
+ return -1;
+ }
+ strip_trailing_slashes (tmp_dir);
+ }
+ else
+ {
+ tmp_dir = (char *) dir;
+ }
+#if FUNC_MKDIR_DOT_BUG
+ /* Additionally, cygwin 1.5 mistakenly creates a directory "d/./". */
+ {
+ char *last = last_component (tmp_dir);
+ if (*last == '.' && (last[1] == '\0'
+ || (last[1] == '.' && last[2] == '\0')))
+ {
+ struct stat st;
+ if (stat (tmp_dir, &st) == 0)
+ errno = EEXIST;
+ return -1;
+ }
+ }
+#endif /* FUNC_MKDIR_DOT_BUG */
+
+ ret_val = mkdir (tmp_dir, mode);
+
+ if (tmp_dir != dir)
+ free (tmp_dir);
+
+ return ret_val;
+}
diff --git a/gl/lib/mkdtemp.c b/gl/lib/mkdtemp.c
index b544015d..b1dd28dd 100644
--- a/gl/lib/mkdtemp.c
+++ b/gl/lib/mkdtemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2018 Free Software
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2019 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/mkstemp.c b/gl/lib/mkstemp.c
index 02a7b653..7ef0420c 100644
--- a/gl/lib/mkstemp.c
+++ b/gl/lib/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2018 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2019 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
diff --git a/gl/lib/msvc-inval.c b/gl/lib/msvc-inval.c
index 0f19a09a..75b5a070 100644
--- a/gl/lib/msvc-inval.c
+++ b/gl/lib/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/msvc-inval.h b/gl/lib/msvc-inval.h
index 8e7ff303..e31cf650 100644
--- a/gl/lib/msvc-inval.h
+++ b/gl/lib/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/msvc-nothrow.c b/gl/lib/msvc-nothrow.c
index 785733e4..49b709ca 100644
--- a/gl/lib/msvc-nothrow.c
+++ b/gl/lib/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/msvc-nothrow.h b/gl/lib/msvc-nothrow.h
index a9671c3b..8d3ca789 100644
--- a/gl/lib/msvc-nothrow.h
+++ b/gl/lib/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/nanosleep.c b/gl/lib/nanosleep.c
index 2cc39091..6f6cc89e 100644
--- a/gl/lib/nanosleep.c
+++ b/gl/lib/nanosleep.c
@@ -1,6 +1,6 @@
/* Provide a replacement for the POSIX nanosleep function.
- Copyright (C) 1999-2000, 2002, 2004-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2004-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/nl_langinfo.c b/gl/lib/nl_langinfo.c
index ea26730e..e8a5595a 100644
--- a/gl/lib/nl_langinfo.c
+++ b/gl/lib/nl_langinfo.c
@@ -1,6 +1,6 @@
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/nonblocking.c b/gl/lib/nonblocking.c
index a325fadc..7e440ae9 100644
--- a/gl/lib/nonblocking.c
+++ b/gl/lib/nonblocking.c
@@ -1,5 +1,5 @@
/* Non-blocking I/O for pipe or socket descriptors.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/nonblocking.h b/gl/lib/nonblocking.h
index e5e3ef73..e6218cab 100644
--- a/gl/lib/nonblocking.h
+++ b/gl/lib/nonblocking.h
@@ -1,5 +1,5 @@
/* Non-blocking I/O for pipe or socket descriptors.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/open.c b/gl/lib/open.c
index 792e258b..65526057 100644
--- a/gl/lib/open.c
+++ b/gl/lib/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/openat-die.c b/gl/lib/openat-die.c
index 26df87af..690c447a 100644
--- a/gl/lib/openat-die.c
+++ b/gl/lib/openat-die.c
@@ -1,6 +1,6 @@
/* Report a save- or restore-cwd failure in our openat replacement and then exit.
- Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/openat-priv.h b/gl/lib/openat-priv.h
index 5d53df12..7b90eefa 100644
--- a/gl/lib/openat-priv.h
+++ b/gl/lib/openat-priv.h
@@ -1,6 +1,6 @@
/* Internals for openat-like functions.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/openat-proc.c b/gl/lib/openat-proc.c
index 87137eec..da76e2b3 100644
--- a/gl/lib/openat-proc.c
+++ b/gl/lib/openat-proc.c
@@ -1,6 +1,6 @@
/* Create /proc/self/fd-related names for subfiles of open directories.
- Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/openat.c b/gl/lib/openat.c
index 341c5113..4ab4a318 100644
--- a/gl/lib/openat.c
+++ b/gl/lib/openat.c
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/openat.h b/gl/lib/openat.h
index 945e0328..f23b371c 100644
--- a/gl/lib/openat.h
+++ b/gl/lib/openat.h
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/opendir.c b/gl/lib/opendir.c
index b77f5404..2eb96c6e 100644
--- a/gl/lib/opendir.c
+++ b/gl/lib/opendir.c
@@ -1,5 +1,5 @@
/* Start reading the entries of a directory.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/pathmax.h b/gl/lib/pathmax.h
index 7052e6a8..83b9491f 100644
--- a/gl/lib/pathmax.h
+++ b/gl/lib/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2018 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/pipe-safer.c b/gl/lib/pipe-safer.c
index 1669d909..62017397 100644
--- a/gl/lib/pipe-safer.c
+++ b/gl/lib/pipe-safer.c
@@ -1,5 +1,5 @@
/* Invoke pipe, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/printf-args.c b/gl/lib/printf-args.c
index 1079e0a9..e45cfbed 100644
--- a/gl/lib/printf-args.c
+++ b/gl/lib/printf-args.c
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2018 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/printf-args.h b/gl/lib/printf-args.h
index 111e8a56..866cba04 100644
--- a/gl/lib/printf-args.h
+++ b/gl/lib/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2018 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/printf-parse.c b/gl/lib/printf-parse.c
index e6251458..8596fd5f 100644
--- a/gl/lib/printf-parse.c
+++ b/gl/lib/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/printf-parse.h b/gl/lib/printf-parse.h
index 16d817ec..746bb3fe 100644
--- a/gl/lib/printf-parse.h
+++ b/gl/lib/printf-parse.h
@@ -1,5 +1,5 @@
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2018 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/progname.c b/gl/lib/progname.c
index 382f5031..a42b7fa2 100644
--- a/gl/lib/progname.c
+++ b/gl/lib/progname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2003, 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/progname.h b/gl/lib/progname.h
index adc6b01d..c726e97e 100644
--- a/gl/lib/progname.h
+++ b/gl/lib/progname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/raise.c b/gl/lib/raise.c
index 3a29339a..e750b7a4 100644
--- a/gl/lib/raise.c
+++ b/gl/lib/raise.c
@@ -1,6 +1,6 @@
/* Provide a non-threads replacement for the POSIX raise function.
- Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,27 +31,9 @@
# include "msvc-inval.h"
# endif
-# undef raise
-
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static int
-raise_nothrow (int sig)
-{
- int result;
-
- TRY_MSVC_INVAL
- {
- result = raise (sig);
- }
- CATCH_MSVC_INVAL
- {
- result = -1;
- errno = EINVAL;
- }
- DONE_MSVC_INVAL;
-
- return result;
-}
+/* Forward declaration. */
+static int raise_nothrow (int sig);
# else
# define raise_nothrow raise
# endif
@@ -61,12 +43,11 @@ raise_nothrow (int sig)
# include <unistd.h>
-# define rpl_raise raise
-
#endif
int
-rpl_raise (int sig)
+raise (int sig)
+#undef raise
{
#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE
if (sig == SIGPIPE)
@@ -79,3 +60,24 @@ rpl_raise (int sig)
return kill (getpid (), sig);
#endif
}
+
+#if HAVE_RAISE && HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+raise_nothrow (int sig)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = raise (sig);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#endif
diff --git a/gl/lib/rawmemchr.c b/gl/lib/rawmemchr.c
index 912bfeb3..7df61512 100644
--- a/gl/lib/rawmemchr.c
+++ b/gl/lib/rawmemchr.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/readdir.c b/gl/lib/readdir.c
index c1c564d2..2a2e1e31 100644
--- a/gl/lib/readdir.c
+++ b/gl/lib/readdir.c
@@ -1,5 +1,5 @@
/* Read the next entry of a directory.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/readlink.c b/gl/lib/readlink.c
index 924e00d2..bf711093 100644
--- a/gl/lib/readlink.c
+++ b/gl/lib/readlink.c
@@ -1,5 +1,5 @@
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/realloc.c b/gl/lib/realloc.c
index 7620b6a9..a81ce3b5 100644
--- a/gl/lib/realloc.c
+++ b/gl/lib/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2018 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/regcomp.c b/gl/lib/regcomp.c
index 53eb2263..10a0a49d 100644
--- a/gl/lib/regcomp.c
+++ b/gl/lib/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -233,9 +233,7 @@ re_compile_pattern (const char *pattern, size_t length,
return NULL;
return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
}
-#ifdef _LIBC
weak_alias (__re_compile_pattern, re_compile_pattern)
-#endif
/* Set by 're_set_syntax' to the current regexp syntax to recognize. Can
also be assigned to arbitrarily: each pattern buffer stores its own
@@ -260,9 +258,7 @@ re_set_syntax (reg_syntax_t syntax)
re_syntax_options = syntax;
return ret;
}
-#ifdef _LIBC
weak_alias (__re_set_syntax, re_set_syntax)
-#endif
int
re_compile_fastmap (struct re_pattern_buffer *bufp)
@@ -281,9 +277,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp)
bufp->fastmap_accurate = 1;
return 0;
}
-#ifdef _LIBC
weak_alias (__re_compile_fastmap, re_compile_fastmap)
-#endif
static inline void
__attribute__ ((always_inline))
@@ -464,7 +458,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
the return codes and their meanings.) */
int
-regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
+regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags)
{
reg_errcode_t ret;
reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -476,7 +470,7 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
/* Try to allocate space for the fastmap. */
preg->fastmap = re_malloc (char, SBC_MAX);
- if (BE (preg->fastmap == NULL, 0))
+ if (__glibc_unlikely (preg->fastmap == NULL))
return REG_ESPACE;
syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0;
@@ -502,7 +496,7 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
ret = REG_EPAREN;
/* We have already checked preg->fastmap != NULL. */
- if (BE (ret == REG_NOERROR, 1))
+ if (__glibc_likely (ret == REG_NOERROR))
/* Compute the fastmap now, since regexec cannot modify the pattern
buffer. This function never fails in this implementation. */
(void) re_compile_fastmap (preg);
@@ -515,24 +509,21 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
return (int) ret;
}
-#ifdef _LIBC
libc_hidden_def (__regcomp)
weak_alias (__regcomp, regcomp)
-#endif
/* Returns a message corresponding to an error code, ERRCODE, returned
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
+regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
size_t errbuf_size)
{
const char *msg;
size_t msg_size;
+ int nerrcodes = sizeof __re_error_msgid_idx / sizeof __re_error_msgid_idx[0];
- if (BE (errcode < 0
- || errcode >= (int) (sizeof (__re_error_msgid_idx)
- / sizeof (__re_error_msgid_idx[0])), 0))
+ if (__glibc_unlikely (errcode < 0 || errcode >= nerrcodes))
/* Only error codes returned by the rest of the code should be passed
to this routine. If we are given anything else, or if other regex
code generates an invalid error code, then the program has a bug.
@@ -543,10 +534,10 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
msg_size = strlen (msg) + 1; /* Includes the null. */
- if (BE (errbuf_size != 0, 1))
+ if (__glibc_likely (errbuf_size != 0))
{
size_t cpy_size = msg_size;
- if (BE (msg_size > errbuf_size, 0))
+ if (__glibc_unlikely (msg_size > errbuf_size))
{
cpy_size = errbuf_size - 1;
errbuf[cpy_size] = '\0';
@@ -556,9 +547,7 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
return msg_size;
}
-#ifdef _LIBC
weak_alias (__regerror, regerror)
-#endif
#ifdef RE_ENABLE_I18N
@@ -644,7 +633,7 @@ void
regfree (regex_t *preg)
{
re_dfa_t *dfa = preg->buffer;
- if (BE (dfa != NULL, 1))
+ if (__glibc_likely (dfa != NULL))
{
lock_fini (dfa->lock);
free_dfa_content (dfa);
@@ -658,10 +647,8 @@ regfree (regex_t *preg)
re_free (preg->translate);
preg->translate = NULL;
}
-#ifdef _LIBC
libc_hidden_def (__regfree)
weak_alias (__regfree, regfree)
-#endif
/* Entry points compatible with 4.2 BSD regex library. We don't define
them unless specifically requested. */
@@ -754,7 +741,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
/* Initialize the dfa. */
dfa = preg->buffer;
- if (BE (preg->allocated < sizeof (re_dfa_t), 0))
+ if (__glibc_unlikely (preg->allocated < sizeof (re_dfa_t)))
{
/* If zero allocated, but buffer is non-null, try to realloc
enough space. This loses if buffer's address is bogus, but
@@ -769,9 +756,9 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
preg->used = sizeof (re_dfa_t);
err = init_dfa (dfa, length);
- if (BE (err == REG_NOERROR && lock_init (dfa->lock) != 0, 0))
+ if (__glibc_unlikely (err == REG_NOERROR && lock_init (dfa->lock) != 0))
err = REG_ESPACE;
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
free_dfa_content (dfa);
preg->buffer = NULL;
@@ -786,7 +773,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
err = re_string_construct (&regexp, pattern, length, preg->translate,
(syntax & RE_ICASE) != 0, dfa);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_compile_internal_free_return:
free_workarea_compile (preg);
@@ -801,12 +788,12 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
/* Parse the regular expression, and build a structure tree. */
preg->re_nsub = 0;
dfa->str_tree = parse (&regexp, preg, syntax, &err);
- if (BE (dfa->str_tree == NULL, 0))
+ if (__glibc_unlikely (dfa->str_tree == NULL))
goto re_compile_internal_free_return;
/* Analyze the tree and create the nfa. */
err = analyze (preg);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto re_compile_internal_free_return;
#ifdef RE_ENABLE_I18N
@@ -822,7 +809,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
free_workarea_compile (preg);
re_string_destruct (&regexp);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
lock_fini (dfa->lock);
free_dfa_content (dfa);
@@ -864,7 +851,8 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
calculation below, and for similar doubling calculations
elsewhere. And it's <= rather than <, because some of the
doubling calculations add 1 afterwards. */
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2
+ <= pat_len))
return REG_ESPACE;
dfa->nodes_alloc = pat_len + 1;
@@ -908,7 +896,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
int i, j, ch;
dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
- if (BE (dfa->sb_char == NULL, 0))
+ if (__glibc_unlikely (dfa->sb_char == NULL))
return REG_ESPACE;
/* Set the bits corresponding to single byte chars. */
@@ -927,7 +915,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
}
#endif
- if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0))
+ if (__glibc_unlikely (dfa->nodes == NULL || dfa->state_table == NULL))
return REG_ESPACE;
return REG_NOERROR;
}
@@ -943,7 +931,7 @@ init_word_char (re_dfa_t *dfa)
int j;
int ch = 0;
dfa->word_ops_used = 1;
- if (BE (dfa->map_notascii == 0, 1))
+ if (__glibc_likely (dfa->map_notascii == 0))
{
/* Avoid uint32_t and uint64_t as some non-GCC platforms lack
them, an issue when this code is used in Gnulib. */
@@ -970,7 +958,7 @@ init_word_char (re_dfa_t *dfa)
goto general_case;
ch = 128;
- if (BE (dfa->is_utf8, 1))
+ if (__glibc_likely (dfa->is_utf8))
{
memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8);
return;
@@ -1017,7 +1005,7 @@ create_initial_state (re_dfa_t *dfa)
first = dfa->str_tree->first->node_idx;
dfa->init_node = first;
err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* The back-references which are in initial states can epsilon transit,
@@ -1061,7 +1049,7 @@ create_initial_state (re_dfa_t *dfa)
/* It must be the first time to invoke acquire_state. */
dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0);
/* We don't check ERR here, since the initial state must not be NULL. */
- if (BE (dfa->init_state == NULL, 0))
+ if (__glibc_unlikely (dfa->init_state == NULL))
return err;
if (dfa->init_state->has_constraint)
{
@@ -1073,8 +1061,9 @@ create_initial_state (re_dfa_t *dfa)
&init_nodes,
CONTEXT_NEWLINE
| CONTEXT_BEGBUF);
- if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL
- || dfa->init_state_begbuf == NULL, 0))
+ if (__glibc_unlikely (dfa->init_state_word == NULL
+ || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL))
return err;
}
else
@@ -1181,8 +1170,8 @@ analyze (regex_t *preg)
dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc);
dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc);
dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc);
- if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL
- || dfa->eclosures == NULL, 0))
+ if (__glibc_unlikely (dfa->nexts == NULL || dfa->org_indices == NULL
+ || dfa->edests == NULL || dfa->eclosures == NULL))
return REG_ESPACE;
dfa->subexp_map = re_malloc (Idx, preg->re_nsub);
@@ -1203,17 +1192,17 @@ analyze (regex_t *preg)
}
ret = postorder (dfa->str_tree, lower_subexps, preg);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
ret = postorder (dfa->str_tree, calc_first, dfa);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
preorder (dfa->str_tree, calc_next, dfa);
ret = preorder (dfa->str_tree, link_nfa_nodes, dfa);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
ret = calc_eclosure (dfa);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
/* We only need this during the prune_impossible_nodes pass in regexec.c;
@@ -1222,7 +1211,7 @@ analyze (regex_t *preg)
|| dfa->nbackref)
{
dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
- if (BE (dfa->inveclosures == NULL, 0))
+ if (__glibc_unlikely (dfa->inveclosures == NULL))
return REG_ESPACE;
ret = calc_inveclosure (dfa);
}
@@ -1252,7 +1241,7 @@ postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
do
{
reg_errcode_t err = fn (extra, node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (node->parent == NULL)
return REG_NOERROR;
@@ -1274,7 +1263,7 @@ preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
for (node = root; ; )
{
reg_errcode_t err = fn (extra, node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* Go to the left node, or up and to the right. */
@@ -1375,7 +1364,8 @@ lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP);
tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls;
tree = create_tree (dfa, op, tree1, CONCAT);
- if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0))
+ if (__glibc_unlikely (tree == NULL || tree1 == NULL
+ || op == NULL || cls == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -1401,7 +1391,7 @@ calc_first (void *extra, bin_tree_t *node)
{
node->first = node;
node->node_idx = re_dfa_add_node (dfa, node->token);
- if (BE (node->node_idx == -1, 0))
+ if (__glibc_unlikely (node->node_idx == -1))
return REG_ESPACE;
if (node->token.type == ANCHOR)
dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
@@ -1512,11 +1502,11 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
org_dest = dfa->nexts[org_node];
re_node_set_empty (dfa->edests + clone_node);
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
dfa->nexts[clone_node] = dfa->nexts[org_node];
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
else if (dfa->edests[org_node].nelem == 0)
@@ -1538,17 +1528,17 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
if (org_node == root_node && clone_node != org_node)
{
ok = re_node_set_insert (dfa->edests + clone_node, org_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
break;
}
/* In case the node has another constraint, append it. */
constraint |= dfa->nodes[org_node].constraint;
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
else /* dfa->edests[org_node].nelem == 2 */
@@ -1564,14 +1554,14 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
/* There is no such duplicated node, create a new one. */
reg_errcode_t err;
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
err = duplicate_node_closure (dfa, org_dest, clone_dest,
root_node, constraint);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
else
@@ -1579,16 +1569,16 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
/* There is a duplicated node which satisfies the constraint,
use it to avoid infinite loop. */
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
org_dest = dfa->edests[org_node].elems[1];
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
org_node = org_dest;
@@ -1622,7 +1612,7 @@ static Idx
duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
{
Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
- if (BE (dup_idx != -1, 1))
+ if (__glibc_likely (dup_idx != -1))
{
dfa->nodes[dup_idx].constraint = constraint;
dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
@@ -1648,7 +1638,7 @@ calc_inveclosure (re_dfa_t *dfa)
for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
{
ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
}
@@ -1689,7 +1679,7 @@ calc_eclosure (re_dfa_t *dfa)
continue;
/* Calculate epsilon closure of 'node_idx'. */
err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (dfa->eclosures[node_idx].nelem == 0)
@@ -1712,7 +1702,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
bool ok;
bool incomplete = false;
err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* This indicates that we are calculating this node now.
@@ -1727,7 +1717,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
{
err = duplicate_node_closure (dfa, node, node, node,
dfa->nodes[node].constraint);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -1749,14 +1739,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
if (dfa->eclosures[edest].nelem == 0)
{
err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
else
eclosure_elem = dfa->eclosures[edest];
/* Merge the epsilon closure of 'edest'. */
err = re_node_set_merge (&eclosure, &eclosure_elem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* If the epsilon closure of 'edest' is incomplete,
the epsilon closure of this node is also incomplete. */
@@ -1769,7 +1759,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
/* An epsilon closure includes itself. */
ok = re_node_set_insert (&eclosure, node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
if (incomplete && !root)
dfa->eclosures[node].nelem = 0;
@@ -2139,14 +2129,14 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
dfa->syntax = syntax;
fetch_token (&current_token, regexp, syntax | RE_CARET_ANCHORS_HERE);
tree = parse_reg_exp (regexp, preg, &current_token, syntax, 0, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
eor = create_tree (dfa, NULL, NULL, END_OF_RE);
if (tree != NULL)
root = create_tree (dfa, tree, eor, CONCAT);
else
root = eor;
- if (BE (eor == NULL || root == NULL, 0))
+ if (__glibc_unlikely (eor == NULL || root == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2171,7 +2161,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
bin_tree_t *tree, *branch = NULL;
bitset_word_t initial_bkref_map = dfa->completed_bkref_map;
tree = parse_branch (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
while (token->type == OP_ALT)
@@ -2183,7 +2173,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
bitset_word_t accumulated_bkref_map = dfa->completed_bkref_map;
dfa->completed_bkref_map = initial_bkref_map;
branch = parse_branch (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && branch == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && branch == NULL))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
@@ -2194,7 +2184,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
else
branch = NULL;
tree = create_tree (dfa, tree, branch, OP_ALT);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2219,14 +2209,14 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
bin_tree_t *tree, *expr;
re_dfa_t *dfa = preg->buffer;
tree = parse_expression (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
while (token->type != OP_ALT && token->type != END_OF_RE
&& (nest == 0 || token->type != OP_CLOSE_SUBEXP))
{
expr = parse_expression (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && expr == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && expr == NULL))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
@@ -2267,7 +2257,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
case CHARACTER:
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2282,7 +2272,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
fetch_token (token, regexp, syntax);
mbc_remain = create_token_tree (dfa, NULL, NULL, token);
tree = create_tree (dfa, tree, mbc_remain, CONCAT);
- if (BE (mbc_remain == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (mbc_remain == NULL || tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2294,25 +2284,25 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_OPEN_SUBEXP:
tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
case OP_OPEN_BRACKET:
tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
case OP_BACK_REF:
- if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
+ if (!__glibc_likely (dfa->completed_bkref_map & (1 << token->opr.idx)))
{
*err = REG_ESUBREG;
return NULL;
}
dfa->used_bkref_map |= 1 << token->opr.idx;
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2358,7 +2348,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
/* mb_partial and word_char bits should be initialized already
by peek_token. */
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2388,7 +2378,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
}
tree_last = create_token_tree (dfa, NULL, NULL, token);
tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
- if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (tree_first == NULL || tree_last == NULL
+ || tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2397,7 +2388,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
else
{
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2412,7 +2403,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_PERIOD:
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2427,7 +2418,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
"alnum",
"_",
token->type == OP_NOTWORD, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
@@ -2437,7 +2428,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
"space",
"",
token->type == OP_NOTSPACE, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
@@ -2463,7 +2454,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token,
syntax, err);
- if (BE (*err != REG_NOERROR && dup_tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && dup_tree == NULL))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
@@ -2509,13 +2500,14 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
else
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
- if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
+ if (__glibc_unlikely (*err == REG_NOERROR
+ && token->type != OP_CLOSE_SUBEXP))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
*err = REG_EPAREN;
}
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
}
@@ -2523,7 +2515,7 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
dfa->completed_bkref_map |= 1 << cur_nsub;
tree = create_tree (dfa, tree, NULL, SUBEXP);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2556,17 +2548,17 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return NULL;
}
}
- if (BE (start != -2, 1))
+ if (__glibc_likely (start != -2))
{
/* We treat "{n}" as "{n,n}". */
end = ((token->type == OP_CLOSE_DUP_NUM) ? start
: ((token->type == CHARACTER && token->opr.c == ',')
? fetch_number (regexp, token, syntax) : -2));
}
- if (BE (start == -2 || end == -2, 0))
+ if (__glibc_unlikely (start == -2 || end == -2))
{
/* Invalid sequence. */
- if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
+ if (__glibc_unlikely (!(syntax & RE_INVALID_INTERVAL_ORD)))
{
if (token->type == END_OF_RE)
*err = REG_EBRACE;
@@ -2585,15 +2577,15 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return elem;
}
- if (BE ((end != -1 && start > end)
- || token->type != OP_CLOSE_DUP_NUM, 0))
+ if (__glibc_unlikely ((end != -1 && start > end)
+ || token->type != OP_CLOSE_DUP_NUM))
{
/* First number greater than second. */
*err = REG_BADBR;
return NULL;
}
- if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0))
+ if (__glibc_unlikely (RE_DUP_MAX < (end == -1 ? start : end)))
{
*err = REG_ESIZE;
return NULL;
@@ -2607,23 +2599,23 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
fetch_token (token, regexp, syntax);
- if (BE (elem == NULL, 0))
+ if (__glibc_unlikely (elem == NULL))
return NULL;
- if (BE (start == 0 && end == 0, 0))
+ if (__glibc_unlikely (start == 0 && end == 0))
{
postorder (elem, free_tree, NULL);
return NULL;
}
/* Extract "<re>{n,m}" to "<re><re>...<re><re>{0,<m-n>}". */
- if (BE (start > 0, 0))
+ if (__glibc_unlikely (start > 0))
{
tree = elem;
for (i = 2; i <= start; ++i)
{
elem = duplicate_tree (elem, dfa);
tree = create_tree (dfa, tree, elem, CONCAT);
- if (BE (elem == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (elem == NULL || tree == NULL))
goto parse_dup_op_espace;
}
@@ -2632,7 +2624,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
/* Duplicate ELEM before it is marked optional. */
elem = duplicate_tree (elem, dfa);
- if (BE (elem == NULL, 0))
+ if (__glibc_unlikely (elem == NULL))
goto parse_dup_op_espace;
old_tree = tree;
}
@@ -2647,7 +2639,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
tree = create_tree (dfa, elem, NULL,
(end == -1 ? OP_DUP_ASTERISK : OP_ALT));
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
goto parse_dup_op_espace;
/* This loop is actually executed only when end != -1,
@@ -2658,11 +2650,11 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
{
elem = duplicate_tree (elem, dfa);
tree = create_tree (dfa, tree, elem, CONCAT);
- if (BE (elem == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (elem == NULL || tree == NULL))
goto parse_dup_op_espace;
tree = create_tree (dfa, tree, NULL, OP_ALT);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
goto parse_dup_op_espace;
}
@@ -2684,15 +2676,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
# ifdef RE_ENABLE_I18N
/* Convert the byte B to the corresponding wide character. In a
- unibyte locale, treat B as itself if it is an encoding error.
- In a multibyte locale, return WEOF if B is an encoding error. */
+ unibyte locale, treat B as itself. In a multibyte locale, return
+ WEOF if B is an encoding error. */
static wint_t
parse_byte (unsigned char b, re_charset_t *mbcset)
{
- wint_t wc = __btowc (b);
- return wc == WEOF && !mbcset ? b : wc;
+ return mbcset == NULL ? b : __btowc (b);
}
-#endif
+# endif
/* Local function for parse_bracket_exp only used in case of NOT _LIBC.
Build the range expression which starts from START_ELEM, and ends
@@ -2718,17 +2709,18 @@ build_range_exp (const reg_syntax_t syntax,
{
unsigned int start_ch, end_ch;
/* Equivalence Classes and Character Classes can't be a range start/end. */
- if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
- || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
- 0))
+ if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
+ || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS
+ || end_elem->type == CHAR_CLASS))
return REG_ERANGE;
/* We can handle no multi character collating elements without libc
support. */
- if (BE ((start_elem->type == COLL_SYM
- && strlen ((char *) start_elem->opr.name) > 1)
- || (end_elem->type == COLL_SYM
- && strlen ((char *) end_elem->opr.name) > 1), 0))
+ if (__glibc_unlikely ((start_elem->type == COLL_SYM
+ && strlen ((char *) start_elem->opr.name) > 1)
+ || (end_elem->type == COLL_SYM
+ && strlen ((char *) end_elem->opr.name) > 1)))
return REG_ECOLLATE;
# ifdef RE_ENABLE_I18N
@@ -2749,7 +2741,8 @@ build_range_exp (const reg_syntax_t syntax,
? parse_byte (end_ch, mbcset) : end_elem->opr.wch);
if (start_wc == WEOF || end_wc == WEOF)
return REG_ECOLLATE;
- else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0))
+ else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
+ && start_wc > end_wc))
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@@ -2760,7 +2753,7 @@ build_range_exp (const reg_syntax_t syntax,
if (mbcset)
{
/* Check the space of the arrays. */
- if (BE (*range_alloc == mbcset->nranges, 0))
+ if (__glibc_unlikely (*range_alloc == mbcset->nranges))
{
/* There is not enough space, need realloc. */
wchar_t *new_array_start, *new_array_end;
@@ -2775,7 +2768,8 @@ build_range_exp (const reg_syntax_t syntax,
new_array_end = re_realloc (mbcset->range_ends, wchar_t,
new_nranges);
- if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ if (__glibc_unlikely (new_array_start == NULL
+ || new_array_end == NULL))
{
re_free (new_array_start);
re_free (new_array_end);
@@ -2835,7 +2829,7 @@ build_collating_symbol (bitset_t sbcset, const unsigned char *name)
# endif /* not RE_ENABLE_I18N */
{
size_t name_len = strlen ((const char *) name);
- if (BE (name_len != 1, 0))
+ if (__glibc_unlikely (name_len != 1))
return REG_ECOLLATE;
else
{
@@ -2970,18 +2964,21 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Equivalence Classes and Character Classes can't be a range
start/end. */
- if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
- || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
- 0))
+ if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
+ || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS
+ || end_elem->type == CHAR_CLASS))
return REG_ERANGE;
/* FIXME: Implement rational ranges here, too. */
start_collseq = lookup_collation_sequence_value (start_elem);
end_collseq = lookup_collation_sequence_value (end_elem);
/* Check start/end collation sequence values. */
- if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0))
+ if (__glibc_unlikely (start_collseq == UINT_MAX
+ || end_collseq == UINT_MAX))
return REG_ECOLLATE;
- if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0))
+ if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
+ && start_collseq > end_collseq))
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@@ -2991,7 +2988,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
if (nrules > 0 || dfa->mb_cur_max > 1)
{
/* Check the space of the arrays. */
- if (BE (*range_alloc == mbcset->nranges, 0))
+ if (__glibc_unlikely (*range_alloc == mbcset->nranges))
{
/* There is not enough space, need realloc. */
uint32_t *new_array_start;
@@ -3005,7 +3002,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
new_array_end = re_realloc (mbcset->range_ends, uint32_t,
new_nranges);
- if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ if (__glibc_unlikely (new_array_start == NULL
+ || new_array_end == NULL))
return REG_ESPACE;
mbcset->range_starts = new_array_start;
@@ -3069,7 +3067,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Got valid collation sequence, add it as a new entry. */
/* Check the space of the arrays. */
- if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0))
+ if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms))
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->ncoll_syms is 0. */
@@ -3078,7 +3076,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
if *alloc == 0. */
int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
new_coll_sym_alloc);
- if (BE (new_coll_syms == NULL, 0))
+ if (__glibc_unlikely (new_coll_syms == NULL))
return REG_ESPACE;
mbcset->coll_syms = new_coll_syms;
*coll_sym_alloc = new_coll_sym_alloc;
@@ -3088,7 +3086,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
}
else
{
- if (BE (name_len != 1, 0))
+ if (__glibc_unlikely (name_len != 1))
return REG_ECOLLATE;
else
{
@@ -3132,9 +3130,9 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
#endif /* RE_ENABLE_I18N */
#ifdef RE_ENABLE_I18N
- if (BE (sbcset == NULL || mbcset == NULL, 0))
+ if (__glibc_unlikely (sbcset == NULL || mbcset == NULL))
#else
- if (BE (sbcset == NULL, 0))
+ if (__glibc_unlikely (sbcset == NULL))
#endif /* RE_ENABLE_I18N */
{
re_free (sbcset);
@@ -3146,7 +3144,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
}
token_len = peek_token_bracket (token, regexp, syntax);
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_BADPAT;
goto parse_bracket_exp_free_return;
@@ -3161,7 +3159,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
bitset_set (sbcset, '\n');
re_string_skip_bytes (regexp, token_len); /* Skip a token. */
token_len = peek_token_bracket (token, regexp, syntax);
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_BADPAT;
goto parse_bracket_exp_free_return;
@@ -3186,7 +3184,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
start_elem.type = COLL_SYM;
ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
syntax, first_round);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
{
*err = ret;
goto parse_bracket_exp_free_return;
@@ -3199,7 +3197,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Do not check for ranges if we know they are not allowed. */
if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS)
{
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_EBRACK;
goto parse_bracket_exp_free_return;
@@ -3208,7 +3206,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
{
re_string_skip_bytes (regexp, token_len); /* Skip '-'. */
token_len2 = peek_token_bracket (&token2, regexp, syntax);
- if (BE (token2.type == END_OF_RE, 0))
+ if (__glibc_unlikely (token2.type == END_OF_RE))
{
*err = REG_EBRACK;
goto parse_bracket_exp_free_return;
@@ -3230,7 +3228,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
end_elem.type = COLL_SYM;
ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
dfa, syntax, true);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
{
*err = ret;
goto parse_bracket_exp_free_return;
@@ -3250,7 +3248,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
*err = build_range_exp (syntax, sbcset, &start_elem, &end_elem);
# endif
#endif /* RE_ENABLE_I18N */
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
}
else
@@ -3263,7 +3261,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#ifdef RE_ENABLE_I18N
case MB_CHAR:
/* Check whether the array has enough space. */
- if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+ if (__glibc_unlikely (mbchar_alloc == mbcset->nmbchars))
{
wchar_t *new_mbchars;
/* Not enough, realloc it. */
@@ -3272,7 +3270,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Use realloc since array is NULL if *alloc == 0. */
new_mbchars = re_realloc (mbcset->mbchars, wchar_t,
mbchar_alloc);
- if (BE (new_mbchars == NULL, 0))
+ if (__glibc_unlikely (new_mbchars == NULL))
goto parse_bracket_exp_espace;
mbcset->mbchars = new_mbchars;
}
@@ -3285,7 +3283,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
mbcset, &equiv_class_alloc,
#endif /* RE_ENABLE_I18N */
start_elem.opr.name);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
break;
case COLL_SYM:
@@ -3294,7 +3292,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
mbcset, &coll_sym_alloc,
#endif /* RE_ENABLE_I18N */
start_elem.opr.name);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
break;
case CHAR_CLASS:
@@ -3304,7 +3302,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#endif /* RE_ENABLE_I18N */
(const char *) start_elem.opr.name,
syntax);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
break;
default:
@@ -3312,7 +3310,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
break;
}
}
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_EBRACK;
goto parse_bracket_exp_free_return;
@@ -3343,7 +3341,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.type = COMPLEX_BRACKET;
br_token.opr.mbcset = mbcset;
mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (mbc_tree == NULL, 0))
+ if (__glibc_unlikely (mbc_tree == NULL))
goto parse_bracket_exp_espace;
for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx)
if (sbcset[sbc_idx])
@@ -3356,12 +3354,12 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (work_tree == NULL, 0))
+ if (__glibc_unlikely (work_tree == NULL))
goto parse_bracket_exp_espace;
/* Then join them by ALT node. */
work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
- if (BE (work_tree == NULL, 0))
+ if (__glibc_unlikely (work_tree == NULL))
goto parse_bracket_exp_espace;
}
else
@@ -3380,7 +3378,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (work_tree == NULL, 0))
+ if (__glibc_unlikely (work_tree == NULL))
goto parse_bracket_exp_espace;
}
return work_tree;
@@ -3417,7 +3415,7 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
|| token->type == OP_OPEN_EQUIV_CLASS)
return parse_bracket_symbol (elem, regexp, token);
- if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen)
+ if (__glibc_unlikely (token->type == OP_CHARSET_RANGE) && !accept_hyphen)
{
/* A '-' must only appear as anything but a range indicator before
the closing bracket. Everything else is an error. */
@@ -3512,7 +3510,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
idx1 = findidx (table, indirect, extra, &cp, -1);
- if (BE (idx1 == 0 || *cp != '\0', 0))
+ if (__glibc_unlikely (idx1 == 0 || *cp != '\0'))
/* This isn't a valid character. */
return REG_ECOLLATE;
@@ -3531,21 +3529,13 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
continue;
/* Compare only if the length matches and the collation rule
index is the same. */
- if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24))
- {
- int cnt = 0;
-
- while (cnt <= len &&
- weights[(idx1 & 0xffffff) + 1 + cnt]
- == weights[(idx2 & 0xffffff) + 1 + cnt])
- ++cnt;
-
- if (cnt > len)
- bitset_set (sbcset, ch);
- }
+ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)
+ && memcmp (weights + (idx1 & 0xffffff) + 1,
+ weights + (idx2 & 0xffffff) + 1, len) == 0)
+ bitset_set (sbcset, ch);
}
/* Check whether the array has enough space. */
- if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
+ if (__glibc_unlikely (*equiv_class_alloc == mbcset->nequiv_classes))
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->nequiv_classes is 0. */
@@ -3554,7 +3544,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes,
int32_t,
new_equiv_class_alloc);
- if (BE (new_equiv_classes == NULL, 0))
+ if (__glibc_unlikely (new_equiv_classes == NULL))
return REG_ESPACE;
mbcset->equiv_classes = new_equiv_classes;
*equiv_class_alloc = new_equiv_class_alloc;
@@ -3564,7 +3554,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
else
#endif /* _LIBC */
{
- if (BE (strlen ((const char *) name) != 1, 0))
+ if (__glibc_unlikely (strlen ((const char *) name) != 1))
return REG_ECOLLATE;
bitset_set (sbcset, *name);
}
@@ -3598,7 +3588,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
#ifdef RE_ENABLE_I18N
/* Check the space of the arrays. */
- if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+ if (__glibc_unlikely (*char_class_alloc == mbcset->nchar_classes))
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->nchar_classes is 0. */
@@ -3606,7 +3596,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
/* Use realloc since array is NULL if *alloc == 0. */
wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t,
new_char_class_alloc);
- if (BE (new_char_classes == NULL, 0))
+ if (__glibc_unlikely (new_char_classes == NULL))
return REG_ESPACE;
mbcset->char_classes = new_char_classes;
*char_class_alloc = new_char_class_alloc;
@@ -3616,7 +3606,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
#define BUILD_CHARCLASS_LOOP(ctype_func) \
do { \
- if (BE (trans != NULL, 0)) \
+ if (__glibc_unlikely (trans != NULL)) \
{ \
for (i = 0; i < SBC_MAX; ++i) \
if (ctype_func (i)) \
@@ -3676,14 +3666,14 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
bin_tree_t *tree;
sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
- if (BE (sbcset == NULL, 0))
+ if (__glibc_unlikely (sbcset == NULL))
{
*err = REG_ESPACE;
return NULL;
}
#ifdef RE_ENABLE_I18N
mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
- if (BE (mbcset == NULL, 0))
+ if (__glibc_unlikely (mbcset == NULL))
{
re_free (sbcset);
*err = REG_ESPACE;
@@ -3699,7 +3689,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
#endif /* RE_ENABLE_I18N */
class_name, 0);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
{
re_free (sbcset);
#ifdef RE_ENABLE_I18N
@@ -3729,7 +3719,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
goto build_word_op_espace;
#ifdef RE_ENABLE_I18N
@@ -3741,11 +3731,11 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
br_token.opr.mbcset = mbcset;
dfa->has_mb_node = 1;
mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (mbc_tree == NULL, 0))
+ if (__glibc_unlikely (mbc_tree == NULL))
goto build_word_op_espace;
/* Then join them by ALT node. */
tree = create_tree (dfa, tree, mbc_tree, OP_ALT);
- if (BE (mbc_tree != NULL, 1))
+ if (__glibc_likely (mbc_tree != NULL))
return tree;
}
else
@@ -3781,7 +3771,7 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
{
fetch_token (token, input, syntax);
c = token->opr.c;
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
return -2;
if (token->type == OP_CLOSE_DUP_NUM || c == ',')
break;
@@ -3802,9 +3792,9 @@ free_charset (re_charset_t *cset)
# ifdef _LIBC
re_free (cset->coll_syms);
re_free (cset->equiv_classes);
+# endif
re_free (cset->range_starts);
re_free (cset->range_ends);
-# endif
re_free (cset->char_classes);
re_free (cset);
}
@@ -3831,7 +3821,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
const re_token_t *token)
{
bin_tree_t *tree;
- if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0))
+ if (__glibc_unlikely (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE))
{
bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1);
diff --git a/gl/lib/regex.c b/gl/lib/regex.c
index 499e1f0e..eab7a48b 100644
--- a/gl/lib/regex.c
+++ b/gl/lib/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -18,12 +18,12 @@
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
-# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# if __GNUC_PREREQ (4, 6)
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# endif
-# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# if __GNUC_PREREQ (4, 3)
# pragma GCC diagnostic ignored "-Wold-style-definition"
# pragma GCC diagnostic ignored "-Wtype-limits"
# endif
diff --git a/gl/lib/regex.h b/gl/lib/regex.h
index f2ac9507..77ac1a55 100644
--- a/gl/lib/regex.h
+++ b/gl/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/lib/regex_internal.c b/gl/lib/regex_internal.c
index 32373565..b592f067 100644
--- a/gl/lib/regex_internal.c
+++ b/gl/lib/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -59,7 +59,7 @@ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
re_string_construct_common (str, len, pstr, trans, icase, dfa);
ret = re_string_realloc_buffers (pstr, init_buf_len);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
pstr->word_char = dfa->word_char;
@@ -84,7 +84,7 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
if (len > 0)
{
ret = re_string_realloc_buffers (pstr, len + 1);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
@@ -97,14 +97,14 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
while (1)
{
ret = build_wcs_upper_buffer (pstr);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
if (pstr->valid_raw_len >= len)
break;
if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
break;
ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
}
@@ -146,17 +146,18 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
/* Avoid overflow in realloc. */
const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size)
+ < new_buf_len))
return REG_ESPACE;
new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
- if (BE (new_wcs == NULL, 0))
+ if (__glibc_unlikely (new_wcs == NULL))
return REG_ESPACE;
pstr->wcs = new_wcs;
if (pstr->offsets != NULL)
{
Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len);
- if (BE (new_offsets == NULL, 0))
+ if (__glibc_unlikely (new_offsets == NULL))
return REG_ESPACE;
pstr->offsets = new_offsets;
}
@@ -166,7 +167,7 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
{
unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char,
new_buf_len);
- if (BE (new_mbs == NULL, 0))
+ if (__glibc_unlikely (new_mbs == NULL))
return REG_ESPACE;
pstr->mbs = new_mbs;
}
@@ -230,7 +231,7 @@ build_wcs_buffer (re_string_t *pstr)
remain_len = end_idx - byte_idx;
prev_st = pstr->cur_state;
/* Apply the translation if we need. */
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
{
int i, ch;
@@ -244,17 +245,18 @@ build_wcs_buffer (re_string_t *pstr)
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
- if (BE (mbclen == (size_t) -1 || mbclen == 0
- || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
+ if (__glibc_unlikely (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2
+ && pstr->bufs_len >= pstr->len)))
{
/* We treat these cases as a singlebyte character. */
mbclen = 1;
wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
wc = pstr->trans[wc];
pstr->cur_state = prev_st;
}
- else if (BE (mbclen == (size_t) -2, 0))
+ else if (__glibc_unlikely (mbclen == (size_t) -2))
{
/* The buffer doesn't have enough space, finish to build. */
pstr->cur_state = prev_st;
@@ -317,7 +319,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
mbclen = __mbrtowc (&wc,
((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+ byte_idx), remain_len, &pstr->cur_state);
- if (BE (mbclen < (size_t) -2, 1))
+ if (__glibc_likely (0 < mbclen && mbclen < (size_t) -2))
{
wchar_t wcu = __towupper (wc);
if (wcu != wc)
@@ -325,7 +327,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
size_t mbcdlen;
mbcdlen = __wcrtomb (buf, wcu, &prev_st);
- if (BE (mbclen == mbcdlen, 1))
+ if (__glibc_likely (mbclen == mbcdlen))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else
{
@@ -350,7 +352,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
pstr->mbs[byte_idx] = ch;
/* And also cast it to wide char. */
pstr->wcs[byte_idx++] = (wchar_t) ch;
- if (BE (mbclen == (size_t) -1, 0))
+ if (__glibc_unlikely (mbclen == (size_t) -1))
pstr->cur_state = prev_st;
}
else
@@ -372,7 +374,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
offsets_needed:
remain_len = end_idx - byte_idx;
prev_st = pstr->cur_state;
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
{
int i, ch;
@@ -386,7 +388,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
- if (BE (mbclen < (size_t) -2, 1))
+ if (__glibc_likely (0 < mbclen && mbclen < (size_t) -2))
{
wchar_t wcu = __towupper (wc);
if (wcu != wc)
@@ -394,7 +396,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
size_t mbcdlen;
mbcdlen = __wcrtomb ((char *) buf, wcu, &prev_st);
- if (BE (mbclen == mbcdlen, 1))
+ if (__glibc_likely (mbclen == mbcdlen))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else if (mbcdlen != (size_t) -1)
{
@@ -444,7 +446,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
else
memcpy (pstr->mbs + byte_idx, p, mbclen);
- if (BE (pstr->offsets_needed != 0, 0))
+ if (__glibc_unlikely (pstr->offsets_needed != 0))
{
size_t i;
for (i = 0; i < mbclen; ++i)
@@ -463,17 +465,17 @@ build_wcs_upper_buffer (re_string_t *pstr)
/* It is an invalid character or '\0'. Just use the byte. */
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
ch = pstr->trans [ch];
pstr->mbs[byte_idx] = ch;
- if (BE (pstr->offsets_needed != 0, 0))
+ if (__glibc_unlikely (pstr->offsets_needed != 0))
pstr->offsets[byte_idx] = src_idx;
++src_idx;
/* And also cast it to wide char. */
pstr->wcs[byte_idx++] = (wchar_t) ch;
- if (BE (mbclen == (size_t) -1, 0))
+ if (__glibc_unlikely (mbclen == (size_t) -1))
pstr->cur_state = prev_st;
}
else
@@ -508,7 +510,8 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
prev_st = pstr->cur_state;
mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
remain_len, &pstr->cur_state);
- if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
+ if (__glibc_unlikely (mbclen == (size_t) -2 || mbclen == (size_t) -1
+ || mbclen == 0))
{
/* We treat these cases as a single byte character. */
if (mbclen == 0 || remain_len == 0)
@@ -540,7 +543,7 @@ build_upper_buffer (re_string_t *pstr)
for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
{
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
ch = pstr->trans[ch];
pstr->mbs[char_idx] = toupper (ch);
}
@@ -576,7 +579,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
{
Idx offset;
- if (BE (pstr->raw_mbs_idx <= idx, 0))
+ if (__glibc_unlikely (pstr->raw_mbs_idx <= idx))
offset = idx - pstr->raw_mbs_idx;
else
{
@@ -598,14 +601,14 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
offset = idx;
}
- if (BE (offset != 0, 1))
+ if (__glibc_likely (offset != 0))
{
/* Should the already checked characters be kept? */
- if (BE (offset < pstr->valid_raw_len, 1))
+ if (__glibc_likely (offset < pstr->valid_raw_len))
{
/* Yes, move them to the front of the buffer. */
#ifdef RE_ENABLE_I18N
- if (BE (pstr->offsets_needed, 0))
+ if (__glibc_unlikely (pstr->offsets_needed))
{
Idx low = 0, high = pstr->valid_len, mid;
do
@@ -677,7 +680,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
memmove (pstr->wcs, pstr->wcs + offset,
(pstr->valid_len - offset) * sizeof (wint_t));
#endif /* RE_ENABLE_I18N */
- if (BE (pstr->mbs_allocated, 0))
+ if (__glibc_unlikely (pstr->mbs_allocated))
memmove (pstr->mbs, pstr->mbs + offset,
pstr->valid_len - offset);
pstr->valid_len -= offset;
@@ -693,7 +696,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
/* No, skip all characters until IDX. */
Idx prev_valid_len = pstr->valid_len;
- if (BE (pstr->offsets_needed, 0))
+ if (__glibc_unlikely (pstr->offsets_needed))
{
pstr->len = pstr->raw_len - idx + offset;
pstr->stop = pstr->raw_stop - idx + offset;
@@ -721,7 +724,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
#ifdef _LIBC
/* We know the wchar_t encoding is UCS4, so for the simple
case, ASCII characters, skip the conversion step. */
- if (isascii (*p) && BE (pstr->trans == NULL, 1))
+ if (isascii (*p) && __glibc_likely (pstr->trans == NULL))
{
memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
/* pstr->valid_len = 0; */
@@ -739,7 +742,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
size_t mbclen;
const unsigned char *pp = p;
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
{
int i = mlen < 6 ? mlen : 6;
while (--i >= 0)
@@ -769,13 +772,13 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
pstr->tip_context
= re_string_context_at (pstr, prev_valid_len - 1, eflags);
else
- pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
+ pstr->tip_context = ((__glibc_unlikely (pstr->word_ops_used != 0)
&& IS_WIDE_WORD_CHAR (wc))
? CONTEXT_WORD
: ((IS_WIDE_NEWLINE (wc)
&& pstr->newline_anchor)
? CONTEXT_NEWLINE : 0));
- if (BE (pstr->valid_len, 0))
+ if (__glibc_unlikely (pstr->valid_len))
{
for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
pstr->wcs[wcs_idx] = WEOF;
@@ -797,7 +800,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
? CONTEXT_NEWLINE : 0));
}
}
- if (!BE (pstr->mbs_allocated, 0))
+ if (!__glibc_unlikely (pstr->mbs_allocated))
pstr->mbs += offset;
}
pstr->raw_mbs_idx = idx;
@@ -811,7 +814,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
if (pstr->icase)
{
reg_errcode_t ret = build_wcs_upper_buffer (pstr);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
else
@@ -819,7 +822,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
}
else
#endif /* RE_ENABLE_I18N */
- if (BE (pstr->mbs_allocated, 0))
+ if (__glibc_unlikely (pstr->mbs_allocated))
{
if (pstr->icase)
build_upper_buffer (pstr);
@@ -841,7 +844,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
Idx off;
/* Handle the common (easiest) cases first. */
- if (BE (!pstr->mbs_allocated, 1))
+ if (__glibc_likely (!pstr->mbs_allocated))
return re_string_peek_byte (pstr, idx);
#ifdef RE_ENABLE_I18N
@@ -873,7 +876,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
static unsigned char
re_string_fetch_byte_case (re_string_t *pstr)
{
- if (BE (!pstr->mbs_allocated, 1))
+ if (__glibc_likely (!pstr->mbs_allocated))
return re_string_fetch_byte (pstr);
#ifdef RE_ENABLE_I18N
@@ -924,11 +927,11 @@ static unsigned int
re_string_context_at (const re_string_t *input, Idx idx, int eflags)
{
int c;
- if (BE (idx < 0, 0))
+ if (__glibc_unlikely (idx < 0))
/* In this case, we use the value stored in input->tip_context,
since we can't know the character in input->mbs[-1] here. */
return input->tip_context;
- if (BE (idx == input->len, 0))
+ if (__glibc_unlikely (idx == input->len))
return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
: CONTEXT_NEWLINE | CONTEXT_ENDBUF);
#ifdef RE_ENABLE_I18N
@@ -947,7 +950,8 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
return input->tip_context;
}
wc = input->wcs[wc_idx];
- if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc))
+ if (__glibc_unlikely (input->word_ops_used != 0)
+ && IS_WIDE_WORD_CHAR (wc))
return CONTEXT_WORD;
return (IS_WIDE_NEWLINE (wc) && input->newline_anchor
? CONTEXT_NEWLINE : 0);
@@ -971,7 +975,8 @@ re_node_set_alloc (re_node_set *set, Idx size)
set->alloc = size;
set->nelem = 0;
set->elems = re_malloc (Idx, size);
- if (BE (set->elems == NULL, 0) && (MALLOC_0_IS_NONNULL || size != 0))
+ if (__glibc_unlikely (set->elems == NULL)
+ && (MALLOC_0_IS_NONNULL || size != 0))
return REG_ESPACE;
return REG_NOERROR;
}
@@ -983,7 +988,7 @@ re_node_set_init_1 (re_node_set *set, Idx elem)
set->alloc = 1;
set->nelem = 1;
set->elems = re_malloc (Idx, 1);
- if (BE (set->elems == NULL, 0))
+ if (__glibc_unlikely (set->elems == NULL))
{
set->alloc = set->nelem = 0;
return REG_ESPACE;
@@ -998,7 +1003,7 @@ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
{
set->alloc = 2;
set->elems = re_malloc (Idx, 2);
- if (BE (set->elems == NULL, 0))
+ if (__glibc_unlikely (set->elems == NULL))
return REG_ESPACE;
if (elem1 == elem2)
{
@@ -1031,7 +1036,7 @@ re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
{
dest->alloc = dest->nelem;
dest->elems = re_malloc (Idx, dest->alloc);
- if (BE (dest->elems == NULL, 0))
+ if (__glibc_unlikely (dest->elems == NULL))
{
dest->alloc = dest->nelem = 0;
return REG_ESPACE;
@@ -1062,7 +1067,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
{
Idx new_alloc = src1->nelem + src2->nelem + dest->alloc;
Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc);
- if (BE (new_elems == NULL, 0))
+ if (__glibc_unlikely (new_elems == NULL))
return REG_ESPACE;
dest->elems = new_elems;
dest->alloc = new_alloc;
@@ -1148,7 +1153,7 @@ re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
{
dest->alloc = src1->nelem + src2->nelem;
dest->elems = re_malloc (Idx, dest->alloc);
- if (BE (dest->elems == NULL, 0))
+ if (__glibc_unlikely (dest->elems == NULL))
return REG_ESPACE;
}
else
@@ -1202,13 +1207,13 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
{
Idx new_alloc = 2 * (src->nelem + dest->alloc);
Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
- if (BE (new_buffer == NULL, 0))
+ if (__glibc_unlikely (new_buffer == NULL))
return REG_ESPACE;
dest->elems = new_buffer;
dest->alloc = new_alloc;
}
- if (BE (dest->nelem == 0, 0))
+ if (__glibc_unlikely (dest->nelem == 0))
{
dest->nelem = src->nelem;
memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
@@ -1281,9 +1286,9 @@ re_node_set_insert (re_node_set *set, Idx elem)
Idx idx;
/* In case the set is empty. */
if (set->alloc == 0)
- return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1);
+ return __glibc_likely (re_node_set_init_1 (set, elem) == REG_NOERROR);
- if (BE (set->nelem, 0) == 0)
+ if (__glibc_unlikely (set->nelem) == 0)
{
/* We already guaranteed above that set->alloc != 0. */
set->elems[0] = elem;
@@ -1297,7 +1302,7 @@ re_node_set_insert (re_node_set *set, Idx elem)
Idx *new_elems;
set->alloc = set->alloc * 2;
new_elems = re_realloc (set->elems, Idx, set->alloc);
- if (BE (new_elems == NULL, 0))
+ if (__glibc_unlikely (new_elems == NULL))
return false;
set->elems = new_elems;
}
@@ -1336,7 +1341,7 @@ re_node_set_insert_last (re_node_set *set, Idx elem)
Idx *new_elems;
set->alloc = (set->alloc + 1) * 2;
new_elems = re_realloc (set->elems, Idx, set->alloc);
- if (BE (new_elems == NULL, 0))
+ if (__glibc_unlikely (new_elems == NULL))
return false;
set->elems = new_elems;
}
@@ -1403,7 +1408,7 @@ re_node_set_remove_at (re_node_set *set, Idx idx)
static Idx
re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
{
- if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
+ if (__glibc_unlikely (dfa->nodes_len >= dfa->nodes_alloc))
{
size_t new_nodes_alloc = dfa->nodes_alloc * 2;
Idx *new_nexts, *new_indices;
@@ -1414,19 +1419,20 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
const size_t max_object_size = MAX (sizeof (re_token_t),
MAX (sizeof (re_node_set),
sizeof (Idx)));
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size)
+ < new_nodes_alloc))
return -1;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
- if (BE (new_nodes == NULL, 0))
+ if (__glibc_unlikely (new_nodes == NULL))
return -1;
dfa->nodes = new_nodes;
new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
- if (BE (new_nexts == NULL || new_indices == NULL
- || new_edests == NULL || new_eclosures == NULL, 0))
+ if (__glibc_unlikely (new_nexts == NULL || new_indices == NULL
+ || new_edests == NULL || new_eclosures == NULL))
{
re_free (new_nexts);
re_free (new_indices);
@@ -1485,7 +1491,7 @@ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
/* Suppress bogus uninitialized-variable warnings. */
*err = REG_NOERROR;
#endif
- if (BE (nodes->nelem == 0, 0))
+ if (__glibc_unlikely (nodes->nelem == 0))
{
*err = REG_NOERROR;
return NULL;
@@ -1504,7 +1510,7 @@ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
/* There are no appropriate state in the dfa, create the new one. */
new_state = create_ci_newstate (dfa, nodes, hash);
- if (BE (new_state == NULL, 0))
+ if (__glibc_unlikely (new_state == NULL))
*err = REG_ESPACE;
return new_state;
@@ -1551,7 +1557,7 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
}
/* There are no appropriate state in 'dfa', create the new one. */
new_state = create_cd_newstate (dfa, nodes, context, hash);
- if (BE (new_state == NULL, 0))
+ if (__glibc_unlikely (new_state == NULL))
*err = REG_ESPACE;
return new_state;
@@ -1572,7 +1578,7 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
newstate->hash = hash;
err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return REG_ESPACE;
for (i = 0; i < newstate->nodes.nelem; i++)
{
@@ -1583,12 +1589,12 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
}
spot = dfa->state_table + (hash & dfa->state_hash_mask);
- if (BE (spot->alloc <= spot->num, 0))
+ if (__glibc_unlikely (spot->alloc <= spot->num))
{
Idx new_alloc = 2 * spot->num + 2;
re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *,
new_alloc);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
spot->array = new_array;
spot->alloc = new_alloc;
@@ -1626,10 +1632,10 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
re_dfastate_t *newstate;
newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
- if (BE (newstate == NULL, 0))
+ if (__glibc_unlikely (newstate == NULL))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_free (newstate);
return NULL;
@@ -1655,7 +1661,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
newstate->has_constraint = 1;
}
err = register_state (dfa, newstate, hash);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
free_state (newstate);
newstate = NULL;
@@ -1676,10 +1682,10 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
re_dfastate_t *newstate;
newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
- if (BE (newstate == NULL, 0))
+ if (__glibc_unlikely (newstate == NULL))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_free (newstate);
return NULL;
@@ -1711,7 +1717,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
if (newstate->entrance_nodes == &newstate->nodes)
{
newstate->entrance_nodes = re_malloc (re_node_set, 1);
- if (BE (newstate->entrance_nodes == NULL, 0))
+ if (__glibc_unlikely (newstate->entrance_nodes == NULL))
{
free_state (newstate);
return NULL;
@@ -1731,7 +1737,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
}
}
err = register_state (dfa, newstate, hash);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
free_state (newstate);
newstate = NULL;
diff --git a/gl/lib/regex_internal.h b/gl/lib/regex_internal.h
index 7bbe802b..a3aedda8 100644
--- a/gl/lib/regex_internal.h
+++ b/gl/lib/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -33,23 +33,7 @@
#include <stdbool.h>
#include <stdint.h>
-/* Properties of integers. Although Gnulib has intprops.h, glibc does
- without for now. */
-#ifndef _LIBC
-# include "intprops.h"
-#else
-/* True if the real type T is signed. */
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
-/* True if adding the nonnegative Idx values A and B would overflow.
- If false, set *R to A + B. A, B, and R may be evaluated more than
- once, or zero times. Although this is not a full implementation of
- Gnulib INT_ADD_WRAPV, it is good enough for glibc regex code.
- FIXME: This implementation is a fragile stopgap, and this file would
- be simpler and more robust if intprops.h were migrated into glibc. */
-# define INT_ADD_WRAPV(a, b, r) \
- (IDX_MAX - (a) < (b) ? true : (*(r) = (a) + (b), false))
-#endif
+#include <intprops.h>
#ifdef _LIBC
# include <libc-lock.h>
@@ -132,8 +116,6 @@
# define RE_ENABLE_I18N
#endif
-#define BE(expr, val) __builtin_expect (expr, val)
-
/* Number of ASCII characters. */
#define ASCII_CHARS 0x80
@@ -149,7 +131,10 @@
/* Rename to standard API for using out of glibc. */
#ifndef _LIBC
# undef __wctype
+# undef __iswalnum
# undef __iswctype
+# undef __towlower
+# undef __towupper
# define __wctype wctype
# define __iswalnum iswalnum
# define __iswctype iswctype
@@ -159,13 +144,8 @@
# define __mbrtowc mbrtowc
# define __wcrtomb wcrtomb
# define __regfree regfree
-# define attribute_hidden
#endif /* not _LIBC */
-#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
-# define __attribute__(arg)
-#endif
-
#ifndef SSIZE_MAX
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
@@ -883,23 +863,6 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
}
#endif /* RE_ENABLE_I18N */
-#ifndef __GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_MINOR__
-# define __GNUC_PREREQ(maj, min) \
- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-# else
-# define __GNUC_PREREQ(maj, min) 0
-# endif
-#endif
-
-#if __GNUC_PREREQ (3,4)
-# undef __attribute_warn_unused_result__
-# define __attribute_warn_unused_result__ \
- __attribute__ ((__warn_unused_result__))
-#else
-# define __attribute_warn_unused_result__ /* empty */
-#endif
-
#ifndef FALLTHROUGH
# if __GNUC__ < 7
# define FALLTHROUGH ((void) 0)
diff --git a/gl/lib/regexec.c b/gl/lib/regexec.c
index 65913111..21cf7915 100644
--- a/gl/lib/regexec.c
+++ b/gl/lib/regexec.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -189,7 +189,7 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len);
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
+regexec (const regex_t *__restrict preg, const char *__restrict string,
size_t nmatch, regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
@@ -232,8 +232,8 @@ __typeof__ (__regexec) __compat_regexec;
int
attribute_compat_text_section
-__compat_regexec (const regex_t *_Restrict_ preg,
- const char *_Restrict_ string, size_t nmatch,
+__compat_regexec (const regex_t *__restrict preg,
+ const char *__restrict string, size_t nmatch,
regmatch_t pmatch[], int eflags)
{
return regexec (preg, string, nmatch, pmatch,
@@ -328,9 +328,8 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
Idx len;
char *s = NULL;
- if (BE ((length1 < 0 || length2 < 0 || stop < 0
- || INT_ADD_WRAPV (length1, length2, &len)),
- 0))
+ if (__glibc_unlikely ((length1 < 0 || length2 < 0 || stop < 0
+ || INT_ADD_WRAPV (length1, length2, &len))))
return -2;
/* Concatenate the strings. */
@@ -339,7 +338,7 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
{
s = re_malloc (char, len);
- if (BE (s == NULL, 0))
+ if (__glibc_unlikely (s == NULL))
return -2;
#ifdef _LIBC
memcpy (__mempcpy (s, string1, length1), string2, length2);
@@ -379,11 +378,13 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
Idx last_start = start + range;
/* Check for out-of-range. */
- if (BE (start < 0 || start > length, 0))
+ if (__glibc_unlikely (start < 0 || start > length))
return -1;
- if (BE (length < last_start || (0 <= range && last_start < start), 0))
+ if (__glibc_unlikely (length < last_start
+ || (0 <= range && last_start < start)))
last_start = length;
- else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
+ else if (__glibc_unlikely (last_start < 0
+ || (range < 0 && start <= last_start)))
last_start = 0;
lock_lock (dfa->lock);
@@ -395,17 +396,17 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate)
re_compile_fastmap (bufp);
- if (BE (bufp->no_sub, 0))
+ if (__glibc_unlikely (bufp->no_sub))
regs = NULL;
/* We need at least 1 register. */
if (regs == NULL)
nregs = 1;
- else if (BE (bufp->regs_allocated == REGS_FIXED
- && regs->num_regs <= bufp->re_nsub, 0))
+ else if (__glibc_unlikely (bufp->regs_allocated == REGS_FIXED
+ && regs->num_regs <= bufp->re_nsub))
{
nregs = regs->num_regs;
- if (BE (nregs < 1, 0))
+ if (__glibc_unlikely (nregs < 1))
{
/* Nothing can be copied to regs. */
regs = NULL;
@@ -415,7 +416,7 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
else
nregs = bufp->re_nsub + 1;
pmatch = re_malloc (regmatch_t, nregs);
- if (BE (pmatch == NULL, 0))
+ if (__glibc_unlikely (pmatch == NULL))
{
rval = -2;
goto out;
@@ -434,11 +435,11 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
/* If caller wants register contents data back, copy them. */
bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs,
bufp->regs_allocated);
- if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0))
+ if (__glibc_unlikely (bufp->regs_allocated == REGS_UNALLOCATED))
rval = -2;
}
- if (BE (rval == 0, 1))
+ if (__glibc_likely (rval == 0))
{
if (ret_len)
{
@@ -468,10 +469,10 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
if (regs_allocated == REGS_UNALLOCATED)
{ /* No. So allocate them with malloc. */
regs->start = re_malloc (regoff_t, need_regs);
- if (BE (regs->start == NULL, 0))
+ if (__glibc_unlikely (regs->start == NULL))
return REGS_UNALLOCATED;
regs->end = re_malloc (regoff_t, need_regs);
- if (BE (regs->end == NULL, 0))
+ if (__glibc_unlikely (regs->end == NULL))
{
re_free (regs->start);
return REGS_UNALLOCATED;
@@ -482,14 +483,14 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
{ /* Yes. If we need more elements than were already
allocated, reallocate them. If we need fewer, just
leave it alone. */
- if (BE (need_regs > regs->num_regs, 0))
+ if (__glibc_unlikely (need_regs > regs->num_regs))
{
regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs);
regoff_t *new_end;
- if (BE (new_start == NULL, 0))
+ if (__glibc_unlikely (new_start == NULL))
return REGS_UNALLOCATED;
new_end = re_realloc (regs->end, regoff_t, need_regs);
- if (BE (new_end == NULL, 0))
+ if (__glibc_unlikely (new_end == NULL))
{
re_free (new_start);
return REGS_UNALLOCATED;
@@ -615,9 +616,10 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
nmatch -= extra_nmatch;
/* Check if the DFA haven't been compiled. */
- if (BE (preg->used == 0 || dfa->init_state == NULL
- || dfa->init_state_word == NULL || dfa->init_state_nl == NULL
- || dfa->init_state_begbuf == NULL, 0))
+ if (__glibc_unlikely (preg->used == 0 || dfa->init_state == NULL
+ || dfa->init_state_word == NULL
+ || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL))
return REG_NOMATCH;
#ifdef DEBUG
@@ -644,14 +646,14 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
preg->translate, (preg->syntax & RE_ICASE) != 0,
dfa);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
mctx.input.stop = stop;
mctx.input.raw_stop = stop;
mctx.input.newline_anchor = preg->newline_anchor;
err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
/* We will log all the DFA states through which the dfa pass,
@@ -661,15 +663,15 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
if (nmatch > 1 || dfa->has_mb_node)
{
/* Avoid overflow. */
- if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
- <= mctx.input.bufs_len), 0))
+ if (__glibc_unlikely ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+ <= mctx.input.bufs_len)))
{
err = REG_ESPACE;
goto free_return;
}
mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1);
- if (BE (mctx.state_log == NULL, 0))
+ if (__glibc_unlikely (mctx.state_log == NULL))
{
err = REG_ESPACE;
goto free_return;
@@ -713,19 +715,19 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
case 7:
/* Fastmap with single-byte translation, match forward. */
- while (BE (match_first < right_lim, 1)
+ while (__glibc_likely (match_first < right_lim)
&& !fastmap[t[(unsigned char) string[match_first]]])
++match_first;
goto forward_match_found_start_or_reached_end;
case 6:
/* Fastmap without translation, match forward. */
- while (BE (match_first < right_lim, 1)
+ while (__glibc_likely (match_first < right_lim)
&& !fastmap[(unsigned char) string[match_first]])
++match_first;
forward_match_found_start_or_reached_end:
- if (BE (match_first == right_lim, 0))
+ if (__glibc_unlikely (match_first == right_lim))
{
ch = match_first >= length
? 0 : (unsigned char) string[match_first];
@@ -758,11 +760,12 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
/* If MATCH_FIRST is out of the valid range, reconstruct the
buffers. */
__re_size_t offset = match_first - mctx.input.raw_mbs_idx;
- if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0))
+ if (__glibc_unlikely (offset
+ >= (__re_size_t) mctx.input.valid_raw_len))
{
err = re_string_reconstruct (&mctx.input, match_first,
eflags);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
offset = match_first - mctx.input.raw_mbs_idx;
@@ -786,7 +789,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
/* Reconstruct the buffers so that the matcher can assume that
the matching starts from the beginning of the buffer. */
err = re_string_reconstruct (&mctx.input, match_first, eflags);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
#ifdef RE_ENABLE_I18N
@@ -803,7 +806,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
start <= last_start ? &match_first : NULL);
if (match_last != -1)
{
- if (BE (match_last == -2, 0))
+ if (__glibc_unlikely (match_last == -2))
{
err = REG_ESPACE;
goto free_return;
@@ -823,7 +826,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
err = prune_impossible_nodes (&mctx);
if (err == REG_NOERROR)
break;
- if (BE (err != REG_NOMATCH, 0))
+ if (__glibc_unlikely (err != REG_NOMATCH))
goto free_return;
match_last = -1;
}
@@ -860,7 +863,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
{
err = set_regs (preg, &mctx, nmatch, pmatch,
dfa->has_plural_match && dfa->nbackref > 0);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
@@ -871,7 +874,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
if (pmatch[reg_idx].rm_so != -1)
{
#ifdef RE_ENABLE_I18N
- if (BE (mctx.input.offsets_needed != 0, 0))
+ if (__glibc_unlikely (mctx.input.offsets_needed != 0))
{
pmatch[reg_idx].rm_so =
(pmatch[reg_idx].rm_so == mctx.input.valid_len
@@ -930,11 +933,12 @@ prune_impossible_nodes (re_match_context_t *mctx)
halt_node = mctx->last_node;
/* Avoid overflow. */
- if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+ <= match_last))
return REG_ESPACE;
sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
- if (BE (sifted_states == NULL, 0))
+ if (__glibc_unlikely (sifted_states == NULL))
{
ret = REG_ESPACE;
goto free_return;
@@ -942,7 +946,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
if (dfa->nbackref)
{
lim_states = re_malloc (re_dfastate_t *, match_last + 1);
- if (BE (lim_states == NULL, 0))
+ if (__glibc_unlikely (lim_states == NULL))
{
ret = REG_ESPACE;
goto free_return;
@@ -955,7 +959,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
match_last);
ret = sift_states_backward (mctx, &sctx);
re_node_set_free (&sctx.limits);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
goto free_return;
if (sifted_states[0] != NULL || lim_states[0] != NULL)
break;
@@ -977,7 +981,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
match_last + 1);
re_free (lim_states);
lim_states = NULL;
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
goto free_return;
}
else
@@ -985,7 +989,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
ret = sift_states_backward (mctx, &sctx);
re_node_set_free (&sctx.limits);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
goto free_return;
if (sifted_states[0] == NULL)
{
@@ -1068,7 +1072,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
err = REG_NOERROR;
cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
/* An initial state must not be NULL (invalid). */
- if (BE (cur_state == NULL, 0))
+ if (__glibc_unlikely (cur_state == NULL))
{
assert (err == REG_ESPACE);
return -2;
@@ -1080,24 +1084,24 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
/* Check OP_OPEN_SUBEXP in the initial state in case that we use them
later. E.g. Processing back references. */
- if (BE (dfa->nbackref, 0))
+ if (__glibc_unlikely (dfa->nbackref))
{
at_init_state = false;
err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (cur_state->has_backref)
{
err = transit_state_bkref (mctx, &cur_state->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
}
/* If the RE accepts NULL string. */
- if (BE (cur_state->halt, 0))
+ if (__glibc_unlikely (cur_state->halt))
{
if (!cur_state->has_constraint
|| check_halt_state_context (mctx, cur_state, cur_str_idx))
@@ -1117,13 +1121,13 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
re_dfastate_t *old_state = cur_state;
Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
- if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
+ if ((__glibc_unlikely (next_char_idx >= mctx->input.bufs_len)
&& mctx->input.bufs_len < mctx->input.len)
- || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ || (__glibc_unlikely (next_char_idx >= mctx->input.valid_len)
&& mctx->input.valid_len < mctx->input.len))
{
err = extend_buffers (mctx, next_char_idx + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
assert (err == REG_ESPACE);
return -2;
@@ -1139,7 +1143,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
/* Reached the invalid state or an error. Try to recover a valid
state using the state log, if available and if we have not
already found a valid (even if not the longest) match. */
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return -2;
if (mctx->state_log == NULL
@@ -1148,7 +1152,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
break;
}
- if (BE (at_init_state, 0))
+ if (__glibc_unlikely (at_init_state))
{
if (old_state == cur_state)
next_start_idx = next_char_idx;
@@ -1237,7 +1241,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
re_node_set *edests = &dfa->edests[node];
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return -2;
/* Pick up a valid destination, or return -1 if none
is found. */
@@ -1299,7 +1303,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
{
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return -2;
dest_node = dfa->edests[node].elems[0];
if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
@@ -1449,9 +1453,9 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
&eps_via_nodes, fs);
- if (BE (cur_node < 0, 0))
+ if (__glibc_unlikely (cur_node < 0))
{
- if (BE (cur_node == -2, 0))
+ if (__glibc_unlikely (cur_node == -2))
{
re_node_set_free (&eps_via_nodes);
if (prev_idx_match_malloced)
@@ -1579,10 +1583,10 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
/* Build sifted state_log[str_idx]. It has the nodes which can epsilon
transit to the last_node and the last_node itself. */
err = re_node_set_init_1 (&cur_dest, sctx->last_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
/* Then check each states in the state_log. */
@@ -1603,7 +1607,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
if (mctx->state_log[str_idx])
{
err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
@@ -1612,7 +1616,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
- It is in CUR_SRC.
And update state_log. */
err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
err = REG_NOERROR;
@@ -1674,7 +1678,7 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
continue;
}
ok = re_node_set_insert (cur_dest, prev_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
@@ -1695,7 +1699,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
{
reg_errcode_t err;
err = extend_buffers (mctx, next_state_log_idx + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -1723,11 +1727,11 @@ merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
re_node_set merged_set;
err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
&src[st_idx]->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
re_node_set_free (&merged_set);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
@@ -1754,7 +1758,7 @@ update_cur_sifted_state (const re_match_context_t *mctx,
/* At first, add the nodes which can epsilon transit to a node in
DEST_NODE. */
err = add_epsilon_src_nodes (dfa, dest_nodes, candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* Then, check the limitations in the current sift_context. */
@@ -1762,20 +1766,20 @@ update_cur_sifted_state (const re_match_context_t *mctx,
{
err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
mctx->bkref_ents, str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
if (candidates && mctx->state_log[str_idx]->has_backref)
{
err = sift_states_bkref (mctx, sctx, str_idx, candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
return REG_NOERROR;
@@ -1790,19 +1794,19 @@ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
Idx i;
re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (!state->inveclosure.alloc)
{
err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return REG_ESPACE;
for (i = 0; i < dest_nodes->nelem; i++)
{
err = re_node_set_merge (&state->inveclosure,
dfa->inveclosures + dest_nodes->elems[i]);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return REG_ESPACE;
}
}
@@ -1837,7 +1841,7 @@ sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
{
err = re_node_set_add_intersect (&except_nodes, candidates,
dfa->inveclosures + cur_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&except_nodes);
return err;
@@ -2043,7 +2047,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
{
err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -2061,7 +2065,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
Remove it form the current sifted state. */
err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
--node_idx;
}
@@ -2081,7 +2085,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
Remove it form the current sifted state. */
err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
@@ -2147,27 +2151,27 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
{
local_sctx = *sctx;
err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
local_sctx.last_node = node;
local_sctx.last_str_idx = str_idx;
ok = re_node_set_insert (&local_sctx.limits, enabled_idx);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
{
err = REG_ESPACE;
goto free_return;
}
cur_state = local_sctx.sifted_states[str_idx];
err = sift_states_backward (mctx, &local_sctx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
if (sctx->limited_states != NULL)
{
err = merge_state_array (dfa, sctx->limited_states,
local_sctx.sifted_states,
str_idx + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
local_sctx.sifted_states[str_idx] = cur_state;
@@ -2229,10 +2233,10 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
#ifdef RE_ENABLE_I18N
/* If the current state can accept multibyte. */
- if (BE (state->accept_mb, 0))
+ if (__glibc_unlikely (state->accept_mb))
{
*err = transit_state_mb (mctx, state);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
}
#endif /* RE_ENABLE_I18N */
@@ -2249,11 +2253,11 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
for (;;)
{
trtable = state->trtable;
- if (BE (trtable != NULL, 1))
+ if (__glibc_likely (trtable != NULL))
return trtable[ch];
trtable = state->word_trtable;
- if (BE (trtable != NULL, 1))
+ if (__glibc_likely (trtable != NULL))
{
unsigned int context;
context
@@ -2309,7 +2313,7 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
table_nodes = next_state->entrance_nodes;
*err = re_node_set_init_union (&next_nodes, table_nodes,
log_nodes);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
}
else
@@ -2329,21 +2333,21 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
re_node_set_free (&next_nodes);
}
- if (BE (dfa->nbackref, 0) && next_state != NULL)
+ if (__glibc_unlikely (dfa->nbackref) && next_state != NULL)
{
/* Check OP_OPEN_SUBEXP in the current state in case that we use them
later. We must check them here, since the back references in the
next state might use them. */
*err = check_subexp_matching_top (mctx, &next_state->nodes,
cur_idx);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
/* If the next state has back references. */
if (next_state->has_backref)
{
*err = transit_state_bkref (mctx, &next_state->nodes);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
next_state = mctx->state_log[cur_idx];
}
@@ -2407,7 +2411,7 @@ check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
& ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
{
err = match_ctx_add_subtop (mctx, node, str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
@@ -2429,7 +2433,7 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
unsigned int context;
*err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
{
@@ -2438,7 +2442,7 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
{
*err = re_node_set_merge (&next_nodes,
dfa->eclosures + dfa->nexts[cur_node]);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return NULL;
@@ -2497,7 +2501,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
: mctx->max_mb_elem_len);
err = clean_state_log_if_needed (mctx, dest_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
#ifdef DEBUG
assert (dfa->nexts[cur_node_idx] != -1);
@@ -2511,7 +2515,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
{
err = re_node_set_init_union (&dest_nodes,
dest_state->entrance_nodes, new_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
context = re_string_context_at (&mctx->input, dest_idx - 1,
@@ -2520,7 +2524,8 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
= re_acquire_state_context (&err, dfa, &dest_nodes, context);
if (dest_state != NULL)
re_node_set_free (&dest_nodes);
- if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[dest_idx] == NULL
+ && err != REG_NOERROR))
return err;
}
return REG_NOERROR;
@@ -2559,7 +2564,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
Check the substring which the substring matched. */
bkc_idx = mctx->nbkref_ents;
err = get_subexp (mctx, node_idx, cur_str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
/* And add the epsilon closures (which is 'new_dest_nodes') of
@@ -2592,8 +2597,8 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
mctx->state_log[dest_str_idx]
= re_acquire_state_context (&err, dfa, new_dest_nodes,
context);
- if (BE (mctx->state_log[dest_str_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR))
goto free_return;
}
else
@@ -2602,7 +2607,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
err = re_node_set_init_union (&dest_nodes,
dest_state->entrance_nodes,
new_dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&dest_nodes);
goto free_return;
@@ -2610,8 +2615,8 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
mctx->state_log[dest_str_idx]
= re_acquire_state_context (&err, dfa, &dest_nodes, context);
re_node_set_free (&dest_nodes);
- if (BE (mctx->state_log[dest_str_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR))
goto free_return;
}
/* We need to check recursively if the backreference can epsilon
@@ -2621,10 +2626,10 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
{
err = check_subexp_matching_top (mctx, new_dest_nodes,
cur_str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
err = transit_state_bkref (mctx, new_dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
}
@@ -2685,7 +2690,8 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
at the back reference? */
if (sl_str_diff > 0)
{
- if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0))
+ if (__glibc_unlikely (bkref_str_off + sl_str_diff
+ > mctx->input.valid_len))
{
/* Not enough chars for a successful match. */
if (bkref_str_off + sl_str_diff > mctx->input.len)
@@ -2694,7 +2700,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
err = clean_state_log_if_needed (mctx,
bkref_str_off
+ sl_str_diff);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
buf = (const char *) re_string_get_buffer (&mctx->input);
}
@@ -2713,7 +2719,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
if (err == REG_NOMATCH)
continue;
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -2732,14 +2738,14 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
at the back reference? */
if (sl_str_off > 0)
{
- if (BE (bkref_str_off >= mctx->input.valid_len, 0))
+ if (__glibc_unlikely (bkref_str_off >= mctx->input.valid_len))
{
/* If we are at the end of the input, we cannot match. */
if (bkref_str_off >= mctx->input.len)
break;
err = extend_buffers (mctx, bkref_str_off + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
buf = (const char *) re_string_get_buffer (&mctx->input);
@@ -2770,15 +2776,18 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
OP_CLOSE_SUBEXP);
if (err == REG_NOMATCH)
continue;
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str);
- if (BE (sub_last == NULL, 0))
+ if (__glibc_unlikely (sub_last == NULL))
return REG_ESPACE;
err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
bkref_str_idx);
+ buf = (const char *) re_string_get_buffer (&mctx->input);
if (err == REG_NOMATCH)
continue;
+ if (__glibc_unlikely (err != REG_NOERROR))
+ return err;
}
}
return REG_NOERROR;
@@ -2804,7 +2813,7 @@ get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
return err;
err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx,
sub_last->str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx;
return clean_state_log_if_needed (mctx, to_idx);
@@ -2854,19 +2863,19 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
subexp_num = dfa->nodes[top_node].opr.idx;
/* Extend the buffer if we need. */
- if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
+ if (__glibc_unlikely (path->alloc < last_str + mctx->max_mb_elem_len + 1))
{
re_dfastate_t **new_array;
Idx old_alloc = path->alloc;
Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1;
Idx new_alloc;
- if (BE (IDX_MAX - old_alloc < incr_alloc, 0))
+ if (__glibc_unlikely (IDX_MAX - old_alloc < incr_alloc))
return REG_ESPACE;
new_alloc = old_alloc + incr_alloc;
- if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+ if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc))
return REG_ESPACE;
new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
path->array = new_array;
path->alloc = new_alloc;
@@ -2887,10 +2896,10 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
if (str_idx == top_str)
{
err = re_node_set_init_1 (&next_nodes, top_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2902,7 +2911,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
if (cur_state && cur_state->has_backref)
{
err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
else
@@ -2914,14 +2923,14 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
{
err = expand_bkref_cache (mctx, &next_nodes, str_idx,
subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
}
}
cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
- if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (cur_state == NULL && err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2936,7 +2945,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
{
err = re_node_set_merge (&next_nodes,
&mctx->state_log[str_idx + 1]->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2947,7 +2956,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
err = check_arrival_add_next_nodes (mctx, str_idx,
&cur_state->non_eps_nodes,
&next_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2957,14 +2966,14 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
if (next_nodes.nelem)
{
err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
}
err = expand_bkref_cache (mctx, &next_nodes, str_idx,
subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2972,7 +2981,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
}
context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
- if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (cur_state == NULL && err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -3041,22 +3050,22 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
if (dest_state)
{
err = re_node_set_merge (&union_set, &dest_state->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&union_set);
return err;
}
}
ok = re_node_set_insert (&union_set, next_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
{
re_node_set_free (&union_set);
return REG_ESPACE;
}
mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
&union_set);
- if (BE (mctx->state_log[next_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[next_idx] == NULL
+ && err != REG_NOERROR))
{
re_node_set_free (&union_set);
return err;
@@ -3068,7 +3077,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
|| check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
{
ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
{
re_node_set_free (&union_set);
return REG_ESPACE;
@@ -3096,7 +3105,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
assert (cur_nodes->nelem);
#endif
err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* Create a new node set NEW_NODES with the nodes which are epsilon
closures of the node in CUR_NODES. */
@@ -3110,7 +3119,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
{
/* There are no problematic nodes, just merge them. */
err = re_node_set_merge (&new_nodes, eclosure);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&new_nodes);
return err;
@@ -3121,7 +3130,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
/* There are problematic nodes, re-calculate incrementally. */
err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node,
ex_subexp, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&new_nodes);
return err;
@@ -3153,13 +3162,13 @@ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
if (type == OP_CLOSE_SUBEXP)
{
ok = re_node_set_insert (dst_nodes, cur_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
break;
}
ok = re_node_set_insert (dst_nodes, cur_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
if (dfa->edests[cur_node].nelem == 0)
break;
@@ -3169,7 +3178,7 @@ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
dfa->edests[cur_node].elems[1],
ex_subexp, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
cur_node = dfa->edests[cur_node].elems[0];
@@ -3221,8 +3230,8 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type);
err3 = re_node_set_merge (cur_nodes, &new_dests);
re_node_set_free (&new_dests);
- if (BE (err != REG_NOERROR || err2 != REG_NOERROR
- || err3 != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR || err2 != REG_NOERROR
+ || err3 != REG_NOERROR))
{
err = (err != REG_NOERROR ? err
: (err2 != REG_NOERROR ? err2 : err3));
@@ -3244,7 +3253,7 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
err = re_node_set_init_copy (&union_set,
&mctx->state_log[to_idx]->nodes);
ok = re_node_set_insert (&union_set, next_node);
- if (BE (err != REG_NOERROR || ! ok, 0))
+ if (__glibc_unlikely (err != REG_NOERROR || ! ok))
{
re_node_set_free (&union_set);
err = err != REG_NOERROR ? err : REG_ESPACE;
@@ -3254,13 +3263,13 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
else
{
err = re_node_set_init_1 (&union_set, next_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
re_node_set_free (&union_set);
- if (BE (mctx->state_log[to_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[to_idx] == NULL
+ && err != REG_NOERROR))
return err;
}
}
@@ -3303,7 +3312,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
else
{
dests_alloc = re_malloc (struct dests_alloc, 1);
- if (BE (dests_alloc == NULL, 0))
+ if (__glibc_unlikely (dests_alloc == NULL))
return false;
dests_node_malloced = true;
}
@@ -3316,7 +3325,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
/* At first, group all nodes belonging to 'state' into several
destinations. */
ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
- if (BE (ndests <= 0, 0))
+ if (__glibc_unlikely (ndests <= 0))
{
if (dests_node_malloced)
re_free (dests_alloc);
@@ -3325,7 +3334,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
{
state->trtable = (re_dfastate_t **)
calloc (sizeof (re_dfastate_t *), SBC_MAX);
- if (BE (state->trtable == NULL, 0))
+ if (__glibc_unlikely (state->trtable == NULL))
return false;
return true;
}
@@ -3333,14 +3342,14 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
}
err = re_node_set_alloc (&follows, ndests + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto out_free;
/* Avoid arithmetic overflow in size calculation. */
- if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
- / (3 * sizeof (re_dfastate_t *)))
- < ndests),
- 0))
+ size_t ndests_max
+ = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
+ / (3 * sizeof (re_dfastate_t *)));
+ if (__glibc_unlikely (ndests_max < ndests))
goto out_free;
if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
@@ -3350,7 +3359,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
else
{
dest_states = re_malloc (re_dfastate_t *, ndests * 3);
- if (BE (dest_states == NULL, 0))
+ if (__glibc_unlikely (dest_states == NULL))
{
out_free:
if (dest_states_malloced)
@@ -3380,12 +3389,12 @@ out_free:
if (next_node != -1)
{
err = re_node_set_merge (&follows, dfa->eclosures + next_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto out_free;
}
}
dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0);
- if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (dest_states[i] == NULL && err != REG_NOERROR))
goto out_free;
/* If the new state has context constraint,
build appropriate states for these contexts. */
@@ -3393,7 +3402,8 @@ out_free:
{
dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows,
CONTEXT_WORD);
- if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (dest_states_word[i] == NULL
+ && err != REG_NOERROR))
goto out_free;
if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
@@ -3401,7 +3411,7 @@ out_free:
dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
CONTEXT_NEWLINE);
- if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (dest_states_nl[i] == NULL && err != REG_NOERROR))
goto out_free;
}
else
@@ -3412,7 +3422,7 @@ out_free:
bitset_merge (acceptable, dests_ch[i]);
}
- if (!BE (need_word_trtable, 0))
+ if (!__glibc_unlikely (need_word_trtable))
{
/* We don't care about whether the following character is a word
character, or we are in a single-byte character set so we can
@@ -3420,7 +3430,7 @@ out_free:
256-entry transition table. */
trtable = state->trtable =
(re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
- if (BE (trtable == NULL, 0))
+ if (__glibc_unlikely (trtable == NULL))
goto out_free;
/* For all characters ch...: */
@@ -3428,7 +3438,7 @@ out_free:
for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
elem;
mask <<= 1, elem >>= 1, ++ch)
- if (BE (elem & 1, 0))
+ if (__glibc_unlikely (elem & 1))
{
/* There must be exactly one destination which accepts
character ch. See group_nodes_into_DFAstates. */
@@ -3451,7 +3461,7 @@ out_free:
starting at trtable[SBC_MAX]. */
trtable = state->word_trtable =
(re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX);
- if (BE (trtable == NULL, 0))
+ if (__glibc_unlikely (trtable == NULL))
goto out_free;
/* For all characters ch...: */
@@ -3459,7 +3469,7 @@ out_free:
for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
elem;
mask <<= 1, elem >>= 1, ++ch)
- if (BE (elem & 1, 0))
+ if (__glibc_unlikely (elem & 1))
{
/* There must be exactly one destination which accepts
character ch. See group_nodes_into_DFAstates. */
@@ -3658,14 +3668,14 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
bitset_copy (dests_ch[ndests], remains);
bitset_copy (dests_ch[j], intersec);
err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto error_return;
++ndests;
}
/* Put the position in the current group. */
ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
goto error_return;
/* If all characters are consumed, go to next node. */
@@ -3677,7 +3687,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
{
bitset_copy (dests_ch[ndests], accepts);
err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto error_return;
++ndests;
bitset_empty (accepts);
@@ -3711,10 +3721,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
int char_len, elem_len;
Idx i;
- if (BE (node->type == OP_UTF8_PERIOD, 0))
+ if (__glibc_unlikely (node->type == OP_UTF8_PERIOD))
{
unsigned char c = re_string_byte_at (input, str_idx), d;
- if (BE (c < 0xc2, 1))
+ if (__glibc_likely (c < 0xc2))
return 0;
if (str_idx + 2 > input->len)
@@ -4049,15 +4059,15 @@ extend_buffers (re_match_context_t *mctx, int min_len)
re_string_t *pstr = &mctx->input;
/* Avoid overflow. */
- if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
- <= pstr->bufs_len, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
+ <= pstr->bufs_len))
return REG_ESPACE;
/* Double the lengths of the buffers, but allocate at least MIN_LEN. */
ret = re_string_realloc_buffers (pstr,
MAX (min_len,
MIN (pstr->len, pstr->bufs_len * 2)));
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
if (mctx->state_log != NULL)
@@ -4068,7 +4078,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
does not have the right size. */
re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *,
pstr->bufs_len + 1);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
mctx->state_log = new_array;
}
@@ -4080,7 +4090,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
if (pstr->mb_cur_max > 1)
{
ret = build_wcs_upper_buffer (pstr);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
else
@@ -4119,12 +4129,12 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
size_t max_object_size =
MAX (sizeof (struct re_backref_cache_entry),
sizeof (re_sub_match_top_t *));
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n))
return REG_ESPACE;
mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
mctx->sub_tops = re_malloc (re_sub_match_top_t *, n);
- if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0))
+ if (__glibc_unlikely (mctx->bkref_ents == NULL || mctx->sub_tops == NULL))
return REG_ESPACE;
}
/* Already zero-ed by the caller.
@@ -4195,7 +4205,7 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
struct re_backref_cache_entry* new_entry;
new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry,
mctx->abkref_ents * 2);
- if (BE (new_entry == NULL, 0))
+ if (__glibc_unlikely (new_entry == NULL))
{
re_free (mctx->bkref_ents);
return REG_ESPACE;
@@ -4264,19 +4274,19 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
assert (mctx->sub_tops != NULL);
assert (mctx->asub_tops > 0);
#endif
- if (BE (mctx->nsub_tops == mctx->asub_tops, 0))
+ if (__glibc_unlikely (mctx->nsub_tops == mctx->asub_tops))
{
Idx new_asub_tops = mctx->asub_tops * 2;
re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops,
re_sub_match_top_t *,
new_asub_tops);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
mctx->sub_tops = new_array;
mctx->asub_tops = new_asub_tops;
}
mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t));
- if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0))
+ if (__glibc_unlikely (mctx->sub_tops[mctx->nsub_tops] == NULL))
return REG_ESPACE;
mctx->sub_tops[mctx->nsub_tops]->node = node;
mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;
@@ -4290,19 +4300,19 @@ static re_sub_match_last_t *
match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
{
re_sub_match_last_t *new_entry;
- if (BE (subtop->nlasts == subtop->alasts, 0))
+ if (__glibc_unlikely (subtop->nlasts == subtop->alasts))
{
Idx new_alasts = 2 * subtop->alasts + 1;
re_sub_match_last_t **new_array = re_realloc (subtop->lasts,
re_sub_match_last_t *,
new_alasts);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return NULL;
subtop->lasts = new_array;
subtop->alasts = new_alasts;
}
new_entry = calloc (1, sizeof (re_sub_match_last_t));
- if (BE (new_entry != NULL, 1))
+ if (__glibc_likely (new_entry != NULL))
{
subtop->lasts[subtop->nlasts] = new_entry;
new_entry->node = node;
diff --git a/gl/lib/rename.c b/gl/lib/rename.c
index 0b457aa3..9d88e5c6 100644
--- a/gl/lib/rename.c
+++ b/gl/lib/rename.c
@@ -1,6 +1,6 @@
/* Work around rename bugs in some systems.
- Copyright (C) 2001-2003, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/rewinddir.c b/gl/lib/rewinddir.c
index 881aa5e1..b58a47d5 100644
--- a/gl/lib/rewinddir.c
+++ b/gl/lib/rewinddir.c
@@ -1,5 +1,5 @@
/* Restart reading the entries of a directory from the beginning.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/rmdir.c b/gl/lib/rmdir.c
index 7dc7aec9..1d088222 100644
--- a/gl/lib/rmdir.c
+++ b/gl/lib/rmdir.c
@@ -1,6 +1,6 @@
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2018 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/same-inode.h b/gl/lib/same-inode.h
index 68377954..06655b6b 100644
--- a/gl/lib/same-inode.h
+++ b/gl/lib/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/same.c b/gl/lib/same.c
index 37420172..39b63983 100644
--- a/gl/lib/same.c
+++ b/gl/lib/same.c
@@ -1,6 +1,6 @@
/* Determine whether two file names refer to the same file.
- Copyright (C) 1997-2000, 2002-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2000, 2002-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/same.h b/gl/lib/same.h
index 859c18eb..afb4e8c5 100644
--- a/gl/lib/same.h
+++ b/gl/lib/same.h
@@ -1,6 +1,6 @@
/* Determine whether two file names refer to the same file.
- Copyright (C) 1997-2000, 2003-2004, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2000, 2003-2004, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/save-cwd.c b/gl/lib/save-cwd.c
index 1de4fb36..a67d95d1 100644
--- a/gl/lib/save-cwd.c
+++ b/gl/lib/save-cwd.c
@@ -1,6 +1,6 @@
/* save-cwd.c -- Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2018 Free Software
+ Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/save-cwd.h b/gl/lib/save-cwd.h
index a521f7f5..6a780703 100644
--- a/gl/lib/save-cwd.h
+++ b/gl/lib/save-cwd.h
@@ -1,6 +1,6 @@
/* Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003, 2009-2018 Free Software Foundation,
+ Copyright (C) 1995, 1997-1998, 2003, 2009-2019 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/scratch_buffer.h b/gl/lib/scratch_buffer.h
index 52f0ed63..4c0db3e5 100644
--- a/gl/lib/scratch_buffer.h
+++ b/gl/lib/scratch_buffer.h
@@ -1,4 +1,11 @@
+#ifndef _GL_SCRATCH_BUFFER_H
+#define _GL_SCRATCH_BUFFER_H
+
+#include <libc-config.h>
+
#define __libc_scratch_buffer_grow gl_scratch_buffer_grow
#define __libc_scratch_buffer_grow_preserve gl_scratch_buffer_grow_preserve
#define __libc_scratch_buffer_set_array_size gl_scratch_buffer_set_array_size
#include <malloc/scratch_buffer.h>
+
+#endif /* _GL_SCRATCH_BUFFER_H */
diff --git a/gl/lib/select.c b/gl/lib/select.c
index ab278a42..ee2f0194 100644
--- a/gl/lib/select.c
+++ b/gl/lib/select.c
@@ -1,7 +1,7 @@
/* Emulation for select(2)
Contributed by Paolo Bonzini.
- Copyright 2008-2018 Free Software Foundation, Inc.
+ Copyright 2008-2019 Free Software Foundation, Inc.
This file is part of gnulib.
@@ -47,6 +47,10 @@
#undef select
+/* Avoid warnings from gcc -Wcast-function-type. */
+#define GetProcAddress \
+ (void *) GetProcAddress
+
struct bitset {
unsigned char in[FD_SETSIZE / CHAR_BIT];
unsigned char out[FD_SETSIZE / CHAR_BIT];
diff --git a/gl/lib/setenv.c b/gl/lib/setenv.c
index 439e1ffc..733b257c 100644
--- a/gl/lib/setenv.c
+++ b/gl/lib/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/sig-handler.h b/gl/lib/sig-handler.h
index 9ea33945..b289473d 100644
--- a/gl/lib/sig-handler.h
+++ b/gl/lib/sig-handler.h
@@ -1,6 +1,6 @@
/* Convenience declarations when working with <signal.h>.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sigaction.c b/gl/lib/sigaction.c
index 7e4af5fe..abedfdcd 100644
--- a/gl/lib/sigaction.c
+++ b/gl/lib/sigaction.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/signal.in.h b/gl/lib/signal.in.h
index 7d4927b8..a6960a25 100644
--- a/gl/lib/signal.in.h
+++ b/gl/lib/signal.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sigprocmask.c b/gl/lib/sigprocmask.c
index 7a49bcd1..d6cd3f82 100644
--- a/gl/lib/sigprocmask.c
+++ b/gl/lib/sigprocmask.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/size_max.h b/gl/lib/size_max.h
index 00500b5a..e265fb97 100644
--- a/gl/lib/size_max.h
+++ b/gl/lib/size_max.h
@@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/sleep.c b/gl/lib/sleep.c
index 8b753909..c5218e5f 100644
--- a/gl/lib/sleep.c
+++ b/gl/lib/sleep.c
@@ -1,5 +1,5 @@
/* Pausing execution of the current thread.
- Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/sockets.c b/gl/lib/sockets.c
index eec1ec80..834c2b85 100644
--- a/gl/lib/sockets.c
+++ b/gl/lib/sockets.c
@@ -1,6 +1,6 @@
/* sockets.c --- wrappers for Windows socket functions
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sockets.h b/gl/lib/sockets.h
index 5a833324..137e834a 100644
--- a/gl/lib/sockets.h
+++ b/gl/lib/sockets.h
@@ -1,6 +1,6 @@
/* sockets.h - wrappers for Windows socket functions
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stat-time.h b/gl/lib/stat-time.h
index 8e787bd3..d4f1f961 100644
--- a/gl/lib/stat-time.h
+++ b/gl/lib/stat-time.h
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -213,7 +213,7 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED)
#if defined __sun && defined STAT_TIMESPEC
if (result == 0)
{
- long int timespec_resolution = 1000000000;
+ long int timespec_hz = 1000000000;
short int const ts_off[] = { offsetof (struct stat, st_atim),
offsetof (struct stat, st_mtim),
offsetof (struct stat, st_ctim) };
@@ -221,11 +221,11 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED)
for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++)
{
struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]);
- long int q = ts->tv_nsec / timespec_resolution;
- long int r = ts->tv_nsec % timespec_resolution;
+ long int q = ts->tv_nsec / timespec_hz;
+ long int r = ts->tv_nsec % timespec_hz;
if (r < 0)
{
- r += timespec_resolution;
+ r += timespec_hz;
q--;
}
ts->tv_nsec = r;
diff --git a/gl/lib/stat-w32.c b/gl/lib/stat-w32.c
index 802b38a8..ffa99429 100644
--- a/gl/lib/stat-w32.c
+++ b/gl/lib/stat-w32.c
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,6 +38,10 @@
#include "pathmax.h"
#include "verify.h"
+/* Avoid warnings from gcc -Wcast-function-type. */
+#define GetProcAddress \
+ (void *) GetProcAddress
+
#if _GL_WINDOWS_STAT_INODES == 2
/* GetFileInformationByHandleEx was introduced only in Windows Vista. */
typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile,
diff --git a/gl/lib/stat-w32.h b/gl/lib/stat-w32.h
index 9a3ecc14..6b961d7f 100644
--- a/gl/lib/stat-w32.h
+++ b/gl/lib/stat-w32.h
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stat.c b/gl/lib/stat.c
index 18c0caa1..74f47954 100644
--- a/gl/lib/stat.c
+++ b/gl/lib/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stdalign.in.h b/gl/lib/stdalign.in.h
index bbfa9ac3..d988d7c1 100644
--- a/gl/lib/stdalign.in.h
+++ b/gl/lib/stdalign.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>.
- Copyright 2011-2018 Free Software Foundation, Inc.
+ Copyright 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stdarg.in.h b/gl/lib/stdarg.in.h
index 46af0c2b..5eec8ba4 100644
--- a/gl/lib/stdarg.in.h
+++ b/gl/lib/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stdbool.in.h b/gl/lib/stdbool.in.h
index ebf1a2f3..8158b009 100644
--- a/gl/lib/stdbool.in.h
+++ b/gl/lib/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2019 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/stddef.in.h b/gl/lib/stddef.in.h
index 8329a9bf..5aad1210 100644
--- a/gl/lib/stddef.in.h
+++ b/gl/lib/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stdint.in.h b/gl/lib/stdint.in.h
index 94e7c81c..21dd8d23 100644
--- a/gl/lib/stdint.in.h
+++ b/gl/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2019 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
diff --git a/gl/lib/stdio-read.c b/gl/lib/stdio-read.c
index ed7f843b..1b113483 100644
--- a/gl/lib/stdio-read.c
+++ b/gl/lib/stdio-read.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream read function.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/stdio-write.c b/gl/lib/stdio-write.c
index e01a780a..3fbd2722 100644
--- a/gl/lib/stdio-write.c
+++ b/gl/lib/stdio-write.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream write function.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/stdio.in.h b/gl/lib/stdio.in.h
index ff7c9c83..acf29c4b 100644
--- a/gl/lib/stdio.in.h
+++ b/gl/lib/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stdlib.in.h b/gl/lib/stdlib.in.h
index 3bf35bf6..d80d7ec6 100644
--- a/gl/lib/stdlib.in.h
+++ b/gl/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -90,9 +90,10 @@ struct random_data
# endif
#endif
-#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
+/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
diff --git a/gl/lib/str-two-way.h b/gl/lib/str-two-way.h
index 85489d1f..9155e6b5 100644
--- a/gl/lib/str-two-way.h
+++ b/gl/lib/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
diff --git a/gl/lib/strcasecmp.c b/gl/lib/strcasecmp.c
index 49f22c59..6cd0e1e3 100644
--- a/gl/lib/strcasecmp.c
+++ b/gl/lib/strcasecmp.c
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strcasestr.c b/gl/lib/strcasestr.c
index 40134f2a..9c93ac5a 100644
--- a/gl/lib/strcasestr.c
+++ b/gl/lib/strcasestr.c
@@ -1,5 +1,5 @@
/* Case-insensitive searching in a string.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/strchrnul.c b/gl/lib/strchrnul.c
index 8b3cd88b..0f5dd814 100644
--- a/gl/lib/strchrnul.c
+++ b/gl/lib/strchrnul.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strdup.c b/gl/lib/strdup.c
index ce43940b..717cf65b 100644
--- a/gl/lib/strdup.c
+++ b/gl/lib/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2018 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2019 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/streq.h b/gl/lib/streq.h
index bde1b956..326537b6 100644
--- a/gl/lib/streq.h
+++ b/gl/lib/streq.h
@@ -1,5 +1,5 @@
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gl/lib/strerror-override.c b/gl/lib/strerror-override.c
index d3ad21e7..558a010a 100644
--- a/gl/lib/strerror-override.c
+++ b/gl/lib/strerror-override.c
@@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strerror-override.h b/gl/lib/strerror-override.h
index a96fd089..255febca 100644
--- a/gl/lib/strerror-override.h
+++ b/gl/lib/strerror-override.h
@@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strerror.c b/gl/lib/strerror.c
index 36397bb8..f5900fd1 100644
--- a/gl/lib/strerror.c
+++ b/gl/lib/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/string.in.h b/gl/lib/string.in.h
index 29f4ba6b..4a9292f7 100644
--- a/gl/lib/string.in.h
+++ b/gl/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strings.in.h b/gl/lib/strings.in.h
index b9d0a67a..21b1a85b 100644
--- a/gl/lib/strings.in.h
+++ b/gl/lib/strings.in.h
@@ -1,6 +1,6 @@
/* A substitute <strings.h>.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/stripslash.c b/gl/lib/stripslash.c
index 60c6781c..dfc15b43 100644
--- a/gl/lib/stripslash.c
+++ b/gl/lib/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2018 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2019 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/strncasecmp.c b/gl/lib/strncasecmp.c
index f750679e..034011c5 100644
--- a/gl/lib/strncasecmp.c
+++ b/gl/lib/strncasecmp.c
@@ -1,5 +1,5 @@
/* strncasecmp.c -- case insensitive string comparator
- Copyright (C) 1998-1999, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strndup.c b/gl/lib/strndup.c
index b5c18dda..5b748284 100644
--- a/gl/lib/strndup.c
+++ b/gl/lib/strndup.c
@@ -1,6 +1,6 @@
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2018 Free Software
+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
diff --git a/gl/lib/strnlen.c b/gl/lib/strnlen.c
index f0b1b8b2..9fb66350 100644
--- a/gl/lib/strnlen.c
+++ b/gl/lib/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/strnlen1.c b/gl/lib/strnlen1.c
index 4459f6b1..666a5572 100644
--- a/gl/lib/strnlen1.c
+++ b/gl/lib/strnlen1.c
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strnlen1.h b/gl/lib/strnlen1.h
index 896a1801..5d952446 100644
--- a/gl/lib/strnlen1.h
+++ b/gl/lib/strnlen1.h
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/strsep.c b/gl/lib/strsep.c
index 7618142b..734cd17f 100644
--- a/gl/lib/strsep.c
+++ b/gl/lib/strsep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2007, 2009-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007, 2009-2019 Free Software Foundation, Inc.
Written by Yoann Vandoorselaere <yoann@prelude-ids.org>.
diff --git a/gl/lib/sys_file.in.h b/gl/lib/sys_file.in.h
index efbf4586..5096421e 100644
--- a/gl/lib/sys_file.in.h
+++ b/gl/lib/sys_file.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/file.h.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sys_ioctl.in.h b/gl/lib/sys_ioctl.in.h
index 42a5ca42..7b4393e0 100644
--- a/gl/lib/sys_ioctl.in.h
+++ b/gl/lib/sys_ioctl.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <sys/ioctl.h>.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sys_select.in.h b/gl/lib/sys_select.in.h
index 154e570f..4cf7cfc8 100644
--- a/gl/lib/sys_select.in.h
+++ b/gl/lib/sys_select.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/select.h>.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sys_socket.in.h b/gl/lib/sys_socket.in.h
index ef65dc61..a0228418 100644
--- a/gl/lib/sys_socket.in.h
+++ b/gl/lib/sys_socket.in.h
@@ -1,6 +1,6 @@
/* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/sys_stat.in.h b/gl/lib/sys_stat.in.h
index 6ae6ac5f..58fa93fd 100644
--- a/gl/lib/sys_stat.in.h
+++ b/gl/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat.h header file.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sys_time.in.h b/gl/lib/sys_time.in.h
index b4a0e49c..53976888 100644
--- a/gl/lib/sys_time.in.h
+++ b/gl/lib/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sys_types.in.h b/gl/lib/sys_types.in.h
index 7f8c1c42..237e2068 100644
--- a/gl/lib/sys_types.in.h
+++ b/gl/lib/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sys_uio.in.h b/gl/lib/sys_uio.in.h
index 0b5790b9..d040a50a 100644
--- a/gl/lib/sys_uio.in.h
+++ b/gl/lib/sys_uio.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/uio.h>.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/sysexits.in.h b/gl/lib/sysexits.in.h
index 9ea88be2..7043a0a9 100644
--- a/gl/lib/sysexits.in.h
+++ b/gl/lib/sysexits.in.h
@@ -1,5 +1,5 @@
/* exit() exit codes for some BSD system programs.
- Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/tempname.c b/gl/lib/tempname.c
index da81263b..be62ed95 100644
--- a/gl/lib/tempname.c
+++ b/gl/lib/tempname.c
@@ -1,6 +1,6 @@
/* tempname.c - generate the name of a temporary file.
- Copyright (C) 1991-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/tempname.h b/gl/lib/tempname.h
index 4020c734..fb203d3a 100644
--- a/gl/lib/tempname.h
+++ b/gl/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/time.in.h b/gl/lib/time.in.h
index cda16c69..dd3b2127 100644
--- a/gl/lib/time.in.h
+++ b/gl/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
+/* Some systems don't define struct timespec (e.g., AIX 4.1).
Or they define it with the wrong member names or define it in <sys/time.h>
(e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it,
but the pthreads-win32 library defines it in <pthread.h>. */
diff --git a/gl/lib/timespec.h b/gl/lib/timespec.h
index 94ba8d0b..26f1bc1a 100644
--- a/gl/lib/timespec.h
+++ b/gl/lib/timespec.h
@@ -1,6 +1,6 @@
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2018 Free Software
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -17,9 +17,9 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if ! defined TIMESPEC_H
-# define TIMESPEC_H
+#define TIMESPEC_H
-# include <time.h>
+#include <time.h>
#ifndef _GL_INLINE_HEADER_BEGIN
#error "Please include config.h first."
@@ -33,13 +33,20 @@ _GL_INLINE_HEADER_BEGIN
extern "C" {
#endif
+#include "arg-nonnull.h"
#include "verify.h"
-/* Resolution of timespec timestamps (in units per second), and log
- base 10 of the resolution. */
+/* Inverse resolution of timespec timestamps (in units per second),
+ and log base 10 of the inverse resolution. */
-enum { TIMESPEC_RESOLUTION = 1000000000 };
-enum { LOG10_TIMESPEC_RESOLUTION = 9 };
+enum { TIMESPEC_HZ = 1000000000 };
+enum { LOG10_TIMESPEC_HZ = 9 };
+
+/* Obsolescent names for backward compatibility.
+ They are misnomers, because TIMESPEC_RESOLUTION is not a resolution. */
+
+enum { TIMESPEC_RESOLUTION = TIMESPEC_HZ };
+enum { LOG10_TIMESPEC_RESOLUTION = LOG10_TIMESPEC_HZ };
/* Return a timespec with seconds S and nanoseconds NS. */
@@ -88,8 +95,8 @@ timespec_cmp (struct timespec a, struct timespec b)
/* Pacify gcc -Wstrict-overflow (bleeding-edge circa 2017-10-02). See:
https://lists.gnu.org/r/bug-gnulib/2017-10/msg00006.html */
- assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_RESOLUTION);
- assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_RESOLUTION);
+ assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_HZ);
+ assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_HZ);
return a.tv_nsec - b.tv_nsec;
}
@@ -116,8 +123,9 @@ timespectod (struct timespec a)
return a.tv_sec + a.tv_nsec / 1e9;
}
-void gettime (struct timespec *);
-int settime (struct timespec const *);
+struct timespec current_timespec (void);
+void gettime (struct timespec *) _GL_ARG_NONNULL ((1));
+int settime (struct timespec const *) _GL_ARG_NONNULL ((1));
#ifdef __cplusplus
}
diff --git a/gl/lib/unistd--.h b/gl/lib/unistd--.h
index a6c5266f..12688543 100644
--- a/gl/lib/unistd--.h
+++ b/gl/lib/unistd--.h
@@ -1,6 +1,6 @@
/* Like unistd.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/unistd-safer.h b/gl/lib/unistd-safer.h
index 5baf339a..8eebffca 100644
--- a/gl/lib/unistd-safer.h
+++ b/gl/lib/unistd-safer.h
@@ -1,6 +1,6 @@
/* Invoke unistd-like functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2005, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/unistd.in.h b/gl/lib/unistd.in.h
index b6a348f5..a10ca28a 100644
--- a/gl/lib/unistd.in.h
+++ b/gl/lib/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -432,12 +432,12 @@ extern char **environ;
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
_GL_UNISTD_INLINE char ***
+_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - "
+ "use gnulib module environ for portability")
rpl_environ (void)
{
return &environ;
}
-_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
- "use gnulib module environ for portability");
# undef environ
# define environ (*rpl_environ ())
# endif
@@ -935,6 +935,36 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
#endif
+#if @GNULIB_GETPASS@
+/* Function getpass() from module 'getpass':
+ Read a password from /dev/tty or stdin.
+ Function getpass() from module 'getpass-gnu':
+ Read a password of arbitrary length from /dev/tty or stdin. */
+# if @REPLACE_GETPASS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getpass
+# define getpass rpl_getpass
+# endif
+_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt));
+# else
+# if !@HAVE_GETPASS@
+_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt));
+# endif
+_GL_CXXALIASWARN (getpass);
+#elif defined GNULIB_POSIXCHECK
+# undef getpass
+# if HAVE_RAW_DECL_GETPASS
+_GL_WARN_ON_USE (getpass, "getpass is unportable - "
+ "use gnulib module getpass or getpass-gnu for portability");
+# endif
+#endif
+
+
#if @GNULIB_GETUSERSHELL@
/* Return the next valid login shell on the system, or NULL when the end of
the list has been reached. */
diff --git a/gl/lib/unsetenv.c b/gl/lib/unsetenv.c
index 82c6c067..0199280c 100644
--- a/gl/lib/unsetenv.c
+++ b/gl/lib/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/utime.c b/gl/lib/utime.c
index 1893c87f..88973e13 100644
--- a/gl/lib/utime.c
+++ b/gl/lib/utime.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in utime.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/utime.in.h b/gl/lib/utime.in.h
index 07fdb309..f4b28046 100644
--- a/gl/lib/utime.in.h
+++ b/gl/lib/utime.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <utime.h>.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/utimens.c b/gl/lib/utimens.c
index 66a1d05d..e8240b49 100644
--- a/gl/lib/utimens.c
+++ b/gl/lib/utimens.c
@@ -1,6 +1,6 @@
/* Set file access and modification times.
- Copyright (C) 2003-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -91,11 +91,11 @@ validate_timespec (struct timespec timespec[2])
if ((timespec[0].tv_nsec != UTIME_NOW
&& timespec[0].tv_nsec != UTIME_OMIT
&& ! (0 <= timespec[0].tv_nsec
- && timespec[0].tv_nsec < TIMESPEC_RESOLUTION))
+ && timespec[0].tv_nsec < TIMESPEC_HZ))
|| (timespec[1].tv_nsec != UTIME_NOW
&& timespec[1].tv_nsec != UTIME_OMIT
&& ! (0 <= timespec[1].tv_nsec
- && timespec[1].tv_nsec < TIMESPEC_RESOLUTION)))
+ && timespec[1].tv_nsec < TIMESPEC_HZ)))
{
errno = EINVAL;
return -1;
diff --git a/gl/lib/utimens.h b/gl/lib/utimens.h
index a24e62cb..b1740960 100644
--- a/gl/lib/utimens.h
+++ b/gl/lib/utimens.h
@@ -1,6 +1,6 @@
/* Set file access and modification times.
- Copyright 2012-2018 Free Software Foundation, Inc.
+ Copyright 2012-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/gl/lib/vasnprintf.c b/gl/lib/vasnprintf.c
index 3b441d03..c4759037 100644
--- a/gl/lib/vasnprintf.c
+++ b/gl/lib/vasnprintf.c
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -860,7 +860,9 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes)
size_t a_len = a.nlimbs;
/* 0.03345 is slightly larger than log(2)/(9*log(10)). */
size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
- char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
+ /* We need extra_zeroes bytes for zeroes, followed by c_len bytes for the
+ digits of a, followed by 1 byte for the terminating NUL. */
+ char *c_ptr = (char *) malloc (xsum (xsum (extra_zeroes, c_len), 1));
if (c_ptr != NULL)
{
char *d_ptr = c_ptr;
@@ -2694,7 +2696,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
errno = EILSEQ;
return NULL;
}
- if (precision < count)
+ if (precision < (unsigned int) count)
break;
arg_end++;
characters += count;
@@ -5125,7 +5127,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
/* Verify that snprintf() has NUL-terminated its
result. */
- if (count < maxlen
+ if ((unsigned int) count < maxlen
&& ((TCHAR_T *) (result + length)) [count] != '\0')
abort ();
/* Portability hack. */
diff --git a/gl/lib/vasnprintf.h b/gl/lib/vasnprintf.h
index 3eaaa7e5..5b192b21 100644
--- a/gl/lib/vasnprintf.h
+++ b/gl/lib/vasnprintf.h
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/vasprintf.c b/gl/lib/vasprintf.c
index aacb306a..f5857ca1 100644
--- a/gl/lib/vasprintf.c
+++ b/gl/lib/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/verify.h b/gl/lib/verify.h
index bc7f99db..b2e5f644 100644
--- a/gl/lib/verify.h
+++ b/gl/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -276,7 +276,8 @@ template <int w>
when 'assume' silences warnings even with older GCCs. */
# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
#else
-# define assume(R) ((void) (0 && (R)))
+ /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */
+# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
#endif
/* @assert.h omit end@ */
diff --git a/gl/lib/vsnprintf.c b/gl/lib/vsnprintf.c
index e11ab6cd..6a209f73 100644
--- a/gl/lib/vsnprintf.c
+++ b/gl/lib/vsnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2019 Free Software Foundation, Inc.
Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/lib/w32sock.h b/gl/lib/w32sock.h
index 1e5e584e..3cbedd95 100644
--- a/gl/lib/w32sock.h
+++ b/gl/lib/w32sock.h
@@ -1,6 +1,6 @@
/* w32sock.h --- internal auxiliary functions for Windows socket functions
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/warn-on-use.h b/gl/lib/warn-on-use.h
index e76c3842..7d11a156 100644
--- a/gl/lib/warn-on-use.h
+++ b/gl/lib/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@@ -20,23 +20,32 @@
supported by the compiler. If the compiler does not support this
feature, the macro expands to an unused extern declaration.
- This macro is useful for marking a function as a potential
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support
+ this feature, it expands to empty.
+
+ These macros are useful for marking a function as a potential
portability trap, with the intent that "literal string" include
instructions on the replacement function that should be used
- instead. However, one of the reasons that a function is a
- portability trap is if it has the wrong signature. Declaring
- FUNCTION with a different signature in C is a compilation error, so
- this macro must use the same type as any existing declaration so
- that programs that avoid the problematic FUNCTION do not fail to
- compile merely because they included a header that poisoned the
- function. But this implies that _GL_WARN_ON_USE is only safe to
- use if FUNCTION is known to already have a declaration. Use of
- this macro implies that there must not be any other macro hiding
- the declaration of FUNCTION; but undefining FUNCTION first is part
- of the poisoning process anyway (although for symbols that are
- provided only via a macro, the result is a compilation error rather
- than a warning containing "literal string"). Also note that in
- C++, it is only safe to use if FUNCTION has no overloads.
+ instead.
+ _GL_WARN_ON_USE is for functions with 'extern' linkage.
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
+ linkage.
+
+ However, one of the reasons that a function is a portability trap is
+ if it has the wrong signature. Declaring FUNCTION with a different
+ signature in C is a compilation error, so this macro must use the
+ same type as any existing declaration so that programs that avoid
+ the problematic FUNCTION do not fail to compile merely because they
+ included a header that poisoned the function. But this implies that
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
+ have a declaration. Use of this macro implies that there must not
+ be any other macro hiding the declaration of FUNCTION; but
+ undefining FUNCTION first is part of the poisoning process anyway
+ (although for symbols that are provided only via a macro, the result
+ is a compilation error rather than a warning containing
+ "literal string"). Also note that in C++, it is only safe to use if
+ FUNCTION has no overloads.
For an example, it is possible to poison 'getline' by:
- adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
@@ -54,12 +63,21 @@
(less common usage, like &environ, will cause a compilation error
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
- #if HAVE_RAW_DECL_ENVIRON
- static char ***rpl_environ (void) { return &environ; }
- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
- # undef environ
- # define environ (*rpl_environ ())
- #endif
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***
+ rpl_environ (void) { return &environ; }
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
+ or better (avoiding contradictory use of 'static' and 'extern'):
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
+ rpl_environ (void) { return &environ; }
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
*/
#ifndef _GL_WARN_ON_USE
@@ -67,13 +85,17 @@
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
+ __attribute__ ((__warning__ (message)))
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function
+# define _GL_WARN_ON_USE_ATTRIBUTE(message)
# else /* Unsupported. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C int _gl_warn_on_use
+# define _GL_WARN_ON_USE_ATTRIBUTE(message)
# endif
#endif
diff --git a/gl/lib/wchar.in.h b/gl/lib/wchar.in.h
index 51a5dda1..17d56912 100644
--- a/gl/lib/wchar.in.h
+++ b/gl/lib/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/wcrtomb.c b/gl/lib/wcrtomb.c
index 8f019721..9fc40cfc 100644
--- a/gl/lib/wcrtomb.c
+++ b/gl/lib/wcrtomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/wctype.in.h b/gl/lib/wctype.in.h
index 3c6e5f29..0a7471fd 100644
--- a/gl/lib/wctype.in.h
+++ b/gl/lib/wctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xalloc-die.c b/gl/lib/xalloc-die.c
index bfe61099..295f8d8e 100644
--- a/gl/lib/xalloc-die.c
+++ b/gl/lib/xalloc-die.c
@@ -1,6 +1,6 @@
/* Report a memory allocation failure and exit.
- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2018 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/xalloc-oversized.h b/gl/lib/xalloc-oversized.h
index 3426e10f..e3068c83 100644
--- a/gl/lib/xalloc-oversized.h
+++ b/gl/lib/xalloc-oversized.h
@@ -1,6 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xalloc.h b/gl/lib/xalloc.h
index c419a2de..fc7e86bd 100644
--- a/gl/lib/xalloc.h
+++ b/gl/lib/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xasprintf.c b/gl/lib/xasprintf.c
index 23ce55fc..8188983f 100644
--- a/gl/lib/xasprintf.c
+++ b/gl/lib/xasprintf.c
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006, 2009-2018 Free Software Foundation,
+ Copyright (C) 1999, 2002-2004, 2006, 2009-2019 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/xgetcwd.c b/gl/lib/xgetcwd.c
index 8c9b0d87..acbbe1cb 100644
--- a/gl/lib/xgetcwd.c
+++ b/gl/lib/xgetcwd.c
@@ -1,6 +1,6 @@
/* xgetcwd.c -- return current directory with unlimited length
- Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2018 Free Software
+ Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/xgetcwd.h b/gl/lib/xgetcwd.h
index 2643bcc1..18b5b9fd 100644
--- a/gl/lib/xgetcwd.h
+++ b/gl/lib/xgetcwd.h
@@ -1,5 +1,5 @@
/* prototype for xgetcwd
- Copyright (C) 1995, 2001, 2003, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001, 2003, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xmalloc.c b/gl/lib/xmalloc.c
index 9a30d67b..cbe9a4f5 100644
--- a/gl/lib/xmalloc.c
+++ b/gl/lib/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xsize.h b/gl/lib/xsize.h
index 8aeb3b7a..ecfd478d 100644
--- a/gl/lib/xsize.h
+++ b/gl/lib/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xstrndup.c b/gl/lib/xstrndup.c
index 3b1700a6..a9738291 100644
--- a/gl/lib/xstrndup.c
+++ b/gl/lib/xstrndup.c
@@ -1,6 +1,6 @@
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xstrndup.h b/gl/lib/xstrndup.h
index 54b0967f..360ccfdb 100644
--- a/gl/lib/xstrndup.h
+++ b/gl/lib/xstrndup.h
@@ -1,6 +1,6 @@
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xvasprintf.c b/gl/lib/xvasprintf.c
index 42a5ea8c..17b053a3 100644
--- a/gl/lib/xvasprintf.c
+++ b/gl/lib/xvasprintf.c
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/lib/xvasprintf.h b/gl/lib/xvasprintf.h
index cabc3565..d4debcca 100644
--- a/gl/lib/xvasprintf.h
+++ b/gl/lib/xvasprintf.h
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by