summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore195
-rw-r--r--Admin/README.update31
-rwxr-xr-xAdmin/containing12
-rwxr-xr-xAdmin/dependent12
-rwxr-xr-xAdmin/gen-uni-tables17
-rwxr-xr-xAdmin/gen-uninames23
-rw-r--r--ChangeLog248
-rw-r--r--DEPENDENCIES83
-rw-r--r--HACKING6
-rw-r--r--JOIN-GNU20
-rw-r--r--Makefile.am7
-rw-r--r--NEWS26
-rw-r--r--README14
-rwxr-xr-xautogen.sh35
-rwxr-xr-xautopull.sh41
-rwxr-xr-xbuild-aux/join-v-143
-rw-r--r--build-aux/ltmain.sh855
-rw-r--r--configure.ac7
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/char32_t.texi50
-rw-r--r--doc/libunistring.texi14
-rw-r--r--doc/uniconv.texi6
-rw-r--r--doc/unictype.texi85
-rw-r--r--doc/unigbrk.texi2
-rw-r--r--doc/unilbrk.texi18
-rw-r--r--doc/unistr.texi6
-rw-r--r--gnulib-local/lib/unicase.in.h.diff8
-rw-r--r--gnulib-local/lib/unictype.in.h.diff9
-rw-r--r--gnulib-local/lib/uninorm.in.h.diff8
-rw-r--r--gnulib-local/lib/unistr.in.h.diff29
-rw-r--r--gnulib-m4/gnulib-cache.m44
-rw-r--r--lib/Makefile.am8
-rw-r--r--lib/stdbool.mini.h15
-rw-r--r--lib/unistring-notinline.h21
-rw-r--r--lib/unistring/cdefs.h115
-rw-r--r--lib/unistring/inline.h21
-rw-r--r--lib/unistring/version.in.h21
-rw-r--r--lib/unistring/woe32dll.in.h21
-rw-r--r--lib/version.c21
-rw-r--r--m4/exported.m46
-rw-r--r--m4/init-package-version.m434
-rw-r--r--m4/libtool.m4227
-rw-r--r--m4/ltoptions.m44
-rw-r--r--m4/ltsugar.m42
-rw-r--r--m4/ltversion.m413
-rw-r--r--m4/lt~obsolete.m44
-rw-r--r--m4/woe32-dll.m46
-rw-r--r--version.sh6
-rw-r--r--woe32dll/export.h8
-rw-r--r--woe32dll/unistring-exports.c17
50 files changed, 1888 insertions, 598 deletions
diff --git a/.gitignore b/.gitignore
index 53b61dd..f809d38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,11 +18,14 @@
/gnulib-m4/absolute-header.m4
/gnulib-m4/alloca.m4
/gnulib-m4/arpa_inet_h.m4
+/gnulib-m4/assert_h.m4
/gnulib-m4/btowc.m4
/gnulib-m4/builtin-expect.m4
+/gnulib-m4/c-bool.m4
+/gnulib-m4/calloc.m4
/gnulib-m4/close.m4
/gnulib-m4/codeset.m4
-/gnulib-m4/ctype.m4
+/gnulib-m4/ctype_h.m4
/gnulib-m4/dirname.m4
/gnulib-m4/double-slash-root.m4
/gnulib-m4/dup2.m4
@@ -30,6 +33,7 @@
/gnulib-m4/environ.m4
/gnulib-m4/errno_h.m4
/gnulib-m4/error.m4
+/gnulib-m4/error_h.m4
/gnulib-m4/exponentd.m4
/gnulib-m4/exponentf.m4
/gnulib-m4/exponentl.m4
@@ -42,6 +46,7 @@
/gnulib-m4/flexmember.m4
/gnulib-m4/float_h.m4
/gnulib-m4/fpieee.m4
+/gnulib-m4/free.m4
/gnulib-m4/frexp.m4
/gnulib-m4/frexpl.m4
/gnulib-m4/fseterr.m4
@@ -127,14 +132,18 @@
/gnulib-m4/printf-frexp.m4
/gnulib-m4/printf-frexpl.m4
/gnulib-m4/printf.m4
+/gnulib-m4/pselect.m4
/gnulib-m4/pthread-thread.m4
/gnulib-m4/pthread_h.m4
/gnulib-m4/pthread_rwlock_rdlock.m4
/gnulib-m4/pthread_sigmask.m4
/gnulib-m4/putenv.m4
/gnulib-m4/raise.m4
+/gnulib-m4/realloc.m4
+/gnulib-m4/reallocarray.m4
/gnulib-m4/relocatable-lib.m4
/gnulib-m4/sched_h.m4
+/gnulib-m4/sched_yield.m4
/gnulib-m4/select.m4
/gnulib-m4/semaphore.m4
/gnulib-m4/setenv.m4
@@ -176,10 +185,15 @@
/gnulib-m4/sys_uio_h.m4
/gnulib-m4/thread.m4
/gnulib-m4/threadlib.m4
+/gnulib-m4/time.m4
/gnulib-m4/time_h.m4
+/gnulib-m4/unicase_h.m4
+/gnulib-m4/unictype_h.m4
+/gnulib-m4/uninorm_h.m4
/gnulib-m4/unistd_h.m4
/gnulib-m4/usleep.m4
/gnulib-m4/vasnprintf.m4
+/gnulib-m4/vararrays.m4
/gnulib-m4/visibility.m4
/gnulib-m4/warn-on-use.m4
/gnulib-m4/wchar_h.m4
@@ -192,6 +206,7 @@
/gnulib-m4/wint_t.m4
/gnulib-m4/xalloc.m4
/gnulib-m4/xsize.m4
+/gnulib-m4/year2038.m4
/gnulib-m4/yield.m4
/gnulib-m4/zzgnulib.m4
/lib/Makefile.gnulib
@@ -201,6 +216,7 @@
/lib/amemxfrm.h
/lib/arg-nonnull.h
/lib/array-mergesort.h
+/lib/assert.in.h
/lib/attribute.h
/lib/c++defs.h
/lib/c-ctype.c
@@ -216,6 +232,7 @@
/lib/float.c
/lib/float.in.h
/lib/fpucw.h
+/lib/free.c
/lib/frexp.c
/lib/frexpl.c
/lib/fseterr.c
@@ -233,6 +250,9 @@
/lib/iconv_open-zos.gperf
/lib/iconv_open.c
/lib/iconveh.h
+/lib/idx.h
+/lib/intprops-internal.h
+/lib/intprops.h
/lib/inttypes.in.h
/lib/isnan.c
/lib/isnand-nolibm.h
@@ -296,6 +316,7 @@
/lib/signbitl.c
/lib/size_max.h
/lib/stdbool.in.h
+/lib/stdckdint.in.h
/lib/stddef.in.h
/lib/stdint.in.h
/lib/stdio-impl.h
@@ -331,6 +352,8 @@
/lib/verify.h
/lib/warn-on-use.h
/lib/wchar.in.h
+/lib/wcs-two-way.h
+/lib/wcsstr-impl.h
/lib/wctype-h.c
/lib/wctype.in.h
/lib/wcwidth.c
@@ -690,6 +713,18 @@
/lib/unictype/pr_deprecated.h
/lib/unictype/pr_diacritic.c
/lib/unictype/pr_diacritic.h
+/lib/unictype/pr_emoji.c
+/lib/unictype/pr_emoji.h
+/lib/unictype/pr_emoji_component.c
+/lib/unictype/pr_emoji_component.h
+/lib/unictype/pr_emoji_modifier.c
+/lib/unictype/pr_emoji_modifier.h
+/lib/unictype/pr_emoji_modifier_base.c
+/lib/unictype/pr_emoji_modifier_base.h
+/lib/unictype/pr_emoji_presentation.c
+/lib/unictype/pr_emoji_presentation.h
+/lib/unictype/pr_extended_pictographic.c
+/lib/unictype/pr_extended_pictographic.h
/lib/unictype/pr_extender.c
/lib/unictype/pr_extender.h
/lib/unictype/pr_format_control.c
@@ -768,6 +803,7 @@
/lib/unictype/pr_quotation_mark.h
/lib/unictype/pr_radical.c
/lib/unictype/pr_radical.h
+/lib/unictype/pr_regional_indicator.c
/lib/unictype/pr_sentence_terminal.c
/lib/unictype/pr_sentence_terminal.h
/lib/unictype/pr_soft_dotted.c
@@ -819,6 +855,7 @@
/lib/unigbrk/uc-grapheme-breaks.c
/lib/unigbrk/uc-is-grapheme-break.c
/lib/unigbrk/ulc-grapheme-breaks.c
+/lib/unilbrk/internal.h
/lib/unilbrk/lbrkprop1.h
/lib/unilbrk/lbrkprop2.h
/lib/unilbrk/lbrktables.c
@@ -1110,12 +1147,15 @@
/lib/uniwidth/u8-strwidth.c
/lib/uniwidth/u8-width.c
/lib/uniwidth/width.c
+/lib/uniwidth/width0.h
+/lib/uniwidth/width2.h
/tests/Makefile.gnulib
/tests/_Noreturn.h
/tests/accept.c
/tests/alloca.c
/tests/arg-nonnull.h
/tests/arpa_inet.in.h
+/tests/test-assert.c
/tests/atomic-int-gnulib.h
/tests/basename-lgpl.c
/tests/basename-lgpl.h
@@ -1124,6 +1164,7 @@
/tests/bind.c
/tests/btowc.c
/tests/c++defs.h
+/tests/calloc.c
/tests/cloexec.c
/tests/cloexec.h
/tests/close.c
@@ -1133,7 +1174,7 @@
/tests/dirname.h
/tests/dup2.c
/tests/error.c
-/tests/error.h
+/tests/error.in.h
/tests/exitfail.c
/tests/exitfail.h
/tests/fcntl.c
@@ -1151,11 +1192,14 @@
/tests/getprogname.h
/tests/gettext.h
/tests/gettimeofday.c
+/tests/ialloc.c
+/tests/ialloc.h
/tests/iconvsupport.c
/tests/ignore-value.h
/tests/inet_pton.c
/tests/infinity.h
/tests/init.sh
+/tests/intprops-internal.h
/tests/intprops.h
/tests/ioctl.c
/tests/isblank.c
@@ -1165,6 +1209,7 @@
/tests/localtime-buffer.h
/tests/lstat.c
/tests/macros.h
+/tests/malloc.c
/tests/mbtowc-impl.h
/tests/mbtowc.c
/tests/minus-zero.h
@@ -1180,6 +1225,7 @@
/tests/pathmax.h
/tests/perror.c
/tests/pipe.c
+/tests/pselect.c
/tests/pthread-thread.c
/tests/pthread.in.h
/tests/pthread_sigmask.c
@@ -1187,8 +1233,11 @@
/tests/raise.c
/tests/randomd.c
/tests/randoml.c
+/tests/realloc.c
+/tests/reallocarray.c
/tests/same-inode.h
/tests/sched.in.h
+/tests/sched_yield.c
/tests/select.c
/tests/setenv.c
/tests/setlocale.c
@@ -1208,7 +1257,10 @@
/tests/stat-w32.c
/tests/stat-w32.h
/tests/stat.c
+/tests/test-stdckdint.c
/tests/stdalign.in.h
+/tests/stdio-read.c
+/tests/stdio-write.c
/tests/stdio.in.h
/tests/strerror-override.c
/tests/strerror-override.h
@@ -1224,6 +1276,7 @@
/tests/sys_time.in.h
/tests/sys_uio.in.h
/tests/test-accept.c
+/tests/test-alignasof.c
/tests/test-alloca-opt.c
/tests/test-arpa_inet.c
/tests/test-array-mergesort.c
@@ -1233,10 +1286,12 @@
/tests/test-btowc.c
/tests/test-btowc1.sh
/tests/test-btowc2.sh
+/tests/test-btowc3.sh
/tests/test-c-ctype.c
/tests/test-c-strcase.sh
/tests/test-c-strcasecmp.c
/tests/test-c-strncasecmp.c
+/tests/test-calloc-gnu.c
/tests/test-cloexec.c
/tests/test-close.c
/tests/test-connect.c
@@ -1244,6 +1299,8 @@
/tests/test-dup2.c
/tests/test-environ.c
/tests/test-errno.c
+/tests/test-error.c
+/tests/test-error.sh
/tests/test-fcntl-h.c
/tests/test-fcntl.c
/tests/test-fdopen.c
@@ -1251,6 +1308,7 @@
/tests/test-float.c
/tests/test-fputc.c
/tests/test-fread.c
+/tests/test-free.c
/tests/test-frexp.c
/tests/test-frexp.h
/tests/test-frexpl.c
@@ -1285,6 +1343,7 @@
/tests/test-iswxdigit.c
/tests/test-iswxdigit.sh
/tests/test-langinfo.c
+/tests/test-largefile.c
/tests/test-limits-h.c
/tests/test-listen.c
/tests/test-localcharset.c
@@ -1293,6 +1352,7 @@
/tests/test-lock.c
/tests/test-lstat.c
/tests/test-lstat.h
+/tests/test-malloc-gnu.c
/tests/test-malloca.c
/tests/test-math.c
/tests/test-mbrtowc-w32-1.sh
@@ -1324,11 +1384,14 @@
/tests/test-pipe.c
/tests/test-printf-frexp.c
/tests/test-printf-frexpl.c
+/tests/test-pselect.c
/tests/test-pthread-thread.c
/tests/test-pthread.c
/tests/test-pthread_sigmask1.c
/tests/test-pthread_sigmask2.c
/tests/test-raise.c
+/tests/test-realloc-gnu.c
+/tests/test-reallocarray.c
/tests/test-rwlock1.c
/tests/test-sched.c
/tests/test-select-fd.c
@@ -1380,6 +1443,7 @@
/tests/test-sys_wait.h
/tests/test-thread_create.c
/tests/test-thread_self.c
+/tests/test-time-h.c
/tests/test-time.c
/tests/test-unistd.c
/tests/test-unsetenv.c
@@ -1402,10 +1466,12 @@
/tests/test-wcwidth.c
/tests/test-xalloc-die.c
/tests/test-xalloc-die.sh
+/tests/time.c
/tests/time.in.h
/tests/unsetenv.c
/tests/unused-parameter.h
/tests/usleep.c
+/tests/verify.h
/tests/w32sock.h
/tests/warn-on-use.h
/tests/wcrtomb.c
@@ -1613,6 +1679,12 @@
/tests/unictype/test-pr_default_ignorable_code_point.c
/tests/unictype/test-pr_deprecated.c
/tests/unictype/test-pr_diacritic.c
+/tests/unictype/test-pr_emoji.c
+/tests/unictype/test-pr_emoji_component.c
+/tests/unictype/test-pr_emoji_modifier.c
+/tests/unictype/test-pr_emoji_modifier_base.c
+/tests/unictype/test-pr_emoji_presentation.c
+/tests/unictype/test-pr_extended_pictographic.c
/tests/unictype/test-pr_extender.c
/tests/unictype/test-pr_format_control.c
/tests/unictype/test-pr_grapheme_base.c
@@ -1652,6 +1724,7 @@
/tests/unictype/test-pr_punctuation.c
/tests/unictype/test-pr_quotation_mark.c
/tests/unictype/test-pr_radical.c
+/tests/unictype/test-pr_regional_indicator.c
/tests/unictype/test-pr_sentence_terminal.c
/tests/unictype/test-pr_soft_dotted.c
/tests/unictype/test-pr_space.c
@@ -1947,7 +2020,7 @@
/build-aux/missing
/build-aux/test-driver
-# Other files brought in by autogen.sh:
+# Other files brought in by autopull.sh or autogen.sh:
/build-aux/ar-lib
/build-aux/config.guess
/build-aux/config.sub
@@ -2010,6 +2083,7 @@ autom4te.cache/
# (i.e. erased by "make distclean"):
/config.log
/config.status
+/config.cache
# Files created by "config.status":
/Makefile
/config.h
@@ -2056,6 +2130,8 @@ autom4te.cache/
/tests/test-arpa_inet.exe
/tests/test-array-mergesort
/tests/test-array-mergesort.exe
+/tests/test-assert
+/tests/test-assert.exe
/tests/test-bidi_byname
/tests/test-bidi_byname.exe
/tests/test-bidi_longname
@@ -2084,6 +2160,8 @@ autom4te.cache/
/tests/test-c-strcasecmp.exe
/tests/test-c-strncasecmp
/tests/test-c-strncasecmp.exe
+/tests/test-calloc-gnu
+/tests/test-calloc-gnu.exe
/tests/test-canonical-decomposition
/tests/test-canonical-decomposition.exe
/tests/test-cased
@@ -2254,6 +2332,8 @@ autom4te.cache/
/tests/test-fputc.exe
/tests/test-fread
/tests/test-fread.exe
+/tests/test-free
+/tests/test-free.exe
/tests/test-frexp-nolibm
/tests/test-frexp-nolibm.exe
/tests/test-frexpl-nolibm
@@ -2338,6 +2418,8 @@ autom4te.cache/
/tests/test-lock.exe
/tests/test-lstat
/tests/test-lstat.exe
+/tests/test-malloc-gnu
+/tests/test-malloc-gnu.exe
/tests/test-malloca
/tests/test-malloca.exe
/tests/test-math
@@ -2450,6 +2532,18 @@ autom4te.cache/
/tests/test-pr_deprecated.exe
/tests/test-pr_diacritic
/tests/test-pr_diacritic.exe
+/tests/test-pr_emoji
+/tests/test-pr_emoji.exe
+/tests/test-pr_emoji_component
+/tests/test-pr_emoji_component.exe
+/tests/test-pr_emoji_modifier
+/tests/test-pr_emoji_modifier.exe
+/tests/test-pr_emoji_modifier_base
+/tests/test-pr_emoji_modifier_base.exe
+/tests/test-pr_emoji_presentation
+/tests/test-pr_emoji_presentation.exe
+/tests/test-pr_extended_pictographic
+/tests/test-pr_extended_pictographic.exe
/tests/test-pr_extender
/tests/test-pr_extender.exe
/tests/test-pr_format_control
@@ -2528,6 +2622,8 @@ autom4te.cache/
/tests/test-pr_quotation_mark.exe
/tests/test-pr_radical
/tests/test-pr_radical.exe
+/tests/test-pr_regional_indicator
+/tests/test-pr_regional_indicator.exe
/tests/test-pr_sentence_terminal
/tests/test-pr_sentence_terminal.exe
/tests/test-pr_soft_dotted
@@ -2560,6 +2656,8 @@ autom4te.cache/
/tests/test-printf-frexp.exe
/tests/test-printf-frexpl
/tests/test-printf-frexpl.exe
+/tests/test-pselect
+/tests/test-pselect.exe
/tests/test-pthread
/tests/test-pthread.exe
/tests/test-pthread-thread
@@ -2570,6 +2668,10 @@ autom4te.cache/
/tests/test-pthread_sigmask2.exe
/tests/test-raise
/tests/test-raise.exe
+/tests/test-realloc-gnu
+/tests/test-realloc-gnu.exe
+/tests/test-reallocarray
+/tests/test-reallocarray.exe
/tests/test-rwlock1
/tests/test-rwlock1.exe
/tests/test-sched
@@ -2616,6 +2718,8 @@ autom4te.cache/
/tests/test-stdalign.exe
/tests/test-stdbool
/tests/test-stdbool.exe
+/tests/test-stdckdint
+/tests/test-stdckdint.exe
/tests/test-stddef
/tests/test-stddef.exe
/tests/test-stdint
@@ -3160,59 +3264,140 @@ core
*.gcno
*.gcda
# Logs generated by Automake:
-/tests/*.log
-/tests/*.trs
+/tests/**/*.log
+/tests/**/*.trs
# Other.
/lib/alloca.h
+/lib/alloca.h-t
/lib/config.h
+/lib/config.h-t
/lib/errno.h
+/lib/errno.h-t
/lib/float.h
+/lib/float.h-t
/lib/iconv.h
+/lib/iconv.h-t
+/lib/iconv_open-aix.h-t
+/lib/iconv_open-hpux.h-t
+/lib/iconv_open-irix.h-t
+/lib/iconv_open-osf.h-t
+/lib/iconv_open-solaris.h-t
+/lib/iconv_open-zos.h-t
/lib/inttypes.h
+/lib/inttypes.h-t
/lib/langinfo.h
+/lib/langinfo.h-t
/lib/libunistring.sym-t1
/lib/libunistring.sym-t2
/lib/limits.h
+/lib/limits.h-t
/lib/locale.h
+/lib/locale.h-t
/lib/math.h
+/lib/math.h-t
+/lib/stdckdint.h
+/lib/stdckdint.h-t
/lib/stdbool.h
+/lib/stdbool.h-t
/lib/stddef.h
+/lib/stddef.h-t
/lib/stdint.h
+/lib/stdint.h-t
/lib/stdlib.h
+/lib/stdlib.h-t
/lib/string.h
+/lib/string.h-t
/lib/unicase.h
+/lib/unicase.h-t
/lib/uniconv.h
+/lib/uniconv.h-t
/lib/unictype.h
+/lib/unictype.h-t
/lib/unigbrk.h
+/lib/unigbrk.h-t
/lib/unilbrk.h
+/lib/unilbrk.h-t
/lib/uniname.h
+/lib/uniname.h-t
/lib/uninorm.h
+/lib/uninorm.h-t
/lib/unistd.h
+/lib/unistd.h-t
/lib/unistdio.h
+/lib/unistdio.h-t
/lib/unistr.h
+/lib/unistr.h-t
/lib/unitypes.h
+/lib/unitypes.h-t
/lib/uniwbrk.h
+/lib/uniwbrk.h-t
/lib/uniwidth.h
+/lib/uniwidth.h-t
/lib/wchar.h
+/lib/wchar.h-t
/lib/wctype.h
+/lib/wctype.h-t
/lib/sys/types.h
+/lib/sys/types.h-t
+/lib/unicase/locale-languages.h-t1
+/lib/unicase/locale-languages.h-t2
+/lib/unicase/special-casing-table.h-t
/lib/unicase/special-casing.h
+/lib/unicase/special-casing.h-t
+/lib/unictype/bidi_byname.h-t1
+/lib/unictype/bidi_byname.h-t2
+/lib/unictype/categ_byname.h-t1
+/lib/unictype/categ_byname.h-t2
+/lib/unictype/combiningclass_byname.h-t1
+/lib/unictype/combiningclass_byname.h-t2
+/lib/unictype/joininggroup_byname.h-t1
+/lib/unictype/joininggroup_byname.h-t2
+/lib/unictype/joiningtype_byname.h-t1
+/lib/unictype/joiningtype_byname.h-t2
+/lib/unictype/pr_byname.h-t1
+/lib/unictype/pr_byname.h-t2
+/lib/unictype/scripts_byname.h-t1
+/lib/unictype/scripts_byname.h-t2
+/lib/uninorm/composition-table.h-t1
+/lib/uninorm/composition-table.h-t2
+/lib/unistring/stdbool.h-t
+/lib/unistring/stdint.h-t
+/lib/unistring/localcharset.h-t
+/lib/unistring/iconveh.h-t
/tests/ctype.h
+/tests/ctype.h-t
+/tests/error.h
+/tests/error.h-t
/tests/fcntl.h
+/tests/fcntl.h-t
/tests/pthread.h
+/tests/pthread.h-t
/tests/sched.h
+/tests/sched.h-t
/tests/signal.h
+/tests/signal.h-t
/tests/stdalign.h
+/tests/stdalign.h-t
/tests/stdio.h
+/tests/stdio.h-t
/tests/time.h
+/tests/time.h-t
/tests/arpa/inet.h
+/tests/arpa/inet.h-t
/tests/netinet/in.h
+/tests/netinet/in.h-t
/tests/sys/ioctl.h
+/tests/sys/ioctl.h-t
/tests/sys/select.h
+/tests/sys/select.h-t
/tests/sys/socket.h
+/tests/sys/socket.h-t
/tests/sys/stat.h
+/tests/sys/stat.h-t
/tests/sys/time.h
+/tests/sys/time.h-t
/tests/sys/uio.h
+/tests/sys/uio.h-t
# ---------- "make all check" gets you here ----------
diff --git a/Admin/README.update b/Admin/README.update
index 8d50baf..fe028ce 100644
--- a/Admin/README.update
+++ b/Admin/README.update
@@ -13,14 +13,22 @@ environment variables
- UCD, which points to the directory containing the Unicode UCD
Before updating, read the Unicode release note carefully and
-understand any changes that might affect Gnulib. In particular,
-changes in the text segmentation algorithms (provided by unilbrk.h,
-uniwbrk.h, unigbrk.h) often require manual adjustment of source files.
-
-The release notes are typically available at:
+understand any changes that might affect Gnulib. The release notes are
+typically available at:
https://unicode.org/versions/Unicode<VERSION>/
+In particular, changes in the text segmentation algorithms often
+require manual adjustment of source files:
+
+ - For unigbrk/ updates, look at the revision history of UAX #29
+ <https://www.unicode.org/reports/tr29/>, section 3.
+ - For uniwbrk/ updates, look at the revision history of UAX #29
+ <https://www.unicode.org/reports/tr29/>, section 4.
+ - For unilbrk/ updates, look at the revision history of UAX #14
+ <https://www.unicode.org/reports/tr14/>.
+
+
* Regenerating the Gnulib source code
The source files in Gnulib are updated using a couple of tools:
@@ -38,9 +46,8 @@ Note that 'gen-uni-tables' sometimes fails when a large portion of
Unicode data changes. In that case, errors are reported as assertion
failures and you will need to adjust 'lib/gen-uni-tables.c'.
-Also note that the files under 'lib/uniwidth' and 'tests/uniwidth' are
-currently _not_ updated automatically. You need to merge the
-generated *.part file by hand.
+Also note that the files under 'tests/uniwidth' are currently _not_
+updated automatically. You need to check the test failures by hand.
* Updating the version numbers of modules
@@ -64,11 +71,13 @@ to bump the version of affected modules.
To identify affected modules, you can use the following command:
$ (cd $GNULIB_SRCDIR && git show --oneline --name-only $COMMIT | tail -n+2) \
- | ./containing | LC_ALL=C sort | uniq \
- | ./dependent | LC_ALL=C sort | uniq
+ | ./containing | LC_ALL=C sort -u \
+ | ./dependent | LC_ALL=C sort -u
where $COMMIT is a git commit ID, which points to the regeneration,
and 'containing' and 'dependent' are scripts included here. Note that
-this command takes some time to complete.
+this command takes some time to complete. Also, it is useful to
+temporarily remove the dependency to 'wcwidth' from modules/mbchar
+before this command.
Daiki Ueno <ueno@gnu.org>
diff --git a/Admin/containing b/Admin/containing
index d6f5e91..57841a7 100755
--- a/Admin/containing
+++ b/Admin/containing
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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
@@ -62,15 +62,15 @@ func_tmpdir ()
func_tmpdir
trap 'exit_status=$?
- if test "$signal" != 0; then
- echo "caught signal $signal" >&2
+ if test "$signal" != EXIT; then
+ echo "caught signal SIG$signal" >&2
fi
rm -rf "$tmp"
- exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+ exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
trap '{ signal='$signal'; func_exit 1; }' $signal
done
-signal=0
+signal=EXIT
sed_literal_to_basic_regex='s/\\/\\\\/g
s/\[/\\[/g
diff --git a/Admin/dependent b/Admin/dependent
index 58e4ceb..e242eb3 100755
--- a/Admin/dependent
+++ b/Admin/dependent
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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
@@ -62,15 +62,15 @@ func_tmpdir ()
func_tmpdir
trap 'exit_status=$?
- if test "$signal" != 0; then
- echo "caught signal $signal" >&2
+ if test "$signal" != EXIT; then
+ echo "caught signal SIG$signal" >&2
fi
rm -rf "$tmp"
- exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+ exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
trap '{ signal='$signal'; func_exit 1; }' $signal
done
-signal=0
+signal=EXIT
sed_literal_to_basic_regex='s/\\/\\\\/g
s/\[/\\[/g
diff --git a/Admin/gen-uni-tables b/Admin/gen-uni-tables
index c75ba9e..e6cd7dc 100755
--- a/Admin/gen-uni-tables
+++ b/Admin/gen-uni-tables
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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
@@ -79,15 +79,15 @@ test -n "$UCD" || \
func_tmpdir
trap 'exit_status=$?
- if test "$signal" != 0; then
- echo "caught signal $signal" >&2
+ if test "$signal" != EXIT; then
+ echo "caught signal SIG$signal" >&2
fi
rm -rf "$tmp"
- exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+ exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
trap '{ signal='$signal'; func_exit 1; }' $signal
done
-signal=0
+signal=EXIT
# Compile lib/gen-uni-tables.c in a temporary directory
: ${CC=gcc}
@@ -106,6 +106,7 @@ ver=`sed -n -e 's/.*Version \([0-9.]*\).*/\1/p' < "$UCD/ReadMe.txt"`
&& "$tmp/gen-uni-tables" "$UCD/UnicodeData.txt" \
"$UCD/PropList.txt" \
"$UCD/DerivedCoreProperties.txt" \
+ "$UCD/emoji/emoji-data.txt" \
"$UCD/ArabicShaping.txt" \
"$UCD/Scripts.txt" \
"$UCD/Blocks.txt" \
@@ -131,8 +132,8 @@ ver=`sed -n -e 's/.*Version \([0-9.]*\).*/\1/p' < "$UCD/ReadMe.txt"`
# Copy necessary files from UCD
for dstfile in "$GNULIB_SRCDIR/tests/uninorm/NormalizationTest.txt" \
- "$GNULIB_SRCDIR/tests/uniwbrk/WordBreakTest.txt" \
- "$GNULIB_SRCDIR/tests/unigbrk/GraphemeBreakTest.txt" ; do
+ "$GNULIB_SRCDIR/tests/uniwbrk/WordBreakTest.txt" \
+ "$GNULIB_SRCDIR/tests/unigbrk/GraphemeBreakTest.txt" ; do
srcfile=`expr "$dstfile" : '.*/\(.*\)'`
if test -f "$UCD/$srcfile"; then
srcfile="$UCD/$srcfile"
diff --git a/Admin/gen-uninames b/Admin/gen-uninames
index 4121260..af2999f 100755
--- a/Admin/gen-uninames
+++ b/Admin/gen-uninames
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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
@@ -79,33 +79,28 @@ test -n "$UCD" || \
func_tmpdir
trap 'exit_status=$?
- if test "$signal" != 0; then
- echo "caught signal $signal" >&2
+ if test "$signal" != EXIT; then
+ echo "caught signal SIG$signal" >&2
fi
rm -rf "$tmp"
- exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+ exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
trap '{ signal='$signal'; func_exit 1; }' $signal
done
-signal=0
+signal=EXIT
: ${CLISP=clisp}
("$CLISP" --version) >/dev/null 2>/dev/null \
|| { echo "$progname: *** clisp not found; skipping uniname" 1>&2; exit 0; }
-sed -e '/^[0-9A-F]*;</d' "$UCD/UnicodeData.txt" > "$tmp/UnicodeDataNames.txt"
-
-sed -e 's/ *$//' -e '/^#/d' -e '/^$/d' < "$UCD/NameAliases.txt" \
- > "$tmp/NameAliases.txt"
-
"$CLISP" "$GNULIB_SRCDIR/lib/uniname/gen-uninames.lisp" \
- "$tmp/UnicodeDataNames.txt" \
+ "$UCD/UnicodeData.txt" \
"$GNULIB_SRCDIR/lib/uniname/uninames.h" \
- "$tmp/NameAliases.txt"
+ "$UCD/NameAliases.txt"
# Copy necessary files from UCD
for dstfile in "$GNULIB_SRCDIR/tests/uniname/UnicodeData.txt" \
- "$GNULIB_SRCDIR/tests/uniname/NameAliases.txt" ; do
+ "$GNULIB_SRCDIR/tests/uniname/NameAliases.txt" ; do
srcfile=`expr "$dstfile" : '.*/\(.*\)'`
if test -f "$UCD/$srcfile"; then
srcfile="$UCD/$srcfile"
diff --git a/ChangeLog b/ChangeLog
index 14f81d2..4013d99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,251 @@
+2023-04-21 Bruno Haible <bruno@clisp.org>
+
+ Make sure unicase.h gets a definition of LIBUNISTRING_DLL_VARIABLE.
+ * gnulib-local/lib/unicase.in.h.diff: Add a
+ '#include <unistring/woe32dll.h>', instead of relying on uninorm.h to
+ include it indirectly.
+
+2023-01-29 Bruno Haible <bruno@clisp.org>
+
+ Fix a bug in the *printf functions.
+ Applies gnulib change
+ 2023-01-28 Bruno Haible <bruno@clisp.org>
+ unistdio/*printf: Fix negative width handling for %U, %lU, %llU.
+ * lib/vasnprintf.c (VASNPRINTF): In the code for %U, %lU, %llU,
+ test for the FLAG_LEFT bit in the flags variable.
+ * tests/unistdio/test-u8-printf1.h (test_xfunction): Add tests
+ for width given as argument for the directives %U, %lU, %llU,
+ %s, %a, %f, %e, %g.
+ * tests/unistdio/test-u16-printf1.h (test_xfunction): Likewise.
+ * tests/unistdio/test-u32-printf1.h (test_xfunction): Likewise.
+ * tests/unistdio/test-ulc-printf1.h (test_xfunction): Likewise.
+ * NEWS: Mention the fix.
+
+2022-09-18 Bruno Haible <bruno@clisp.org>
+
+ stdbool.mini.h: Improvements for MSVC 14 and Sun C++.
+ Applies gnulib changes
+ 2022-09-04 Bruno Haible <bruno@clisp.org>
+ * stdbool.in.h (_Bool, bool, false, true): In C++ mode with
+ MSVC 14, don't define these as macros.
+ 2022-09-18 Bruno Haible <bruno@clisp.org>
+ * stdbool.in.h (true): Redefine if it does not evaluate to 1 in
+ the preprocessor.
+
+2022-07-18 Bruno Haible <bruno@clisp.org>
+
+ Move gnulib-tool invocation back from autopull.sh to autogen.sh.
+ * autogen.sh: Revert last change. Improve comments.
+ * autopull.sh: Only call 'gitsub.sh pull'.
+ * m4/init-package-version.m4: Revert last change.
+
+2022-07-17 Bruno Haible <bruno@clisp.org>
+
+ Split autogen.sh into autopull.sh and autogen.sh.
+ * autopull.sh: New file, based on autogen.sh.
+ * autogen.sh: Remove code that was moved to autopull.sh. Remove
+ --skip-gnulib option.
+ * HACKING: Mention autopull.sh.
+ * m4/init-package-version.m4: Update comment.
+
+2022-05-22 Bruno Haible <bruno@clisp.org>
+
+ Add GNU Project notice.
+ * JOIN-GNU: New file. Inspired by a suggestion from José E. Marchesi
+ on the gnu-prog-discuss mailing list.
+ * README: Refer to it.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2022-05-15 Bruno Haible <bruno@clisp.org>
+
+ Upgrade to libtool 2.4.7.
+ * m4/libtool.m4: Update from libtool-2.4.7, with modifications.
+ 2017-10-21 Bruno Haible <bruno@clisp.org>
+ Fix -export-symbols and -export-symbols-regex support on
+ Solaris 11.3.
+ * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Adjust symcode for
+ Solaris.
+ 2009-04-23 Bruno Haible <bruno@clisp.org>
+ Fix recognition of "nm" command.
+ * m4/libtool.m4 (LT_PATH_NM): Try "nm" program also when
+ compiling for mingw in a cygwin environment.
+ 2008-04-06 Bruno Haible <bruno@clisp.org>
+ * m4/libtool.m4 (LT_INIT): When setting LIBTOOL, use
+ CONFIG_SHELL; don't assume that the Makefile.in will set SHELL
+ to ${CONFIG_SHELL}.
+ * m4/ltoptions.m4: Likewise.
+ * m4/ltsugar.m4: Likewise.
+ * m4/ltversion.m4: Likewise.
+ * m4/lt~obsolete.m4: Likewise.
+ * build-aux/ltmain.sh: Likewise.
+
+2022-01-05 Bruno Haible <bruno@clisp.org>
+
+ doc: Document a new feature (already in version 1.0).
+ * doc/uniconv.texi (uniconv.h): Document
+ iconveh_question_replacement_character.
+
+2022-01-04 Bruno Haible <bruno@clisp.org>
+
+ Prepare for 1.0 release.
+ * version.sh: Bump version number, date, gnulib version.
+ * README: Update version.
+ * NEWS: Update version.
+ * lib/Makefile.am (LTV_*): Update to 4:0:2 (determined with help from
+ gnulib's libtool-next-version).
+ * doc/libunistring.texi: Bump copyright year.
+
+2022-01-04 Bruno Haible <bruno@clisp.org>
+
+ build: Update Windows DLL exports.
+ * woe32dll/unistring-exports.c: Add new UC_PROPERTY_* variables.
+
+2021-12-31 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 14.0.0.
+ * doc/unictype.texi (Joining group): Document UC_JOINING_GROUP_THIN_YEH,
+ UC_JOINING_GROUP_VERTICAL_TAIL.
+ NEWS: Mention the update.
+
+2021-12-30 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 11.0.0.
+ * doc/unictype.texi (Joining group): Document
+ UC_JOINING_GROUP_HANIFI_ROHINGYA_*.
+
+2021-12-30 Bruno Haible <bruno@clisp.org>
+
+ doc: Document properties for Emojis.
+ * doc/unictype.texi (Properties as objects): Document UC_PROPERTY_EMOJI,
+ UC_PROPERTY_EMOJI_PRESENTATION, UC_PROPERTY_EMOJI_MODIFIER,
+ UC_PROPERTY_EMOJI_MODIFIER_BASE, UC_PROPERTY_EMOJI_COMPONENT,
+ UC_PROPERTY_EXTENDED_PICTOGRAPHIC.
+ (Properties as functions): Document uc_is_property_emoji,
+ uc_is_property_emoji_presentation, uc_is_property_emoji_modifier,
+ uc_is_property_emoji_modifier_base, uc_is_property_emoji_component,
+ uc_is_property_extended_pictographic.
+ * NEWS: Mention the new properties.
+
+2021-12-29 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for new behaviour of line breaking functions.
+ * doc/unilbrk.texi (unilbrk.h): Document UC_BREAK_CR_BEFORE_LF. Mention
+ that this value can occur in the array returned by
+ u*_possible_linebreaks and u*_width_linebreaks.
+ * NEWS: Mention the change.
+
+2021-12-26 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 10.0.0.
+ * doc/unictype.texi (Joining group): Document
+ UC_JOINING_GROUP_MALAYALAM_*.
+ (Properties as objects): Document UC_PROPERTY_REGIONAL_INDICATOR.
+ (Properties as functions): Document uc_is_property_regional_indicator.
+
+2021-12-26 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 9.0.0.
+ * doc/unictype.texi (Joining group): Document
+ UC_JOINING_GROUP_AFRICAN_*.
+
+2021-12-26 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 7.0.0.
+ * doc/unictype.texi (Joining group): Document
+ UC_JOINING_GROUP_STRAIGHT_WAW, UC_JOINING_GROUP_MANICHAEAN_*.
+
+2021-12-26 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 6.3.0.
+ * doc/unictype.texi (Bidi class): Document UC_BIDI_LRI, UC_BIDI_RLI,
+ UC_BIDI_FSI, UC_BIDI_PDI.
+
+2021-12-26 Bruno Haible <bruno@clisp.org>
+
+ doc: Update for Unicode 6.1.0.
+ * doc/unictype.texi (Joining group): Document
+ UC_JOINING_GROUP_ROHINGYA_YEH.
+
+2021-12-16 Bruno Haible <bruno@clisp.org>
+
+ doc: Clarify u{8,16,32}_grapheme_prev behaviour.
+ Reported by Vincent Westenberg <vincent.westenberg@posteo.de> in
+ <https://lists.gnu.org/archive/html/bug-libunistring/2021-12/msg00001.html>.
+ * doc/unigbrk.texi (Grapheme cluster breaks in a string): Clarify that
+ the u{8,16,32}_grapheme_prev functions, like u{8,16,32}_prev, work only
+ on well-formed Unicode strings.
+
+2021-12-07 Bruno Haible <bruno@clisp.org>
+
+ Clarify rationale for gl_INIT_PACKAGE.
+ * m4/init-package-version.m4: Add more comments.
+
+2021-12-07 Bruno Haible <bruno@clisp.org>
+
+ Fix some license headers.
+ Reported by Dylan Aïssi <daissi@debian.org> at
+ <https://savannah.gnu.org/bugs/?61459>.
+ * lib/version.c: Change license header to LGPLv3+ or GPLv2+.
+ * lib/unistring-notinline.h: Likewise.
+ * lib/unistring/cdefs.h: Likewise.
+ * lib/unistring/inline.h: Likewise.
+ * lib/unistring/version.in.h: Likewise.
+ * lib/unistring/woe32dll.in.h: Likewise.
+
+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ Make gl_INIT_PACKAGE work with Automake >= 1.16.4.
+ Reported and analyzed by Nicole Mazzuca <mazzucan@outlook.com> in
+ <https://lists.gnu.org/archive/html/bug-libunistring/2021-08/msg00002.html>.
+ * m4/init-package-version.m4 (gl_INIT_PACKAGE): Use a new macro
+ gl_INIT_EMPTY.
+ (gl_INIT_DUMMY): Expand to empty in two steps, via a new macro
+ gl_INIT_DUMMY2.
+
+2021-07-25 Bruno Haible <bruno@clisp.org>
+
+ u{8,16,32}-uctomb: Avoid possible trouble with huge strings.
+ * doc/unistr.texi (Creating Unicode strings): Update prototypes of
+ u8_uctomb, u16_uctomb, u32_uctomb to match the change in gnulib on
+ 2020-09-05.
+
+2021-05-30 Bruno Haible <bruno@clisp.org>
+
+ Change license to LGPLv3+ or GPLv2+.
+ * README (Copyright): Adjust section.
+ * doc/libunistring.texi (Licenses): Change accordingly.
+ * NEWS: Mention the change.
+
+2021-04-06 Bruno Haible <bruno@clisp.org>
+
+ build: Fix the set of exported symbols on Alpine Linux.
+ * build-aux/join-v-1: New file.
+ * Makefile.am (EXTRA_DIST): Add it.
+ * lib/Makefile.am (config.h): Use it instead of 'join -v 1'.
+
+2021-02-28 Bruno Haible <bruno@clisp.org>
+
+ Update DEPENDENCIES.
+ * DEPENDENCIES: List the normal dependencies of a package with an
+ Autoconf-generated configure file. Update info regarding libiconv.
+
+2021-01-31 Bruno Haible <bruno@clisp.org>
+
+ Switch to autoconf-2.71.
+ * autogen.sh: Update comments.
+
+2020-12-09 Bruno Haible <bruno@clisp.org>
+
+ Allow use of autoconf-2.70.
+ * autogen.sh: Update comments.
+
+2020-11-21 Bruno Haible <bruno@clisp.org>
+
+ build: Fix export of symbols in 64-bit mode on Windows.
+ Reported by kenjiuno <h8mastre@gmail.com> in
+ <https://savannah.gnu.org/bugs/?59491>.
+ * woe32dll/export.h (IMP): Correct definition in 64-bit mode.
+
2020-09-06 Bruno Haible <bruno@clisp.org>
build: Add support for clang on Windows.
diff --git a/DEPENDENCIES b/DEPENDENCIES
index be47e5c..797bdb4 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -1,16 +1,89 @@
The following packages should be installed before GNU libunistring is
-installed:
+installed (runtime dependencies that are also build dependencies):
* GNU libiconv
- + Not needed on systems with
- - glibc 2.2 or newer, or
- - MacOS X 10.3 or newer, or
- - NetBSD 3.0 or newer.
+ + Not needed on systems with glibc, on macOS, and NetBSD.
But highly recommended on all other systems.
Needed for character set conversion of strings from/to Unicode.
+ Homepage:
https://www.gnu.org/software/libiconv/
+ Download:
https://ftp.gnu.org/gnu/libiconv/
+ + Pre-built package name:
+ - On Debian and Debian-based systems: --,
+ - On Red Hat distributions: --.
+ - Other: https://repology.org/project/libiconv/versions
+ If it is installed in a nonstandard directory, pass the option
--with-libiconv-prefix=DIR to 'configure'.
+
+
+The following packages should be installed when GNU libunistring is installed
+(runtime dependencies, but not build dependencies):
+
+None.
+
+
+The following should be installed when GNU libunistring is built, but are not
+needed later, once it is installed (build dependencies, but not runtime
+dependencies):
+
+* A C runtime, compiler, linker, etc.
+ + Mandatory.
+ Either the platform's native 'cc', or GCC 3.1 or newer.
+ + GCC Homepage:
+ https://gcc.gnu.org/
+ + Download:
+ https://ftp.gnu.org/gnu/gcc/
+
+* A 'make' utility.
+ + Mandatory.
+ Either the platform's native 'make' (for in-tree builds only),
+ or GNU Make 3.79.1 or newer.
+ + GNU Make Homepage:
+ https://www.gnu.org/software/make/
+ + Download:
+ https://ftp.gnu.org/gnu/make/
+
+* A shell
+ + Mandatory.
+ Either the platform's native 'sh', or Bash.
+ + Homepage:
+ https://www.gnu.org/software/bash/
+ + Download:
+ https://ftp.gnu.org/gnu/bash/
+
+* Core POSIX utilities, including:
+ [ basename cat chgrp chmod chown cp dd echo expand expr
+ false hostname install kill ln ls md5sum mkdir mkfifo
+ mknod mv printenv pwd rm rmdir sleep sort tee test touch
+ true uname
+ + Mandatory.
+ Either the platform's native utilities, or GNU coreutils.
+ + Homepage:
+ https://www.gnu.org/software/coreutils/
+ + Download:
+ https://ftp.gnu.org/gnu/coreutils/
+
+* The comparison utilities 'cmp' and 'diff'.
+ + Mandatory.
+ Either the platform's native utilities, or GNU diffutils.
+ + Homepage:
+ https://www.gnu.org/software/diffutils/
+ + Download:
+ https://ftp.gnu.org/gnu/diffutils/
+
+* Grep.
+ + Mandatory.
+ Either the platform's native grep, or GNU grep.
+ + Homepage:
+ https://www.gnu.org/software/grep/
+ + Download:
+ https://ftp.gnu.org/gnu/grep/
+
+* Awk.
+ + Mandatory.
+ Either the platform's native awk, mawk, or nawk, or GNU awk.
+ + Homepage:
+ https://www.gnu.org/software/gawk/
+ + Download:
+ https://ftp.gnu.org/gnu/gawk/
diff --git a/HACKING b/HACKING
index fa59b41..9edbdfd 100644
--- a/HACKING
+++ b/HACKING
@@ -11,7 +11,7 @@ You will need reasonably recent versions of the build tools:
+ Homepage:
https://gcc.gnu.org/
- * GNU automake
+ * GNU automake 1.16.4 or newer
+ Homepage:
https://www.gnu.org/software/automake/
@@ -71,12 +71,12 @@ https://savannah.gnu.org/git/?group=libunistring .
After fetching the sources from the Git repository, peek at the comments in
autogen.sh, then run
- ./gitsub.sh pull
+ ./autopull.sh
./autogen.sh
Then you can proceed with "./configure" as usual.
Each time you want to update the source, do not only "git pull". Instead do
- git pull && ./gitsub.sh pull
+ git pull && ./autopull.sh
./autogen.sh
diff --git a/JOIN-GNU b/JOIN-GNU
new file mode 100644
index 0000000..c0fc898
--- /dev/null
+++ b/JOIN-GNU
@@ -0,0 +1,20 @@
+Join the GNU Project
+====================
+
+GNU libunistring is part of the GNU Operating System, developed by the
+GNU Project.
+
+If you are the author of an awesome program and want to join us in
+writing Free (libre) Software, please consider making it an official
+GNU program and become a GNU Maintainer. Instructions on how to do
+this are here:
+ https://www.gnu.org/help/evaluation
+We are looking forward to hacking with you!
+
+Don't have a program to contribute? Look at all the other ways to help:
+ https://www.gnu.org/help/help.html
+
+And to learn more about Free (libre) Software in general, please read
+and share this page:
+ https://gnu.org/philosophy/free-sw.html
+
diff --git a/Makefile.am b/Makefile.am
index fdc3e68..8c05275 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
## Makefile for the toplevel directory of GNU libunistring.
-## Copyright (C) 2009, 2016, 2018 Free Software Foundation, Inc.
+## Copyright (C) 2009, 2016, 2018, 2021-2022 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
@@ -22,8 +22,9 @@ ACLOCAL_AMFLAGS = -I m4 -I gnulib-m4
SUBDIRS = doc gnulib-local lib tests
EXTRA_DIST = \
- version.sh BUGS DEPENDENCIES HACKING autogen.sh \
- build-aux/texi2html build-aux/run-test
+ version.sh BUGS DEPENDENCIES HACKING JOIN-GNU \
+ autogen.sh \
+ build-aux/join-v-1 build-aux/texi2html build-aux/run-test
# Allow users to use "gnulib-tool --update".
diff --git a/NEWS b/NEWS
index b2892b3..5873566 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,28 @@
-New in 0.9.11:
+New in 1.2:
+* Fixed a bug in the *printf functions: In the %U, %lU, %llU directives, a
+ negative width given as an argument did not trigger left-justification.
+
+New in 1.1:
+* The data tables and algorithms have been updated to Unicode version 15.0.0.
+
+New in 1.0:
+* The license has changed from "LGPLv3+ or GPLv2" to "LGPLv3+ or GPLv2+".
+* The data tables and algorithms have been updated to Unicode version 14.0.0.
+* The functions u8_uctomb, u16_uctomb, u32_uctomb now support strings larger
+ than 2 GiB by taking an 'n' argument of type ptrdiff_t (instead of int).
+* The functions u*_possible_linebreaks and u*_width_linebreaks now make it
+ easier to work with strings that contain CR-LF sequences: In this case,
+ in the returned array, it will return UC_BREAK_CR_BEFORE_LF followed by
+ UC_BREAK_MANDATORY (instead of twice UC_BREAK_MANDATORY).
+* There are new properties for recognizing pictographic symbols and
+ regional indicators:
+ - UC_PROPERTY_EMOJI uc_is_property_emoji
+ - UC_PROPERTY_EMOJI_PRESENTATION uc_is_property_emoji_presentation
+ - UC_PROPERTY_EMOJI_MODIFIER uc_is_property_emoji_modifier
+ - UC_PROPERTY_EMOJI_MODIFIER_BASE uc_is_property_emoji_modifier_base
+ - UC_PROPERTY_EMOJI_COMPONENT uc_is_property_emoji_component
+ - UC_PROPERTY_EXTENDED_PICTOGRAPHIC uc_is_property_extended_pictographic
+ - UC_PROPERTY_REGIONAL_INDICATOR uc_is_property_regional_indicator
* Fixed multithread-safety bugs on Cygwin, native Windows, and Haiku.
New in 0.9.10:
diff --git a/README b/README
index 47de6b0..997efbb 100644
--- a/README
+++ b/README
@@ -46,11 +46,12 @@ Copyright
---------
The libunistring library and its header files are dual-licensed under
-"the GNU LGPLv3+ or the GNU GPLv2". This means, you can use it under either
+"the GNU LGPLv3+ or the GNU GPLv2+". This means, you can use it under either
- the terms of the GNU Lesser General Public License (LGPL) version 3 or
(at your option) any later version, or
- - the terms of the GNU General Public License (GPL) version 2, or
- - the same dual license "the GNU LGPLv3+ or the GNU GPLv2".
+ - the terms of the GNU General Public License (GPL) version 2 or
+ (at your option) any later version, or
+ - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
You find the GNU LGPL version 3 in the file COPYING.LIB. This license is
based on the GNU GPL version 3, see file COPYING.
@@ -68,7 +69,7 @@ The documentation is under another license; see in the documentation.
Download
--------
- https://ftp.gnu.org/gnu/libunistring/libunistring-0.9.10.tar.gz
+ https://ftp.gnu.org/gnu/libunistring/libunistring-1.1.tar.gz
Homepage
--------
@@ -82,5 +83,10 @@ Report bugs
- in the bug tracker at <https://savannah.gnu.org/projects/libunistring>
- or by email to <bug-libunistring@gnu.org>.
+Join the GNU project
+--------------------
+
+See file JOIN-GNU.
+
Bruno Haible <bruno@clisp.org>
diff --git a/autogen.sh b/autogen.sh
index d1d493c..5cce072 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,14 +4,11 @@
# also regenerates all aclocal.m4, config.h.in, Makefile.in, configure files
# with new versions of autoconf or automake.
#
-# This script requires autoconf-2.63..2.69 and automake-1.11..1.16 in the PATH.
-# If not used from a released tarball, it also requires either
-# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout, or
-# - a preceding invocation of './gitsub.sh pull'.
+# This script requires autoconf-2.65..2.71 and automake-1.16.4 in the PATH.
# It also requires
# - the gperf program.
-# Copyright (C) 2003-2020 Free Software Foundation, Inc.
+# Copyright (C) 2003-2023 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
@@ -26,7 +23,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# Prerequisite (if not used from a released tarball): either
+# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout, or
+# - a preceding invocation of './autopull.sh'.
+#
# Usage: ./autogen.sh [--skip-gnulib]
+#
+# Options:
+# --skip-gnulib Avoid fetching files from Gnulib.
+# This option is useful
+# - when you are working from a released tarball (possibly
+# with modifications), or
+# - as a speedup, if the set of gnulib modules did not
+# change since the last time you ran this script.
skip_gnulib=false
while :; do
@@ -439,20 +448,6 @@ if test $skip_gnulib = false; then
< lib/unistr.in.h \
> lib/unistr.in.h.tmp \
&& mv lib/unistr.in.h.tmp lib/unistr.in.h
- # Change lib/unictype.h, lib/uninorm.h, lib/unicase.h for shared libraries on Woe32 systems.
- sed -e 's/extern const uc_general_category_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_/' \
- -e 's/extern const uc_property_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_/' \
- < lib/unictype.in.h \
- > lib/unictype.in.h.tmp \
- && mv lib/unictype.in.h.tmp lib/unictype.in.h
- sed -e 's/extern const struct unicode_normalization_form /extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form /' \
- < lib/uninorm.in.h \
- > lib/uninorm.in.h.tmp \
- && mv lib/uninorm.in.h.tmp lib/uninorm.in.h
- sed -e 's/extern const casing_/extern LIBUNISTRING_DLL_VARIABLE const casing_/' \
- < lib/unicase.in.h \
- > lib/unicase.in.h.tmp \
- && mv lib/unicase.in.h.tmp lib/unicase.in.h
$GNULIB_TOOL --copy-file build-aux/ar-lib; chmod a+x build-aux/ar-lib
$GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess
$GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub
@@ -474,3 +469,5 @@ automake --add-missing --copy
patch build-aux/test-driver < build-aux/test-driver.diff
# Get rid of autom4te.cache directory.
rm -rf autom4te.cache
+
+echo "$0: done. Now you can run './configure'."
diff --git a/autopull.sh b/autopull.sh
new file mode 100755
index 0000000..4638d7b
--- /dev/null
+++ b/autopull.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Convenience script for fetching auxiliary files that are omitted from
+# the version control repository of this package.
+
+# Copyright (C) 2022 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/>.
+
+# Usage: ./autopull.sh [--one-time]
+#
+# Options:
+# --one-time Optimize, assuming that the current directory will be
+# used to build the current version only and will be
+# thrown away afterwards.
+
+# Parse options.
+
+shallow=
+
+while :; do
+ case "$1" in
+ --one-time) shallow='--depth 1'; shift;;
+ *) break ;;
+ esac
+done
+
+
+./gitsub.sh pull $shallow || exit 1
+
+echo "$0: done. Now you can run './autogen.sh'."
diff --git a/build-aux/join-v-1 b/build-aux/join-v-1
new file mode 100755
index 0000000..d1948ac
--- /dev/null
+++ b/build-aux/join-v-1
@@ -0,0 +1,43 @@
+#!/bin/sh
+# join-v-1 - Filter out a set of items from another set of items.
+
+# Copyright (C) 2021 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/>.
+
+# Usage: join-v-1 FILE1 FILE2
+# Produces on stdout a list of items that are contained in FILE1 but not
+# contained in FILE2. The items are strings without whitespace.
+# FILE1 and FILE2 contain such items, one per line, sorted according to
+# the current locale.
+# FILE1 or FILE2 can be specified as '-', which denotes standard input.
+
+# The 'join' program does not exist on all platforms. Where it exists,
+# we can use it.
+if (type join) >/dev/null 2>&1; then
+ join -v 1 "$1" "$2"
+else
+ # Two solutions based on awk, by Bernhard Voelker <mail@bernhard-voelker.de>.
+ if true; then
+ awk -v keyfile="$2" '
+ BEGIN { while ((getline < keyfile) > 0) k[$1]=1 }
+ !k[$1]
+ ' "$1"
+ else
+ awk '
+ keys { k[$1]=1; next }
+ !k[$1]
+ ' keys=1 "$2" keys=0 "$1"
+ fi
+fi
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 0f0a2da..2a50d7f 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -1,12 +1,12 @@
-#! /bin/sh
+#! /usr/bin/env sh
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
-## by inline-source v2014-01-03.01
+## by inline-source v2019-02-19.15
-# libtool (GNU libtool) 2.4.6
+# libtool (GNU libtool) 2.4.7
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -31,8 +31,8 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4.6
-package_revision=2.4.6
+VERSION=2.4.7
+package_revision=2.4.7
## ------ ##
@@ -64,34 +64,25 @@ package_revision=2.4.6
# libraries, which are installed to $pkgauxdir.
# Set a version string for this script.
-scriptversion=2015-01-20.17; # UTC
+scriptversion=2019-02-19.15; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# 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.
-
-# As a special exception to the GNU General Public License, if you distribute
-# this file as part of a program or library that is built using GNU Libtool,
-# you may include this file under the same distribution terms that you use
-# for the rest of that program.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNES 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 <http://www.gnu.org/licenses/>.
+# This is free software. There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2004-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it. See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
-# Please report bugs or propose patches to gary@gnu.org.
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
## ------ ##
@@ -139,9 +130,12 @@ do
_G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
fi"
done
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# These NLS vars are set unconditionally (bootstrap issue #24). Unset those
+# in case the environment reset is needed later and the $save_* variant is not
+# defined (see the code above).
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
# Make sure IFS has a sensible default
sp=' '
@@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
+# func_unset VAR
+# --------------
+# Portably unset VAR.
+# In some shells, an 'unset VAR' statement leaves a non-zero return
+# status if VAR is already unset, which might be problematic if the
+# statement is used at the end of a function (thus poisoning its return
+# value) or when 'set -e' is active (causing even a spurious abort of
+# the script in this case).
+func_unset ()
+{
+ { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
+}
+
+
+# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
+func_unset CDPATH
+
+# Make sure ${,E,F}GREP behave sanely.
+func_unset GREP_OPTIONS
+
## ------------------------- ##
## Locate command utilities. ##
@@ -259,7 +273,7 @@ test -z "$SED" && {
rm -f conftest.in conftest.tmp conftest.nl conftest.out
}
- func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
rm -f conftest.sed
SED=$func_path_progs_result
}
@@ -295,7 +309,7 @@ test -z "$GREP" && {
rm -f conftest.in conftest.tmp conftest.nl conftest.out
}
- func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
GREP=$func_path_progs_result
}
@@ -360,6 +374,35 @@ sed_double_backslash="\
s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
s/\n//g"
+# require_check_ifs_backslash
+# ---------------------------
+# Check if we can use backslash as IFS='\' separator, and set
+# $check_ifs_backshlash_broken to ':' or 'false'.
+require_check_ifs_backslash=func_require_check_ifs_backslash
+func_require_check_ifs_backslash ()
+{
+ _G_save_IFS=$IFS
+ IFS='\'
+ _G_check_ifs_backshlash='a\\b'
+ for _G_i in $_G_check_ifs_backshlash
+ do
+ case $_G_i in
+ a)
+ check_ifs_backshlash_broken=false
+ ;;
+ '')
+ break
+ ;;
+ *)
+ check_ifs_backshlash_broken=:
+ break
+ ;;
+ esac
+ done
+ IFS=$_G_save_IFS
+ require_check_ifs_backslash=:
+}
+
## ----------------- ##
## Global variables. ##
@@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
{
$debug_cmd
- func_quote_for_eval "$2"
- eval "$1+=\\ \$func_quote_for_eval_result"
+ func_quote_arg pretty "$2"
+ eval "$1+=\\ \$func_quote_arg_result"
}'
else
func_append_quoted ()
{
$debug_cmd
- func_quote_for_eval "$2"
- eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ func_quote_arg pretty "$2"
+ eval "$1=\$$1\\ \$func_quote_arg_result"
}
fi
@@ -1091,85 +1134,203 @@ func_relative_path ()
}
-# func_quote_for_eval ARG...
-# --------------------------
-# Aesthetically quote ARGs to be evaled later.
-# This function returns two values:
-# i) func_quote_for_eval_result
-# double-quoted, suitable for a subsequent eval
-# ii) func_quote_for_eval_unquoted_result
-# has all characters that are still active within double
-# quotes backslashified.
-func_quote_for_eval ()
+# func_quote_portable EVAL ARG
+# ----------------------------
+# Internal function to portably implement func_quote_arg. Note that we still
+# keep attention to performance here so we as much as possible try to avoid
+# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
+func_quote_portable ()
{
$debug_cmd
- func_quote_for_eval_unquoted_result=
- func_quote_for_eval_result=
- while test 0 -lt $#; do
- case $1 in
- *[\\\`\"\$]*)
- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
- *)
- _G_unquoted_arg=$1 ;;
- esac
- if test -n "$func_quote_for_eval_unquoted_result"; then
- func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
- else
- func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ $require_check_ifs_backslash
+
+ func_quote_portable_result=$2
+
+ # one-time-loop (easy break)
+ while true
+ do
+ if $1; then
+ func_quote_portable_result=`$ECHO "$2" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
+ break
fi
- case $_G_unquoted_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and variable expansion
- # for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- _G_quoted_arg=\"$_G_unquoted_arg\"
+ # Quote for eval.
+ case $func_quote_portable_result in
+ *[\\\`\"\$]*)
+ # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
+ # contains the shell wildcard characters.
+ case $check_ifs_backshlash_broken$func_quote_portable_result in
+ :*|*[\[\*\?]*)
+ func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
+ | $SED "$sed_quote_subst"`
+ break
+ ;;
+ esac
+
+ func_quote_portable_old_IFS=$IFS
+ for _G_char in '\' '`' '"' '$'
+ do
+ # STATE($1) PREV($2) SEPARATOR($3)
+ set start "" ""
+ func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
+ IFS=$_G_char
+ for _G_part in $func_quote_portable_result
+ do
+ case $1 in
+ quote)
+ func_append func_quote_portable_result "$3$2"
+ set quote "$_G_part" "\\$_G_char"
+ ;;
+ start)
+ set first "" ""
+ func_quote_portable_result=
+ ;;
+ first)
+ set quote "$_G_part" ""
+ ;;
+ esac
+ done
+ done
+ IFS=$func_quote_portable_old_IFS
;;
- *)
- _G_quoted_arg=$_G_unquoted_arg
- ;;
+ *) ;;
esac
-
- if test -n "$func_quote_for_eval_result"; then
- func_append func_quote_for_eval_result " $_G_quoted_arg"
- else
- func_append func_quote_for_eval_result "$_G_quoted_arg"
- fi
- shift
+ break
done
+
+ func_quote_portable_unquoted_result=$func_quote_portable_result
+ case $func_quote_portable_result in
+ # double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # many bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_portable_result=\"$func_quote_portable_result\"
+ ;;
+ esac
}
-# func_quote_for_expand ARG
-# -------------------------
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
- $debug_cmd
+# func_quotefast_eval ARG
+# -----------------------
+# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
+# but optimized for speed. Result is stored in $func_quotefast_eval.
+if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
+ printf -v _GL_test_printf_tilde %q '~'
+ if test '\~' = "$_GL_test_printf_tilde"; then
+ func_quotefast_eval ()
+ {
+ printf -v func_quotefast_eval_result %q "$1"
+ }
+ else
+ # Broken older Bash implementations. Make those faster too if possible.
+ func_quotefast_eval ()
+ {
+ case $1 in
+ '~'*)
+ func_quote_portable false "$1"
+ func_quotefast_eval_result=$func_quote_portable_result
+ ;;
+ *)
+ printf -v func_quotefast_eval_result %q "$1"
+ ;;
+ esac
+ }
+ fi
+else
+ func_quotefast_eval ()
+ {
+ func_quote_portable false "$1"
+ func_quotefast_eval_result=$func_quote_portable_result
+ }
+fi
- case $1 in
- *[\\\`\"]*)
- _G_arg=`$ECHO "$1" | $SED \
- -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- _G_arg=$1 ;;
+
+# func_quote_arg MODEs ARG
+# ------------------------
+# Quote one ARG to be evaled later. MODEs argument may contain zero or more
+# specifiers listed below separated by ',' character. This function returns two
+# values:
+# i) func_quote_arg_result
+# double-quoted (when needed), suitable for a subsequent eval
+# ii) func_quote_arg_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified. Available only if 'unquoted' is specified.
+#
+# Available modes:
+# ----------------
+# 'eval' (default)
+# - escape shell special characters
+# 'expand'
+# - the same as 'eval'; but do not quote variable references
+# 'pretty'
+# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
+# be used later in func_quote to get output like: 'echo "a b"' instead
+# of 'echo a\ b'. This is slower than default on some shells.
+# 'unquoted'
+# - produce also $func_quote_arg_unquoted_result which does not contain
+# wrapping double-quotes.
+#
+# Examples for 'func_quote_arg pretty,unquoted string':
+#
+# string | *_result | *_unquoted_result
+# ------------+-----------------------+-------------------
+# " | \" | \"
+# a b | "a b" | a b
+# "a b" | "\"a b\"" | \"a b\"
+# * | "*" | *
+# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
+#
+# Examples for 'func_quote_arg pretty,unquoted,expand string':
+#
+# string | *_result | *_unquoted_result
+# --------------+---------------------+--------------------
+# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
+func_quote_arg ()
+{
+ _G_quote_expand=false
+ case ,$1, in
+ *,expand,*)
+ _G_quote_expand=:
+ ;;
esac
- case $_G_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- _G_arg=\"$_G_arg\"
+ case ,$1, in
+ *,pretty,*|*,expand,*|*,unquoted,*)
+ func_quote_portable $_G_quote_expand "$2"
+ func_quote_arg_result=$func_quote_portable_result
+ func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
+ ;;
+ *)
+ # Faster quote-for-eval for some shells.
+ func_quotefast_eval "$2"
+ func_quote_arg_result=$func_quotefast_eval_result
;;
esac
+}
+
- func_quote_for_expand_result=$_G_arg
+# func_quote MODEs ARGs...
+# ------------------------
+# Quote all ARGs to be evaled later and join them into single command. See
+# func_quote_arg's description for more info.
+func_quote ()
+{
+ $debug_cmd
+ _G_func_quote_mode=$1 ; shift
+ func_quote_result=
+ while test 0 -lt $#; do
+ func_quote_arg "$_G_func_quote_mode" "$1"
+ if test -n "$func_quote_result"; then
+ func_append func_quote_result " $func_quote_arg_result"
+ else
+ func_append func_quote_result "$func_quote_arg_result"
+ fi
+ shift
+ done
}
@@ -1215,8 +1376,8 @@ func_show_eval ()
_G_cmd=$1
_G_fail_exp=${2-':'}
- func_quote_for_expand "$_G_cmd"
- eval "func_notquiet $func_quote_for_expand_result"
+ func_quote_arg pretty,expand "$_G_cmd"
+ eval "func_notquiet $func_quote_arg_result"
$opt_dry_run || {
eval "$_G_cmd"
@@ -1241,8 +1402,8 @@ func_show_eval_locale ()
_G_fail_exp=${2-':'}
$opt_quiet || {
- func_quote_for_expand "$_G_cmd"
- eval "func_echo $func_quote_for_expand_result"
+ func_quote_arg expand,pretty "$_G_cmd"
+ eval "func_echo $func_quote_arg_result"
}
$opt_dry_run || {
@@ -1369,30 +1530,26 @@ func_lt_ver ()
# End:
#! /bin/sh
-# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
-
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# 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.
+# This is free software. There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2010-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it. See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
-# Please report bugs or propose patches to gary@gnu.org.
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
## ------ ##
@@ -1415,7 +1572,7 @@ scriptversion=2014-01-07.03; # UTC
#
# In order for the '--version' option to work, you will need to have a
# suitably formatted comment like the one at the top of this file
-# starting with '# Written by ' and ending with '# warranty; '.
+# starting with '# Written by ' and ending with '# Copyright'.
#
# For '-h' and '--help' to work, you will also need a one line
# description of your script's purpose in a comment directly above the
@@ -1427,7 +1584,7 @@ scriptversion=2014-01-07.03; # UTC
# to display verbose messages only when your user has specified
# '--verbose'.
#
-# After sourcing this file, you can plug processing for additional
+# After sourcing this file, you can plug in processing for additional
# options by amending the variables from the 'Configuration' section
# below, and following the instructions in the 'Option parsing'
# section further down.
@@ -1476,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information."
## ------------------------- ##
# This section contains functions for adding, removing, and running hooks
-# to the main code. A hook is just a named list of of function, that can
-# be run in order later on.
+# in the main code. A hook is just a list of function names that can be
+# run in order later on.
# func_hookable FUNC_NAME
# -----------------------
@@ -1510,7 +1667,8 @@ func_add_hook ()
# func_remove_hook FUNC_NAME HOOK_FUNC
# ------------------------------------
-# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+# Remove HOOK_FUNC from the list of hook functions to be called by
+# FUNC_NAME.
func_remove_hook ()
{
$debug_cmd
@@ -1519,10 +1677,28 @@ func_remove_hook ()
}
+# func_propagate_result FUNC_NAME_A FUNC_NAME_B
+# ---------------------------------------------
+# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
+# *_result variable of FUNC_NAME_B.
+func_propagate_result ()
+{
+ $debug_cmd
+
+ func_propagate_result_result=:
+ if eval "test \"\${${1}_result+set}\" = set"
+ then
+ eval "${2}_result=\$${1}_result"
+ else
+ func_propagate_result_result=false
+ fi
+}
+
+
# func_run_hooks FUNC_NAME [ARG]...
# ---------------------------------
# Run all hook functions registered to FUNC_NAME.
-# It is assumed that the list of hook functions contains nothing more
+# It's assumed that the list of hook functions contains nothing more
# than a whitespace-delimited list of legal shell function names, and
# no effort is wasted trying to catch shell meta-characters or preserve
# whitespace.
@@ -1532,22 +1708,19 @@ func_run_hooks ()
case " $hookable_fns " in
*" $1 "*) ;;
- *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ *) func_fatal_error "'$1' does not support hook functions." ;;
esac
eval _G_hook_fns=\$$1_hooks; shift
for _G_hook in $_G_hook_fns; do
- eval $_G_hook '"$@"'
-
- # store returned options list back into positional
- # parameters for next 'cmd' execution.
- eval _G_hook_result=\$${_G_hook}_result
- eval set dummy "$_G_hook_result"; shift
+ func_unset "${_G_hook}_result"
+ eval $_G_hook '${1+"$@"}'
+ func_propagate_result $_G_hook func_run_hooks
+ if $func_propagate_result_result; then
+ eval set dummy "$func_run_hooks_result"; shift
+ fi
done
-
- func_quote_for_eval ${1+"$@"}
- func_run_hooks_result=$func_quote_for_eval_result
}
@@ -1557,10 +1730,18 @@ func_run_hooks ()
## --------------- ##
# In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
-# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'. Like this:
+# full positional parameter list from your hook function. You may remove
+# or edit any options that you action, and then pass back the remaining
+# unprocessed options in '<hooked_function_name>_result', escaped
+# suitably for 'eval'.
+#
+# The '<hooked_function_name>_result' variable is automatically unset
+# before your hook gets called; for best performance, only set the
+# *_result variable when necessary (i.e. don't call the 'func_quote'
+# function unnecessarily because it can be an expensive operation on some
+# machines).
+#
+# Like this:
#
# my_options_prep ()
# {
@@ -1570,9 +1751,8 @@ func_run_hooks ()
# usage_message=$usage_message'
# -s, --silent don'\''t print informational messages
# '
-#
-# func_quote_for_eval ${1+"$@"}
-# my_options_prep_result=$func_quote_for_eval_result
+# # No change in '$@' (ignored completely by this hook). Leave
+# # my_options_prep_result variable intact.
# }
# func_add_hook func_options_prep my_options_prep
#
@@ -1581,25 +1761,36 @@ func_run_hooks ()
# {
# $debug_cmd
#
-# # Note that for efficiency, we parse as many options as we can
+# args_changed=false
+#
+# # Note that, for efficiency, we parse as many options as we can
# # recognise in a loop before passing the remainder back to the
# # caller on the first unrecognised argument we encounter.
# while test $# -gt 0; do
# opt=$1; shift
# case $opt in
-# --silent|-s) opt_silent=: ;;
+# --silent|-s) opt_silent=:
+# args_changed=:
+# ;;
# # Separate non-argument short options:
# -s*) func_split_short_opt "$_G_opt"
# set dummy "$func_split_short_opt_name" \
# "-$func_split_short_opt_arg" ${1+"$@"}
# shift
+# args_changed=:
# ;;
-# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# *) # Make sure the first unrecognised option "$_G_opt"
+# # is added back to "$@" in case we need it later,
+# # if $args_changed was set to 'true'.
+# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
# esac
# done
#
-# func_quote_for_eval ${1+"$@"}
-# my_silent_option_result=$func_quote_for_eval_result
+# # Only call 'func_quote' here if we processed at least one argument.
+# if $args_changed; then
+# func_quote eval ${1+"$@"}
+# my_silent_option_result=$func_quote_result
+# fi
# }
# func_add_hook func_parse_options my_silent_option
#
@@ -1610,17 +1801,26 @@ func_run_hooks ()
#
# $opt_silent && $opt_verbose && func_fatal_help "\
# '--silent' and '--verbose' options are mutually exclusive."
-#
-# func_quote_for_eval ${1+"$@"}
-# my_option_validation_result=$func_quote_for_eval_result
# }
# func_add_hook func_validate_options my_option_validation
#
-# You'll alse need to manually amend $usage_message to reflect the extra
+# You'll also need to manually amend $usage_message to reflect the extra
# options you parse. It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+ $debug_cmd
+
+ func_run_hooks func_options ${1+"$@"}
+ func_propagate_result func_run_hooks func_options_finish
+}
+
+
# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
@@ -1630,17 +1830,27 @@ func_options ()
{
$debug_cmd
- func_options_prep ${1+"$@"}
- eval func_parse_options \
- ${func_options_prep_result+"$func_options_prep_result"}
- eval func_validate_options \
- ${func_parse_options_result+"$func_parse_options_result"}
+ _G_options_quoted=false
- eval func_run_hooks func_options \
- ${func_validate_options_result+"$func_validate_options_result"}
+ for my_func in options_prep parse_options validate_options options_finish
+ do
+ func_unset func_${my_func}_result
+ func_unset func_run_hooks_result
+ eval func_$my_func '${1+"$@"}'
+ func_propagate_result func_$my_func func_options
+ if $func_propagate_result_result; then
+ eval set dummy "$func_options_result"; shift
+ _G_options_quoted=:
+ fi
+ done
- # save modified positional parameters for caller
- func_options_result=$func_run_hooks_result
+ $_G_options_quoted || {
+ # As we (func_options) are top-level options-parser function and
+ # nobody quoted "$@" for us yet, we need to do it explicitly for
+ # caller.
+ func_quote eval ${1+"$@"}
+ func_options_result=$func_quote_result
+ }
}
@@ -1649,9 +1859,8 @@ func_options ()
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters. If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
-# modified list must be put in 'func_run_hooks_result' before
-# returning.
+# needs to propagate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before returning.
func_hookable func_options_prep
func_options_prep ()
{
@@ -1662,9 +1871,7 @@ func_options_prep ()
opt_warning_types=
func_run_hooks func_options_prep ${1+"$@"}
-
- # save modified positional parameters for caller
- func_options_prep_result=$func_run_hooks_result
+ func_propagate_result func_run_hooks func_options_prep
}
@@ -1676,25 +1883,32 @@ func_parse_options ()
{
$debug_cmd
- func_parse_options_result=
-
+ _G_parse_options_requote=false
# this just eases exit handling
while test $# -gt 0; do
# Defer to hook functions for initial option parsing, so they
# get priority in the event of reusing an option name.
func_run_hooks func_parse_options ${1+"$@"}
-
- # Adjust func_parse_options positional parameters to match
- eval set dummy "$func_run_hooks_result"; shift
+ func_propagate_result func_run_hooks func_parse_options
+ if $func_propagate_result_result; then
+ eval set dummy "$func_parse_options_result"; shift
+ # Even though we may have changed "$@", we passed the "$@" array
+ # down into the hook and it quoted it for us (because we are in
+ # this if-branch). No need to quote it again.
+ _G_parse_options_requote=false
+ fi
# Break out of the loop if we already parsed every option.
test $# -gt 0 || break
+ # We expect that one of the options parsed in this function matches
+ # and thus we remove _G_opt from "$@" and need to re-quote.
+ _G_match_parse_options=:
_G_opt=$1
shift
case $_G_opt in
--debug|-x) debug_cmd='set -x'
- func_echo "enabling shell trace mode"
+ func_echo "enabling shell trace mode" >&2
$debug_cmd
;;
@@ -1704,7 +1918,10 @@ func_parse_options ()
;;
--warnings|--warning|-W)
- test $# = 0 && func_missing_arg $_G_opt && break
+ if test $# = 0 && func_missing_arg $_G_opt; then
+ _G_parse_options_requote=:
+ break
+ fi
case " $warning_categories $1" in
*" $1 "*)
# trailing space prevents matching last $1 above
@@ -1757,15 +1974,24 @@ func_parse_options ()
shift
;;
- --) break ;;
+ --) _G_parse_options_requote=: ; break ;;
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
+ _G_match_parse_options=false
+ break
+ ;;
esac
+
+ if $_G_match_parse_options; then
+ _G_parse_options_requote=:
+ fi
done
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- func_parse_options_result=$func_quote_for_eval_result
+ if $_G_parse_options_requote; then
+ # save modified positional parameters for caller
+ func_quote eval ${1+"$@"}
+ func_parse_options_result=$func_quote_result
+ fi
}
@@ -1782,12 +2008,10 @@ func_validate_options ()
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
func_run_hooks func_validate_options ${1+"$@"}
+ func_propagate_result func_run_hooks func_validate_options
# Bail if the options were screwed!
$exit_cmd $EXIT_FAILURE
-
- # save modified positional parameters for caller
- func_validate_options_result=$func_run_hooks_result
}
@@ -1843,8 +2067,8 @@ func_missing_arg ()
# func_split_equals STRING
# ------------------------
-# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
-# splitting STRING at the '=' sign.
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables
+# after splitting STRING at the '=' sign.
test -z "$_G_HAVE_XSI_OPS" \
&& (eval 'x=a/b/c;
test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
@@ -1859,8 +2083,9 @@ then
func_split_equals_lhs=${1%%=*}
func_split_equals_rhs=${1#*=}
- test "x$func_split_equals_lhs" = "x$1" \
- && func_split_equals_rhs=
+ if test "x$func_split_equals_lhs" = "x$1"; then
+ func_split_equals_rhs=
+ fi
}'
else
# ...otherwise fall back to using expr, which is often a shell builtin.
@@ -1870,7 +2095,7 @@ else
func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
func_split_equals_rhs=
- test "x$func_split_equals_lhs" = "x$1" \
+ test "x$func_split_equals_lhs=" = "x$1" \
|| func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
}
fi #func_split_equals
@@ -1896,7 +2121,7 @@ else
{
$debug_cmd
- func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
}
fi #func_split_short_opt
@@ -1938,31 +2163,44 @@ func_usage_message ()
# func_version
# ------------
# Echo version message to standard output and exit.
+# The version message is extracted from the calling file's header
+# comments, with leading '# ' stripped:
+# 1. First display the progname and version
+# 2. Followed by the header comment line matching /^# Written by /
+# 3. Then a blank line followed by the first following line matching
+# /^# Copyright /
+# 4. Immediately followed by any lines between the previous matches,
+# except lines preceding the intervening completely blank line.
+# For example, see the header comments of this file.
func_version ()
{
$debug_cmd
printf '%s\n' "$progname $scriptversion"
$SED -n '
- /(C)/!b go
- :more
- /\./!{
- N
- s|\n# | |
- b more
- }
- :go
- /^# Written by /,/# warranty; / {
- s|^# ||
- s|^# *$||
- s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
- p
+ /^# Written by /!b
+ s|^# ||; p; n
+
+ :fwd2blnk
+ /./ {
+ n
+ b fwd2blnk
}
- /^# Written by / {
- s|^# ||
- p
+ p; n
+
+ :holdwrnt
+ s|^# ||
+ s|^# *$||
+ /^Copyright /!{
+ /./H
+ n
+ b holdwrnt
}
- /^warranty; /q' < "$progpath"
+
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ G
+ s|\(\n\)\n*|\1|g
+ p; q' < "$progpath"
exit $?
}
@@ -1972,12 +2210,12 @@ func_version ()
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
# Set a version string.
-scriptversion='(GNU libtool) 2.4.6'
+scriptversion='(GNU libtool) 2.4.7'
# func_echo ARG...
@@ -2068,7 +2306,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname (GNU libtool) 2.4.6
+ version: $progname (GNU libtool) 2.4.7
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
@@ -2124,7 +2362,7 @@ fi
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
- func__fatal_error ${1+"$@"} \
+ func_fatal_error ${1+"$@"} \
"See the $PACKAGE documentation for more information." \
"Fatal configuration error."
}
@@ -2270,6 +2508,8 @@ libtool_options_prep ()
nonopt=
preserve_args=
+ _G_rc_lt_options_prep=:
+
# Shorthand for --mode=foo, only valid as the first argument
case $1 in
clean|clea|cle|cl)
@@ -2293,11 +2533,16 @@ libtool_options_prep ()
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
shift; set dummy --mode uninstall ${1+"$@"}; shift
;;
+ *)
+ _G_rc_lt_options_prep=false
+ ;;
esac
- # Pass back the list of options.
- func_quote_for_eval ${1+"$@"}
- libtool_options_prep_result=$func_quote_for_eval_result
+ if $_G_rc_lt_options_prep; then
+ # Pass back the list of options.
+ func_quote eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_result
+ fi
}
func_add_hook func_options_prep libtool_options_prep
@@ -2309,9 +2554,12 @@ libtool_parse_options ()
{
$debug_cmd
+ _G_rc_lt_parse_options=false
+
# Perform our own loop to consume as many options as possible in
# each iteration.
while test $# -gt 0; do
+ _G_match_lt_parse_options=:
_G_opt=$1
shift
case $_G_opt in
@@ -2386,15 +2634,20 @@ libtool_parse_options ()
func_append preserve_args " $_G_opt"
;;
- # An option not handled by this hook function:
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"} ; shift
+ _G_match_lt_parse_options=false
+ break
+ ;;
esac
+ $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
done
-
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- libtool_parse_options_result=$func_quote_for_eval_result
+ if $_G_rc_lt_parse_options; then
+ # save modified positional parameters for caller
+ func_quote eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_result
+ fi
}
func_add_hook func_parse_options libtool_parse_options
@@ -2451,8 +2704,8 @@ libtool_validate_options ()
}
# Pass back the unparsed argument list
- func_quote_for_eval ${1+"$@"}
- libtool_validate_options_result=$func_quote_for_eval_result
+ func_quote eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_result
}
func_add_hook func_validate_options libtool_validate_options
@@ -3418,8 +3671,8 @@ func_mode_compile ()
esac
done
- func_quote_for_eval "$libobj"
- test "X$libobj" != "X$func_quote_for_eval_result" \
+ func_quote_arg pretty "$libobj"
+ test "X$libobj" != "X$func_quote_arg_result" \
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
&& func_warning "libobj name '$libobj' may not contain shell special characters."
func_dirname_and_basename "$obj" "/" ""
@@ -3492,8 +3745,8 @@ compiler."
func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
srcfile=$func_to_tool_file_result
- func_quote_for_eval "$srcfile"
- qsrcfile=$func_quote_for_eval_result
+ func_quote_arg pretty "$srcfile"
+ qsrcfile=$func_quote_arg_result
# Only build a PIC object if we are building libtool libraries.
if test yes = "$build_libtool_libs"; then
@@ -3648,7 +3901,8 @@ This mode accepts the following additional options:
-prefer-non-pic try to build non-PIC objects only
-shared do not build a '.o' file suitable for static linking
-static only build a '.o' file suitable for static linking
- -Wc,FLAG pass FLAG directly to the compiler
+ -Wc,FLAG
+ -Xcompiler FLAG pass FLAG directly to the compiler
COMPILE-COMMAND is a command to be used in creating a 'standard' object file
from the given SOURCEFILE.
@@ -3754,6 +4008,8 @@ The following components of LINK-COMMAND are treated specially:
-weak LIBNAME declare that the target provides the LIBNAME interface
-Wc,FLAG
-Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wa,FLAG
+ -Xassembler FLAG pass linker-specific FLAG directly to the assembler
-Wl,FLAG
-Xlinker FLAG pass linker-specific FLAG directly to the linker
-XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
@@ -4096,8 +4352,8 @@ func_mode_install ()
case $nonopt in *shtool*) :;; *) false;; esac
then
# Aesthetically quote it.
- func_quote_for_eval "$nonopt"
- install_prog="$func_quote_for_eval_result "
+ func_quote_arg pretty "$nonopt"
+ install_prog="$func_quote_arg_result "
arg=$1
shift
else
@@ -4107,8 +4363,8 @@ func_mode_install ()
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
- func_quote_for_eval "$arg"
- func_append install_prog "$func_quote_for_eval_result"
+ func_quote_arg pretty "$arg"
+ func_append install_prog "$func_quote_arg_result"
install_shared_prog=$install_prog
case " $install_prog " in
*[\\\ /]cp\ *) install_cp=: ;;
@@ -4165,12 +4421,12 @@ func_mode_install ()
esac
# Aesthetically quote the argument.
- func_quote_for_eval "$arg"
- func_append install_prog " $func_quote_for_eval_result"
+ func_quote_arg pretty "$arg"
+ func_append install_prog " $func_quote_arg_result"
if test -n "$arg2"; then
- func_quote_for_eval "$arg2"
+ func_quote_arg pretty "$arg2"
fi
- func_append install_shared_prog " $func_quote_for_eval_result"
+ func_append install_shared_prog " $func_quote_arg_result"
done
test -z "$install_prog" && \
@@ -4181,8 +4437,8 @@ func_mode_install ()
if test -n "$install_override_mode" && $no_mode; then
if $install_cp; then :; else
- func_quote_for_eval "$install_override_mode"
- func_append install_shared_prog " -m $func_quote_for_eval_result"
+ func_quote_arg pretty "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_arg_result"
fi
fi
@@ -4478,8 +4734,8 @@ func_mode_install ()
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
$opt_quiet || {
- func_quote_for_expand "$relink_command"
- eval "func_echo $func_quote_for_expand_result"
+ func_quote_arg expand,pretty "$relink_command"
+ eval "func_echo $func_quote_arg_result"
}
if eval "$relink_command"; then :
else
@@ -5258,7 +5514,8 @@ else
if test \"\$libtool_execute_magic\" != \"$magic\"; then
file=\"\$0\""
- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ func_quote_arg pretty "$ECHO"
+ qECHO=$func_quote_arg_result
$ECHO "\
# A function that is used when there is no print builtin or printf.
@@ -5268,7 +5525,7 @@ func_fallback_echo ()
\$1
_LTECHO_EOF'
}
- ECHO=\"$qECHO\"
+ ECHO=$qECHO
fi
# Very basic option parsing. These options are (a) specific to
@@ -6611,9 +6868,9 @@ func_mode_link ()
while test "$#" -gt 0; do
arg=$1
shift
- func_quote_for_eval "$arg"
- qarg=$func_quote_for_eval_unquoted_result
- func_append libtool_args " $func_quote_for_eval_result"
+ func_quote_arg pretty,unquoted "$arg"
+ qarg=$func_quote_arg_unquoted_result
+ func_append libtool_args " $func_quote_arg_result"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
@@ -6849,6 +7106,13 @@ func_mode_link ()
prev=
continue
;;
+ xassembler)
+ func_append compiler_flags " -Xassembler $qarg"
+ prev=
+ func_append compile_command " -Xassembler $qarg"
+ func_append finalize_command " -Xassembler $qarg"
+ continue
+ ;;
xcclinker)
func_append linker_flags " $qarg"
func_append compiler_flags " $qarg"
@@ -7019,7 +7283,7 @@ func_mode_link ()
# These systems don't actually have a C library (as such)
test X-lc = "X$arg" && continue
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
# Do not include libc due to us having libc/libc_r.
test X-lc = "X$arg" && continue
;;
@@ -7039,7 +7303,7 @@ func_mode_link ()
esac
elif test X-lc_r = "X$arg"; then
case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -7069,8 +7333,20 @@ func_mode_link ()
prev=xcompiler
continue
;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
+ -pthread)
+ case $host in
+ *solaris2*) ;;
+ *)
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
@@ -7211,9 +7487,9 @@ func_mode_link ()
save_ifs=$IFS; IFS=,
for flag in $args; do
IFS=$save_ifs
- func_quote_for_eval "$flag"
- func_append arg " $func_quote_for_eval_result"
- func_append compiler_flags " $func_quote_for_eval_result"
+ func_quote_arg pretty "$flag"
+ func_append arg " $func_quote_arg_result"
+ func_append compiler_flags " $func_quote_arg_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
@@ -7227,16 +7503,21 @@ func_mode_link ()
save_ifs=$IFS; IFS=,
for flag in $args; do
IFS=$save_ifs
- func_quote_for_eval "$flag"
- func_append arg " $wl$func_quote_for_eval_result"
- func_append compiler_flags " $wl$func_quote_for_eval_result"
- func_append linker_flags " $func_quote_for_eval_result"
+ func_quote_arg pretty "$flag"
+ func_append arg " $wl$func_quote_arg_result"
+ func_append compiler_flags " $wl$func_quote_arg_result"
+ func_append linker_flags " $func_quote_arg_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
arg=$func_stripname_result
;;
+ -Xassembler)
+ prev=xassembler
+ continue
+ ;;
+
-Xcompiler)
prev=xcompiler
continue
@@ -7254,8 +7535,8 @@ func_mode_link ()
# -msg_* for osf cc
-msg_*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
;;
# Flags to be passed through unchanged, with rationale:
@@ -7272,12 +7553,17 @@ func_mode_link ()
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fuse-ld=* Linker select flags for GCC
+ # -Wa,* Pass flags directly to the assembler
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
func_append compile_command " $arg"
func_append finalize_command " $arg"
func_append compiler_flags " $arg"
@@ -7298,15 +7584,15 @@ func_mode_link ()
continue
else
# Otherwise treat like 'Some other compiler flag' below
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
fi
;;
# Some other compiler flag.
-* | +*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
;;
*.$objext)
@@ -7426,8 +7712,8 @@ func_mode_link ()
*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
;;
esac # arg
@@ -8632,7 +8918,7 @@ func_mode_link ()
test CXX = "$tagname" && {
case $host_os in
linux*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*) # Sun C++ 5.9
func_suncc_cstd_abi
@@ -8805,7 +9091,7 @@ func_mode_link ()
#
case $version_type in
# correct linux to gnu/linux during the next big refactor
- darwin|freebsd-elf|linux|osf|windows|none)
+ darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
age=$number_minor
@@ -8896,7 +9182,7 @@ func_mode_link ()
versuffix=.$current.$revision
;;
- freebsd-elf)
+ freebsd-elf | midnightbsd-elf)
func_arith $current - $age
major=.$func_arith_result
versuffix=$major.$age.$revision
@@ -9122,7 +9408,7 @@ func_mode_link ()
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
# Do not include libc due to us having libc/libc_r.
;;
*-*-sco3.2v5* | *-*-sco5v6*)
@@ -9933,8 +10219,8 @@ EOF
for cmd in $concat_cmds; do
IFS=$save_ifs
$opt_quiet || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
+ func_quote_arg expand,pretty "$cmd"
+ eval "func_echo $func_quote_arg_result"
}
$opt_dry_run || eval "$cmd" || {
lt_exit=$?
@@ -10027,8 +10313,8 @@ EOF
eval cmd=\"$cmd\"
IFS=$save_ifs
$opt_quiet || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
+ func_quote_arg expand,pretty "$cmd"
+ eval "func_echo $func_quote_arg_result"
}
$opt_dry_run || eval "$cmd" || {
lt_exit=$?
@@ -10502,12 +10788,13 @@ EOF
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ func_quote_arg pretty "$var_value"
+ relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
fi
done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ func_quote eval cd "`pwd`"
+ func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
+ relink_command=$func_quote_arg_unquoted_result
fi
# Only actually do things if not in dry run mode.
@@ -10747,13 +11034,15 @@ EOF
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ func_quote_arg pretty,unquoted "$var_value"
+ relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ func_quote eval cd "`pwd`"
+ relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ func_quote_arg pretty,unquoted "$relink_command"
+ relink_command=$func_quote_arg_unquoted_result
if test yes = "$hardcode_automatic"; then
relink_command=
fi
diff --git a/configure.ac b/configure.ac
index 3acecd9..1fa3934 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Configuration for the toplevel directory of GNU libunistring
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -23,11 +23,14 @@ AC_CONFIG_AUX_DIR([build-aux])
. $srcdir/version.sh
gl_INIT_PACKAGE([libunistring], [$VERSION_NUMBER])
AM_INIT_AUTOMAKE([silent-rules dist-xz])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
dnl Override automake's tar command used for creating distributions.
am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"'
+dnl An indicator macro that declares that we're in libunistring.
+AC_DEFUN([gl_IN_LIBUNISTRING], [])
+
dnl Checks for basic programs.
AC_PROG_CC
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c82b9ec..3f33218 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -36,7 +36,7 @@ info_TEXINFOS = libunistring.texi
libunistring_TEXINFOS = \
unitypes.texi unistr.texi uniconv.texi unistdio.texi uniname.texi \
unictype.texi uniwidth.texi unigbrk.texi uniwbrk.texi unilbrk.texi \
- uninorm.texi unicase.texi uniregex.texi wchar_t.texi \
+ uninorm.texi unicase.texi uniregex.texi wchar_t.texi char32_t.texi \
gpl.texi lgpl.texi fdl.texi
# The dependencies of stamp-vti generated by automake are incomplete.
diff --git a/doc/char32_t.texi b/doc/char32_t.texi
new file mode 100644
index 0000000..040e298
--- /dev/null
+++ b/doc/char32_t.texi
@@ -0,0 +1,50 @@
+@node The char32_t problem
+@appendix The @code{char32_t} problem
+
+@cindex char32_t, type
+@cindex char16_t, type
+In response to the @code{wchar_t} mess described in the previous section,
+ISO C 11 introduces two new types: @code{char32_t} and @code{char16_t}.
+
+@code{char32_t} is a type like @code{wchar_t}, with the added guarantee that it
+is 32 bits wide. So, it is a type that is appropriate for encoding a Unicode
+character. It is meant to resolve the problems of the 16-bit wide
+@code{wchar_t} on AIX and Windows platforms, and allow a saner programming model
+for wide character strings across all platforms.
+
+@code{char16_t} is a type like @code{wchar_t}, with the added guarantee that it
+is 16 bits wide. It is meant to allow porting programs that use the broken wide
+character strings programming model from Windows to all platforms. Of course,
+no one needs this.
+
+These types are accompanied with a syntax for defining wide string literals with
+these element types: @code{u"..."} and @code{U"..."}.
+
+So far, so good. What the ISO C designers forgot, is to provide standardized C
+library functions that operate on these wide character strings. They
+standardized only the most basic functions, @code{mbrtoc32} and @code{c32rtomb},
+which are analogous to @code{mbrtowc} and @code{wcrtomb}, respectively. For the
+rest, GNU gnulib @url{https://www.gnu.org/software/gnulib/} provides the
+functions:
+@itemize @bullet
+@item
+Functions for converting an entire string: @code{mbstoc32s} -- like
+@code{mbstowcs}, @code{c32stombs} -- like @code{wcstombs}.
+@item
+Functions for testing the properties of a 32-bit wide character:
+@code{c32isalnum}, @code{c32isalpha}, etc. -- like @code{iswalnum},
+@code{iswalpha}, etc.
+@end itemize
+
+Still, this API has two problems:
+@itemize @bullet
+@item
+The @code{char32_t} encoding is locale dependent and undocumented. This means,
+if you want to know any property of a @code{char32_t} character, other than the
+properties defined by @code{<wctype.h>} -- such as whether it's a dash, currency
+symbol, paragraph separator, or similar --, you have to convert it to
+@code{char *} encoding first, by use of the function @code{c32tomb}.
+@item
+Even on platforms where @code{wchar_t} is 32 bits wide, the @code{char32_t}
+encoding may be different from the @code{wchar_t} encoding.
+@end itemize
diff --git a/doc/libunistring.texi b/doc/libunistring.texi
index b26f48f..428e8c6 100644
--- a/doc/libunistring.texi
+++ b/doc/libunistring.texi
@@ -98,7 +98,7 @@ This manual is for GNU libunistring.
@ignore
@c This was: @copying but it triggers a makeinfo 4.13 bug
-Copyright (C) 2001-2019 Free Software Foundation, Inc.
+Copyright (C) 2001-2022 Free Software Foundation, Inc.
This manual is free documentation. It is dually licensed under the
GNU FDL and the GNU GPL. This means that you can redistribute this
@@ -129,7 +129,7 @@ A copy of the license is included in @ref{GNU GPL}.
@page
@vskip 0pt plus 1filll
@c @insertcopying
-Copyright (C) 2001-2019 Free Software Foundation, Inc.
+Copyright (C) 2001-2022 Free Software Foundation, Inc.
This manual is free documentation. It is dually licensed under the
GNU FDL and the GNU GPL. This means that you can redistribute this
@@ -178,6 +178,7 @@ A copy of the license is included in @ref{GNU GPL}.
* Using the library:: How to link with the library and use it?
* More functionality:: More advanced functionality
* The wchar_t mess:: Why @code{wchar_t *} strings are useless
+* The char32_t problem:: Why @code{char32_t *} strings are problematic
* Licenses:: Licenses
* Index:: General Index
@@ -927,6 +928,8 @@ For the rendering of Unicode strings outside of the context of a given toolkit
@include wchar_t.texi
+@include char32_t.texi
+
@node Licenses
@appendix Licenses
@cindex Licenses
@@ -937,15 +940,16 @@ particular file or directory. Here is a summary:
@itemize @bullet
@item
The @code{libunistring} library and its header files are dual-licensed under
-"the GNU LGPLv3+ or the GNU GPLv2". This means, you can use it under either
+"the GNU LGPLv3+ or the GNU GPLv2+". This means, you can use it under either
@itemize @bullet
@item @minus{}
the terms of the GNU Lesser General Public License (LGPL) version 3 or
(at your option) any later version, or
@item @minus{}
-the terms of the GNU General Public License (GPL) version 2, or
+the terms of the GNU General Public License (GPL) version 2 or
+(at your option) any later version, or
@item @minus{}
-the same dual license "the GNU LGPLv3+ or the GNU GPLv2".
+the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
@end itemize
You find the GNU LGPL version 3 in @ref{GNU LGPL}. This license is
based on the GNU GPL version 3, see @ref{GNU GPL}.
diff --git a/doc/uniconv.texi b/doc/uniconv.texi
index c11558f..3c8a63b 100644
--- a/doc/uniconv.texi
+++ b/doc/uniconv.texi
@@ -37,6 +37,12 @@ This handler causes the function to return with @code{errno} set to
This handler produces one question mark @samp{?} per unconvertible character.
@end deftypevr
+@deftypevr Constant {enum iconv_ilseq_handler} iconveh_question_replacement_character
+This handler produces one U+FFFD per unconvertible character if that
+fits in the target encoding, otherwise one question mark @samp{?} per
+unconvertible character.
+@end deftypevr
+
@deftypevr Constant {enum iconv_ilseq_handler} iconveh_escape_sequence
This handler produces an escape sequence @code{\u@var{xxxx}} or
@code{\U@var{xxxxxxxx}} for each unconvertible character.
diff --git a/doc/unictype.texi b/doc/unictype.texi
index d23a9ac..ac20f77 100644
--- a/doc/unictype.texi
+++ b/doc/unictype.texi
@@ -594,6 +594,22 @@ The bidi class for ``Whitespace'' characters.
The bidi class for ``Other Neutral'' characters.
@end deftypevr
+@deftypevr Constant int UC_BIDI_LRI
+The bidi class for ``Left-to-Right Isolate'' characters.
+@end deftypevr
+
+@deftypevr Constant int UC_BIDI_RLI
+The bidi class for ``Right-to-Left Isolate'' characters.
+@end deftypevr
+
+@deftypevr Constant int UC_BIDI_FSI
+The bidi class for ``First Strong Isolate'' characters.
+@end deftypevr
+
+@deftypevr Constant int UC_BIDI_PDI
+The bidi class for ``Pop Directional Isolate'' characters.
+@end deftypevr
+
The following functions implement the association between a bidirectional
category and its name.
@@ -846,6 +862,53 @@ The joining group has the following possible values:
@deftypevrx Constant int UC_JOINING_GROUP_YUDH_HE
@deftypevrx Constant int UC_JOINING_GROUP_ZAIN
@deftypevrx Constant int UC_JOINING_GROUP_ZHAIN
+@deftypevrx Constant int UC_JOINING_GROUP_ROHINGYA_YEH
+@deftypevrx Constant int UC_JOINING_GROUP_STRAIGHT_WAW
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_ALEPH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_BETH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_GIMEL
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_DALETH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_WAW
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_ZAYIN
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_HETH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_TETH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_YODH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_KAPH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_LAMEDH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_DHAMEDH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_THAMEDH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_MEM
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_NUN
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_SAMEKH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_AYIN
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_PE
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_SADHE
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_QOPH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_RESH
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_TAW
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_ONE
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_FIVE
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_TEN
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_TWENTY
+@deftypevrx Constant int UC_JOINING_GROUP_MANICHAEAN_HUNDRED
+@deftypevrx Constant int UC_JOINING_GROUP_AFRICAN_FEH
+@deftypevrx Constant int UC_JOINING_GROUP_AFRICAN_QAF
+@deftypevrx Constant int UC_JOINING_GROUP_AFRICAN_NOON
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_NGA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_JA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_NYA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_TTA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_NNA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_NNNA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_BHA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_RA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_LLA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_LLLA
+@deftypevrx Constant int UC_JOINING_GROUP_MALAYALAM_SSA
+@deftypevrx Constant int UC_JOINING_GROUP_HANIFI_ROHINGYA_PA
+@deftypevrx Constant int UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA
+@deftypevrx Constant int UC_JOINING_GROUP_THIN_YEH
+@deftypevrx Constant int UC_JOINING_GROUP_VERTICAL_TAIL
@end deftypevr
The following functions implement the association between a joining group
@@ -989,6 +1052,16 @@ The following properties deal with CJK.
@deftypevrx Constant uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR
@end deftypevr
+The following properties deal with pictographic symbols.
+
+@deftypevr Constant uc_property_t UC_PROPERTY_EMOJI
+@deftypevrx Constant uc_property_t UC_PROPERTY_EMOJI_PRESENTATION
+@deftypevrx Constant uc_property_t UC_PROPERTY_EMOJI_MODIFIER
+@deftypevrx Constant uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE
+@deftypevrx Constant uc_property_t UC_PROPERTY_EMOJI_COMPONENT
+@deftypevrx Constant uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC
+@end deftypevr
+
Other miscellaneous properties are:
@deftypevr Constant uc_property_t UC_PROPERTY_ZERO_WIDTH
@@ -1016,6 +1089,7 @@ Other miscellaneous properties are:
@deftypevrx Constant uc_property_t UC_PROPERTY_DIACRITIC
@deftypevrx Constant uc_property_t UC_PROPERTY_EXTENDER
@deftypevrx Constant uc_property_t UC_PROPERTY_IGNORABLE_CONTROL
+@deftypevrx Constant uc_property_t UC_PROPERTY_REGIONAL_INDICATOR
@end deftypevr
The following function looks up a property by its name.
@@ -1138,6 +1212,16 @@ The following properties deal with CJK.
@deftypefunx bool uc_is_property_ids_trinary_operator (ucs4_t@tie{}@var{uc})
@end deftypefun
+The following properties deal with pictographic symbols.
+
+@deftypefun bool uc_is_property_emoji (ucs4_t@tie{}@var{uc})
+@deftypefunx bool uc_is_property_emoji_presentation (ucs4_t@tie{}@var{uc})
+@deftypefunx bool uc_is_property_emoji_modifier (ucs4_t@tie{}@var{uc})
+@deftypefunx bool uc_is_property_emoji_modifier_base (ucs4_t@tie{}@var{uc})
+@deftypefunx bool uc_is_property_emoji_component (ucs4_t@tie{}@var{uc})
+@deftypefunx bool uc_is_property_extended_pictographic (ucs4_t@tie{}@var{uc})
+@end deftypefun
+
Other miscellaneous properties are:
@deftypefun bool uc_is_property_zero_width (ucs4_t@tie{}@var{uc})
@@ -1165,6 +1249,7 @@ Other miscellaneous properties are:
@deftypefunx bool uc_is_property_diacritic (ucs4_t@tie{}@var{uc})
@deftypefunx bool uc_is_property_extender (ucs4_t@tie{}@var{uc})
@deftypefunx bool uc_is_property_ignorable_control (ucs4_t@tie{}@var{uc})
+@deftypefunx bool uc_is_property_regional_indicator (ucs4_t@tie{}@var{uc})
@end deftypefun
@node Scripts
diff --git a/doc/unigbrk.texi b/doc/unigbrk.texi
index af4d996..e7e94d6 100644
--- a/doc/unigbrk.texi
+++ b/doc/unigbrk.texi
@@ -62,6 +62,8 @@ Note that these functions do not handle the case when a character
outside of the range between @var{start} and @var{s} is needed to
determine the boundary. Use @func{_grapheme_breaks} functions for such
cases.
+
+Note also that these functions work only on well-formed Unicode strings.
@end deftypefun
The following functions determine all of the grapheme cluster
diff --git a/doc/unilbrk.texi b/doc/unilbrk.texi
index 91e5863..c068704 100644
--- a/doc/unilbrk.texi
+++ b/doc/unilbrk.texi
@@ -20,6 +20,12 @@ following meanings:
This value indicates that @code{@var{s}[@var{i}]} is a line break character.
@end deftypevr
+@deftypevr Constant int UC_BREAK_CR_BEFORE_LF
+This value is a variant of @code{UC_BREAK_MANDATORY}. It indicates that
+@code{@var{s}[@var{i}]} is a CR character and that @code{@var{s}[@var{i+1}]}
+is a LF character.
+@end deftypevr
+
@deftypevr Constant int UC_BREAK_POSSIBLE
This value indicates that a line break may be inserted between
@code{@var{s}[@var{i}-1]} and @code{@var{s}[@var{i}]}.
@@ -51,8 +57,9 @@ possible.
@deftypefunx void ulc_possible_linebreaks (const@tie{}char@tie{}*@var{s}, size_t@tie{}@var{n}, const@tie{}char@tie{}*@var{encoding}, char@tie{}*@var{p})
Determines the line break points in @var{s}, and stores the result at
@code{@var{p}[0..@var{n}-1]}. Every @code{@var{p}[@var{i}]} is assigned one of
-the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_POSSIBLE},
-@code{UC_BREAK_HYPHENATION}, @code{UC_BREAK_PROHIBITED}.
+the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_CR_BEFORE_LF},
+@code{UC_BREAK_POSSIBLE}, @code{UC_BREAK_HYPHENATION},
+@code{UC_BREAK_PROHIBITED}.
@end deftypefun
The following functions determine where line breaks should be inserted so that
@@ -82,7 +89,8 @@ The given @var{encoding} is used for disambiguating widths in @code{uc_width}.
Returns the column after the end of the string, and stores the result at
@code{@var{p}[0..@var{n}-1]}. Every @code{@var{p}[@var{i}]} is assigned one of
-the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_POSSIBLE},
-@code{UC_BREAK_HYPHENATION}, @code{UC_BREAK_PROHIBITED}. Here the value
-@code{UC_BREAK_POSSIBLE} indicates that a line break @emph{should} be inserted.
+the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_CR_BEFORE_LF},
+@code{UC_BREAK_POSSIBLE}, @code{UC_BREAK_HYPHENATION},
+@code{UC_BREAK_PROHIBITED}. Here the value @code{UC_BREAK_POSSIBLE} indicates
+that a line break @emph{should} be inserted.
@end deftypefun
diff --git a/doc/unistr.texi b/doc/unistr.texi
index c59094d..d26a3f3 100644
--- a/doc/unistr.texi
+++ b/doc/unistr.texi
@@ -152,9 +152,9 @@ gives more details about the failure, similar to @posixfunc{mbrtowc}.
The following function stores a Unicode character as a Unicode string in
memory.
-@deftypefun int u8_uctomb (uint8_t@tie{}*@var{s}, ucs4_t@tie{}@var{uc}, int@tie{}@var{n})
-@deftypefunx int u16_uctomb (uint16_t@tie{}*@var{s}, ucs4_t@tie{}@var{uc}, int@tie{}@var{n})
-@deftypefunx int u32_uctomb (uint32_t@tie{}*@var{s}, ucs4_t@tie{}@var{uc}, int@tie{}@var{n})
+@deftypefun int u8_uctomb (uint8_t@tie{}*@var{s}, ucs4_t@tie{}@var{uc}, ptrdiff_t@tie{}@var{n})
+@deftypefunx int u16_uctomb (uint16_t@tie{}*@var{s}, ucs4_t@tie{}@var{uc}, ptrdiff_t@tie{}@var{n})
+@deftypefunx int u32_uctomb (uint32_t@tie{}*@var{s}, ucs4_t@tie{}@var{uc}, ptrdiff_t@tie{}@var{n})
Puts the multibyte character represented by @var{uc} in @var{s}, returning its
length. Returns -1 upon failure, -2 if the number of available units, @var{n},
is too small. The latter case cannot occur if @var{n} >= 6/2/1, respectively.
diff --git a/gnulib-local/lib/unicase.in.h.diff b/gnulib-local/lib/unicase.in.h.diff
index 6fa4261..f96a1df 100644
--- a/gnulib-local/lib/unicase.in.h.diff
+++ b/gnulib-local/lib/unicase.in.h.diff
@@ -1,7 +1,7 @@
-*** unicase.in.h.orig 2009-04-05 19:30:26.000000000 +0200
---- unicase.in.h 2009-04-10 16:21:23.000000000 +0200
+*** unicase.in.h.orig 2023-04-21 12:07:22.606233082 +0200
+--- unicase.in.h 2023-04-21 12:09:26.709004578 +0200
***************
-*** 20,26 ****
+*** 28,34 ****
#include "unitypes.h"
/* Get bool. */
@@ -9,7 +9,7 @@
/* Get size_t. */
#include <stddef.h>
---- 20,26 ----
+--- 28,34 ----
#include "unitypes.h"
/* Get bool. */
diff --git a/gnulib-local/lib/unictype.in.h.diff b/gnulib-local/lib/unictype.in.h.diff
index cb68885..9a64591 100644
--- a/gnulib-local/lib/unictype.in.h.diff
+++ b/gnulib-local/lib/unictype.in.h.diff
@@ -1,8 +1,7 @@
*** unictype.in.h.orig 2009-04-05 12:15:57.000000000 +0200
--- unictype.in.h 2009-04-12 04:31:36.000000000 +0200
***************
-*** 19,26 ****
-
+*** 20,26 ****
#include "unitypes.h"
/* Get bool. */
@@ -10,13 +9,9 @@
/* Get size_t. */
#include <stddef.h>
---- 19,29 ----
-
+--- 20,26 ----
#include "unitypes.h"
-+ /* Get LIBUNISTRING_DLL_VARIABLE. */
-+ #include <unistring/woe32dll.h>
-+
/* Get bool. */
! #include <unistring/stdbool.h>
diff --git a/gnulib-local/lib/uninorm.in.h.diff b/gnulib-local/lib/uninorm.in.h.diff
index 47f644e..0ae1eb0 100644
--- a/gnulib-local/lib/uninorm.in.h.diff
+++ b/gnulib-local/lib/uninorm.in.h.diff
@@ -1,13 +1,13 @@
-*** uninorm.in.h.orig 2009-04-05 12:38:24.000000000 +0200
---- uninorm.in.h 2009-04-12 04:31:52.000000000 +0200
+*** uninorm.in.h.orig 2021-08-07 14:40:34.920237057 +0200
+--- uninorm.in.h 2021-08-08 02:17:17.145608518 +0200
***************
*** 18,23 ****
--- 18,26 ----
#ifndef _UNINORM_H
#define _UNINORM_H
-+ /* Get LIBUNISTRING_DLL_VARIABLE. */
-+ #include <unistring/woe32dll.h>
++ /* Get common macros for C. */
++ #include <unistring/cdefs.h>
+
/* Get size_t. */
#include <stddef.h>
diff --git a/gnulib-local/lib/unistr.in.h.diff b/gnulib-local/lib/unistr.in.h.diff
index 0b31c86..7bd18e7 100644
--- a/gnulib-local/lib/unistr.in.h.diff
+++ b/gnulib-local/lib/unistr.in.h.diff
@@ -1,28 +1,27 @@
-*** unistr.in.h.orig 2009-12-24 23:21:27.000000000 +0100
---- unistr.in.h 2009-12-25 02:04:40.000000000 +0100
+*** lib/unistr.in.h.orig 2021-08-01 16:43:54.915090697 +0200
+--- lib/unistr.in.h 2021-08-01 15:52:07.388856862 +0200
***************
-*** 20,29 ****
- #include "unitypes.h"
+*** 19,26 ****
- /* Get common macros for C. */
-! #include "unused-parameter.h"
+ #include "unitypes.h"
/* Get bool. */
! #include <stdbool.h>
- /* Get size_t. */
+ /* Get size_t, ptrdiff_t. */
#include <stddef.h>
---- 20,32 ----
- #include "unitypes.h"
+--- 19,32 ----
- /* Get common macros for C. */
-! #include <unistring/cdefs.h>
-!
-! /* Get inline if available. */
-! #include <unistring/inline.h>
+ #include "unitypes.h"
++ /* Get common macros for C. */
++ #include <unistring/cdefs.h>
++
++ /* Get inline if available. */
++ #include <unistring/inline.h>
++
/* Get bool. */
! #include <unistring/stdbool.h>
- /* Get size_t. */
+ /* Get size_t, ptrdiff_t. */
#include <stddef.h>
diff --git a/gnulib-m4/gnulib-cache.m4 b/gnulib-m4/gnulib-cache.m4
index bbb1478..8b68e8a 100644
--- a/gnulib-m4/gnulib-cache.m4
+++ b/gnulib-m4/gnulib-cache.m4
@@ -1,8 +1,8 @@
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 6136ced..382d2bc 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,5 @@
## Makefile for the lib subdirectory of GNU libunistring.
-## Copyright (C) 2009-2019 Free Software Foundation, Inc.
+## Copyright (C) 2009-2022 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
@@ -303,7 +303,7 @@ config.h: $(BUILT_SOURCES) $(srcdir)/libunistring.sym
done; \
} 5>&1 1>&2 \
| sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \
- | LC_ALL=C join -v 1 - $(srcdir)/libunistring.sym \
+ | LC_ALL=C $(top_srcdir)/build-aux/join-v-1 - $(srcdir)/libunistring.sym \
| grep -v '^libintl_locale' \
| grep -v 'gl_get_setlocale_null_lock' \
| sed -e 's,^\(.*\)$$,#define \1 libunistring_\1,' > config.h-t; \
@@ -336,9 +336,9 @@ AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1
# Libtool's library version information for libunistring.
# See the libtool documentation, section "Library interface versions".
-LTV_CURRENT=3
+LTV_CURRENT=5
LTV_REVISION=0
-LTV_AGE=1
+LTV_AGE=0
# How to build libunistring.la.
libunistring_la_LDFLAGS += \
diff --git a/lib/stdbool.mini.h b/lib/stdbool.mini.h
index 29736b7..7bdec72 100644
--- a/lib/stdbool.mini.h
+++ b/lib/stdbool.mini.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2022 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
@@ -96,8 +96,17 @@
/* The other macros must be usable in preprocessor directives. */
#ifdef __cplusplus
-# define false false
-# define true true
+# if !defined _MSC_VER
+# define false false
+# define true true
+# endif
+/* In Sun C++ 5.11 (Solaris Studio 12.2) and older, 'true' as a preprocessor
+ expression evaluates to 0, not 1. Fix this by overriding 'true'. Note that
+ the replacement has to be of type 'bool'. */
+# if defined __SUNPRO_CC && true != 1
+# undef true
+# define true (!false)
+# endif
#else
# undef false
# define false 0
diff --git a/lib/unistring-notinline.h b/lib/unistring-notinline.h
index 1fc8be0..59ebc63 100644
--- a/lib/unistring-notinline.h
+++ b/lib/unistring-notinline.h
@@ -1,15 +1,24 @@
/* Override decision whether to use 'inline' or not.
Copyright (C) 2009 Free Software Foundation, Inc.
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU Lesser 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 free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
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
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
diff --git a/lib/unistring/cdefs.h b/lib/unistring/cdefs.h
index e186b3a..3faf5ba 100644
--- a/lib/unistring/cdefs.h
+++ b/lib/unistring/cdefs.h
@@ -1,15 +1,24 @@
/* Common macro definitions for C include files.
- Copyright (C) 2008-2020 Free Software Foundation, Inc.
+ Copyright (C) 2008-2021 Free Software Foundation, Inc.
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU Lesser 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 free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
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
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
@@ -17,25 +26,91 @@
#ifndef _UNISTRING_CDEFS_H
#define _UNISTRING_CDEFS_H
-/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
+/* _GL_UNUSED_PARAMETER is a marker that can be prepended to function parameter
declarations for parameters that are not used. This helps to reduce
warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
- type param _GL_UNUSED_PARAMETER
+ _GL_UNUSED_PARAMETER type param
or more generally
- param_decl _GL_UNUSED_PARAMETER
+ _GL_UNUSED_PARAMETER param_decl
For example:
- int param _GL_UNUSED_PARAMETER
- int *(*param)(void) _GL_UNUSED_PARAMETER
- Other possible, but obscure and discouraged syntaxes:
- int _GL_UNUSED_PARAMETER *(*param)(void)
- _GL_UNUSED_PARAMETER int *(*param)(void)
+ _GL_UNUSED_PARAMETER int param
+ _GL_UNUSED_PARAMETER int *(*param) (void)
*/
#ifndef _GL_UNUSED_PARAMETER
-# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
-# else
-# define _GL_UNUSED_PARAMETER
-# endif
+# define _GL_UNUSED_PARAMETER _UC_ATTRIBUTE_MAYBE_UNUSED
+#endif
+/* _GL_ATTRIBUTE_MAYBE_UNUSED likewise. */
+#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED
+#endif
+
+#ifndef _GL_ATTRIBUTE_MALLOC
+# define _GL_ATTRIBUTE_MALLOC _UC_ATTRIBUTE_MALLOC
+#endif
+
+/* _GL_ATTRIBUTE_DEALLOC (F, I) is for functions returning pointers
+ that can be freed by passing them as the Ith argument to the
+ function F. _UC_ATTRIBUTE_DEALLOC_FREE is for functions that
+ return pointers that can be freed via 'free'; it can be used
+ only after including stdlib.h. These macros cannot be used on
+ inline functions. */
+#ifndef _GL_ATTRIBUTE_DEALLOC
+# define _GL_ATTRIBUTE_DEALLOC _UC_ATTRIBUTE_DEALLOC
+#endif
+#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
+# define _GL_ATTRIBUTE_DEALLOC_FREE _UC_ATTRIBUTE_DEALLOC_FREE
+#endif
+
+/* The definitions below are taken from gnulib/m4/gnulib-common.m4,
+ with prefix _UC instead of prefix _GL. */
+
+/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
+#if defined __GNUC__ && defined __GNUC_MINOR__
+# define _UC_GNUC_PREREQ(major, minor) \
+ ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
+#else
+# define _UC_GNUC_PREREQ(major, minor) 0
+#endif
+
+#if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define _UC_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
+#else
+# define _UC_HAS_ATTRIBUTE(attr) _UC_ATTR_##attr
+# define _UC_ATTR_malloc _UC_GNUC_PREREQ (3, 0)
+# define _UC_ATTR_unused _UC_GNUC_PREREQ (2, 7)
+#endif
+
+#ifdef __has_c_attribute
+# define _UC_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
+#else
+# define _UC_HAS_C_ATTRIBUTE(attr) 0
+#endif
+
+#if _UC_GNUC_PREREQ (11, 0)
+# define _UC_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+#else
+# define _UC_ATTRIBUTE_DEALLOC(f, i)
+#endif
+#define _UC_ATTRIBUTE_DEALLOC_FREE _UC_ATTRIBUTE_DEALLOC (free, 1)
+
+#if _UC_HAS_ATTRIBUTE (malloc)
+# define _UC_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _UC_ATTRIBUTE_MALLOC
+#endif
+
+#if _UC_HAS_C_ATTRIBUTE (maybe_unused)
+# define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#else
+# define _UC_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_UNUSED
+#endif
+
+#if _UC_HAS_ATTRIBUTE (unused)
+# define _UC_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#else
+# define _UC_ATTRIBUTE_UNUSED
#endif
#endif /* _UNISTRING_CDEFS_H */
diff --git a/lib/unistring/inline.h b/lib/unistring/inline.h
index a6c8985..4605fbf 100644
--- a/lib/unistring/inline.h
+++ b/lib/unistring/inline.h
@@ -1,15 +1,24 @@
/* Decision whether to use 'inline' or not.
Copyright (C) 2006, 2009, 2018 Free Software Foundation, Inc.
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU Lesser 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 free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
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
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
diff --git a/lib/unistring/version.in.h b/lib/unistring/version.in.h
index 0e588ef..d35adc6 100644
--- a/lib/unistring/version.in.h
+++ b/lib/unistring/version.in.h
@@ -2,15 +2,24 @@
Copyright (C) 2009-2010 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
- under the terms of the GNU Lesser 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 free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
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
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
diff --git a/lib/unistring/woe32dll.in.h b/lib/unistring/woe32dll.in.h
index 19df687..6f5b9d8 100644
--- a/lib/unistring/woe32dll.in.h
+++ b/lib/unistring/woe32dll.in.h
@@ -1,15 +1,24 @@
/* Support for variables in shared libraries on Windows platforms.
Copyright (C) 2009 Free Software Foundation, Inc.
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU Lesser 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 free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
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
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
diff --git a/lib/version.c b/lib/version.c
index a2f2f2d..3036509 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -2,15 +2,24 @@
Copyright (C) 2009 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
- under the terms of the GNU Lesser 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 free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
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
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
diff --git a/m4/exported.m4 b/m4/exported.m4
index be30ec9..2ee884f 100644
--- a/m4/exported.m4
+++ b/m4/exported.m4
@@ -1,5 +1,5 @@
-# exported.m4 serial 2 (gettext-0.21)
-dnl Copyright (C) 2006, 2009, 2019 Free Software Foundation, Inc.
+# exported.m4 serial 3 (gettext-0.21.1)
+dnl Copyright (C) 2006, 2009, 2019-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Prerequisites of the exported.sh script:
dnl Check for nm output filter that yields the exported symbols.
AC_DEFUN([gt_GLOBAL_SYMBOL_PIPE], [
- AC_REQUIRE([AC_PROG_NM]) dnl provided by libtool.m4
+ AC_REQUIRE([LT_PATH_NM]) dnl provided by libtool.m4
AC_SUBST([NM])
AC_REQUIRE([_LT_CMD_GLOBAL_SYMBOLS]) dnl provided by libtool.m4
GLOBAL_SYMBOL_PIPE=$lt_cv_sys_global_symbol_pipe
diff --git a/m4/init-package-version.m4 b/m4/init-package-version.m4
index f131a84..823afc6 100644
--- a/m4/init-package-version.m4
+++ b/m4/init-package-version.m4
@@ -1,5 +1,5 @@
-# init-package-version.m4 serial 1 (gettext-0.18)
-dnl Copyright (C) 1992-2009 Free Software Foundation, Inc.
+# init-package-version.m4 serial 3
+dnl Copyright (C) 1992-2021 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
@@ -61,6 +61,28 @@ dnl the same distribution terms as the rest of that program.
# . $srcdir/../version.sh
# gl_INIT_PACKAGE(PACKAGE, $VERSION_NUMBER)
# AM_INIT_AUTOMAKE([OPTIONS])
+#
+# and after changing version.sh, the developer can directly configure and build:
+#
+# make distclean
+# ./configure
+# make
+#
+# Some other packages use another approach:
+#
+# AC_INIT(PACKAGE,
+# m4_normalize(m4_esyscmd([. ./version.sh; echo $VERSION_NUMBER])))
+# AC_CONFIG_SRCDIR(WITNESS)
+# AM_INIT_AUTOMAKE([OPTIONS])
+#
+# but here, after changing version.sh, the developer must first regenerate the
+# configure file:
+#
+# make distclean
+# ./autogen.sh --skip-gnulib
+# ./configure
+# make
+#
# gl_INIT_PACKAGE(PACKAGE-NAME, VERSION)
# --------------------------------------
@@ -77,7 +99,7 @@ AC_DEFUN([gl_INIT_PACKAGE],
m4_bpatsubst(m4_dquote(
m4_defn([AM_INIT_AUTOMAKE])),
[AC_PACKAGE_NAME], [gl_INIT_DUMMY])),
- [AC_PACKAGE_TARNAME], [gl_INIT_DUMMY])),
+ [AC_PACKAGE_TARNAME], [gl_INIT_EMPTY])),
[AC_PACKAGE_VERSION], [gl_INIT_DUMMY])
[AC_SUBST([PACKAGE], [$1])
AC_SUBST([VERSION], [$2])
@@ -85,7 +107,11 @@ AC_DEFUN([gl_INIT_PACKAGE],
m4_define([AM_INIT_AUTOMAKE],
m4_defn([gl_RPL_INIT_AUTOMAKE]))
])
-m4_define([gl_INIT_DUMMY], [])
+m4_define([gl_INIT_EMPTY], [])
+dnl Automake 1.16.4 no longer accepts an empty value for gl_INIT_DUMMY.
+dnl But a macro that later expands to empty works.
+m4_define([gl_INIT_DUMMY], [gl_INIT_DUMMY2])
+m4_define([gl_INIT_DUMMY2], [])
AC_DEFUN([gl_RPL_INIT_AUTOMAKE], [
m4_ifval([$2],
[m4_fatal([After gl_INIT_PACKAGE, the two-argument form of AM_INIT_AUTOMAKE cannot be used.])])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index d4e1427..dbd6ce4 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
# along with this program. If not, see <http://www.gnu.org/licenses/>.
])
-# serial 58 LT_INIT
+# serial 59 LT_INIT
# LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -778,7 +780,7 @@ _LT_EOF
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
+ $SED '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
mv -f "$cfgfile" "$ofile" ||
@@ -1042,8 +1044,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1067,17 +1069,12 @@ _LT_EOF
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]][[,.]]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ darwin*)
+ case $MACOSX_DEPLOYMENT_TARGET,$host in
+ 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ *)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
@@ -1126,12 +1123,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
output_verbose_link_cmd=func_echo_all
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
],[])
else
@@ -1245,7 +1242,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
# _LT_WITH_SYSROOT
# ----------------
AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
+[m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([for sysroot])
AC_ARG_WITH([sysroot],
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
[Search for dependent libraries within DIR (or the compiler's sysroot
@@ -1262,7 +1260,7 @@ case $with_sysroot in #(
fi
;; #(
/*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
;; #(
no|'')
;; #(
@@ -1292,7 +1290,7 @@ ia64-*-hpux*)
# options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE=32
;;
@@ -1309,7 +1307,7 @@ ia64-*-hpux*)
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
if test yes = "$lt_cv_prog_gnu_ld"; then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
@@ -1321,7 +1319,7 @@ ia64-*-hpux*)
;;
esac
else
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -1343,7 +1341,7 @@ mips64*-*linux*)
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
emul="${emul}32"
;;
@@ -1351,7 +1349,7 @@ mips64*-*linux*)
emul="${emul}64"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*MSB*)
emul="${emul}btsmip"
;;
@@ -1359,7 +1357,7 @@ mips64*-*linux*)
emul="${emul}ltsmip"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*N32*)
emul="${emul}n32"
;;
@@ -1379,14 +1377,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# not appear in the list.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*32-bit*)
case $host in
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
;;
@@ -1454,7 +1452,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*)
@@ -1493,9 +1491,22 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
-: ${AR_FLAGS=cru}
_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
+ [Flags to create an archive])
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[lt_cv_ar_at_file=no
@@ -1714,7 +1725,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1757,7 +1768,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
@@ -2207,26 +2218,35 @@ m4_defun([_LT_CMD_STRIPLIB],
striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+ AC_MSG_RESULT([no])
else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP"; then
+ if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+ else
+ case $host_os in
+ darwin*)
+ # FIXME - insert some real tests, host_os isn't really good enough
striplib="$STRIP -x"
old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
- else
+ ;;
+ freebsd*)
+ if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
+ ;;
+ esac
+ fi
fi
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
_LT_DECL([], [striplib], [1])
@@ -2549,7 +2569,7 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
@@ -2559,14 +2579,14 @@ m4_if([$1], [],[
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
;;
- *,cl*)
- # Native MSVC
+ *,cl* | *,icl*)
+ # Native MSVC or ICC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -2585,7 +2605,7 @@ m4_if([$1], [],[
done
IFS=$lt_save_ifs
# Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
@@ -2622,7 +2642,7 @@ m4_if([$1], [],[
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -2655,7 +2675,7 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
if test -x /usr/bin/objformat; then
@@ -3454,7 +3474,7 @@ beos*)
bsdi[[45]]*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_cmd='$FILECMD -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -3488,14 +3508,14 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -3509,7 +3529,7 @@ haiku*)
;;
hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
case $host_cpu in
ia64*)
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
@@ -3556,7 +3576,7 @@ netbsd*)
newos6*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
@@ -3686,13 +3706,13 @@ else
mingw*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
*$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
break 2
;;
*)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
break 2
@@ -3718,7 +3738,7 @@ else
# Let the user override the test.
else
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
*COFF*)
DUMPBIN="$DUMPBIN -symbols -headers"
;;
@@ -3958,7 +3978,7 @@ esac
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
# Adjust the below global symbol transforms to fixup imported variables.
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
@@ -3976,20 +3996,20 @@ fi
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
$lt_cdecl_hook\
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
$lt_c_name_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
# Transform an extracted symbol line into symbol name with lib prefix and
# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
$lt_c_name_lib_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
@@ -4013,7 +4033,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++,
+ # Also find C++ and __fastcall symbols from MSVC++ or ICC,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
@@ -4031,9 +4051,9 @@ for ac_symprfx in "" "_"; do
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx]"
else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -4320,7 +4340,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -4403,7 +4423,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4739,7 +4759,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4922,7 +4942,7 @@ m4_if([$1], [CXX], [
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@@ -4930,7 +4950,7 @@ m4_if([$1], [CXX], [
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*)
+ cl* | icl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
;;
*)
@@ -4987,15 +5007,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
+ # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@@ -5047,7 +5067,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5159,6 +5179,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
interix[[3-9]]*)
@@ -5173,7 +5194,7 @@ _LT_EOF
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -5216,7 +5237,7 @@ _LT_EOF
_LT_TAGVAR(compiler_needs_object, $1)=yes
;;
esac
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*) # Sun C 5.9
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
@@ -5228,7 +5249,7 @@ _LT_EOF
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
@@ -5244,7 +5265,7 @@ _LT_EOF
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
@@ -5376,7 +5397,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -5559,12 +5580,12 @@ _LT_EOF
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
- cl*)
- # Native MSVC
+ cl* | icl*)
+ # Native MSVC or ICC
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5605,7 +5626,7 @@ _LT_EOF
fi'
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Tell ltmain to make .lib files, not .a files.
@@ -5653,7 +5674,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_TAGVAR(hardcode_direct, $1)=yes
@@ -5864,6 +5885,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
osf3*)
@@ -6634,8 +6656,8 @@ if test yes != "$_lt_caught_CXX_error"; then
cygwin* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
- ,cl* | no,cl*)
- # Native MSVC
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6733,6 +6755,7 @@ if test yes != "$_lt_caught_CXX_error"; then
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
dgux*)
@@ -6763,7 +6786,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -6900,7 +6923,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
@@ -7040,13 +7063,13 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -8192,6 +8215,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
AC_SUBST([DLLTOOL])
])
+# _LT_DECL_FILECMD
+# ----------------
+# Check for a file(cmd) program that can be used to detect file type and magic
+m4_defun([_LT_DECL_FILECMD],
+[AC_CHECK_TOOL([FILECMD], [file], [:])
+_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
+])# _LD_DECL_FILECMD
+
# _LT_DECL_SED
# ------------
# Check for a fully-functional sed program, that truncates
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 94b0829..b0b5e9c 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,7 +1,7 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 48bc934..902508b 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index fa04b52..b155d0a 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,7 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+# Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +10,15 @@
# @configure_input@
-# serial 4179 ltversion.m4
+# serial 4245 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.7])
+m4_define([LT_PACKAGE_REVISION], [2.4.7])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.7'
+macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index c6b26f8..0f7a875 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,7 +1,7 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
diff --git a/m4/woe32-dll.m4 b/m4/woe32-dll.m4
index c21efd7..8a14c2c 100644
--- a/m4/woe32-dll.m4
+++ b/m4/woe32-dll.m4
@@ -1,5 +1,5 @@
-# woe32-dll.m4 serial 5
-dnl Copyright (C) 2005-2006, 2011, 2015-2018, 2020 Free Software Foundation, Inc.
+# woe32-dll.m4 serial 6
+dnl Copyright (C) 2005-2006, 2011, 2018, 2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -46,7 +46,7 @@ AC_DEFUN([gl_WOE32_DLL],
[gl_cv_ld_autoimport=no],
[gl_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--disable-auto-import"
- AC_TRY_LINK([], [], [gl_cv_ld_autoimport=yes], [gl_cv_ld_autoimport=no])
+ AC_LINK_IFELSE([], [gl_cv_ld_autoimport=yes], [gl_cv_ld_autoimport=no])
LDFLAGS="$gl_save_LDFLAGS"
])
])
diff --git a/version.sh b/version.sh
index 303d202..8c26d19 100644
--- a/version.sh
+++ b/version.sh
@@ -1,6 +1,6 @@
# Version number and release date.
-VERSION_NUMBER=0.9.10
-RELEASE_DATE=2018-05-17 # in "date +%Y-%m-%d" format
+VERSION_NUMBER=1.1
+RELEASE_DATE=2022-10-16 # in "date +%Y-%m-%d" format
# Version of gnulib that was used in this release.
-GNULIB_GIT_COMMIT=b35c22af02271c8dd9844b98db17702b8bf2bd93
+GNULIB_GIT_COMMIT=2118e7cf12997850652002b3af3c44511c98f4bc
diff --git a/woe32dll/export.h b/woe32dll/export.h
index ef6a77c..b17d9d3 100644
--- a/woe32dll/export.h
+++ b/woe32dll/export.h
@@ -1,5 +1,5 @@
/* Exporting symbols from Cygwin shared libraries.
- Copyright (C) 2006, 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2011-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or
@@ -103,7 +103,11 @@
#if defined __GNUC__ /* GCC compiler, GNU toolchain */
/* IMP(x) is a symbol that contains the address of x. */
-# define IMP(x) _imp__##x
+# if defined _WIN64 || defined _LP64
+# define IMP(x) __imp_##x
+# else
+# define IMP(x) _imp__##x
+# endif
/* Ensure that the variable x is exported from the library, and that a
pseudo-variable IMP(x) is available. */
diff --git a/woe32dll/unistring-exports.c b/woe32dll/unistring-exports.c
index f13e525..c66b698 100644
--- a/woe32dll/unistring-exports.c
+++ b/woe32dll/unistring-exports.c
@@ -1,5 +1,5 @@
/* List of exported symbols of libunistring on Cygwin.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or
@@ -34,6 +34,7 @@ VARIABLE(UC_CATEGORY_Cn)
VARIABLE(UC_CATEGORY_Co)
VARIABLE(UC_CATEGORY_Cs)
VARIABLE(UC_CATEGORY_L)
+VARIABLE(UC_CATEGORY_LC)
VARIABLE(UC_CATEGORY_Ll)
VARIABLE(UC_CATEGORY_Lm)
VARIABLE(UC_CATEGORY_Lo)
@@ -83,6 +84,13 @@ VARIABLE(UC_PROPERTY_BIDI_OTHER_NEUTRAL)
VARIABLE(UC_PROPERTY_BIDI_PDF)
VARIABLE(UC_PROPERTY_BIDI_SEGMENT_SEPARATOR)
VARIABLE(UC_PROPERTY_BIDI_WHITESPACE)
+VARIABLE(UC_PROPERTY_CASED)
+VARIABLE(UC_PROPERTY_CASE_IGNORABLE)
+VARIABLE(UC_PROPERTY_CHANGES_WHEN_CASEFOLDED)
+VARIABLE(UC_PROPERTY_CHANGES_WHEN_CASEMAPPED)
+VARIABLE(UC_PROPERTY_CHANGES_WHEN_LOWERCASED)
+VARIABLE(UC_PROPERTY_CHANGES_WHEN_TITLECASED)
+VARIABLE(UC_PROPERTY_CHANGES_WHEN_UPPERCASED)
VARIABLE(UC_PROPERTY_COMBINING)
VARIABLE(UC_PROPERTY_COMPOSITE)
VARIABLE(UC_PROPERTY_CURRENCY_SYMBOL)
@@ -91,6 +99,12 @@ VARIABLE(UC_PROPERTY_DECIMAL_DIGIT)
VARIABLE(UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT)
VARIABLE(UC_PROPERTY_DEPRECATED)
VARIABLE(UC_PROPERTY_DIACRITIC)
+VARIABLE(UC_PROPERTY_EMOJI)
+VARIABLE(UC_PROPERTY_EMOJI_COMPONENT)
+VARIABLE(UC_PROPERTY_EMOJI_MODIFIER)
+VARIABLE(UC_PROPERTY_EMOJI_MODIFIER_BASE)
+VARIABLE(UC_PROPERTY_EMOJI_PRESENTATION)
+VARIABLE(UC_PROPERTY_EXTENDED_PICTOGRAPHIC)
VARIABLE(UC_PROPERTY_EXTENDER)
VARIABLE(UC_PROPERTY_FORMAT_CONTROL)
VARIABLE(UC_PROPERTY_GRAPHEME_BASE)
@@ -130,6 +144,7 @@ VARIABLE(UC_PROPERTY_PRIVATE_USE)
VARIABLE(UC_PROPERTY_PUNCTUATION)
VARIABLE(UC_PROPERTY_QUOTATION_MARK)
VARIABLE(UC_PROPERTY_RADICAL)
+VARIABLE(UC_PROPERTY_REGIONAL_INDICATOR)
VARIABLE(UC_PROPERTY_SENTENCE_TERMINAL)
VARIABLE(UC_PROPERTY_SOFT_DOTTED)
VARIABLE(UC_PROPERTY_SPACE)