diff --git a/COPYING b/COPYING index ced3565..098a995 100644 --- a/COPYING +++ b/COPYING @@ -4,7 +4,7 @@ Star Traders: A Game of Interstellar Trading ============================================ -**Copyright © 1990–2019, John Zaitseff.** +**Copyright © 1990–2020, John Zaitseff.** The Star Traders game is free software that is distributed under the terms of the GNU General Public License. The actual copyright on this diff --git a/INSTALL b/INSTALL index eda8710..c1bc25b 100644 --- a/INSTALL +++ b/INSTALL @@ -142,11 +142,11 @@ This feature requires GNU Make and allows you to keep the source code tree from being modified by the compilation process. To use this option, create a separate `build` directory, then run ``configure``. For example, if you placed the Star Traders source code tree in -`$HOME/src/trader-7.13`, you could run something like:: +`$HOME/src/trader-7.14`, you could run something like:: - mkdir $HOME/build/trader-build-7.13 - cd $HOME/build/trader-build-7.13 - $HOME/src/trader-7.13/configure + mkdir $HOME/build/trader-build-7.14 + cd $HOME/build/trader-build-7.14 + $HOME/src/trader-7.14/configure Once again, the `Autoconf manual`__ describes these options (and many others). @@ -231,12 +231,13 @@ Operating system Arch Compiler Notes ======================= ====== ============================ ============ FreeBSD 12.1 x86_64 Clang (LLVM) 8.0.1 [#freebsd1]_ NetBSD 8.1 x86_64 GNU C Compiler 5.5.0 [#netbsd1]_ -macOS 10.14 x86_64 Apple Clang (LLVM) 11.0.0 [#macos1]_ -macOS 10.14 x86_64 Apple Clang (LLVM) 11.0.0 [#macos2]_ +macOS 10.15 x86_64 Apple Clang (LLVM) 11.0.0 [#macos1]_ +macOS 10.15 x86_64 Apple Clang (LLVM) 11.0.0 [#macos2]_ Solaris 11.4 (x86_64) x86_64 GNU C Compiler 7.3.0 [#solaris1]_ Solaris 11.4 (x86_64) i386 Oracle Developer Studio 12.6 [#solaris2]_ Solaris 11.4 (x86_64) x86_64 Oracle Developer Studio 12.6 [#solaris3]_ -Cygwin 3.0.7 (Win7 SP1) i686 GNU C Compiler 7.4.0 +Cygwin 3.1.2 (Win7 SP1) i686 GNU C Compiler 7.4.0 +Cygwin 3.1.2 (Win10) x86_64 GNU C Compiler 7.4.0 ======================= ====== ============================ ============ Notes: diff --git a/Makefile.am b/Makefile.am index 1ef870d..6ac3caf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/Makefile.in b/Makefile.in index 9814f1b..e9d6f95 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,12 +17,12 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### # Author: John Zaitseff -# $Id: 1ef870decc2757ddbeeb382f058d1551fc8402b3 $ +# $Id: 6ac3caf88ee3dbffddbadb7a3441e922d04686d8 $ # # This file, Makefile.am, contains the top-level Makefile for Star # Traders. It needs to be processed by automake to produce the @@ -134,20 +134,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ - $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ - $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ - $(top_srcdir)/m4/monetary_h.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ + $(top_srcdir)/m4/localtime-buffer.m4 \ + $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ + $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ + $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ + $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/monetary_h.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/setlocale_null.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ @@ -155,12 +154,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ - $(top_srcdir)/m4/wcsdup.m4 $(top_srcdir)/m4/wctob.m4 \ - $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemcpy.m4 \ - $(top_srcdir)/m4/xopen-source.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wcsdup.m4 \ + $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \ + $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/wmemcpy.m4 $(top_srcdir)/m4/xopen-source.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -298,6 +298,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSES_CFLAGS = @CURSES_CFLAGS@ @@ -376,6 +377,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ @@ -385,6 +387,8 @@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -474,6 +478,7 @@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ @@ -498,10 +503,12 @@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLD = @GNULIB_STRTOLD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ @@ -593,6 +600,8 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ @@ -607,7 +616,9 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ @@ -646,6 +657,7 @@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -654,7 +666,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ @@ -739,11 +750,11 @@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ @@ -795,6 +806,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ @@ -802,12 +815,16 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPMULTITHREAD = @LIBPMULTITHREAD@ +LIBPTHREAD = @LIBPTHREAD@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIB_HARD_LOCALE = @LIB_HARD_LOCALE@ +LIB_MBRTOWC = @LIB_MBRTOWC@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -816,9 +833,7 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -828,6 +843,7 @@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MONETARY_H = @NEXT_AS_FIRST_DIRECTIVE_MONETARY_H@ @@ -845,6 +861,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MONETARY_H = @NEXT_MONETARY_H@ @@ -875,6 +892,8 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ @@ -995,8 +1014,10 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOLD = @REPLACE_STRTOLD@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ @@ -1022,6 +1043,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSTOK = @REPLACE_WCSTOK@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ @@ -1038,6 +1060,8 @@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ diff --git a/NEWS b/NEWS index 0280ec9..2666e48 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,19 @@ __ https://www.zap.org.au/ .. contents:: +Version 7.14 (9th January, 2020) +-------------------------------- + +Added the Brazilian Portuguese translation, with thanks to Rafael +Fontenelle. Updated the French, Hungarian and Esperanto translations, in +that order, with thanks to Frédéric Marchal, Balázs Úr and Felipe Castro. + +Updated to the latest snapshot of the Gnulib GNU Portability Library. +Also updated the `INSTALL` file to list macOS 10.15 (Catalina) and the +64-bit version of Cygwin under Microsoft Windows 10 as being tested +platforms. + + Version 7.13 (13th November, 2019) ---------------------------------- diff --git a/README b/README index de9e81e..6acc8f5 100644 --- a/README +++ b/README @@ -61,12 +61,15 @@ warmly welcomed! Please send these to: :Web: | https://www.zap.org.au/projects/trader/ :FTP: | https://ftp.zap.org.au/pub/trader/ | ftp://ftp.zap.org.au/pub/trader/ + :Git: | https://www.zap.org.au/git-browser/trader.git + | https://git.zap.org.au/git/trader.git + | git://git.zap.org.au/data/git/trader.git Copyright ========= -**Copyright © 1990–2019, John Zaitseff.** +**Copyright © 1990–2020, John Zaitseff.** Star Traders is free software that is distributed under the terms of the GNU General Public License. You can redistribute it and/or modify it diff --git a/aclocal.m4 b/aclocal.m4 index c66567e..f4e1520 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -531,9 +531,9 @@ AC_DEFUN([AM_NLS], AC_SUBST([USE_NLS]) ]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 11 (pkg-config-0.29.1) + dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl @@ -574,7 +574,7 @@ dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29]) +[m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -807,6 +807,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + # po.m4 serial 24 (gettext-0.19) dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -2526,6 +2594,7 @@ m4_include([m4/iconv_h.m4]) m4_include([m4/iconv_open.m4]) m4_include([m4/include_next.m4]) m4_include([m4/inline.m4]) +m4_include([m4/inttypes.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) @@ -2537,8 +2606,6 @@ m4_include([m4/locale-ja.m4]) m4_include([m4/locale-zh.m4]) m4_include([m4/locale_h.m4]) m4_include([m4/localtime-buffer.m4]) -m4_include([m4/lock.m4]) -m4_include([m4/longlong.m4]) m4_include([m4/mbrtowc.m4]) m4_include([m4/mbsinit.m4]) m4_include([m4/mbsrtowcs.m4]) @@ -2550,7 +2617,7 @@ m4_include([m4/monetary_h.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/nocrash.m4]) m4_include([m4/off_t.m4]) -m4_include([m4/pthread_rwlock_rdlock.m4]) +m4_include([m4/setlocale_null.m4]) m4_include([m4/ssize_t.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stddef_h.m4]) @@ -2565,6 +2632,7 @@ m4_include([m4/sys_types_h.m4]) m4_include([m4/threadlib.m4]) m4_include([m4/time_h.m4]) m4_include([m4/unistd_h.m4]) +m4_include([m4/visibility.m4]) m4_include([m4/warn-on-use.m4]) m4_include([m4/wchar_h.m4]) m4_include([m4/wchar_t.m4]) diff --git a/build-aux/config.rpath b/build-aux/config.rpath index 1644dbd..24be79c 100755 --- a/build-aux/config.rpath +++ b/build-aux/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2019 Free Software Foundation, Inc. +# Copyright 1996-2020 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # @@ -57,7 +57,7 @@ else aix*) wl='-Wl,' ;; - mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' @@ -149,7 +149,7 @@ hardcode_direct=no hardcode_minus_L=no case "$host_os" in - cygwin* | msys* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -198,7 +198,7 @@ if test "$with_gnu_ld" = yes; then ld_shlibs=no fi ;; - cygwin* | msys* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -348,7 +348,7 @@ else ;; bsdi[45]*) ;; - cygwin* | msys* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -533,7 +533,7 @@ case "$host_os" in bsdi[45]*) library_names_spec='$libname$shrext' ;; - cygwin* | msys* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; diff --git a/config.h.in b/config.h.in index 7173608..65f3fa9 100644 --- a/config.h.in +++ b/config.h.in @@ -15,9 +15,6 @@ /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T -/* Define to 1 if the C locale may have encoding errors. */ -#undef C_LOCALE_MAYBE_EILSEQ - /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS @@ -33,10 +30,6 @@ whether the gnulib module fscanf shall be considered present. */ #undef GNULIB_FSCANF -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#undef GNULIB_LOCK - /* Define to 1 if printf and friends should be labeled with attribute "__gnu_printf__" instead of "__printf__" */ #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU @@ -48,6 +41,9 @@ /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC +/* Define to 1 when the gnulib module getopt-posix should be tested. */ +#undef GNULIB_TEST_GETOPT_POSIX + /* Define to 1 when the gnulib module gettimeofday should be tested. */ #undef GNULIB_TEST_GETTIMEOFDAY @@ -66,6 +62,9 @@ /* Define to 1 when the gnulib module memchr should be tested. */ #undef GNULIB_TEST_MEMCHR +/* Define to 1 when the gnulib module setlocale_null should be tested. */ +#undef GNULIB_TEST_SETLOCALE_NULL + /* Define to 1 when the gnulib module wcrtomb should be tested. */ #undef GNULIB_TEST_WCRTOMB @@ -236,15 +235,8 @@ /* Define to 1 if is present */ #undef HAVE_NCURSES_H -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -#undef HAVE_PTHREAD_MUTEX_RECURSIVE - -/* Define if the POSIX multithreading library has read/write locks. */ -#undef HAVE_PTHREAD_RWLOCK - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -#undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER +/* Define if you have the header and the POSIX threads API. */ +#undef HAVE_PTHREAD_API /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T @@ -303,6 +295,10 @@ /* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#undef HAVE_VISIBILITY + /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H @@ -321,6 +317,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H +/* Define to 1 if the compiler and linker support weak declarations of + symbols. */ +#undef HAVE_WEAK_SYMBOLS + /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H @@ -353,6 +353,10 @@ */ #undef MBRTOWC_EMPTY_INPUT_BUG +/* Define if the mbrtowc function may signal encoding errors in the C locale. + */ +#undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ + /* Define if the mbrtowc function has the NULL pwc argument bug. */ #undef MBRTOWC_NULL_ARG1_BUG @@ -365,6 +369,10 @@ /* Define if the mbrtowc function returns a wrong return value. */ #undef MBRTOWC_RETVAL_BUG +/* Define if the mbrtowc function stores a wide character when reporting + incomplete input. */ +#undef MBRTOWC_STORES_INCOMPLETE_BUG + /* Use GNU style printf and scanf. */ #ifndef __USE_MINGW_ANSI_STDIO # undef __USE_MINGW_ANSI_STDIO @@ -405,6 +413,12 @@ 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX +/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ +#undef SETLOCALE_NULL_ALL_MTSAFE + +/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ +#undef SETLOCALE_NULL_ONE_MTSAFE + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX @@ -419,13 +433,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define if the POSIX multithreading library can be used. */ -#undef USE_POSIX_THREADS - -/* Define if references to the POSIX multithreading library should be made - weak. */ -#undef USE_POSIX_THREADS_WEAK - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -499,9 +506,6 @@ #endif -/* Define if the native Windows multithreading API can be used. */ -#undef USE_WINDOWS_THREADS - /* Version number of package */ #undef VERSION @@ -509,6 +513,12 @@ 'wchar_t'. */ #undef WCHAR_T_SUFFIX +/* Define if the wcrtomb function does not work in the C locale. */ +#undef WCRTOMB_C_LOCALE_BUG + +/* Define if the wcrtomb function has an incorrect return value. */ +#undef WCRTOMB_RETVAL_BUG + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX @@ -526,7 +536,14 @@ #ifndef _Noreturn # if (defined __cplusplus \ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER))) + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ # define _Noreturn [[noreturn]] # elif ((!defined __cplusplus || defined __clang__) \ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ @@ -725,12 +742,13 @@ nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ # define _Restrict # define __restrict__ #endif diff --git a/configure b/configure index d6f7ca1..4e21142 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Star Traders 7.13. +# Generated by GNU Autoconf 2.69 for Star Traders 7.14. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Star Traders' PACKAGE_TARNAME='trader' -PACKAGE_VERSION='7.13' -PACKAGE_STRING='Star Traders 7.13' +PACKAGE_VERSION='7.14' +PACKAGE_STRING='Star Traders 7.14' PACKAGE_BUGREPORT='J.Zaitseff@zap.org.au' PACKAGE_URL='https://www.zap.org.au/projects/trader/' @@ -623,8 +623,6 @@ ac_includes_default="\ # include #endif" -gl_use_threads_default= -gl_use_winpthreads_default= gt_needs= ac_func_list= gl_getopt_required=POSIX @@ -649,20 +647,10 @@ LIBGNU_LIBDEPS gltests_WITNESS gl_GNULIB_ENABLED_wmemcpy_FALSE gl_GNULIB_ENABLED_wmemcpy_TRUE -gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_FALSE -gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_TRUE -gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_FALSE -gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_TRUE -gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_FALSE -gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_TRUE -gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_FALSE -gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_TRUE gl_GNULIB_ENABLED_wctomb_FALSE gl_GNULIB_ENABLED_wctomb_TRUE gl_GNULIB_ENABLED_verify_FALSE gl_GNULIB_ENABLED_verify_TRUE -gl_GNULIB_ENABLED_threadlib_FALSE -gl_GNULIB_ENABLED_threadlib_TRUE gl_GNULIB_ENABLED_strnlen1_FALSE gl_GNULIB_ENABLED_strnlen1_TRUE gl_GNULIB_ENABLED_streq_FALSE @@ -671,14 +659,14 @@ gl_GNULIB_ENABLED_stdlib_FALSE gl_GNULIB_ENABLED_stdlib_TRUE gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147_FALSE gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147_TRUE +gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_FALSE +gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_TRUE gl_GNULIB_ENABLED_memchr_FALSE gl_GNULIB_ENABLED_memchr_TRUE gl_GNULIB_ENABLED_mbtowc_FALSE gl_GNULIB_ENABLED_mbtowc_TRUE gl_GNULIB_ENABLED_mbsinit_FALSE gl_GNULIB_ENABLED_mbsinit_TRUE -gl_GNULIB_ENABLED_lock_FALSE -gl_GNULIB_ENABLED_lock_TRUE gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9_FALSE gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9_TRUE gl_GNULIB_ENABLED_localcharset_FALSE @@ -779,11 +767,9 @@ GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT -LTLIBMULTITHREAD -LIBMULTITHREAD -LTLIBTHREAD -LIBTHREAD LOCALCHARSET_TESTS_ENVIRONMENT +LIB_HARD_LOCALE +LIB_SETLOCALE_NULL REPLACE_TOWLOWER REPLACE_ISWCNTRL HAVE_WCTYPE_H @@ -1041,39 +1027,10 @@ GNULIB_FFLUSH GNULIB_FDOPEN GNULIB_FCLOSE GNULIB_DPRINTF -GL_GENERATE_STDINT_H_FALSE -GL_GENERATE_STDINT_H_TRUE -STDINT_H -HAVE_SYS_INTTYPES_H -HAVE_SYS_BITYPES_H -HAVE_C99_STDINT_H -WINT_T_SUFFIX -WCHAR_T_SUFFIX -SIG_ATOMIC_T_SUFFIX -SIZE_T_SUFFIX -PTRDIFF_T_SUFFIX -HAVE_SIGNED_WINT_T -HAVE_SIGNED_WCHAR_T -HAVE_SIGNED_SIG_ATOMIC_T -BITSIZEOF_WINT_T -BITSIZEOF_WCHAR_T -BITSIZEOF_SIG_ATOMIC_T -BITSIZEOF_SIZE_T -BITSIZEOF_PTRDIFF_T -HAVE_STDINT_H -NEXT_AS_FIRST_DIRECTIVE_STDINT_H -NEXT_STDINT_H -HAVE_SYS_TYPES_H -HAVE_INTTYPES_H -HAVE_WCHAR_H -HAVE_UNSIGNED_LONG_LONG_INT -HAVE_LONG_LONG_INT -GNULIB_OVERRIDES_WINT_T HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H -APPLE_UNIVERSAL_BUILD GL_GENERATE_MONETARY_H_FALSE GL_GENERATE_MONETARY_H_TRUE MONETARY_H @@ -1083,9 +1040,15 @@ NEXT_MONETARY_H REPLACE_STRFMON_L HAVE_STRFMON_L GNULIB_STRFMON_L -LOCALE_FR_UTF8 +HAVE_VISIBILITY +CFLAG_VISIBILITY +LIB_MBRTOWC LOCALE_ZH_CN +LOCALE_FR_UTF8 LOCALE_JA +LIB_SCHED_YIELD +LIBPMULTITHREAD +LIBPTHREAD NEXT_AS_FIRST_DIRECTIVE_LOCALE_H NEXT_LOCALE_H HAVE_XLOCALE_H @@ -1108,8 +1071,55 @@ HAVE_DUPLOCALE HAVE_NEWLOCALE GNULIB_LOCALENAME GNULIB_DUPLOCALE +GNULIB_SETLOCALE_NULL GNULIB_SETLOCALE GNULIB_LOCALECONV +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H +NEXT_INTTYPES_H +UINT64_MAX_EQ_ULONG_MAX +UINT32_MAX_LT_UINTMAX_MAX +PRIPTR_PREFIX +PRI_MACROS_BROKEN +INT64_MAX_EQ_LONG_MAX +INT32_MAX_LT_INTMAX_MAX +REPLACE_STRTOUMAX +REPLACE_STRTOIMAX +HAVE_IMAXDIV_T +HAVE_DECL_STRTOUMAX +HAVE_DECL_STRTOIMAX +HAVE_DECL_IMAXDIV +HAVE_DECL_IMAXABS +GNULIB_STRTOUMAX +GNULIB_STRTOIMAX +GNULIB_IMAXDIV +GNULIB_IMAXABS +GL_GENERATE_STDINT_H_FALSE +GL_GENERATE_STDINT_H_TRUE +STDINT_H +HAVE_SYS_INTTYPES_H +HAVE_SYS_BITYPES_H +HAVE_C99_STDINT_H +WINT_T_SUFFIX +WCHAR_T_SUFFIX +SIG_ATOMIC_T_SUFFIX +SIZE_T_SUFFIX +PTRDIFF_T_SUFFIX +HAVE_SIGNED_WINT_T +HAVE_SIGNED_WCHAR_T +HAVE_SIGNED_SIG_ATOMIC_T +BITSIZEOF_WINT_T +BITSIZEOF_WCHAR_T +BITSIZEOF_SIG_ATOMIC_T +BITSIZEOF_SIZE_T +BITSIZEOF_PTRDIFF_T +APPLE_UNIVERSAL_BUILD +HAVE_STDINT_H +NEXT_AS_FIRST_DIRECTIVE_STDINT_H +NEXT_STDINT_H +HAVE_SYS_TYPES_H +HAVE_INTTYPES_H +HAVE_WCHAR_H +GNULIB_OVERRIDES_WINT_T GL_GENERATE_LIMITS_H_FALSE GL_GENERATE_LIMITS_H_TRUE LIMITS_H @@ -1282,6 +1292,7 @@ GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPASS GNULIB_GETPAGESIZE +GNULIB_GETOPT_POSIX GNULIB_GETLOGIN_R GNULIB_GETLOGIN GNULIB_GETHOSTNAME @@ -1306,6 +1317,7 @@ GNULIB_CHOWN GNULIB_CHDIR GNULIB_ACCESS LOCALE_FR +REPLACE_WCSTOK REPLACE_WCSFTIME REPLACE_WCSWIDTH REPLACE_WCWIDTH @@ -1409,6 +1421,14 @@ INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 @@ -1420,14 +1440,6 @@ MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build RANLIB ARFLAGS AR @@ -1526,7 +1538,6 @@ enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking -enable_threads enable_nls with_gnu_ld enable_rpath @@ -2101,7 +2112,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Star Traders 7.13 to adapt to many kinds of systems. +\`configure' configures Star Traders 7.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2172,7 +2183,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Star Traders 7.13:";; + short | recursive ) echo "Configuration of Star Traders 7.14:";; esac cat <<\_ACEOF @@ -2189,9 +2200,6 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build - --enable-threads={posix|windows} - specify multithreading API - --disable-threads build without multithread safety --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-cross-guesses={conservative|risky} @@ -2294,7 +2302,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Star Traders configure 7.13 +Star Traders configure 7.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2714,52 +2722,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl - # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2942,11 +2904,60 @@ rm -f conftest.val as_fn_set_status $ac_retval } # ac_fn_c_compute_int + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + ac_save_ac_compile="$ac_compile" + ac_compile="$ac_compile_for_check_decl" + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + ac_compile="$ac_save_ac_compile" + +} # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Star Traders $as_me 7.13, which was +It was created by Star Traders $as_me 7.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3236,13 +3247,15 @@ as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_func_list " gettimeofday" as_fn_append ac_header_list " iconv.h" as_fn_append ac_header_list " limits.h" +as_fn_append ac_header_list " wchar.h" +as_fn_append ac_header_list " stdint.h" +as_fn_append ac_header_list " inttypes.h" as_fn_append ac_header_list " xlocale.h" +as_fn_append ac_header_list " threads.h" as_fn_append ac_func_list " mbsinit" as_fn_append ac_func_list " mbrtowc" as_fn_append ac_func_list " mbsrtowcs" as_fn_append ac_header_list " monetary.h" -as_fn_append ac_header_list " wchar.h" -as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " sys/stat.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " features.h" @@ -3252,7 +3265,6 @@ as_fn_append ac_func_list " wcsdup" as_fn_append ac_func_list " wctob" as_fn_append ac_func_list " iswcntrl" as_fn_append ac_header_list " wctype.h" -as_fn_append ac_header_list " threads.h" as_fn_append ac_header_list " sys/mman.h" as_fn_append ac_func_list " mprotect" # Check that the precious variables saved in the cache have kept the same @@ -3847,7 +3859,7 @@ fi # Define the identity of the package. PACKAGE='trader' - VERSION='7.13' + VERSION='7.14' cat >>confdefs.h <<_ACEOF @@ -5966,133 +5978,6 @@ fi -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - - - - - - # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then : - enableval=$enable_threads; gl_use_threads=$enableval -else - if test -n "$gl_use_threads_default"; then - gl_use_threads="$gl_use_threads_default" - else - case "$host_os" in - osf*) gl_use_threads=no ;; - cygwin*) - case `uname -r` in - 1.[0-5].*) gl_use_threads=no ;; - *) gl_use_threads=yes ;; - esac - ;; - mingw*) - case "$gl_use_winpthreads_default" in - yes) gl_use_threads=posix ;; - no) gl_use_threads=windows ;; - *) gl_use_threads=yes ;; - esac - ;; - *) gl_use_threads=yes ;; - esac - fi - -fi - - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_LINK_IFELSE test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac - fi - # Pre-early section. @@ -6121,11 +6006,11 @@ fi # Code from module iconv_open: # Code from module include_next: # Code from module inline: + # Code from module inttypes-incomplete: # Code from module limits-h: # Code from module localcharset: # Code from module locale: # Code from module localtime-buffer: - # Code from module lock: # Code from module mbrtowc: # Code from module mbsinit: # Code from module mbsrtowcs: @@ -6134,6 +6019,7 @@ fi # Code from module monetary: # Code from module multiarch: # Code from module nocrash: + # Code from module setlocale-null: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: @@ -6152,10 +6038,6 @@ fi # Code from module sys_stat: # Code from module sys_time: # Code from module sys_types: - # Code from module threadlib: - - - # Code from module time: # Code from module unistd: # Code from module unistr/base: @@ -6169,10 +6051,6 @@ fi # Code from module wctob: # Code from module wctomb: # Code from module wctype-h: - # Code from module windows-mutex: - # Code from module windows-once: - # Code from module windows-recmutex: - # Code from module windows-rwlock: # Code from module wmemcpy: @@ -6819,6 +6697,77 @@ fi eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + # Check whether --with-gnu-ld was given. @@ -7042,8 +6991,10 @@ else case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; - *) + x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else case "$host_cpu" in @@ -7068,6 +7019,12 @@ else gl_cv_host_cpu_c_abi_32bit=yes ;; + # CPUs that only support a 64-bit ABI. + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) + gl_cv_host_cpu_c_abi_32bit=no + ;; + i[34567]86 ) gl_cv_host_cpu_c_abi_32bit=yes ;; @@ -7272,7 +7229,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; *) - gl_cv_host_cpu_c_abi_32bit=no + gl_cv_host_cpu_c_abi_32bit=unknown ;; esac fi @@ -7287,90 +7244,150 @@ $as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; } - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if ${gl_cv_solaris_64bit+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 +$as_echo_n "checking for ELF binary format... " >&6; } +if ${gl_cv_elf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef _LP64 - int ok; - #else - error fail - #endif +#ifdef __ELF__ + Extensible Linking Format + #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_solaris_64bit=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_elf=yes else - gl_cv_solaris_64bit=no + gl_cv_elf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest* + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; };; - esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 +$as_echo "$gl_cv_elf" >&6; } + if test $gl_cv_elf; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac + else + acl_is_expected_elfclass () + { + : + } + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 $as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } if ${acl_cv_libdirstems+:} false; then : $as_echo_n "(cached) " >&6 else - acl_libdirstem=lib + acl_libdirstem=lib acl_libdirstem2= + acl_libdirstem3= case "$host_os" in solaris*) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) - if test "$HOST_CPU_C_ABI_32BIT" != yes; then - searchpath=`(if test -f /usr/bin/gcc \ - && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ - LC_ALL=C /usr/bin/gcc -print-search-dirs; \ - else \ - LC_ALL=C $CC -print-search-dirs; \ - fi) 2>/dev/null \ - | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" - acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 $as_echo "$acl_cv_libdirstems" >&6; } - # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. - acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` - acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` @@ -7391,6 +7408,8 @@ $as_echo "$acl_cv_libdirstems" >&6; } eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -7411,6 +7430,8 @@ if test "${with_libiconv_prefix+set}" = set; then : eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -7418,15 +7439,19 @@ if test "${with_libiconv_prefix+set}" = set; then : else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && test ! -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi fi + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi LIBICONV= LTLIBICONV= INCICONV= @@ -7472,45 +7497,51 @@ fi shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" - found_so="$dir/$f" - break + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi fi - done + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do @@ -7527,7 +7558,7 @@ fi -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -7537,14 +7568,14 @@ fi | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -7554,7 +7585,7 @@ fi fi fi if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -7576,7 +7607,8 @@ fi if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= @@ -7655,6 +7687,13 @@ fi fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then @@ -7700,12 +7739,14 @@ fi for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -7724,14 +7765,14 @@ fi exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= @@ -7745,14 +7786,14 @@ fi exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi @@ -8299,6 +8340,8 @@ $as_echo "$LIBICONV" >&6; } eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -8319,6 +8362,8 @@ if test "${with_libintl_prefix+set}" = set; then : eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -8326,15 +8371,19 @@ if test "${with_libintl_prefix+set}" = set; then : else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && test ! -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi fi + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi LIBINTL= LTLIBINTL= INCINTL= @@ -8380,45 +8429,51 @@ fi shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" - found_so="$dir/$f" - break + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi fi - done + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do @@ -8435,7 +8490,7 @@ fi -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -8445,14 +8500,14 @@ fi | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -8462,7 +8517,7 @@ fi fi fi if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -8484,7 +8539,8 @@ fi if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= @@ -8563,6 +8619,13 @@ fi fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then @@ -8608,12 +8671,14 @@ fi for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -8632,14 +8697,14 @@ fi exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir" fi fi haveit= @@ -8653,14 +8718,14 @@ fi exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir" fi fi fi @@ -9063,6 +9128,7 @@ fi REPLACE_WCWIDTH=0; REPLACE_WCSWIDTH=0; REPLACE_WCSFTIME=0; + REPLACE_WCSTOK=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 @@ -9362,6 +9428,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN=0; GNULIB_GETLOGIN_R=0; + GNULIB_GETOPT_POSIX=0; GNULIB_GETPAGESIZE=0; GNULIB_GETPASS=0; GNULIB_GETUSERSHELL=0; @@ -11030,953 +11097,6 @@ fi - GNULIB_LOCALECONV=0; - GNULIB_SETLOCALE=0; - GNULIB_DUPLOCALE=0; - GNULIB_LOCALENAME=0; - HAVE_NEWLOCALE=1; - HAVE_DUPLOCALE=1; - HAVE_FREELOCALE=1; - REPLACE_LOCALECONV=0; - REPLACE_SETLOCALE=0; - REPLACE_NEWLOCALE=0; - REPLACE_DUPLOCALE=0; - REPLACE_FREELOCALE=0; - REPLACE_STRUCT_LCONV=0; - - - REPLACE_NULL=0; - HAVE_MAX_ALIGN_T=1; - HAVE_WCHAR_T=1; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if ${gt_cv_c_wchar_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h - - fi - - - - - STDDEF_H= - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 -$as_echo_n "checking for good max_align_t... " >&6; } -if ${gl_cv_type_max_align_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - unsigned int s = sizeof (max_align_t); - #if defined __GNUC__ || defined __IBM__ALIGNOF__ - int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; - int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; - #endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_max_align_t=yes -else - gl_cv_type_max_align_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 -$as_echo "$gl_cv_type_max_align_t" >&6; } - if test $gl_cv_type_max_align_t = no; then - HAVE_MAX_ALIGN_T=0 - STDDEF_H=stddef.h - fi - - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if ${gl_cv_decl_null_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes -else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - - - if test -n "$STDDEF_H"; then - GL_GENERATE_STDDEF_H_TRUE= - GL_GENERATE_STDDEF_H_FALSE='#' -else - GL_GENERATE_STDDEF_H_TRUE='#' - GL_GENERATE_STDDEF_H_FALSE= -fi - - if test -n "$STDDEF_H"; then - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stddef_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'stddef.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_stddef_h - gl_cv_next_stddef_h='"'$gl_header'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - - - - - fi - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -$as_echo_n "checking for mbstate_t... " >&6; } -if ${ac_cv_type_mbstate_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int -main () -{ -mbstate_t x; return sizeof x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_mbstate_t=yes -else - ac_cv_type_mbstate_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -$as_echo "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then - -$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h - - else - -$as_echo "#define mbstate_t int" >>confdefs.h - - fi - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if ${gt_cv_locale_ja+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else - /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - { - const char *p; - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - } - return 0; -#endif -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if ${gt_cv_locale_zh_CN+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else - /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - { - const char *p; - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - } - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -#endif -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 -$as_echo_n "checking for a french Unicode locale... " >&6; } -if ${gt_cv_locale_fr_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if !(defined __BEOS__ || defined __HAIKU__) - /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; -#endif -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; -#endif - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -$as_echo "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 - - - - - - GNULIB_STRFMON_L=0; - HAVE_STRFMON_L=1; - REPLACE_STRFMON_L=0; - - - - - - - - - if false || test $ac_cv_header_monetary_h = yes; then - MONETARY_H='monetary.h' - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_monetary_h='<'monetary.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_monetary_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_monetary_h = yes; then - - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'monetary.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_monetary_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_monetary_h - gl_cv_next_monetary_h='"'$gl_header'"' - else - gl_cv_next_monetary_h='<'monetary.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_monetary_h" >&5 -$as_echo "$gl_cv_next_monetary_h" >&6; } - fi - NEXT_MONETARY_H=$gl_cv_next_monetary_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'monetary.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_monetary_h - fi - NEXT_AS_FIRST_DIRECTIVE_MONETARY_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_monetary_h = yes; then - HAVE_MONETARY_H=1 - else - HAVE_MONETARY_H=0 - fi - - - - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - else - HAVE_XLOCALE_H=0 - fi - - - - - - else - MONETARY_H='' - fi - - if test -n "$MONETARY_H"; then - GL_GENERATE_MONETARY_H_TRUE= - GL_GENERATE_MONETARY_H_FALSE='#' -else - GL_GENERATE_MONETARY_H_TRUE='#' - GL_GENERATE_MONETARY_H_FALSE= -fi - - - - gl_cv_c_multiarch=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - - #ifdef __cplusplus - typedef bool Bool; - #else - typedef _Bool Bool; - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #endif - - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html - */ - Bool q = true; - Bool *pq = &q; - bool *qq = &q; - -int -main () -{ - - bool e = &s; - *pq |= q; *pq |= ! q; - *qq |= q; *qq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq + !qq); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes -else - ac_cv_header_stdbool_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if ${gt_cv_c_wint_t+:} false; then : @@ -12064,144 +11184,61 @@ $as_echo "$gl_cv_type_wint_t_too_small" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if ${ac_cv_type_unsigned_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} + + + + gl_cv_c_multiarch=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO"; then : + + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done -else - ac_cv_type_unsigned_long_long_int=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_c_multiarch = yes; then + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if ${ac_cv_type_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif -int -main () -{ -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : -else - ac_cv_type_long_long_int=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then + + $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - fi - - - - - - - - - - - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - - - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h @@ -13050,6 +12087,1495 @@ fi + + + GNULIB_IMAXABS=0; + GNULIB_IMAXDIV=0; + GNULIB_STRTOIMAX=0; + GNULIB_STRTOUMAX=0; + HAVE_DECL_IMAXABS=1; + HAVE_DECL_IMAXDIV=1; + HAVE_DECL_STRTOIMAX=1; + HAVE_DECL_STRTOUMAX=1; + HAVE_IMAXDIV_T=1; + REPLACE_STRTOIMAX=0; + REPLACE_STRTOUMAX=0; + INT32_MAX_LT_INTMAX_MAX=1; + INT64_MAX_EQ_LONG_MAX='defined _LP64'; + PRI_MACROS_BROKEN=0; + PRIPTR_PREFIX=__PRIPTR_PREFIX; + UINT32_MAX_LT_UINTMAX_MAX=1; + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_inttypes_h='<'inttypes.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_inttypes_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_inttypes_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'inttypes.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_inttypes_h + gl_cv_next_inttypes_h='"'$gl_header'"' + else + gl_cv_next_inttypes_h='<'inttypes.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 +$as_echo "$gl_cv_next_inttypes_h" >&6; } + fi + NEXT_INTTYPES_H=$gl_cv_next_inttypes_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'inttypes.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_inttypes_h + fi + NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive + + + + + + + + + + + + + GNULIB_LOCALECONV=0; + GNULIB_SETLOCALE=0; + GNULIB_SETLOCALE_NULL=0; + GNULIB_DUPLOCALE=0; + GNULIB_LOCALENAME=0; + HAVE_NEWLOCALE=1; + HAVE_DUPLOCALE=1; + HAVE_FREELOCALE=1; + REPLACE_LOCALECONV=0; + REPLACE_SETLOCALE=0; + REPLACE_NEWLOCALE=0; + REPLACE_DUPLOCALE=0; + REPLACE_FREELOCALE=0; + REPLACE_STRUCT_LCONV=0; + + + REPLACE_NULL=0; + HAVE_MAX_ALIGN_T=1; + HAVE_WCHAR_T=1; + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if ${gt_cv_c_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + + + STDDEF_H= + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 +$as_echo_n "checking for good max_align_t... " >&6; } +if ${gl_cv_type_max_align_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + unsigned int s = sizeof (max_align_t); + #if defined __GNUC__ || defined __IBM__ALIGNOF__ + int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; + int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_max_align_t=yes +else + gl_cv_type_max_align_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 +$as_echo "$gl_cv_type_max_align_t" >&6; } + if test $gl_cv_type_max_align_t = no; then + HAVE_MAX_ALIGN_T=0 + STDDEF_H=stddef.h + fi + + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } +if ${gl_cv_decl_null_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_null_works=yes +else + gl_cv_decl_null_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +$as_echo "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + + + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= +fi + + if test -n "$STDDEF_H"; then + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stddef_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stddef_h + gl_cv_next_stddef_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +$as_echo "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + + fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 +$as_echo_n "checking whether locale.h defines locale_t... " >&6; } +if ${gl_cv_header_locale_has_locale_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + locale_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_locale_has_locale_t=yes +else + gl_cv_header_locale_has_locale_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 +$as_echo "$gl_cv_header_locale_has_locale_t" >&6; } + + + if test $ac_cv_header_xlocale_h = yes; then + HAVE_XLOCALE_H=1 + if test $gl_cv_header_locale_has_locale_t = yes; then + gl_cv_header_locale_h_needs_xlocale_h=no + else + gl_cv_header_locale_h_needs_xlocale_h=yes + fi + HAVE_LOCALE_T=1 + else + HAVE_XLOCALE_H=0 + gl_cv_header_locale_h_needs_xlocale_h=no + if test $gl_cv_header_locale_has_locale_t = yes; then + HAVE_LOCALE_T=1 + else + HAVE_LOCALE_T=0 + fi + fi + + + + + if test -z "$gl_anythreadlib_early_done"; then + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + gl_anythreadlib_early_done=done + fi + + + + + + if test -z "$gl_pthreadlib_body_done"; then + gl_pthread_api=no + LIBPTHREAD= + LIBPMULTITHREAD= + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_ANYTHREADLIB_EARLY. + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : + gl_have_pthread_h=yes +else + gl_have_pthread_h=no +fi + + + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + +int +main () +{ +pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_pthread_api=yes + LIBPTHREAD=$gl_pthread + LIBPMULTITHREAD=$gl_pthread +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$save_LIBS + test $gl_pthread_api = yes && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + LIBPMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) + +$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h + + esac + +fi + + elif test $gl_pthread_api != yes; then + # Some library is needed. Try libpthread and libc_r. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + gl_pthread_api=yes + LIBPTHREAD=-lpthread + LIBPMULTITHREAD=-lpthread +fi + + if test $gl_pthread_api != yes; then + # For FreeBSD 4. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } +if ${ac_cv_lib_c_r_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_r_pthread_kill=yes +else + ac_cv_lib_c_r_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : + gl_pthread_api=yes + LIBPTHREAD=-lc_r + LIBPMULTITHREAD=-lc_r +fi + + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 +$as_echo_n "checking whether POSIX threads API is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 +$as_echo "$gl_pthread_api" >&6; } + + + if test $gl_pthread_api = yes; then + +$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h + + fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +sched_yield (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIB_SCHED_YIELD= + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 +$as_echo_n "checking for sched_yield in -lrt... " >&6; } +if ${ac_cv_lib_rt_sched_yield+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sched_yield (); +int +main () +{ +return sched_yield (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_sched_yield=yes +else + ac_cv_lib_rt_sched_yield=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 +$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } +if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : + LIB_SCHED_YIELD=-lrt +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 +$as_echo_n "checking for sched_yield in -lposix4... " >&6; } +if ${ac_cv_lib_posix4_sched_yield+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix4 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sched_yield (); +int +main () +{ +return sched_yield (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_posix4_sched_yield=yes +else + ac_cv_lib_posix4_sched_yield=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 +$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } +if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : + LIB_SCHED_YIELD=-lposix4 +fi + +fi + + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + gl_pthreadlib_body_done=done + fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 +$as_echo_n "checking for mbstate_t... " >&6; } +if ${ac_cv_type_mbstate_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int +main () +{ +mbstate_t x; return sizeof x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_mbstate_t=yes +else + ac_cv_type_mbstate_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 +$as_echo "$ac_cv_type_mbstate_t" >&6; } + if test $ac_cv_type_mbstate_t = yes; then + +$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + + else + +$as_echo "#define mbstate_t int" >>confdefs.h + + fi + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 +$as_echo_n "checking for a traditional japanese locale... " >&6; } +if ${gt_cv_locale_ja+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () +{ + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else + /* Check whether the given locale name is recognized by the system. */ +# if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales + on Cygwin 1.5.x. */ + if (MB_CUR_MAX == 1) + return 1; + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } + return 0; +#endif +} + +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. + gt_cv_locale_ja=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the AIX locale name. + if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC-JP + else + # Test for the HP-UX, OSF/1, NetBSD locale name. + if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.eucJP + else + # Test for the IRIX, FreeBSD locale name. + if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC + else + # Test for the Solaris 7 locale name. + if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja + else + # Special test for NetBSD 1.6. + if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then + gt_cv_locale_ja=ja_JP.eucJP + else + # None found. + gt_cv_locale_ja=none + fi + fi + fi + fi + fi + fi + ;; + esac + fi + rm -fr conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 +$as_echo "$gt_cv_locale_ja" >&6; } + LOCALE_JA=$gt_cv_locale_ja + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 +$as_echo_n "checking for a french Unicode locale... " >&6; } +if ${gt_cv_locale_fr_utf8+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if !(defined __BEOS__ || defined __HAIKU__) + /* Check whether the given locale name is recognized by the system. */ +# if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') + return 1; +#endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} + +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + fi + fi + ;; + esac + fi + rm -fr conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 +$as_echo "$gt_cv_locale_fr_utf8" >&6; } + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 +$as_echo_n "checking for a transitional chinese locale... " >&6; } +if ${gt_cv_locale_zh_CN+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () +{ + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if defined __BEOS__ || defined __HAIKU__ + return 1; +#else + /* Check whether the given locale name is recognized by the system. */ +# if defined _WIN32 && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + { + const char *p; + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + } + /* Check whether a typical GB18030 multibyte sequence is recognized as a + single wide character. This excludes the GB2312 and GBK encodings. */ + if (mblen ("\203\062\332\066", 5) != 4) + return 1; + return 0; +#endif +} + +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=Chinese_China.54936 + else + # None found. + gt_cv_locale_zh_CN=none + fi + ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the locale name without encoding suffix. + if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN.GB18030 + else + # None found. + gt_cv_locale_zh_CN=none + fi + fi + ;; + esac + else + # If there was a link error, due to mblen(), the system is so old that + # it certainly doesn't have a chinese locale. + gt_cv_locale_zh_CN=none + fi + rm -fr conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 +$as_echo "$gt_cv_locale_zh_CN" >&6; } + LOCALE_ZH_CN=$gt_cv_locale_zh_CN + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 +$as_echo_n "checking whether the compiler is clang... " >&6; } +if ${gl_cv_compiler_clang+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __clang__ +barfbarf +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "barfbarf" >/dev/null 2>&1; then : + gl_cv_compiler_clang=yes +else + gl_cv_compiler_clang=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5 +$as_echo "$gl_cv_compiler_clang" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5 +$as_echo_n "checking for compiler option needed when checking for declarations... " >&6; } +if ${gl_cv_compiler_check_decl_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test $gl_cv_compiler_clang = yes; then + save_ac_compile="$ac_compile" + ac_compile="$ac_compile -Werror=implicit-function-declaration" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration' +else + gl_cv_compiler_check_decl_option=none +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_compile="$save_ac_compile" + else + gl_cv_compiler_check_decl_option=none + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5 +$as_echo "$gl_cv_compiler_check_decl_option" >&6; } + if test "x$gl_cv_compiler_check_decl_option" != xnone; then + ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option" + else + ac_compile_for_check_decl="$ac_compile" + fi + + + + + GNULIB_STRFMON_L=0; + HAVE_STRFMON_L=1; + REPLACE_STRFMON_L=0; + + + + + + + + + if false || test $ac_cv_header_monetary_h = yes; then + MONETARY_H='monetary.h' + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_monetary_h='<'monetary.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_monetary_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_monetary_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'monetary.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_monetary_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_monetary_h + gl_cv_next_monetary_h='"'$gl_header'"' + else + gl_cv_next_monetary_h='<'monetary.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_monetary_h" >&5 +$as_echo "$gl_cv_next_monetary_h" >&6; } + fi + NEXT_MONETARY_H=$gl_cv_next_monetary_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'monetary.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_monetary_h + fi + NEXT_AS_FIRST_DIRECTIVE_MONETARY_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_monetary_h = yes; then + HAVE_MONETARY_H=1 + else + HAVE_MONETARY_H=0 + fi + + + + if test $ac_cv_header_xlocale_h = yes; then + HAVE_XLOCALE_H=1 + else + HAVE_XLOCALE_H=0 + fi + + + + + + else + MONETARY_H='' + fi + + if test -n "$MONETARY_H"; then + GL_GENERATE_MONETARY_H_TRUE= + GL_GENERATE_MONETARY_H_FALSE='#' +else + GL_GENERATE_MONETARY_H_TRUE='#' + GL_GENERATE_MONETARY_H_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + + #ifdef __cplusplus + typedef bool Bool; + #else + typedef _Bool Bool; + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #endif + + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html + */ + Bool q = true; + Bool *pq = &q; + bool *qq = &q; + +int +main () +{ + + bool e = &s; + *pq |= q; *pq |= ! q; + *qq |= q; *qq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq + !qq); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + + GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; GNULIB_FDOPEN=0; @@ -13792,19 +14318,95 @@ q - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 +$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } +if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. + *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) + gl_cv_func_setlocale_null_all_mtsafe=no ;; + # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. + *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) + gl_cv_func_setlocale_null_all_mtsafe=yes ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 +$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } + case "$host_os" in + mingw*) ;; + *) + if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then + gl_cv_func_setlocale_null_all_mtsafe="trivially yes" + fi + ;; + esac + case "$gl_cv_func_setlocale_null_all_mtsafe" in + *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; + *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; + esac + +cat >>confdefs.h <<_ACEOF +#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 +$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } +if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on OpenBSD, AIX. + openbsd* | aix*) + gl_cv_func_setlocale_null_one_mtsafe=no ;; + # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. + *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) + gl_cv_func_setlocale_null_one_mtsafe=yes ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 +$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } + case "$host_os" in + mingw*) ;; + *) + if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then + gl_cv_func_setlocale_null_one_mtsafe="trivially yes" + fi + ;; + esac + case "$gl_cv_func_setlocale_null_one_mtsafe" in + *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; + *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; + esac + +cat >>confdefs.h <<_ACEOF +#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE +_ACEOF + + + if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then + case "$host_os" in + mingw*) LIB_SETLOCALE_NULL= ;; + *) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } if ${gl_cv_have_weak+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_have_weak=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern void xyzzy (); #pragma weak xyzzy @@ -13821,13 +14423,13 @@ if ac_fn_c_try_link "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test $gl_cv_have_weak = maybe; then - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ - Extensible Linking Format - #endif + Extensible Linking Format + #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -13859,263 +14461,31 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi - case " $LDFLAGS " in - *" -static "*) gl_cv_have_weak=no ;; - esac + fi + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 $as_echo "$gl_cv_have_weak" >&6; } - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + case "$gl_cv_have_weak" in + *yes) - : - fi - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - gl_have_pthread_h=yes -else - gl_have_pthread_h=no -fi +$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h + ;; + esac - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - # - # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 - # needs -pthread for some reason. See: - # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html - save_LIBS=$LIBS - for gl_pthread in '' '-pthread'; do - LIBS="$LIBS $gl_pthread" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - pthread_mutex_t m; - pthread_mutexattr_t ma; - -int -main () -{ -pthread_mutex_lock (&m); - pthread_mutexattr_init (&ma); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_pthread=yes - LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread - LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$save_LIBS - test -n "$gl_have_pthread" && break - done - - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_kill+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_kill=yes -else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - # On Solaris 10 or newer, this test is no longer needed, because - # libc contains the fully functional pthread functions. - case "$host_os" in - solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) - -$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h - - esac - -fi - - elif test -z "$gl_have_pthread"; then - # Some library is needed. Try libpthread and libc_r. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_kill+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_kill=yes -else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : - gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread -fi - - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 -$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } -if ${ac_cv_lib_c_r_pthread_kill+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_r_pthread_kill=yes -else - ac_cv_lib_c_r_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } -if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : - gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r -fi - - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - -$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h - - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - -$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - fi - if test -z "$gl_have_pthread"; then - case "$gl_use_threads" in - yes | windows | win32) # The 'win32' is for backward compatibility. - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=windows - -$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h - - fi - ;; - esac - fi + case "$gl_cv_have_weak" in + *yes) LIB_SETLOCALE_NULL= ;; + *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; + esac + ;; + esac + else + LIB_SETLOCALE_NULL= fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 -$as_echo_n "checking for multithread API to use... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 -$as_echo "$gl_threads_api" >&6; } - - - - - - - @@ -14664,6 +15034,21 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + GNULIB_GETOPT_POSIX=1 + + + + + +$as_echo "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h + + + + + + + + @@ -14983,11 +15368,12 @@ rm -f conftest* if test $gl_func_iconv_gnu = no; then iconv_flavor= case "$host_os" in - aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; - irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; - hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; - osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; - solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;; + aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; + irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; + hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; + osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; + solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;; + openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;; esac if test -n "$iconv_flavor"; then @@ -15098,6 +15484,9 @@ $as_echo "#define HAVE_INLINE 1" >>confdefs.h + + + case "$host_os" in solaris*) @@ -15134,47 +15523,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; } - - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 -$as_echo_n "checking whether locale.h defines locale_t... " >&6; } -if ${gl_cv_header_locale_has_locale_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - locale_t x; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_locale_has_locale_t=yes -else - gl_cv_header_locale_has_locale_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 -$as_echo "$gl_cv_header_locale_has_locale_t" >&6; } - if test $gl_cv_header_locale_has_locale_t = yes; then - gl_cv_header_locale_h_needs_xlocale_h=no - else - gl_cv_header_locale_h_needs_xlocale_h=yes - fi - else - HAVE_XLOCALE_H=0 - gl_cv_header_locale_h_needs_xlocale_h=no - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5 $as_echo_n "checking whether struct lconv is properly defined... " >&6; } if ${gl_cv_sys_struct_lconv_ok+:} false; then : @@ -15205,7 +15553,27 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; } if test $gl_cv_sys_struct_lconv_ok = no; then - REPLACE_STRUCT_LCONV=1 + case "$host_os" in + mingw*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Special +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Special" >/dev/null 2>&1; then : + +else + REPLACE_STRUCT_LCONV=1 +fi +rm -f conftest* + + ;; + *) REPLACE_STRUCT_LCONV=1 ;; + esac fi @@ -15294,7 +15662,15 @@ $as_echo "$gl_cv_next_locale_h" >&6; } - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + + + if case "$host_os" in + mingw*) true ;; + *) test $ac_cv_func_mbsinit = yes ;; + esac \ + && test $ac_cv_func_mbrtowc = yes; then + @@ -15352,6 +15728,50 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + else + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi fi fi @@ -15814,6 +16234,144 @@ $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5 +$as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; } +if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;; + *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;; + esac + case "$host_os" in + mingw*) + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + if (setlocale (LC_ALL, "French_France.65001") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 1; + } + if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 2; + } + if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 4; + } + if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 8; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_stores_incomplete=no +else + gl_cv_func_mbrtowc_stores_incomplete=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + ;; + *) + + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_stores_incomplete=no +else + gl_cv_func_mbrtowc_stores_incomplete=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5 +$as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; } if ${gl_cv_func_mbrtowc_empty_input+:} false; then : @@ -15859,16 +16417,16 @@ $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } -if ${gl_cv_C_locale_sans_EILSEQ+:} false; then : +if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then : $as_echo_n "(cached) " >&6 else - gl_cv_C_locale_sans_EILSEQ="$gl_cross_guess_normal" + gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on native Windows. - mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;; esac else @@ -15902,9 +16460,9 @@ main () } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_C_locale_sans_EILSEQ=yes + gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes else - gl_cv_C_locale_sans_EILSEQ=no + gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -15912,8 +16470,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5 -$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5 +$as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; } case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; @@ -15947,6 +16505,14 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac + case "$gl_cv_func_mbrtowc_stores_incomplete" in + *no) ;; + *) +$as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac case "$gl_cv_func_mbrtowc_empty_input" in *yes) ;; *) @@ -15955,16 +16521,108 @@ $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac - case $gl_cv_C_locale_sans_EILSEQ in + case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in *yes) ;; *) -$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h +$as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac fi fi + if test $REPLACE_MBSTATE_T = 1; then + case "$host_os" in + mingw*) LIB_MBRTOWC= ;; + *) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } +if ${gl_cv_have_weak+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main () +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_have_weak="guessing yes" +else + gl_cv_have_weak="guessing no" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_have_weak=yes +else + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +$as_echo "$gl_cv_have_weak" >&6; } + case "$gl_cv_have_weak" in + *yes) + +$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h + + ;; + esac + + case "$gl_cv_have_weak" in + *yes) LIB_MBRTOWC= ;; + *) LIB_MBRTOWC="$LIBPTHREAD" ;; + esac + ;; + esac + else + LIB_MBRTOWC= + fi + if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then @@ -15977,6 +16635,114 @@ $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" + if test $REPLACE_MBSTATE_T = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext" + + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +$as_echo_n "checking whether the -Werror option is usable... " >&6; } +if ${gl_cv_cc_vis_werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_vis_werror=yes +else + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +$as_echo "$gl_cv_cc_vis_werror" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +$as_echo_n "checking for simple visibility declarations... " >&6; } +if ${gl_cv_cc_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_visibility=yes +else + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +$as_echo "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_VISIBILITY $HAVE_VISIBILITY +_ACEOF + + + + fi : @@ -16007,7 +16773,13 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + if case "$host_os" in + mingw*) true ;; + *) test $ac_cv_func_mbsinit = yes ;; + esac \ + && test $ac_cv_func_mbrtowc = yes; then + @@ -16065,6 +16837,50 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + else + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi fi fi @@ -16381,10 +17197,20 @@ $as_echo "#define ssize_t int" >>confdefs.h - # Define two additional variables used in the Makefile substitution. - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' + if test "$ac_cv_header_stdbool_h" = yes; then + case "$host_os" in + solaris*) + if test -z "$GCC"; then + STDBOOL_H='stdbool.h' + else + STDBOOL_H='' + fi + ;; + *) + STDBOOL_H='' + ;; + esac else STDBOOL_H='stdbool.h' fi @@ -17192,7 +18018,13 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + if case "$host_os" in + mingw*) true ;; + *) test $ac_cv_func_mbsinit = yes ;; + esac \ + && test $ac_cv_func_mbrtowc = yes; then + @@ -17250,6 +18082,50 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + else + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi fi fi @@ -17365,10 +18241,7 @@ _ACEOF REPLACE_WCRTOMB=1 fi else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_WCRTOMB=1 - fi - if test $REPLACE_WCRTOMB = 0; then + if test $REPLACE_WCRTOMB = 0; then @@ -17426,7 +18299,10 @@ fi $as_echo "$gl_cv_func_wcrtomb_works" >&6; } case "$gl_cv_func_wcrtomb_works" in *yes) ;; - *) REPLACE_WCRTOMB=1 ;; + *) +$as_echo "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h + + REPLACE_WCRTOMB=1 ;; esac fi if test $REPLACE_WCRTOMB = 0; then @@ -17437,12 +18313,10 @@ if ${gl_cv_func_wcrtomb_retval+:} false; then : else case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; + # Guess no on AIX 4, OSF/1, Solaris, native Windows. + aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : @@ -17461,6 +18335,7 @@ else #include #include #include +#include int main () { int result = 0; @@ -17473,6 +18348,12 @@ int main () { if (wcrtomb (NULL, 0, NULL) != 1) result |= 2; + { + wchar_t wc = (wchar_t) 0xBADFACE; + if (mbtowc (&wc, "\303\274", 2) == 2) + if (wcrtomb (NULL, wc, NULL) != 1) + result |= 2; + } } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { @@ -17503,7 +18384,10 @@ fi $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } case "$gl_cv_func_wcrtomb_retval" in *yes) ;; - *) REPLACE_WCRTOMB=1 ;; + *) +$as_echo "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h + + REPLACE_WCRTOMB=1 ;; esac fi fi @@ -17917,10 +18801,14 @@ $as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi - case "$gl_cv_func_iswcntrl_works" in - *yes) REPLACE_ISWCNTRL=0 ;; - *) REPLACE_ISWCNTRL=1 ;; - esac + if test $GNULIB_OVERRIDES_WINT_T = 1; then + REPLACE_ISWCNTRL=1 + else + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then @@ -18069,26 +18957,25 @@ $as_echo "$gl_cv_type_wctrans_t" >&6; } gl_gnulib_enabled_30838f5439487421042f2225bed3af76=false gl_gnulib_enabled_localcharset=false gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=false - gl_gnulib_enabled_lock=false gl_gnulib_enabled_mbsinit=false gl_gnulib_enabled_mbtowc=false gl_gnulib_enabled_memchr=false + gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd=false gl_gnulib_enabled_b3ae4a413a1340415f34a52d1dafb147=false gl_gnulib_enabled_stdlib=false gl_gnulib_enabled_streq=false gl_gnulib_enabled_strnlen1=false - gl_gnulib_enabled_threadlib=false gl_gnulib_enabled_verify=false gl_gnulib_enabled_wctomb=false - gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440=false - gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab=false - gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354=false - gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef=false gl_gnulib_enabled_wmemcpy=false func_gl_gnulib_m4code_30838f5439487421042f2225bed3af76 () { if ! $gl_gnulib_enabled_30838f5439487421042f2225bed3af76; then + + LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL" + gl_gnulib_enabled_30838f5439487421042f2225bed3af76=true + func_gl_gnulib_m4code_e7e881d32ca02f1c997b13c737c64bbd fi } func_gl_gnulib_m4code_localcharset () @@ -18119,248 +19006,6 @@ $as_echo "$gl_cv_type_wctrans_t" >&6; } gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=true fi } - func_gl_gnulib_m4code_lock () - { - if ! $gl_gnulib_enabled_lock; then - - - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - has_rwlock=false - ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include -" -if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : - has_rwlock=true - -$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h - -fi - - if $has_rwlock; then - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 -$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } -if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LIBS="$LIBS" - LIBS="$LIBS $LIBMULTITHREAD" - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess no on glibc systems. - *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; - # Guess no on musl systems. - *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; - # Guess no on bionic systems. - *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; - # Guess yes on native Windows with the mingw-w64 winpthreads library. - # Guess no on native Windows with the gnulib windows-rwlock module. - mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" - else - gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" - fi - ;; - # If we don't know, obey --enable-cross-guesses. - *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#include - -#define SUCCEED() exit (0) -#define FAILURE() exit (1) -#define UNEXPECTED(n) (exit (10 + (n))) - -/* The main thread creates the waiting writer and the requesting reader threads - in the default way; this guarantees that they have the same priority. - We can reuse the main thread as first reader thread. */ - -static pthread_rwlock_t lock; -static pthread_t reader1; -static pthread_t writer; -static pthread_t reader2; -static pthread_t timer; -/* Used to pass control from writer to reader2 and from reader2 to timer, - as in a relay race. - Passing control from one running thread to another running thread - is most likely faster than to create the second thread. */ -static pthread_mutex_t baton; - -static void * -timer_func (void *ignored) -{ - /* Step 13 (can be before or after step 12): - The timer thread takes the baton, then waits a moment to make sure - it can tell whether the second reader thread is blocked at step 12. */ - if (pthread_mutex_lock (&baton)) - UNEXPECTED (13); - usleep (100000); - /* By the time we get here, it's clear that the second reader thread is - blocked at step 12. This is the desired behaviour. */ - SUCCEED (); -} - -static void * -reader2_func (void *ignored) -{ - int err; - - /* Step 8 (can be before or after step 7): - The second reader thread takes the baton, then waits a moment to make sure - the writer thread has reached step 7. */ - if (pthread_mutex_lock (&baton)) - UNEXPECTED (8); - usleep (100000); - /* Step 9: The second reader thread requests the lock. */ - err = pthread_rwlock_tryrdlock (&lock); - if (err == 0) - FAILURE (); - else if (err != EBUSY) - UNEXPECTED (9); - /* Step 10: Launch a timer, to test whether the next call blocks. */ - if (pthread_create (&timer, NULL, timer_func, NULL)) - UNEXPECTED (10); - /* Step 11: Release the baton. */ - if (pthread_mutex_unlock (&baton)) - UNEXPECTED (11); - /* Step 12: The second reader thread requests the lock. */ - err = pthread_rwlock_rdlock (&lock); - if (err == 0) - FAILURE (); - else - UNEXPECTED (12); -} - -static void * -writer_func (void *ignored) -{ - /* Step 4: Take the baton, so that the second reader thread does not go ahead - too early. */ - if (pthread_mutex_lock (&baton)) - UNEXPECTED (4); - /* Step 5: Create the second reader thread. */ - if (pthread_create (&reader2, NULL, reader2_func, NULL)) - UNEXPECTED (5); - /* Step 6: Release the baton. */ - if (pthread_mutex_unlock (&baton)) - UNEXPECTED (6); - /* Step 7: The writer thread requests the lock. */ - if (pthread_rwlock_wrlock (&lock)) - UNEXPECTED (7); - return NULL; -} - -int -main () -{ - reader1 = pthread_self (); - - /* Step 1: The main thread initializes the lock and the baton. */ - if (pthread_rwlock_init (&lock, NULL)) - UNEXPECTED (1); - if (pthread_mutex_init (&baton, NULL)) - UNEXPECTED (1); - /* Step 2: The main thread acquires the lock as a reader. */ - if (pthread_rwlock_rdlock (&lock)) - UNEXPECTED (2); - /* Step 3: Create the writer thread. */ - if (pthread_create (&writer, NULL, writer_func, NULL)) - UNEXPECTED (3); - /* Job done. Go to sleep. */ - for (;;) - { - sleep (1); - } -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_pthread_rwlock_rdlock_prefer_writer=yes -else - gl_cv_pthread_rwlock_rdlock_prefer_writer=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - LIBS="$save_LIBS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 -$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } - case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in - *yes) - -$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h - - ;; - esac - - fi - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -int -main () -{ - -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ - && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) -error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - : - - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_LOCK 1 -_ACEOF - - - gl_gnulib_enabled_lock=true - func_gl_gnulib_m4code_threadlib - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_503a4cb75d69c787103d0aa2ab7d8440 - fi - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_68a4501daeca58988392c7e60b4917ab - fi - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_f0efff84a70f4afba30902bb8ffe9354 - fi - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_8bb827fe37eaccf1b97feb0c87bc92ef - fi - fi - } func_gl_gnulib_m4code_mbsinit () { if ! $gl_gnulib_enabled_mbsinit; then @@ -18375,7 +19020,13 @@ _ACEOF - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + if case "$host_os" in + mingw*) true ;; + *) test $ac_cv_func_mbsinit = yes ;; + esac \ + && test $ac_cv_func_mbrtowc = yes; then + @@ -18433,6 +19084,50 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + else + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 2; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi fi fi @@ -18700,6 +19395,299 @@ $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h gl_gnulib_enabled_memchr=true fi } + func_gl_gnulib_m4code_e7e881d32ca02f1c997b13c737c64bbd () + { + if ! $gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd; then + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 +$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } +if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. + *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) + gl_cv_func_setlocale_null_all_mtsafe=no ;; + # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. + *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) + gl_cv_func_setlocale_null_all_mtsafe=yes ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 +$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } + case "$host_os" in + mingw*) ;; + *) + if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then + gl_cv_func_setlocale_null_all_mtsafe="trivially yes" + fi + ;; + esac + case "$gl_cv_func_setlocale_null_all_mtsafe" in + *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; + *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; + esac + +cat >>confdefs.h <<_ACEOF +#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 +$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } +if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on OpenBSD, AIX. + openbsd* | aix*) + gl_cv_func_setlocale_null_one_mtsafe=no ;; + # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. + *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) + gl_cv_func_setlocale_null_one_mtsafe=yes ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 +$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } + case "$host_os" in + mingw*) ;; + *) + if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then + gl_cv_func_setlocale_null_one_mtsafe="trivially yes" + fi + ;; + esac + case "$gl_cv_func_setlocale_null_one_mtsafe" in + *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; + *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; + esac + +cat >>confdefs.h <<_ACEOF +#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE +_ACEOF + + + if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then + case "$host_os" in + mingw*) LIB_SETLOCALE_NULL= ;; + *) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } +if ${gl_cv_have_weak+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main () +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_have_weak="guessing yes" +else + gl_cv_have_weak="guessing no" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_have_weak=yes +else + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +$as_echo "$gl_cv_have_weak" >&6; } + case "$gl_cv_have_weak" in + *yes) + +$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h + + ;; + esac + + case "$gl_cv_have_weak" in + *yes) LIB_SETLOCALE_NULL= ;; + *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; + esac + ;; + esac + else + LIB_SETLOCALE_NULL= + fi + + + if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext" + + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +$as_echo_n "checking whether the -Werror option is usable... " >&6; } +if ${gl_cv_cc_vis_werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_vis_werror=yes +else + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +$as_echo "$gl_cv_cc_vis_werror" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +$as_echo_n "checking for simple visibility declarations... " >&6; } +if ${gl_cv_cc_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_visibility=yes +else + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +$as_echo "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_VISIBILITY $HAVE_VISIBILITY +_ACEOF + + + + fi + + + + + + GNULIB_SETLOCALE_NULL=1 + + + + + +$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h + + + + gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd=true + fi + } func_gl_gnulib_m4code_b3ae4a413a1340415f34a52d1dafb147 () { if ! $gl_gnulib_enabled_b3ae4a413a1340415f34a52d1dafb147; then @@ -18804,13 +19792,6 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; } func_gl_gnulib_m4code_memchr fi } - func_gl_gnulib_m4code_threadlib () - { - if ! $gl_gnulib_enabled_threadlib; then - - gl_gnulib_enabled_threadlib=true - fi - } func_gl_gnulib_m4code_verify () { if ! $gl_gnulib_enabled_verify; then @@ -18861,90 +19842,6 @@ $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h func_gl_gnulib_m4code_stdlib fi } - func_gl_gnulib_m4code_503a4cb75d69c787103d0aa2ab7d8440 () - { - if ! $gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440; then - - case "$host_os" in - mingw*) - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext" - - ;; - esac - gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440=true - fi - } - func_gl_gnulib_m4code_68a4501daeca58988392c7e60b4917ab () - { - if ! $gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab; then - - case "$host_os" in - mingw*) - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext" - - ;; - esac - gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab=true - fi - } - func_gl_gnulib_m4code_f0efff84a70f4afba30902bb8ffe9354 () - { - if ! $gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354; then - - case "$host_os" in - mingw*) - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext" - - ;; - esac - gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354=true - fi - } - func_gl_gnulib_m4code_8bb827fe37eaccf1b97feb0c87bc92ef () - { - if ! $gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef; then - - case "$host_os" in - mingw*) - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext" - - ;; - esac - gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef=true - fi - } func_gl_gnulib_m4code_wmemcpy () { if ! $gl_gnulib_enabled_wmemcpy; then @@ -19026,16 +19923,13 @@ $as_echo "#define GNULIB_TEST_WMEMCPY 1" >>confdefs.h if test $NEED_LOCALTIME_BUFFER = 1; then func_gl_gnulib_m4code_2049e887c7e5308faad27b3f894bb8c9 fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then + if { test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0; then func_gl_gnulib_m4code_30838f5439487421042f2225bed3af76 fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then func_gl_gnulib_m4code_localcharset fi - if test $HAVE_MBRTOWC = 0 || { test $REPLACE_MBRTOWC = 1 && { test $HAVE_MBSINIT = 0 || test $REPLACE_MBSTATE_T = 1; }; }; then - func_gl_gnulib_m4code_lock - fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then + if { test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0; then func_gl_gnulib_m4code_mbsinit fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then @@ -19081,14 +19975,6 @@ else gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9_FALSE= fi - if $gl_gnulib_enabled_lock; then - gl_GNULIB_ENABLED_lock_TRUE= - gl_GNULIB_ENABLED_lock_FALSE='#' -else - gl_GNULIB_ENABLED_lock_TRUE='#' - gl_GNULIB_ENABLED_lock_FALSE= -fi - if $gl_gnulib_enabled_mbsinit; then gl_GNULIB_ENABLED_mbsinit_TRUE= gl_GNULIB_ENABLED_mbsinit_FALSE='#' @@ -19113,6 +19999,14 @@ else gl_GNULIB_ENABLED_memchr_FALSE= fi + if $gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd; then + gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_TRUE= + gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_FALSE='#' +else + gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_TRUE='#' + gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_FALSE= +fi + if $gl_gnulib_enabled_b3ae4a413a1340415f34a52d1dafb147; then gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147_TRUE= gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147_FALSE='#' @@ -19145,14 +20039,6 @@ else gl_GNULIB_ENABLED_strnlen1_FALSE= fi - if $gl_gnulib_enabled_threadlib; then - gl_GNULIB_ENABLED_threadlib_TRUE= - gl_GNULIB_ENABLED_threadlib_FALSE='#' -else - gl_GNULIB_ENABLED_threadlib_TRUE='#' - gl_GNULIB_ENABLED_threadlib_FALSE= -fi - if $gl_gnulib_enabled_verify; then gl_GNULIB_ENABLED_verify_TRUE= gl_GNULIB_ENABLED_verify_FALSE='#' @@ -19169,38 +20055,6 @@ else gl_GNULIB_ENABLED_wctomb_FALSE= fi - if $gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440; then - gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_TRUE= - gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_FALSE='#' -else - gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_TRUE='#' - gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_FALSE= -fi - - if $gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab; then - gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_TRUE= - gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_FALSE='#' -else - gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_TRUE='#' - gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_FALSE= -fi - - if $gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354; then - gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_TRUE= - gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_FALSE='#' -else - gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_TRUE='#' - gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_FALSE= -fi - - if $gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef; then - gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_TRUE= - gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_FALSE='#' -else - gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_TRUE='#' - gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_FALSE= -fi - if $gl_gnulib_enabled_wmemcpy; then gl_GNULIB_ENABLED_wmemcpy_TRUE= gl_GNULIB_ENABLED_wmemcpy_FALSE='#' @@ -20678,6 +21532,14 @@ if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FAL as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20694,14 +21556,6 @@ if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FAL as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20722,10 +21576,6 @@ if test -z "${gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9_TRUE}" && test as_fn_error $? "conditional \"gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${gl_GNULIB_ENABLED_lock_TRUE}" && test -z "${gl_GNULIB_ENABLED_lock_FALSE}"; then - as_fn_error $? "conditional \"gl_GNULIB_ENABLED_lock\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${gl_GNULIB_ENABLED_mbsinit_TRUE}" && test -z "${gl_GNULIB_ENABLED_mbsinit_FALSE}"; then as_fn_error $? "conditional \"gl_GNULIB_ENABLED_mbsinit\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20738,6 +21588,10 @@ if test -z "${gl_GNULIB_ENABLED_memchr_TRUE}" && test -z "${gl_GNULIB_ENABLED_me as_fn_error $? "conditional \"gl_GNULIB_ENABLED_memchr\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_TRUE}" && test -z "${gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_FALSE}"; then + as_fn_error $? "conditional \"gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147_TRUE}" && test -z "${gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147_FALSE}"; then as_fn_error $? "conditional \"gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20754,10 +21608,6 @@ if test -z "${gl_GNULIB_ENABLED_strnlen1_TRUE}" && test -z "${gl_GNULIB_ENABLED_ as_fn_error $? "conditional \"gl_GNULIB_ENABLED_strnlen1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${gl_GNULIB_ENABLED_threadlib_TRUE}" && test -z "${gl_GNULIB_ENABLED_threadlib_FALSE}"; then - as_fn_error $? "conditional \"gl_GNULIB_ENABLED_threadlib\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then as_fn_error $? "conditional \"gl_GNULIB_ENABLED_verify\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20766,22 +21616,6 @@ if test -z "${gl_GNULIB_ENABLED_wctomb_TRUE}" && test -z "${gl_GNULIB_ENABLED_wc as_fn_error $? "conditional \"gl_GNULIB_ENABLED_wctomb\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_TRUE}" && test -z "${gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440_FALSE}"; then - as_fn_error $? "conditional \"gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_TRUE}" && test -z "${gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab_FALSE}"; then - as_fn_error $? "conditional \"gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_TRUE}" && test -z "${gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354_FALSE}"; then - as_fn_error $? "conditional \"gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_TRUE}" && test -z "${gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef_FALSE}"; then - as_fn_error $? "conditional \"gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${gl_GNULIB_ENABLED_wmemcpy_TRUE}" && test -z "${gl_GNULIB_ENABLED_wmemcpy_FALSE}"; then as_fn_error $? "conditional \"gl_GNULIB_ENABLED_wmemcpy\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21215,7 +22049,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Star Traders $as_me 7.13, which was +This file was extended by Star Traders $as_me 7.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21282,7 +22116,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Star Traders config.status 7.13 +Star Traders config.status 7.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -22272,7 +23106,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: - Configuration summary for Star Traders 7.13: + Configuration summary for Star Traders 7.14: Building for host: $host Using C compiler with options: $CC $CFLAGS @@ -22282,7 +23116,7 @@ fi " >&5 $as_echo "$as_me: - Configuration summary for Star Traders 7.13: + Configuration summary for Star Traders 7.14: Building for host: $host Using C compiler with options: $CC $CFLAGS diff --git a/configure.ac b/configure.ac index 4535eeb..e2373dd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl ********************************************************************* dnl * * dnl * Star Traders: A Game of Interstellar Trading * -dnl * Copyright (C) 1990-2019, John Zaitseff * +dnl * Copyright (C) 1990-2020, John Zaitseff * dnl * * dnl ********************************************************************* dnl @@ -26,7 +26,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see https://www.gnu.org/licenses/. -AC_INIT([Star Traders], [7.13], [J.Zaitseff@zap.org.au], [trader], +AC_INIT([Star Traders], [7.14], [J.Zaitseff@zap.org.au], [trader], [https://www.zap.org.au/projects/trader/]) AC_DEFINE([PACKAGE_AUTHOR], ["John Zaitseff"], [Package author]) diff --git a/data/Makefile.am b/data/Makefile.am index cecf7f4..6b3dd89 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/data/Makefile.in b/data/Makefile.in index 423a616..f4f112f 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -17,12 +17,12 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### # Author: John Zaitseff -# $Id: cecf7f49addcd789ba2910d3e09eab55d858d9eb $ +# $Id: 6b3dd89a21a39a189f02b33dfb1e1d4ac3716eee $ # # This file, data/Makefile.am, contains the non-code data directory # Makefile for Star Traders. It needs to be processed by automake to @@ -135,20 +135,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ - $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ - $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ - $(top_srcdir)/m4/monetary_h.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ + $(top_srcdir)/m4/localtime-buffer.m4 \ + $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ + $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ + $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ + $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/monetary_h.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/setlocale_null.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ @@ -156,12 +155,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ - $(top_srcdir)/m4/wcsdup.m4 $(top_srcdir)/m4/wctob.m4 \ - $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemcpy.m4 \ - $(top_srcdir)/m4/xopen-source.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wcsdup.m4 \ + $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \ + $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/wmemcpy.m4 $(top_srcdir)/m4/xopen-source.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_desktop_DATA) \ @@ -254,6 +254,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSES_CFLAGS = @CURSES_CFLAGS@ @@ -332,6 +333,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ @@ -341,6 +343,8 @@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -430,6 +434,7 @@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ @@ -454,10 +459,12 @@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLD = @GNULIB_STRTOLD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ @@ -549,6 +556,8 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ @@ -563,7 +572,9 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ @@ -602,6 +613,7 @@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -610,7 +622,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ @@ -695,11 +706,11 @@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ @@ -751,6 +762,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ @@ -758,12 +771,16 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPMULTITHREAD = @LIBPMULTITHREAD@ +LIBPTHREAD = @LIBPTHREAD@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIB_HARD_LOCALE = @LIB_HARD_LOCALE@ +LIB_MBRTOWC = @LIB_MBRTOWC@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -772,9 +789,7 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -784,6 +799,7 @@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MONETARY_H = @NEXT_AS_FIRST_DIRECTIVE_MONETARY_H@ @@ -801,6 +817,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MONETARY_H = @NEXT_MONETARY_H@ @@ -831,6 +848,8 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ @@ -951,8 +970,10 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOLD = @REPLACE_STRTOLD@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ @@ -978,6 +999,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSTOK = @REPLACE_WCSTOK@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ @@ -994,6 +1016,8 @@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ diff --git a/data/trader.desktop b/data/trader.desktop index f8bf0f1..4b53e63 100644 --- a/data/trader.desktop +++ b/data/trader.desktop @@ -1,12 +1,12 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### # Author: John Zaitseff -# $Id: f8e3e64b8d5bdf73079c79ae778aba1666f679a6 $ +# $Id: ea09a46b0a2baa97b5a0a371c8263507b5303118 $ # This file provides a translated desktop entry for Star Traders and # conforms to the Desktop Entry Specification v1.1. @@ -32,6 +32,7 @@ Name[fr]=Star Traders Name[hr]=Star Traders Name[hu]=Star Traders Name[nb]=Star Traders +Name[pt_BR]=Comerciantes Estelares Name[ru]=Звёздные торговцы Name[sr]=Звездани трговци Name[sv]=Star Traders @@ -49,6 +50,7 @@ Comment[fr]=Jouer à Star Traders, un simple jeu de commerce interstellaire Comment[hr]=Igrajte Star Traders, jednostavnu igru međuzvjezdanog trgovanja Comment[hu]=A Star Traders, egy egyszerű csillagközi kereskedelmi játék indítása Comment[nb]=Spill Star Traders, et enkelt spill med interstellar handel +Comment[pt_BR]=Jogue Comerciantes Estelares, um jogo simples de comércio interestelar Comment[ru]=Играть в «Звёздные торговцы», простую игру о межзвёздной торговле Comment[sr]=Играјте Звездане трговце, једноставну игру међузвезданог трговања Comment[sv]=Spela Star Traders, ett enkelt spel om interstellär handel @@ -66,6 +68,7 @@ Keywords[eo]=ludo;kosmo;negoco;strategio; Keywords[fr]=jeu;interstellaire;commerce;stratégie; Keywords[hu]=játék;csillagközi;kereskedés;stratégia; Keywords[nb]=spill;interstellar;handel;strategi; +Keywords[pt_BR]=jogo;interestelar;comércio;estratégia; Keywords[ru]=игра;межзвёздная;торговля;стратегия; Keywords[sr]=игра;међузвездано;трговање;стратегиј; Keywords[sv]=spel;interstellär;handel;strategi; @@ -87,6 +90,7 @@ Icon[fr]=trader Icon[hr]=trader Icon[hu]=trader Icon[nb]=trader +Icon[pt_BR]=trader Icon[ru]=trader Icon[sr]=trader Icon[sv]=trader diff --git a/data/trader.desktop.in b/data/trader.desktop.in index f8e3e64..ea09a46 100644 --- a/data/trader.desktop.in +++ b/data/trader.desktop.in @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/data/trader.svg b/data/trader.svg index d37cf54..ef89715 100644 --- a/data/trader.svg +++ b/data/trader.svg @@ -11,7 +11,7 @@ ************************************************************************* * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************* diff --git a/doc/Makefile.am b/doc/Makefile.am index fc8c051..6979917 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/doc/Makefile.in b/doc/Makefile.in index 818adb1..d08fe39 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -17,12 +17,12 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### # Author: John Zaitseff -# $Id: fc8c0510914a0abae12ab728bc4c352038bb48fd $ +# $Id: 69799171a20533946b8615dfb011dea1408bbf2d $ # # This file, doc/Makefile.am, contains the documentation directory # Makefile for Star Traders. It needs to be processed by automake to @@ -134,20 +134,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ - $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ - $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ - $(top_srcdir)/m4/monetary_h.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ + $(top_srcdir)/m4/localtime-buffer.m4 \ + $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ + $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ + $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ + $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/monetary_h.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/setlocale_null.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ @@ -155,12 +154,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ - $(top_srcdir)/m4/wcsdup.m4 $(top_srcdir)/m4/wctob.m4 \ - $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemcpy.m4 \ - $(top_srcdir)/m4/xopen-source.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wcsdup.m4 \ + $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \ + $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/wmemcpy.m4 $(top_srcdir)/m4/xopen-source.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -239,6 +239,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSES_CFLAGS = @CURSES_CFLAGS@ @@ -317,6 +318,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ @@ -326,6 +328,8 @@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -415,6 +419,7 @@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ @@ -439,10 +444,12 @@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLD = @GNULIB_STRTOLD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ @@ -534,6 +541,8 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ @@ -548,7 +557,9 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ @@ -587,6 +598,7 @@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -595,7 +607,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ @@ -680,11 +691,11 @@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ @@ -736,6 +747,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ @@ -743,12 +756,16 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPMULTITHREAD = @LIBPMULTITHREAD@ +LIBPTHREAD = @LIBPTHREAD@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIB_HARD_LOCALE = @LIB_HARD_LOCALE@ +LIB_MBRTOWC = @LIB_MBRTOWC@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -757,9 +774,7 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -769,6 +784,7 @@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MONETARY_H = @NEXT_AS_FIRST_DIRECTIVE_MONETARY_H@ @@ -786,6 +802,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MONETARY_H = @NEXT_MONETARY_H@ @@ -816,6 +833,8 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ @@ -936,8 +955,10 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOLD = @REPLACE_STRTOLD@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ @@ -963,6 +984,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSTOK = @REPLACE_WCSTOK@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ @@ -979,6 +1001,8 @@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ diff --git a/doc/trader.6 b/doc/trader.6 index d951697..7b834aa 100644 --- a/doc/trader.6 +++ b/doc/trader.6 @@ -1,7 +1,7 @@ .\" ********************************************************************* .\" * * .\" * Star Traders: A Game of Interstellar Trading * -.\" * Copyright (C) 1990-2019, John Zaitseff * +.\" * Copyright (C) 1990-2020, John Zaitseff * .\" * * .\" ********************************************************************* .\" @@ -41,7 +41,7 @@ .if \n[.g] .mso www.tmac .\" .\" ********************************************************************* -.TH TRADER 6 "13th November, 2019" "Unix-like systems" +.TH TRADER 6 "9th January, 2020" "Unix-like systems" .SH NAME trader \- a game of interstellar trading .\" ********************************************************************* @@ -208,11 +208,18 @@ Australia .URL https://ftp.zap.org.au/pub/trader/ .br .FTP ftp://ftp.zap.org.au/pub/trader/ +.PD 0 +.IP Git: 10n +.URL https://www.zap.org.au/git-browser/trader.git +.br +.URL https://git.zap.org.au/git/trader.git +.br +.URL git://git.zap.org.au/data/git/trader.git .PD .PP .\" ********************************************************************* .SH COPYRIGHT -Copyright \(co 1990\-2019, John Zaitseff. +Copyright \(co 1990\-2020, John Zaitseff. .PP \fBStar Traders\fR is free software that is distributed under the terms of the GNU General Public License. You can redistribute it and/or modify diff --git a/lib/.gitignore b/lib/.gitignore index a8adeb2..2292ee1 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -1,4 +1,5 @@ /iconv.h +/inttypes.h /limits.h /locale.h /monetary.h diff --git a/lib/Makefile.am b/lib/Makefile.am index 5279ab1..a0fdc3e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2019 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 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 @@ -251,17 +251,64 @@ $(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf $(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t && \ mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h -BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h -MOSTLYCLEANFILES += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t -MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h -EXTRA_DIST += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h +$(srcdir)/iconv_open-zos.h: $(srcdir)/iconv_open-zos.gperf + $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-zos.gperf > $(srcdir)/iconv_open-zos.h-t && \ + mv $(srcdir)/iconv_open-zos.h-t $(srcdir)/iconv_open-zos.h +BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h +MOSTLYCLEANFILES += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t iconv_open-zos.h-t +MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h +EXTRA_DIST += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h -EXTRA_DIST += iconv.c iconv_close.c iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c +EXTRA_DIST += iconv.c iconv_close.c iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open-zos.gperf iconv_open.c EXTRA_libgnu_a_SOURCES += iconv.c iconv_close.c iconv_open.c ## end gnulib module iconv_open +## begin gnulib module inttypes-incomplete + +BUILT_SOURCES += inttypes.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ + -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ + -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ + -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \ + -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ + -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ + -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ + -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ + -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ + -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/inttypes.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += inttypes.h inttypes.h-t + +EXTRA_DIST += inttypes.in.h + +## end gnulib module inttypes-incomplete + ## begin gnulib module limits-h BUILT_SOURCES += $(LIMITS_H) @@ -316,6 +363,7 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ + -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GNULIB_SETLOCALE_NULL)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \ @@ -351,20 +399,12 @@ EXTRA_libgnu_a_SOURCES += localtime-buffer.c ## end gnulib module localtime-buffer -## begin gnulib module lock - -if gl_GNULIB_ENABLED_lock -libgnu_a_SOURCES += glthread/lock.h glthread/lock.c - -endif -## end gnulib module lock - ## begin gnulib module mbrtowc -EXTRA_DIST += mbrtowc.c +EXTRA_DIST += lc-charset-dispatch.c lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c mbtowc-lock.h windows-initguard.h -EXTRA_libgnu_a_SOURCES += mbrtowc.c +EXTRA_libgnu_a_SOURCES += lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c ## end gnulib module mbrtowc @@ -446,6 +486,18 @@ EXTRA_DIST += monetary.in.h ## end gnulib module monetary +## begin gnulib module setlocale-null + +if gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd +libgnu_a_SOURCES += setlocale_null.c + +endif +EXTRA_DIST += setlocale-lock.c setlocale_null.h windows-initguard.h + +EXTRA_libgnu_a_SOURCES += setlocale-lock.c + +## end gnulib module setlocale-null + ## begin gnulib module snippet/_Noreturn if gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147 @@ -584,8 +636,6 @@ stdint.h: stdint.in.h $(top_builddir)/config.status -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ @@ -1114,16 +1164,6 @@ EXTRA_DIST += sys_types.in.h ## end gnulib module sys_types -## begin gnulib module threadlib - -if gl_GNULIB_ENABLED_threadlib -libgnu_a_SOURCES += glthread/threadlib.c - -endif -EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath - -## end gnulib module threadlib - ## begin gnulib module time BUILT_SOURCES += time.h @@ -1219,6 +1259,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ + -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ @@ -1516,6 +1557,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ + -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ @@ -1607,50 +1649,6 @@ EXTRA_DIST += wctype.in.h ## end gnulib module wctype-h -## begin gnulib module windows-mutex - -if gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440 - -endif -EXTRA_DIST += windows-initguard.h windows-mutex.c windows-mutex.h - -EXTRA_libgnu_a_SOURCES += windows-mutex.c - -## end gnulib module windows-mutex - -## begin gnulib module windows-once - -if gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab - -endif -EXTRA_DIST += windows-once.c windows-once.h - -EXTRA_libgnu_a_SOURCES += windows-once.c - -## end gnulib module windows-once - -## begin gnulib module windows-recmutex - -if gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354 - -endif -EXTRA_DIST += windows-initguard.h windows-recmutex.c windows-recmutex.h - -EXTRA_libgnu_a_SOURCES += windows-recmutex.c - -## end gnulib module windows-recmutex - -## begin gnulib module windows-rwlock - -if gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef - -endif -EXTRA_DIST += windows-initguard.h windows-rwlock.c windows-rwlock.h - -EXTRA_libgnu_a_SOURCES += windows-rwlock.c - -## end gnulib module windows-rwlock - ## begin gnulib module wmemcpy if gl_GNULIB_ENABLED_wmemcpy diff --git a/lib/Makefile.in b/lib/Makefile.in index 196bc4b..84f39b7 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2019 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 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 @@ -149,13 +149,12 @@ build_triplet = @build@ host_triplet = @host@ @gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76_TRUE@am__append_1 = hard-locale.c @gl_GNULIB_ENABLED_localcharset_TRUE@am__append_2 = localcharset.c -@gl_GNULIB_ENABLED_lock_TRUE@am__append_3 = glthread/lock.h glthread/lock.c +@gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_TRUE@am__append_3 = setlocale_null.c @gl_GNULIB_ENABLED_stdlib_TRUE@am__append_4 = stdlib.h @gl_GNULIB_ENABLED_stdlib_TRUE@am__append_5 = stdlib.h stdlib.h-t @gl_GNULIB_ENABLED_strnlen1_TRUE@am__append_6 = strnlen1.h strnlen1.c -@gl_GNULIB_ENABLED_threadlib_TRUE@am__append_7 = glthread/threadlib.c -@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_8 = unistr/u8-mbtoucr.c -@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_9 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c +@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_7 = unistr/u8-mbtoucr.c +@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_8 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ @@ -175,20 +174,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ - $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ - $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ - $(top_srcdir)/m4/monetary_h.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ + $(top_srcdir)/m4/localtime-buffer.m4 \ + $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ + $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ + $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ + $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/monetary_h.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/setlocale_null.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ @@ -196,12 +194,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ - $(top_srcdir)/m4/wcsdup.m4 $(top_srcdir)/m4/wctob.m4 \ - $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemcpy.m4 \ - $(top_srcdir)/m4/xopen-source.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wcsdup.m4 \ + $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \ + $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/wmemcpy.m4 $(top_srcdir)/m4/xopen-source.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ @@ -220,25 +219,23 @@ libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__libgnu_a_SOURCES_DIST = c-ctype.h c-ctype.c c-strcase.h \ c-strcasecmp.c c-strncasecmp.c crc.c gettext.h hard-locale.c \ - localcharset.c glthread/lock.h glthread/lock.c striconv.h \ - striconv.c strnlen1.h strnlen1.c glthread/threadlib.c unistd.c \ - unistr/u8-mbtoucr.c unistr/u8-uctomb.c unistr/u8-uctomb-aux.c \ - wctype-h.c + localcharset.c setlocale_null.c striconv.h striconv.c \ + strnlen1.h strnlen1.c unistd.c unistr/u8-mbtoucr.c \ + unistr/u8-uctomb.c unistr/u8-uctomb-aux.c wctype-h.c @gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76_TRUE@am__objects_1 = hard-locale.$(OBJEXT) @gl_GNULIB_ENABLED_localcharset_TRUE@am__objects_2 = \ @gl_GNULIB_ENABLED_localcharset_TRUE@ localcharset.$(OBJEXT) -am__dirstamp = $(am__leading_dot)dirstamp -@gl_GNULIB_ENABLED_lock_TRUE@am__objects_3 = glthread/lock.$(OBJEXT) +@gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd_TRUE@am__objects_3 = setlocale_null.$(OBJEXT) @gl_GNULIB_ENABLED_strnlen1_TRUE@am__objects_4 = strnlen1.$(OBJEXT) -@gl_GNULIB_ENABLED_threadlib_TRUE@am__objects_5 = glthread/threadlib.$(OBJEXT) -@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_6 = unistr/u8-mbtoucr.$(OBJEXT) -@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_7 = unistr/u8-uctomb.$(OBJEXT) \ +am__dirstamp = $(am__leading_dot)dirstamp +@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_5 = unistr/u8-mbtoucr.$(OBJEXT) +@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_6 = unistr/u8-uctomb.$(OBJEXT) \ @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@ unistr/u8-uctomb-aux.$(OBJEXT) am_libgnu_a_OBJECTS = c-ctype.$(OBJEXT) c-strcasecmp.$(OBJEXT) \ c-strncasecmp.$(OBJEXT) crc.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) striconv.$(OBJEXT) \ - $(am__objects_4) $(am__objects_5) unistd.$(OBJEXT) \ - $(am__objects_6) $(am__objects_7) wctype-h.$(OBJEXT) + $(am__objects_4) unistd.$(OBJEXT) $(am__objects_5) \ + $(am__objects_6) wctype-h.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -261,18 +258,17 @@ am__depfiles_remade = ./$(DEPDIR)/btowc.Po ./$(DEPDIR)/c-ctype.Po \ ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/gettimeofday.Po \ ./$(DEPDIR)/hard-locale.Po ./$(DEPDIR)/iconv.Po \ ./$(DEPDIR)/iconv_close.Po ./$(DEPDIR)/iconv_open.Po \ - ./$(DEPDIR)/localcharset.Po ./$(DEPDIR)/localtime-buffer.Po \ - ./$(DEPDIR)/mbrtowc.Po ./$(DEPDIR)/mbsinit.Po \ - ./$(DEPDIR)/mbsrtowcs-state.Po ./$(DEPDIR)/mbsrtowcs.Po \ + ./$(DEPDIR)/lc-charset-dispatch.Po ./$(DEPDIR)/localcharset.Po \ + ./$(DEPDIR)/localtime-buffer.Po ./$(DEPDIR)/mbrtowc.Po \ + ./$(DEPDIR)/mbsinit.Po ./$(DEPDIR)/mbsrtowcs-state.Po \ + ./$(DEPDIR)/mbsrtowcs.Po ./$(DEPDIR)/mbtowc-lock.Po \ ./$(DEPDIR)/mbtowc.Po ./$(DEPDIR)/memchr.Po \ + ./$(DEPDIR)/setlocale-lock.Po ./$(DEPDIR)/setlocale_null.Po \ ./$(DEPDIR)/striconv.Po ./$(DEPDIR)/strnlen1.Po \ ./$(DEPDIR)/unistd.Po ./$(DEPDIR)/wcrtomb.Po \ ./$(DEPDIR)/wcsdup.Po ./$(DEPDIR)/wctob.Po \ ./$(DEPDIR)/wctomb.Po ./$(DEPDIR)/wctype-h.Po \ - ./$(DEPDIR)/windows-mutex.Po ./$(DEPDIR)/windows-once.Po \ - ./$(DEPDIR)/windows-recmutex.Po ./$(DEPDIR)/windows-rwlock.Po \ - ./$(DEPDIR)/wmemcpy.Po glthread/$(DEPDIR)/lock.Po \ - glthread/$(DEPDIR)/threadlib.Po unistr/$(DEPDIR)/u8-mbtoucr.Po \ + ./$(DEPDIR)/wmemcpy.Po unistr/$(DEPDIR)/u8-mbtoucr.Po \ unistr/$(DEPDIR)/u8-uctomb-aux.Po \ unistr/$(DEPDIR)/u8-uctomb.Po am__mv = mv -f @@ -378,6 +374,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSES_CFLAGS = @CURSES_CFLAGS@ @@ -456,6 +453,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ @@ -465,6 +463,8 @@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -554,6 +554,7 @@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ @@ -578,10 +579,12 @@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLD = @GNULIB_STRTOLD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ @@ -673,6 +676,8 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ @@ -687,7 +692,9 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ @@ -726,6 +733,7 @@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -734,7 +742,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ @@ -819,11 +826,11 @@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ @@ -875,6 +882,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ @@ -882,12 +891,16 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPMULTITHREAD = @LIBPMULTITHREAD@ +LIBPTHREAD = @LIBPTHREAD@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIB_HARD_LOCALE = @LIB_HARD_LOCALE@ +LIB_MBRTOWC = @LIB_MBRTOWC@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -896,9 +909,7 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -908,6 +919,7 @@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MONETARY_H = @NEXT_AS_FIRST_DIRECTIVE_MONETARY_H@ @@ -925,6 +937,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MONETARY_H = @NEXT_MONETARY_H@ @@ -955,6 +968,8 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ @@ -1075,8 +1090,10 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOLD = @REPLACE_STRTOLD@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ @@ -1102,6 +1119,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSTOK = @REPLACE_WCSTOK@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ @@ -1118,6 +1136,8 @@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ @@ -1201,37 +1221,37 @@ EXTRA_DIST = btowc.c crc.h getopt-cdefs.in.h getopt-core.h \ getopt.in.h getopt1.c getopt_int.h gettimeofday.c \ hard-locale.h $(top_srcdir)/build-aux/config.rpath iconv.in.h \ iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h \ - iconv_open-osf.h iconv_open-solaris.h iconv.c iconv_close.c \ - iconv_open-aix.gperf iconv_open-hpux.gperf \ + iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h iconv.c \ + iconv_close.c iconv_open-aix.gperf iconv_open-hpux.gperf \ iconv_open-irix.gperf iconv_open-osf.gperf \ - iconv_open-solaris.gperf iconv_open.c limits.in.h \ - localcharset.h locale.in.h localtime-buffer.c \ - localtime-buffer.h mbrtowc.c mbsinit.c mbsrtowcs-impl.h \ - mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h mbtowc.c memchr.c \ - memchr.valgrind monetary.in.h _Noreturn.h arg-nonnull.h \ - c++defs.h unused-parameter.h warn-on-use.h stdbool.in.h \ - stddef.in.h stdint.in.h stdio.in.h stdlib.in.h streq.h \ - string.in.h sys_stat.in.h sys_time.in.h sys_types.in.h \ - $(top_srcdir)/build-aux/config.rpath time.in.h unistd.in.h \ - unistr.in.h unitypes.in.h verify.h wchar.in.h wcrtomb.c \ - wcsdup-impl.h wcsdup.c wctob.c wctomb-impl.h wctomb.c \ - wctype.in.h windows-initguard.h windows-mutex.c \ - windows-mutex.h windows-once.c windows-once.h \ - windows-initguard.h windows-recmutex.c windows-recmutex.h \ - windows-initguard.h windows-rwlock.c windows-rwlock.h \ - wmemcpy-impl.h wmemcpy.c + iconv_open-solaris.gperf iconv_open-zos.gperf iconv_open.c \ + inttypes.in.h limits.in.h localcharset.h locale.in.h \ + localtime-buffer.c localtime-buffer.h lc-charset-dispatch.c \ + lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h \ + mbrtowc.c mbtowc-lock.c mbtowc-lock.h windows-initguard.h \ + mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c \ + mbtowc-impl.h mbtowc.c memchr.c memchr.valgrind monetary.in.h \ + setlocale-lock.c setlocale_null.h windows-initguard.h \ + _Noreturn.h arg-nonnull.h c++defs.h unused-parameter.h \ + warn-on-use.h stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \ + stdlib.in.h streq.h string.in.h sys_stat.in.h sys_time.in.h \ + sys_types.in.h time.in.h unistd.in.h unistr.in.h unitypes.in.h \ + verify.h wchar.in.h wcrtomb.c wcsdup-impl.h wcsdup.c wctob.c \ + wctomb-impl.h wctomb.c wctype.in.h wmemcpy-impl.h wmemcpy.c BUILT_SOURCES = $(GETOPT_H) $(GETOPT_CDEFS_H) $(ICONV_H) \ iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h \ - iconv_open-osf.h iconv_open-solaris.h $(LIMITS_H) locale.h \ - $(MONETARY_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ - $(am__append_4) string.h sys/stat.h sys/time.h sys/types.h \ - time.h unistd.h $(LIBUNISTRING_UNISTR_H) \ - $(LIBUNISTRING_UNITYPES_H) wchar.h wctype.h + iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h \ + inttypes.h $(LIMITS_H) locale.h $(MONETARY_H) $(STDBOOL_H) \ + $(STDDEF_H) $(STDINT_H) stdio.h $(am__append_4) string.h \ + sys/stat.h sys/time.h sys/types.h time.h unistd.h \ + $(LIBUNISTRING_UNISTR_H) $(LIBUNISTRING_UNITYPES_H) wchar.h \ + wctype.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump getopt.h getopt.h-t getopt-cdefs.h \ getopt-cdefs.h-t iconv.h iconv.h-t iconv_open-aix.h-t \ iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t \ - iconv_open-solaris.h-t limits.h limits.h-t locale.h locale.h-t \ + iconv_open-solaris.h-t iconv_open-zos.h-t inttypes.h \ + inttypes.h-t limits.h limits.h-t locale.h locale.h-t \ monetary.h monetary.h-t stdbool.h stdbool.h-t stddef.h \ stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ $(am__append_5) string.h string.h-t sys/stat.h sys/stat.h-t \ @@ -1242,22 +1262,23 @@ MOSTLYCLEANDIRS = sys CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = iconv_open-aix.h iconv_open-hpux.h \ - iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h + iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h \ + iconv_open-zos.h # No GNU Make output. AM_CPPFLAGS = AM_CFLAGS = libgnu_a_SOURCES = c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c \ c-strncasecmp.c crc.c gettext.h $(am__append_1) \ $(am__append_2) $(am__append_3) striconv.h striconv.c \ - $(am__append_6) $(am__append_7) unistd.c $(am__append_8) \ - $(am__append_9) wctype-h.c + $(am__append_6) unistd.c $(am__append_7) $(am__append_8) \ + wctype-h.c libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = btowc.c getopt.c getopt1.c gettimeofday.c \ iconv.c iconv_close.c iconv_open.c localtime-buffer.c \ - mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c mbtowc.c \ - memchr.c wcrtomb.c wcsdup.c wctob.c wctomb.c windows-mutex.c \ - windows-once.c windows-recmutex.c windows-rwlock.c wmemcpy.c + lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c mbsinit.c \ + mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c \ + setlocale-lock.c wcrtomb.c wcsdup.c wctob.c wctomb.c wmemcpy.c # Use this preprocessor expression to decide whether #include_next works. # Do not rely on a 'configure'-time test for this, since the expression @@ -1340,16 +1361,6 @@ clean-noinstLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } -glthread/$(am__dirstamp): - @$(MKDIR_P) glthread - @: > glthread/$(am__dirstamp) -glthread/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) glthread/$(DEPDIR) - @: > glthread/$(DEPDIR)/$(am__dirstamp) -glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \ - glthread/$(DEPDIR)/$(am__dirstamp) -glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \ - glthread/$(DEPDIR)/$(am__dirstamp) unistr/$(am__dirstamp): @$(MKDIR_P) unistr @: > unistr/$(am__dirstamp) @@ -1370,7 +1381,6 @@ libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDEN mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f glthread/*.$(OBJEXT) -rm -f unistr/*.$(OBJEXT) distclean-compile: @@ -1388,14 +1398,18 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv_close.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv_open.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lc-charset-dispatch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc-lock.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale-lock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale_null.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/striconv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@ # am--include-marker @@ -1404,13 +1418,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-mutex.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-once.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-recmutex.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-rwlock.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmemcpy.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtoucr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-uctomb-aux.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-uctomb.Po@am__quote@ # am--include-marker @@ -1629,8 +1637,6 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f glthread/$(DEPDIR)/$(am__dirstamp) - -rm -f glthread/$(am__dirstamp) -rm -f unistr/$(DEPDIR)/$(am__dirstamp) -rm -f unistr/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) @@ -1658,14 +1664,18 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/iconv.Po -rm -f ./$(DEPDIR)/iconv_close.Po -rm -f ./$(DEPDIR)/iconv_open.Po + -rm -f ./$(DEPDIR)/lc-charset-dispatch.Po -rm -f ./$(DEPDIR)/localcharset.Po -rm -f ./$(DEPDIR)/localtime-buffer.Po -rm -f ./$(DEPDIR)/mbrtowc.Po -rm -f ./$(DEPDIR)/mbsinit.Po -rm -f ./$(DEPDIR)/mbsrtowcs-state.Po -rm -f ./$(DEPDIR)/mbsrtowcs.Po + -rm -f ./$(DEPDIR)/mbtowc-lock.Po -rm -f ./$(DEPDIR)/mbtowc.Po -rm -f ./$(DEPDIR)/memchr.Po + -rm -f ./$(DEPDIR)/setlocale-lock.Po + -rm -f ./$(DEPDIR)/setlocale_null.Po -rm -f ./$(DEPDIR)/striconv.Po -rm -f ./$(DEPDIR)/strnlen1.Po -rm -f ./$(DEPDIR)/unistd.Po @@ -1674,13 +1684,7 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/wctob.Po -rm -f ./$(DEPDIR)/wctomb.Po -rm -f ./$(DEPDIR)/wctype-h.Po - -rm -f ./$(DEPDIR)/windows-mutex.Po - -rm -f ./$(DEPDIR)/windows-once.Po - -rm -f ./$(DEPDIR)/windows-recmutex.Po - -rm -f ./$(DEPDIR)/windows-rwlock.Po -rm -f ./$(DEPDIR)/wmemcpy.Po - -rm -f glthread/$(DEPDIR)/lock.Po - -rm -f glthread/$(DEPDIR)/threadlib.Po -rm -f unistr/$(DEPDIR)/u8-mbtoucr.Po -rm -f unistr/$(DEPDIR)/u8-uctomb-aux.Po -rm -f unistr/$(DEPDIR)/u8-uctomb.Po @@ -1741,14 +1745,18 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/iconv.Po -rm -f ./$(DEPDIR)/iconv_close.Po -rm -f ./$(DEPDIR)/iconv_open.Po + -rm -f ./$(DEPDIR)/lc-charset-dispatch.Po -rm -f ./$(DEPDIR)/localcharset.Po -rm -f ./$(DEPDIR)/localtime-buffer.Po -rm -f ./$(DEPDIR)/mbrtowc.Po -rm -f ./$(DEPDIR)/mbsinit.Po -rm -f ./$(DEPDIR)/mbsrtowcs-state.Po -rm -f ./$(DEPDIR)/mbsrtowcs.Po + -rm -f ./$(DEPDIR)/mbtowc-lock.Po -rm -f ./$(DEPDIR)/mbtowc.Po -rm -f ./$(DEPDIR)/memchr.Po + -rm -f ./$(DEPDIR)/setlocale-lock.Po + -rm -f ./$(DEPDIR)/setlocale_null.Po -rm -f ./$(DEPDIR)/striconv.Po -rm -f ./$(DEPDIR)/strnlen1.Po -rm -f ./$(DEPDIR)/unistd.Po @@ -1757,13 +1765,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/wctob.Po -rm -f ./$(DEPDIR)/wctomb.Po -rm -f ./$(DEPDIR)/wctype-h.Po - -rm -f ./$(DEPDIR)/windows-mutex.Po - -rm -f ./$(DEPDIR)/windows-once.Po - -rm -f ./$(DEPDIR)/windows-recmutex.Po - -rm -f ./$(DEPDIR)/windows-rwlock.Po -rm -f ./$(DEPDIR)/wmemcpy.Po - -rm -f glthread/$(DEPDIR)/lock.Po - -rm -f glthread/$(DEPDIR)/threadlib.Po -rm -f unistr/$(DEPDIR)/u8-mbtoucr.Po -rm -f unistr/$(DEPDIR)/u8-uctomb-aux.Po -rm -f unistr/$(DEPDIR)/u8-uctomb.Po @@ -1869,6 +1871,44 @@ $(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf $(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t && \ mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h +$(srcdir)/iconv_open-zos.h: $(srcdir)/iconv_open-zos.gperf + $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-zos.gperf > $(srcdir)/iconv_open-zos.h-t && \ + mv $(srcdir)/iconv_open-zos.h-t $(srcdir)/iconv_open-zos.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ + -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ + -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ + -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \ + -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ + -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ + -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ + -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ + -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ + -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/inttypes.in.h; \ + } > $@-t && \ + mv $@-t $@ # We need the following in order to create when the system # doesn't have one that is compatible with GNU. @@ -1898,6 +1938,7 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ + -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GNULIB_SETLOCALE_NULL)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \ @@ -1988,8 +2029,6 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ @@ -2510,6 +2549,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ + -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ @@ -2755,6 +2795,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ + -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h index db9b455..0d4b9c2 100644 --- a/lib/_Noreturn.h +++ b/lib/_Noreturn.h @@ -1,5 +1,5 @@ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 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 @@ -17,7 +17,14 @@ #ifndef _Noreturn # if (defined __cplusplus \ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER))) + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ # define _Noreturn [[noreturn]] # elif ((!defined __cplusplus || defined __clang__) \ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h index ad8c26c..ac26ca8 100644 --- a/lib/arg-nonnull.h +++ b/lib/arg-nonnull.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/btowc.c b/lib/btowc.c index 9e2496d..6828b70 100644 --- a/lib/btowc.c +++ b/lib/btowc.c @@ -1,5 +1,5 @@ /* Convert unibyte character to wide character. - Copyright (C) 2008, 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/lib/c++defs.h b/lib/c++defs.h index 87d0716..7a05763 100644 --- a/lib/c++defs.h +++ b/lib/c++defs.h @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2010-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 4d52176..fbd11b3 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -5,7 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/c-strcase.h b/lib/c-strcase.h index b67c9b5..3b711f5 100644 --- a/lib/c-strcase.h +++ b/lib/c-strcase.h @@ -1,5 +1,5 @@ /* Case-insensitive string comparison functions in C locale. - Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2019 Free Software + Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index ec50f1a..951220f 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c @@ -1,5 +1,5 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index 513c353..9ad4919 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c @@ -1,5 +1,5 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/crc.c b/lib/crc.c index 29c6afb..332d96b 100644 --- a/lib/crc.c +++ b/lib/crc.c @@ -1,5 +1,5 @@ /* crc.c -- cyclic redundancy checks - Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/crc.h b/lib/crc.h index c842f25..eec7cbf 100644 --- a/lib/crc.h +++ b/lib/crc.h @@ -1,5 +1,5 @@ /* crc.h -- cyclic redundancy checks - Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h index 049145b..c510ab1 100644 --- a/lib/getopt-cdefs.in.h +++ b/lib/getopt-cdefs.in.h @@ -1,5 +1,5 @@ /* getopt-on-non-glibc compatibility macros. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. diff --git a/lib/getopt-core.h b/lib/getopt-core.h index 6360ad6..d4d942e 100644 --- a/lib/getopt-core.h +++ b/lib/getopt-core.h @@ -1,5 +1,5 @@ /* Declarations for getopt (basic, portable features only). - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h index 13cb007..05f7083 100644 --- a/lib/getopt-ext.h +++ b/lib/getopt-ext.h @@ -1,5 +1,5 @@ /* Declarations for getopt (GNU extensions). - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h index 8fac269..da0a6d0 100644 --- a/lib/getopt-pfx-core.h +++ b/lib/getopt-pfx-core.h @@ -1,5 +1,5 @@ /* getopt (basic, portable features) gnulib wrapper header. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h index 0e21aef..647fae6 100644 --- a/lib/getopt-pfx-ext.h +++ b/lib/getopt-pfx-ext.h @@ -1,5 +1,5 @@ /* getopt (GNU extensions) gnulib wrapper header. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. diff --git a/lib/getopt.c b/lib/getopt.c index 8ee075a..a6389d8 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -1,5 +1,5 @@ /* Getopt for GNU. - Copyright (C) 1987-2019 Free Software Foundation, Inc. + Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/lib/getopt.in.h b/lib/getopt.in.h index c77f34c..36e04bb 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library, which supplies a different version of diff --git a/lib/getopt1.c b/lib/getopt1.c index 883aa6b..0902efe 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-2019 Free Software Foundation, Inc. + Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/lib/getopt_int.h b/lib/getopt_int.h index e63706f..afcd8a6 100644 --- a/lib/getopt_int.h +++ b/lib/getopt_int.h @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/lib/gettext.h b/lib/gettext.h index c7c0fdb..0bd1e13 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2019 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index e728bf4..b63f8f2 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -1,6 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/glthread/.gitignore b/lib/glthread/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c deleted file mode 100644 index fefcd59..0000000 --- a/lib/glthread/lock.c +++ /dev/null @@ -1,506 +0,0 @@ -/* Locking in multithreaded situations. - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h. */ - -#include - -#include "glthread/lock.h" - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) - -# ifdef PTHREAD_RWLOCK_INITIALIZER - -# if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER - /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ - -int -glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock) -{ - pthread_rwlockattr_t attributes; - int err; - - err = pthread_rwlockattr_init (&attributes); - if (err != 0) - return err; - /* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that - causes the writer to be preferred. PTHREAD_RWLOCK_PREFER_WRITER_NP does not - do this; see - http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html */ - err = pthread_rwlockattr_setkind_np (&attributes, - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); - if (err == 0) - err = pthread_rwlock_init(lock, &attributes); - /* pthread_rwlockattr_destroy always returns 0. It cannot influence the - return value. */ - pthread_rwlockattr_destroy (&attributes); - return err; -} - -# endif -# else - -int -glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_rwlock_init (&lock->rwlock, NULL); - if (err != 0) - return err; - lock->initialized = 1; - return 0; -} - -int -glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_rwlock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_rwlock_rdlock (&lock->rwlock); -} - -int -glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_rwlock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_rwlock_wrlock (&lock->rwlock); -} - -int -glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - return EINVAL; - return pthread_rwlock_unlock (&lock->rwlock); -} - -int -glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -{ - int err; - - if (!lock->initialized) - return EINVAL; - err = pthread_rwlock_destroy (&lock->rwlock); - if (err != 0) - return err; - lock->initialized = 0; - return 0; -} - -# endif - -# else - -int -glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_init (&lock->lock, NULL); - if (err != 0) - return err; - err = pthread_cond_init (&lock->waiting_readers, NULL); - if (err != 0) - return err; - err = pthread_cond_init (&lock->waiting_writers, NULL); - if (err != 0) - return err; - lock->waiting_writers_count = 0; - lock->runcount = 0; - return 0; -} - -int -glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - /* Test whether only readers are currently running, and whether the runcount - field will not overflow, and whether no writer is waiting. The latter - condition is because POSIX recommends that "write locks shall take - precedence over read locks", to avoid "writer starvation". */ - while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ - err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - lock->runcount++; - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - /* Test whether no readers or writers are currently running. */ - while (!(lock->runcount == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_writers. */ - lock->waiting_writers_count++; - err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); - if (err != 0) - { - lock->waiting_writers_count--; - pthread_mutex_unlock (&lock->lock); - return err; - } - lock->waiting_writers_count--; - } - lock->runcount--; /* runcount becomes -1 */ - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - if (lock->runcount < 0) - { - /* Drop a writer lock. */ - if (!(lock->runcount == -1)) - { - pthread_mutex_unlock (&lock->lock); - return EINVAL; - } - lock->runcount = 0; - } - else - { - /* Drop a reader lock. */ - if (!(lock->runcount > 0)) - { - pthread_mutex_unlock (&lock->lock); - return EINVAL; - } - lock->runcount--; - } - if (lock->runcount == 0) - { - /* POSIX recommends that "write locks shall take precedence over read - locks", to avoid "writer starvation". */ - if (lock->waiting_writers_count > 0) - { - /* Wake up one of the waiting writers. */ - err = pthread_cond_signal (&lock->waiting_writers); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - else - { - /* Wake up all waiting readers. */ - err = pthread_cond_broadcast (&lock->waiting_readers); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - } - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_destroy (&lock->lock); - if (err != 0) - return err; - err = pthread_cond_destroy (&lock->waiting_readers); - if (err != 0) - return err; - err = pthread_cond_destroy (&lock->waiting_writers); - if (err != 0) - return err; - return 0; -} - -# endif - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -# if HAVE_PTHREAD_MUTEX_RECURSIVE - -# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_mutexattr_t attributes; - int err; - - err = pthread_mutexattr_init (&attributes); - if (err != 0) - return err; - err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutex_init (lock, &attributes); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutexattr_destroy (&attributes); - if (err != 0) - return err; - return 0; -} - -# else - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_mutexattr_t attributes; - int err; - - err = pthread_mutexattr_init (&attributes); - if (err != 0) - return err; - err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutex_init (&lock->recmutex, &attributes); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutexattr_destroy (&attributes); - if (err != 0) - return err; - lock->initialized = 1; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_recursive_lock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_mutex_lock (&lock->recmutex); -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (!lock->initialized) - return EINVAL; - return pthread_mutex_unlock (&lock->recmutex); -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - if (!lock->initialized) - return EINVAL; - err = pthread_mutex_destroy (&lock->recmutex); - if (err != 0) - return err; - lock->initialized = 0; - return 0; -} - -# endif - -# else - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - err = pthread_mutex_init (&lock->mutex, NULL); - if (err != 0) - return err; - lock->owner = (pthread_t) 0; - lock->depth = 0; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_t self = pthread_self (); - if (lock->owner != self) - { - int err; - - err = pthread_mutex_lock (&lock->mutex); - if (err != 0) - return err; - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - return 0; -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != pthread_self ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = (pthread_t) 0; - return pthread_mutex_unlock (&lock->mutex); - } - else - return 0; -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != (pthread_t) 0) - return EBUSY; - return pthread_mutex_destroy (&lock->mutex); -} - -# endif - -/* -------------------------- gl_once_t datatype -------------------------- */ - -static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; - -int -glthread_once_singlethreaded (pthread_once_t *once_control) -{ - /* We don't know whether pthread_once_t is an integer type, a floating-point - type, a pointer type, or a structure type. */ - char *firstbyte = (char *)once_control; - if (*firstbyte == *(const char *)&fresh_once) - { - /* First time use of once_control. Invert the first byte. */ - *firstbyte = ~ *(const char *)&fresh_once; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -#endif - -/* ========================================================================= */ diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h deleted file mode 100644 index a92c2a8..0000000 --- a/lib/glthread/lock.h +++ /dev/null @@ -1,666 +0,0 @@ -/* Locking in multithreaded situations. - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-win32.h. */ - -/* This file contains locking primitives for use with a given thread library. - It does not contain primitives for creating threads or for other - synchronization primitives. - - Normal (non-recursive) locks: - Type: gl_lock_t - Declaration: gl_lock_define(extern, name) - Initializer: gl_lock_define_initialized(, name) - Initialization: gl_lock_init (name); - Taking the lock: gl_lock_lock (name); - Releasing the lock: gl_lock_unlock (name); - De-initialization: gl_lock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_lock_init (&name); - Taking the lock: err = glthread_lock_lock (&name); - Releasing the lock: err = glthread_lock_unlock (&name); - De-initialization: err = glthread_lock_destroy (&name); - - Read-Write (non-recursive) locks: - Type: gl_rwlock_t - Declaration: gl_rwlock_define(extern, name) - Initializer: gl_rwlock_define_initialized(, name) - Initialization: gl_rwlock_init (name); - Taking the lock: gl_rwlock_rdlock (name); - gl_rwlock_wrlock (name); - Releasing the lock: gl_rwlock_unlock (name); - De-initialization: gl_rwlock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_rwlock_init (&name); - Taking the lock: err = glthread_rwlock_rdlock (&name); - err = glthread_rwlock_wrlock (&name); - Releasing the lock: err = glthread_rwlock_unlock (&name); - De-initialization: err = glthread_rwlock_destroy (&name); - - Recursive locks: - Type: gl_recursive_lock_t - Declaration: gl_recursive_lock_define(extern, name) - Initializer: gl_recursive_lock_define_initialized(, name) - Initialization: gl_recursive_lock_init (name); - Taking the lock: gl_recursive_lock_lock (name); - Releasing the lock: gl_recursive_lock_unlock (name); - De-initialization: gl_recursive_lock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_recursive_lock_init (&name); - Taking the lock: err = glthread_recursive_lock_lock (&name); - Releasing the lock: err = glthread_recursive_lock_unlock (&name); - De-initialization: err = glthread_recursive_lock_destroy (&name); - - Once-only execution: - Type: gl_once_t - Initializer: gl_once_define(extern, name) - Execution: gl_once (name, initfunction); - Equivalent functions with control of error handling: - Execution: err = glthread_once (&name, initfunction); -*/ - - -#ifndef _LOCK_H -#define _LOCK_H - -#include -#include - -#if !defined c11_threads_in_use -# if HAVE_THREADS_H && USE_POSIX_THREADS_WEAK -# include -# pragma weak thrd_exit -# define c11_threads_in_use() (thrd_exit != NULL) -# else -# define c11_threads_in_use() 0 -# endif -#endif - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The pthread_in_use() detection needs to be done at runtime. */ -# define pthread_in_use() \ - glthread_in_use () -extern int glthread_in_use (void); - -# endif - -# if USE_POSIX_THREADS_WEAK - -/* Use weak references to the POSIX threads library. */ - -/* Weak references avoid dragging in external libraries if the other parts - of the program don't use them. Here we use them, because we don't want - every program that uses libintl to depend on libpthread. This assumes - that libpthread would not be loaded after libintl; i.e. if libintl is - loaded first, by an executable that does not depend on libpthread, and - then a module is dynamically loaded that depends on libpthread, libintl - will not be multithread-safe. */ - -/* The way to test at runtime whether libpthread is present is to test - whether a function pointer's value, such as &pthread_mutex_init, is - non-NULL. However, some versions of GCC have a bug through which, in - PIC mode, &foo != NULL always evaluates to true if there is a direct - call to foo(...) in the same function. To avoid this, we test the - address of a function in libpthread that we don't use. */ - -# pragma weak pthread_mutex_init -# pragma weak pthread_mutex_lock -# pragma weak pthread_mutex_unlock -# pragma weak pthread_mutex_destroy -# pragma weak pthread_rwlock_init -# pragma weak pthread_rwlock_rdlock -# pragma weak pthread_rwlock_wrlock -# pragma weak pthread_rwlock_unlock -# pragma weak pthread_rwlock_destroy -# pragma weak pthread_once -# pragma weak pthread_cond_init -# pragma weak pthread_cond_wait -# pragma weak pthread_cond_signal -# pragma weak pthread_cond_broadcast -# pragma weak pthread_cond_destroy -# pragma weak pthread_mutexattr_init -# pragma weak pthread_mutexattr_settype -# pragma weak pthread_mutexattr_destroy -# pragma weak pthread_rwlockattr_init -# if __GNU_LIBRARY__ > 1 -# pragma weak pthread_rwlockattr_setkind_np -# endif -# pragma weak pthread_rwlockattr_destroy -# ifndef pthread_self -# pragma weak pthread_self -# endif - -# if !PTHREAD_IN_USE_DETECTION_HARD - /* Considering all platforms with USE_POSIX_THREADS_WEAK, only few symbols - can be used to determine whether libpthread is in use. These are: - pthread_mutexattr_gettype - pthread_rwlockattr_destroy - pthread_rwlockattr_init - */ -# pragma weak pthread_mutexattr_gettype -# define pthread_in_use() \ - (pthread_mutexattr_gettype != NULL || c11_threads_in_use ()) -# endif - -# else - -# if !PTHREAD_IN_USE_DETECTION_HARD -# define pthread_in_use() 1 -# endif - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef pthread_mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - PTHREAD_MUTEX_INITIALIZER -# define glthread_lock_init(LOCK) \ - (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) -# define glthread_lock_lock(LOCK) \ - (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) -# define glthread_lock_unlock(LOCK) \ - (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) -# define glthread_lock_destroy(LOCK) \ - (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) - -# ifdef PTHREAD_RWLOCK_INITIALIZER - -typedef pthread_rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; -# if HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER -# define gl_rwlock_initializer \ - PTHREAD_RWLOCK_INITIALIZER -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) -# else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ -# define gl_rwlock_initializer \ - PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_for_glibc (LOCK) : 0) -extern int glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock); -# endif -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) - -# else - -typedef struct - { - int initialized; - pthread_mutex_t guard; /* protects the initialization */ - pthread_rwlock_t rwlock; /* read-write lock */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { 0, PTHREAD_MUTEX_INITIALIZER } -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); - -# endif - -# else - -typedef struct - { - pthread_mutex_t lock; /* protects the remaining fields */ - pthread_cond_t waiting_readers; /* waiting readers */ - pthread_cond_t waiting_writers; /* waiting writers */ - unsigned int waiting_writers_count; /* number of waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); - -# endif - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -# if HAVE_PTHREAD_MUTEX_RECURSIVE - -# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - -typedef pthread_mutex_t gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; -# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER -# define gl_recursive_lock_initializer \ - PTHREAD_RECURSIVE_MUTEX_INITIALIZER -# else -# define gl_recursive_lock_initializer \ - PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -# endif -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); - -# else - -typedef struct - { - pthread_mutex_t recmutex; /* recursive mutex */ - pthread_mutex_t guard; /* protects the initialization */ - int initialized; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -# endif - -# else - -/* Old versions of POSIX threads on Solaris did not have recursive locks. - We have to implement them ourselves. */ - -typedef struct - { - pthread_mutex_t mutex; - pthread_t owner; - unsigned long depth; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -# endif - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef pthread_once_t gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (pthread_in_use () \ - ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_singlethreaded (pthread_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include - -# include "windows-mutex.h" -# include "windows-rwlock.h" -# include "windows-recmutex.h" -# include "windows-once.h" - -# ifdef __cplusplus -extern "C" { -# endif - -/* We can use CRITICAL_SECTION directly, rather than the native Windows Event, - Mutex, Semaphore types, because - - we need only to synchronize inside a single process (address space), - not inter-process locking, - - we don't need to support trylock operations. (TryEnterCriticalSection - does not work on Windows 95/98/ME. Packages that need trylock usually - define their own mutex type.) */ - -/* There is no way to statically initialize a CRITICAL_SECTION. It needs - to be done lazily, once only. For this we need spinlocks. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef glwthread_mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_lock_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_lock_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - GLWTHREAD_MUTEX_INIT -# define glthread_lock_init(LOCK) \ - (glwthread_mutex_init (LOCK), 0) -# define glthread_lock_lock(LOCK) \ - glwthread_mutex_lock (LOCK) -# define glthread_lock_unlock(LOCK) \ - glwthread_mutex_unlock (LOCK) -# define glthread_lock_destroy(LOCK) \ - glwthread_mutex_destroy (LOCK) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef glwthread_rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - GLWTHREAD_RWLOCK_INIT -# define glthread_rwlock_init(LOCK) \ - (glwthread_rwlock_init (LOCK), 0) -# define glthread_rwlock_rdlock(LOCK) \ - glwthread_rwlock_rdlock (LOCK) -# define glthread_rwlock_wrlock(LOCK) \ - glwthread_rwlock_wrlock (LOCK) -# define glthread_rwlock_unlock(LOCK) \ - glwthread_rwlock_unlock (LOCK) -# define glthread_rwlock_destroy(LOCK) \ - glwthread_rwlock_destroy (LOCK) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -typedef glwthread_recmutex_t gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - GLWTHREAD_RECMUTEX_INIT -# define glthread_recursive_lock_init(LOCK) \ - (glwthread_recmutex_init (LOCK), 0) -# define glthread_recursive_lock_lock(LOCK) \ - glwthread_recmutex_lock (LOCK) -# define glthread_recursive_lock_unlock(LOCK) \ - glwthread_recmutex_unlock (LOCK) -# define glthread_recursive_lock_destroy(LOCK) \ - glwthread_recmutex_destroy (LOCK) - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef glwthread_once_t gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = GLWTHREAD_ONCE_INIT; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (glwthread_once (ONCE_CONTROL, INITFUNCTION), 0) - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if !(USE_POSIX_THREADS || USE_WINDOWS_THREADS) - -/* Provide dummy implementation if threads are not supported. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef int gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) -# define gl_lock_define_initialized(STORAGECLASS, NAME) -# define glthread_lock_init(NAME) 0 -# define glthread_lock_lock(NAME) 0 -# define glthread_lock_unlock(NAME) 0 -# define glthread_lock_destroy(NAME) 0 - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef int gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) -# define glthread_rwlock_init(NAME) 0 -# define glthread_rwlock_rdlock(NAME) 0 -# define glthread_rwlock_wrlock(NAME) 0 -# define glthread_rwlock_unlock(NAME) 0 -# define glthread_rwlock_destroy(NAME) 0 - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -typedef int gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) -# define glthread_recursive_lock_init(NAME) 0 -# define glthread_recursive_lock_lock(NAME) 0 -# define glthread_recursive_lock_unlock(NAME) 0 -# define glthread_recursive_lock_destroy(NAME) 0 - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef int gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = 0; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) - -#endif - -/* ========================================================================= */ - -/* Macros with built-in error handling. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -#define gl_lock_init(NAME) \ - do \ - { \ - if (glthread_lock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_lock(NAME) \ - do \ - { \ - if (glthread_lock_lock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_unlock(NAME) \ - do \ - { \ - if (glthread_lock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_destroy(NAME) \ - do \ - { \ - if (glthread_lock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -#define gl_rwlock_init(NAME) \ - do \ - { \ - if (glthread_rwlock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_rdlock(NAME) \ - do \ - { \ - if (glthread_rwlock_rdlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_wrlock(NAME) \ - do \ - { \ - if (glthread_rwlock_wrlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_unlock(NAME) \ - do \ - { \ - if (glthread_rwlock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_destroy(NAME) \ - do \ - { \ - if (glthread_rwlock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -#define gl_recursive_lock_init(NAME) \ - do \ - { \ - if (glthread_recursive_lock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_lock(NAME) \ - do \ - { \ - if (glthread_recursive_lock_lock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_unlock(NAME) \ - do \ - { \ - if (glthread_recursive_lock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_destroy(NAME) \ - do \ - { \ - if (glthread_recursive_lock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* -------------------------- gl_once_t datatype -------------------------- */ - -#define gl_once(NAME, INITFUNCTION) \ - do \ - { \ - if (glthread_once (&NAME, INITFUNCTION)) \ - abort (); \ - } \ - while (0) - -/* ========================================================================= */ - -#endif /* _LOCK_H */ diff --git a/lib/glthread/threadlib.c b/lib/glthread/threadlib.c deleted file mode 100644 index a5ebd9b..0000000 --- a/lib/glthread/threadlib.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Multithreading primitives. - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. */ - -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include -# include - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The function to be executed by a dummy thread. */ -static void * -dummy_thread_func (void *arg) -{ - return arg; -} - -int -glthread_in_use (void) -{ - static int tested; - static int result; /* 1: linked with -lpthread, 0: only with libc */ - - if (!tested) - { - pthread_t thread; - - if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) - /* Thread creation failed. */ - result = 0; - else - { - /* Thread creation works. */ - void *retval; - if (pthread_join (thread, &retval) != 0) - abort (); - result = 1; - } - tested = 1; - } - return result; -} - -# endif - -#endif - -/* ========================================================================= */ - -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; diff --git a/lib/hard-locale.c b/lib/hard-locale.c index dcfcad6..730e9be 100644 --- a/lib/hard-locale.c +++ b/lib/hard-locale.c @@ -1,6 +1,6 @@ /* hard-locale.c -- Determine whether a locale is hard. - Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2019 Free Software + Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -21,52 +21,15 @@ #include "hard-locale.h" #include -#include #include -#ifdef __GLIBC__ -# define GLIBC_VERSION __GLIBC__ -#elif defined __UCLIBC__ -# define GLIBC_VERSION 2 -#else -# define GLIBC_VERSION 0 -#endif - -/* Return true if the current CATEGORY locale is hard, i.e. if you - can't get away with assuming traditional C or POSIX behavior. */ bool hard_locale (int category) { - bool hard = true; - char const *p = setlocale (category, NULL); + char locale[SETLOCALE_NULL_MAX]; - if (p) - { - if (2 <= GLIBC_VERSION) - { - if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) - hard = false; - } - else - { - char *locale = strdup (p); - if (locale) - { - /* Temporarily set the locale to the "C" and "POSIX" locales - to find their names, so that we can determine whether one - or the other is the caller's locale. */ - if (((p = setlocale (category, "C")) - && strcmp (p, locale) == 0) - || ((p = setlocale (category, "POSIX")) - && strcmp (p, locale) == 0)) - hard = false; + if (setlocale_null_r (category, locale, sizeof (locale))) + return false; - /* Restore the caller's locale. */ - setlocale (category, locale); - free (locale); - } - } - } - - return hard; + return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0); } diff --git a/lib/hard-locale.h b/lib/hard-locale.h index 8f1da96..1886eaa 100644 --- a/lib/hard-locale.h +++ b/lib/hard-locale.h @@ -1,6 +1,6 @@ /* Determine whether a locale is hard. - Copyright (C) 1999, 2003-2004, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 1999, 2003-2004, 2009-2020 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 @@ -20,6 +20,9 @@ # include -bool hard_locale (int); +/* Return true if the specified CATEGORY of the current locale is hard, i.e. + different from the C or POSIX locale that has a fixed behavior. + CATEGORY must be one of the LC_* values, but not LC_ALL. */ +extern bool hard_locale (int category); #endif /* HARD_LOCALE_H_ */ diff --git a/lib/iconv.c b/lib/iconv.c index d27f097..4e9bcdb 100644 --- a/lib/iconv.c +++ b/lib/iconv.c @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 1999-2001, 2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2001, 2007, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv.in.h b/lib/iconv.in.h index 090581b..f51fb22 100644 --- a/lib/iconv.in.h +++ b/lib/iconv.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-2020 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 @@ -87,10 +87,12 @@ _GL_CXXALIAS_RPL (iconv, size_t, @ICONV_CONST@ char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)); # else -_GL_CXXALIAS_SYS (iconv, size_t, - (iconv_t cd, - @ICONV_CONST@ char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft)); +/* Need to cast, because on some versions of Solaris, ICONV_CONST does + not have the right value for C++. */ +_GL_CXXALIAS_SYS_CAST (iconv, size_t, + (iconv_t cd, + @ICONV_CONST@ char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft)); # endif _GL_CXXALIASWARN (iconv); # ifndef ICONV_CONST diff --git a/lib/iconv_close.c b/lib/iconv_close.c index 49362d4..aec2b8f 100644 --- a/lib/iconv_close.c +++ b/lib/iconv_close.c @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv_open-aix.gperf b/lib/iconv_open-aix.gperf index 0fe4b83..9ecdab0 100644 --- a/lib/iconv_open-aix.gperf +++ b/lib/iconv_open-aix.gperf @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv_open-hpux.gperf b/lib/iconv_open-hpux.gperf index b5cbaf4..a35dc2a 100644 --- a/lib/iconv_open-hpux.gperf +++ b/lib/iconv_open-hpux.gperf @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv_open-irix.gperf b/lib/iconv_open-irix.gperf index 459cf41..a698e05 100644 --- a/lib/iconv_open-irix.gperf +++ b/lib/iconv_open-irix.gperf @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv_open-osf.gperf b/lib/iconv_open-osf.gperf index 6ae174f..43a3724 100644 --- a/lib/iconv_open-osf.gperf +++ b/lib/iconv_open-osf.gperf @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv_open-solaris.gperf b/lib/iconv_open-solaris.gperf index 55749f6..e7dd60f 100644 --- a/lib/iconv_open-solaris.gperf +++ b/lib/iconv_open-solaris.gperf @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 2007, 2009, 2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/iconv_open-zos.gperf b/lib/iconv_open-zos.gperf new file mode 100644 index 0000000..bbb4369 --- /dev/null +++ b/lib/iconv_open-zos.gperf @@ -0,0 +1,68 @@ +/* Character set conversion. + Copyright (C) 2019-2020 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, 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 . */ + +struct mapping { int standard_name; const char vendor_name[10 + 1]; }; +%struct-type +%language=ANSI-C +%define slot-name standard_name +%define hash-function-name mapping_hash +%define lookup-function-name mapping_lookup +%readonly-tables +%global-table +%define word-array-name mappings +%pic +%% +ASCII, "00367" +ISO-8859-1, "ISO8859-1" +ISO-8859-2, "ISO8859-2" +ISO-8859-4, "ISO8859-4" +ISO-8859-5, "ISO8859-5" +ISO-8859-6, "ISO8859-6" +ISO-8859-7, "ISO8859-7" +ISO-8859-8, "ISO8859-8" +ISO-8859-9, "ISO8859-9" +ISO-8859-13, "ISO8859-13" +ISO-8859-15, "ISO8859-15" +CP437, "IBM-437" +CP850, "IBM-850" +CP852, "IBM-852" +CP855, "IBM-855" +CP856, "IBM-856" +CP861, "IBM-861" +CP862, "IBM-862" +CP864, "IBM-864" +CP866, "IBM-866" +CP869, "IBM-869" +CP874, "TIS-620" +CP922, "IBM-922" +CP932, "IBM-eucJC" +CP943, "IBM-943" +CP949, "IBM-949" +CP1046, "IBM-1046" +CP1124, "IBM-1124" +CP1125, "IBM-1125" +CP1250, "IBM-1250" +CP1251, "IBM-1251" +CP1252, "IBM-1252" +CP1253, "IBM-1253" +CP1254, "IBM-1254" +CP1255, "IBM-1255" +CP1256, "IBM-1256" +GB2312, "IBM-eucCN" +EUC-JP, "EUCJP" +EUC-KR, "IBM-eucKR" +EUC-TW, "IBM-eucTW" +GBK, "IBM-936" diff --git a/lib/iconv_open-zos.h b/lib/iconv_open-zos.h new file mode 100644 index 0000000..8051f30 --- /dev/null +++ b/lib/iconv_open-zos.h @@ -0,0 +1,297 @@ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -m 10 ./iconv_open-zos.gperf */ +/* Computed positions: -k'4,$' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 17 "./iconv_open-zos.gperf" +struct mapping { int standard_name; const char vendor_name[10 + 1]; }; + +#define TOTAL_KEYWORDS 41 +#define MIN_WORD_LENGTH 3 +#define MAX_WORD_LENGTH 11 +#define MIN_HASH_VALUE 3 +#define MAX_HASH_VALUE 51 +/* maximum key range = 49, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +mapping_hash (register const char *str, register size_t len) +{ + static const unsigned char asso_values[] = + { + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 31, 28, + 9, 0, 26, 20, 3, 7, 0, 6, 30, 15, + 14, 11, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 0, 52, 0, 52, 52, 52, 0, + 18, 52, 2, 52, 52, 52, 52, 1, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52 + }; + register unsigned int hval = len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[3]+6]; + /*FALLTHROUGH*/ + case 3: + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +struct stringpool_t + { + char stringpool_str3[sizeof("GBK")]; + char stringpool_str5[sizeof("ASCII")]; + char stringpool_str6[sizeof("CP1253")]; + char stringpool_str7[sizeof("EUC-TW")]; + char stringpool_str8[sizeof("EUC-KR")]; + char stringpool_str9[sizeof("CP1256")]; + char stringpool_str10[sizeof("ISO-8859-8")]; + char stringpool_str11[sizeof("ISO-8859-13")]; + char stringpool_str12[sizeof("CP1046")]; + char stringpool_str13[sizeof("ISO-8859-6")]; + char stringpool_str14[sizeof("CP922")]; + char stringpool_str15[sizeof("CP1252")]; + char stringpool_str16[sizeof("ISO-8859-9")]; + char stringpool_str17[sizeof("ISO-8859-7")]; + char stringpool_str18[sizeof("CP437")]; + char stringpool_str19[sizeof("ISO-8859-2")]; + char stringpool_str20[sizeof("CP932")]; + char stringpool_str21[sizeof("GB2312")]; + char stringpool_str22[sizeof("CP866")]; + char stringpool_str23[sizeof("CP856")]; + char stringpool_str24[sizeof("EUC-JP")]; + char stringpool_str25[sizeof("CP869")]; + char stringpool_str26[sizeof("CP1255")]; + char stringpool_str28[sizeof("CP862")]; + char stringpool_str29[sizeof("CP852")]; + char stringpool_str30[sizeof("ISO-8859-5")]; + char stringpool_str31[sizeof("ISO-8859-15")]; + char stringpool_str32[sizeof("CP1254")]; + char stringpool_str33[sizeof("CP1125")]; + char stringpool_str34[sizeof("CP1251")]; + char stringpool_str35[sizeof("CP943")]; + char stringpool_str36[sizeof("ISO-8859-4")]; + char stringpool_str37[sizeof("CP1250")]; + char stringpool_str38[sizeof("ISO-8859-1")]; + char stringpool_str39[sizeof("CP1124")]; + char stringpool_str40[sizeof("CP855")]; + char stringpool_str41[sizeof("CP949")]; + char stringpool_str42[sizeof("CP874")]; + char stringpool_str45[sizeof("CP864")]; + char stringpool_str47[sizeof("CP861")]; + char stringpool_str51[sizeof("CP850")]; + }; +static const struct stringpool_t stringpool_contents = + { + "GBK", + "ASCII", + "CP1253", + "EUC-TW", + "EUC-KR", + "CP1256", + "ISO-8859-8", + "ISO-8859-13", + "CP1046", + "ISO-8859-6", + "CP922", + "CP1252", + "ISO-8859-9", + "ISO-8859-7", + "CP437", + "ISO-8859-2", + "CP932", + "GB2312", + "CP866", + "CP856", + "EUC-JP", + "CP869", + "CP1255", + "CP862", + "CP852", + "ISO-8859-5", + "ISO-8859-15", + "CP1254", + "CP1125", + "CP1251", + "CP943", + "ISO-8859-4", + "CP1250", + "ISO-8859-1", + "CP1124", + "CP855", + "CP949", + "CP874", + "CP864", + "CP861", + "CP850" + }; +#define stringpool ((const char *) &stringpool_contents) + +static const struct mapping mappings[] = + { + {-1}, {-1}, {-1}, +#line 68 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str3, "IBM-936"}, + {-1}, +#line 28 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str5, "00367"}, +#line 60 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "IBM-1253"}, +#line 67 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "IBM-eucTW"}, +#line 66 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "IBM-eucKR"}, +#line 63 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "IBM-1256"}, +#line 35 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "ISO8859-8"}, +#line 37 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "ISO8859-13"}, +#line 54 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "IBM-1046"}, +#line 33 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "ISO8859-6"}, +#line 50 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "IBM-922"}, +#line 59 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "IBM-1252"}, +#line 36 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "ISO8859-9"}, +#line 34 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "ISO8859-7"}, +#line 39 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "IBM-437"}, +#line 30 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "ISO8859-2"}, +#line 51 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "IBM-eucJC"}, +#line 64 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "IBM-eucCN"}, +#line 47 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "IBM-866"}, +#line 43 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "IBM-856"}, +#line 65 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, "EUCJP"}, +#line 48 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "IBM-869"}, +#line 62 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "IBM-1255"}, + {-1}, +#line 45 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, "IBM-862"}, +#line 41 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "IBM-852"}, +#line 32 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "ISO8859-5"}, +#line 38 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "ISO8859-15"}, +#line 61 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, "IBM-1254"}, +#line 56 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "IBM-1125"}, +#line 58 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "IBM-1251"}, +#line 52 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "IBM-943"}, +#line 31 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, "ISO8859-4"}, +#line 57 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, "IBM-1250"}, +#line 29 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "ISO8859-1"}, +#line 55 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, "IBM-1124"}, +#line 42 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "IBM-855"}, +#line 53 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "IBM-949"}, +#line 49 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, "TIS-620"}, + {-1}, {-1}, +#line 46 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45, "IBM-864"}, + {-1}, +#line 44 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, "IBM-861"}, + {-1}, {-1}, {-1}, +#line 40 "./iconv_open-zos.gperf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str51, "IBM-850"} + }; + +const struct mapping * +mapping_lookup (register const char *str, register size_t len) +{ + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register unsigned int key = mapping_hash (str, len); + + if (key <= MAX_HASH_VALUE) + { + register int o = mappings[key].standard_name; + if (o >= 0) + { + register const char *s = o + stringpool; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return &mappings[key]; + } + } + } + return 0; +} diff --git a/lib/iconv_open.c b/lib/iconv_open.c index 10bf403..7e18a1a 100644 --- a/lib/iconv_open.c +++ b/lib/iconv_open.c @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2020 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 @@ -36,6 +36,7 @@ #define ICONV_FLAVOR_IRIX "iconv_open-irix.h" #define ICONV_FLAVOR_OSF "iconv_open-osf.h" #define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h" +#define ICONV_FLAVOR_ZOS "iconv_open-zos.h" #ifdef ICONV_FLAVOR # include ICONV_FLAVOR diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h new file mode 100644 index 0000000..d6efc7e --- /dev/null +++ b/lib/inttypes.in.h @@ -0,0 +1,1148 @@ +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Derek Price. + This file is part of gnulib. + + 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 . */ + +/* + * ISO C 99 for platforms that lack it. + * + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Include the original if it exists, and if this file + has not been included yet or if this file includes gnulib stdint.h + which in turn includes this file. + The include_next requires a split double-inclusion guard. */ +#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +# if @HAVE_INTTYPES_H@ + + /* Some pre-C++11 implementations need this. */ +# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# endif + +# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ + +# define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H +# endif +#endif + +#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +#define INTTYPES_H + +/* Include or the gnulib replacement. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif +/* Get CHAR_BIT, INT_MAX, LONG_MAX, etc. */ +#include +/* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ +#if defined _WIN32 && ! defined __CYGWIN__ +# include +#endif + +#if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1) +# error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to ." +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* 7.8.1 Macros for format specifiers */ + +#if defined _TNS_R_TARGET + /* Tandem NonStop R series and compatible platforms released before + July 2005 support %Ld but not %lld. */ +# define _LONG_LONG_FORMAT_PREFIX "L" +#else +# define _LONG_LONG_FORMAT_PREFIX "ll" +#endif + +#if !defined PRId8 || @PRI_MACROS_BROKEN@ +# undef PRId8 +# ifdef INT8_MAX +# define PRId8 "d" +# endif +#endif +#if !defined PRIi8 || @PRI_MACROS_BROKEN@ +# undef PRIi8 +# ifdef INT8_MAX +# define PRIi8 "i" +# endif +#endif +#if !defined PRIo8 || @PRI_MACROS_BROKEN@ +# undef PRIo8 +# ifdef UINT8_MAX +# define PRIo8 "o" +# endif +#endif +#if !defined PRIu8 || @PRI_MACROS_BROKEN@ +# undef PRIu8 +# ifdef UINT8_MAX +# define PRIu8 "u" +# endif +#endif +#if !defined PRIx8 || @PRI_MACROS_BROKEN@ +# undef PRIx8 +# ifdef UINT8_MAX +# define PRIx8 "x" +# endif +#endif +#if !defined PRIX8 || @PRI_MACROS_BROKEN@ +# undef PRIX8 +# ifdef UINT8_MAX +# define PRIX8 "X" +# endif +#endif +#if !defined PRId16 || @PRI_MACROS_BROKEN@ +# undef PRId16 +# ifdef INT16_MAX +# define PRId16 "d" +# endif +#endif +#if !defined PRIi16 || @PRI_MACROS_BROKEN@ +# undef PRIi16 +# ifdef INT16_MAX +# define PRIi16 "i" +# endif +#endif +#if !defined PRIo16 || @PRI_MACROS_BROKEN@ +# undef PRIo16 +# ifdef UINT16_MAX +# define PRIo16 "o" +# endif +#endif +#if !defined PRIu16 || @PRI_MACROS_BROKEN@ +# undef PRIu16 +# ifdef UINT16_MAX +# define PRIu16 "u" +# endif +#endif +#if !defined PRIx16 || @PRI_MACROS_BROKEN@ +# undef PRIx16 +# ifdef UINT16_MAX +# define PRIx16 "x" +# endif +#endif +#if !defined PRIX16 || @PRI_MACROS_BROKEN@ +# undef PRIX16 +# ifdef UINT16_MAX +# define PRIX16 "X" +# endif +#endif +#if !defined PRId32 || @PRI_MACROS_BROKEN@ +# undef PRId32 +# ifdef INT32_MAX +# define PRId32 "d" +# endif +#endif +#if !defined PRIi32 || @PRI_MACROS_BROKEN@ +# undef PRIi32 +# ifdef INT32_MAX +# define PRIi32 "i" +# endif +#endif +#if !defined PRIo32 || @PRI_MACROS_BROKEN@ +# undef PRIo32 +# ifdef UINT32_MAX +# define PRIo32 "o" +# endif +#endif +#if !defined PRIu32 || @PRI_MACROS_BROKEN@ +# undef PRIu32 +# ifdef UINT32_MAX +# define PRIu32 "u" +# endif +#endif +#if !defined PRIx32 || @PRI_MACROS_BROKEN@ +# undef PRIx32 +# ifdef UINT32_MAX +# define PRIx32 "x" +# endif +#endif +#if !defined PRIX32 || @PRI_MACROS_BROKEN@ +# undef PRIX32 +# ifdef UINT32_MAX +# define PRIX32 "X" +# endif +#endif +#ifdef INT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) +# define _PRI64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRI64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRId64 || @PRI_MACROS_BROKEN@ +# undef PRId64 +# define PRId64 _PRI64_PREFIX "d" +# endif +# if !defined PRIi64 || @PRI_MACROS_BROKEN@ +# undef PRIi64 +# define PRIi64 _PRI64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) +# define _PRIu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRIu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRIo64 || @PRI_MACROS_BROKEN@ +# undef PRIo64 +# define PRIo64 _PRIu64_PREFIX "o" +# endif +# if !defined PRIu64 || @PRI_MACROS_BROKEN@ +# undef PRIu64 +# define PRIu64 _PRIu64_PREFIX "u" +# endif +# if !defined PRIx64 || @PRI_MACROS_BROKEN@ +# undef PRIx64 +# define PRIx64 _PRIu64_PREFIX "x" +# endif +# if !defined PRIX64 || @PRI_MACROS_BROKEN@ +# undef PRIX64 +# define PRIX64 _PRIu64_PREFIX "X" +# endif +#endif + +#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#ifdef INT64_MAX +# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST64 +# define PRIdLEAST64 PRId64 +# endif +# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +# endif +# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +# endif +# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +# endif +# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +# endif +#endif + +#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIdFAST8 PRId64 +# else +# define PRIdFAST8 "d" +# endif +#endif +#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIiFAST8 PRIi64 +# else +# define PRIiFAST8 "i" +# endif +#endif +#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIoFAST8 PRIo64 +# else +# define PRIoFAST8 "o" +# endif +#endif +#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIuFAST8 PRIu64 +# else +# define PRIuFAST8 "u" +# endif +#endif +#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIxFAST8 PRIx64 +# else +# define PRIxFAST8 "x" +# endif +#endif +#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIXFAST8 PRIX64 +# else +# define PRIXFAST8 "X" +# endif +#endif +#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIdFAST16 PRId64 +# else +# define PRIdFAST16 "d" +# endif +#endif +#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIiFAST16 PRIi64 +# else +# define PRIiFAST16 "i" +# endif +#endif +#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIoFAST16 PRIo64 +# else +# define PRIoFAST16 "o" +# endif +#endif +#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIuFAST16 PRIu64 +# else +# define PRIuFAST16 "u" +# endif +#endif +#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIxFAST16 PRIx64 +# else +# define PRIxFAST16 "x" +# endif +#endif +#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIXFAST16 PRIX64 +# else +# define PRIXFAST16 "X" +# endif +#endif +#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIdFAST32 PRId64 +# else +# define PRIdFAST32 "d" +# endif +#endif +#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIiFAST32 PRIi64 +# else +# define PRIiFAST32 "i" +# endif +#endif +#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIoFAST32 PRIo64 +# else +# define PRIoFAST32 "o" +# endif +#endif +#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIuFAST32 PRIu64 +# else +# define PRIuFAST32 "u" +# endif +#endif +#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIxFAST32 PRIx64 +# else +# define PRIxFAST32 "x" +# endif +#endif +#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIXFAST32 PRIX64 +# else +# define PRIXFAST32 "X" +# endif +#endif +#ifdef INT64_MAX +# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST64 +# define PRIdFAST64 PRId64 +# endif +# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST64 +# define PRIiFAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST64 +# define PRIoFAST64 PRIo64 +# endif +# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST64 +# define PRIuFAST64 PRIu64 +# endif +# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST64 +# define PRIxFAST64 PRIx64 +# endif +# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST64 +# define PRIXFAST64 PRIX64 +# endif +#endif + +#if !defined PRIdMAX || @PRI_MACROS_BROKEN@ +# undef PRIdMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" +# endif +#endif +#if !defined PRIiMAX || @PRI_MACROS_BROKEN@ +# undef PRIiMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" +# endif +#endif +#if !defined PRIoMAX || @PRI_MACROS_BROKEN@ +# undef PRIoMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" +# endif +#endif +#if !defined PRIuMAX || @PRI_MACROS_BROKEN@ +# undef PRIuMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" +# endif +#endif +#if !defined PRIxMAX || @PRI_MACROS_BROKEN@ +# undef PRIxMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" +# endif +#endif +#if !defined PRIXMAX || @PRI_MACROS_BROKEN@ +# undef PRIXMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIXMAX PRIX64 +# else +# define PRIXMAX "lX" +# endif +#endif + +#if !defined PRIdPTR || @PRI_MACROS_BROKEN@ +# undef PRIdPTR +# ifdef INTPTR_MAX +# define PRIdPTR @PRIPTR_PREFIX@ "d" +# endif +#endif +#if !defined PRIiPTR || @PRI_MACROS_BROKEN@ +# undef PRIiPTR +# ifdef INTPTR_MAX +# define PRIiPTR @PRIPTR_PREFIX@ "i" +# endif +#endif +#if !defined PRIoPTR || @PRI_MACROS_BROKEN@ +# undef PRIoPTR +# ifdef UINTPTR_MAX +# define PRIoPTR @PRIPTR_PREFIX@ "o" +# endif +#endif +#if !defined PRIuPTR || @PRI_MACROS_BROKEN@ +# undef PRIuPTR +# ifdef UINTPTR_MAX +# define PRIuPTR @PRIPTR_PREFIX@ "u" +# endif +#endif +#if !defined PRIxPTR || @PRI_MACROS_BROKEN@ +# undef PRIxPTR +# ifdef UINTPTR_MAX +# define PRIxPTR @PRIPTR_PREFIX@ "x" +# endif +#endif +#if !defined PRIXPTR || @PRI_MACROS_BROKEN@ +# undef PRIXPTR +# ifdef UINTPTR_MAX +# define PRIXPTR @PRIPTR_PREFIX@ "X" +# endif +#endif + +#if !defined SCNd8 || @PRI_MACROS_BROKEN@ +# undef SCNd8 +# ifdef INT8_MAX +# define SCNd8 "hhd" +# endif +#endif +#if !defined SCNi8 || @PRI_MACROS_BROKEN@ +# undef SCNi8 +# ifdef INT8_MAX +# define SCNi8 "hhi" +# endif +#endif +#if !defined SCNo8 || @PRI_MACROS_BROKEN@ +# undef SCNo8 +# ifdef UINT8_MAX +# define SCNo8 "hho" +# endif +#endif +#if !defined SCNu8 || @PRI_MACROS_BROKEN@ +# undef SCNu8 +# ifdef UINT8_MAX +# define SCNu8 "hhu" +# endif +#endif +#if !defined SCNx8 || @PRI_MACROS_BROKEN@ +# undef SCNx8 +# ifdef UINT8_MAX +# define SCNx8 "hhx" +# endif +#endif +#if !defined SCNd16 || @PRI_MACROS_BROKEN@ +# undef SCNd16 +# ifdef INT16_MAX +# define SCNd16 "hd" +# endif +#endif +#if !defined SCNi16 || @PRI_MACROS_BROKEN@ +# undef SCNi16 +# ifdef INT16_MAX +# define SCNi16 "hi" +# endif +#endif +#if !defined SCNo16 || @PRI_MACROS_BROKEN@ +# undef SCNo16 +# ifdef UINT16_MAX +# define SCNo16 "ho" +# endif +#endif +#if !defined SCNu16 || @PRI_MACROS_BROKEN@ +# undef SCNu16 +# ifdef UINT16_MAX +# define SCNu16 "hu" +# endif +#endif +#if !defined SCNx16 || @PRI_MACROS_BROKEN@ +# undef SCNx16 +# ifdef UINT16_MAX +# define SCNx16 "hx" +# endif +#endif +#if !defined SCNd32 || @PRI_MACROS_BROKEN@ +# undef SCNd32 +# ifdef INT32_MAX +# define SCNd32 "d" +# endif +#endif +#if !defined SCNi32 || @PRI_MACROS_BROKEN@ +# undef SCNi32 +# ifdef INT32_MAX +# define SCNi32 "i" +# endif +#endif +#if !defined SCNo32 || @PRI_MACROS_BROKEN@ +# undef SCNo32 +# ifdef UINT32_MAX +# define SCNo32 "o" +# endif +#endif +#if !defined SCNu32 || @PRI_MACROS_BROKEN@ +# undef SCNu32 +# ifdef UINT32_MAX +# define SCNu32 "u" +# endif +#endif +#if !defined SCNx32 || @PRI_MACROS_BROKEN@ +# undef SCNx32 +# ifdef UINT32_MAX +# define SCNx32 "x" +# endif +#endif +#ifdef INT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) +# define _SCN64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCN64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNd64 || @PRI_MACROS_BROKEN@ +# undef SCNd64 +# define SCNd64 _SCN64_PREFIX "d" +# endif +# if !defined SCNi64 || @PRI_MACROS_BROKEN@ +# undef SCNi64 +# define SCNi64 _SCN64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) +# define _SCNu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCNu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNo64 || @PRI_MACROS_BROKEN@ +# undef SCNo64 +# define SCNo64 _SCNu64_PREFIX "o" +# endif +# if !defined SCNu64 || @PRI_MACROS_BROKEN@ +# undef SCNu64 +# define SCNu64 _SCNu64_PREFIX "u" +# endif +# if !defined SCNx64 || @PRI_MACROS_BROKEN@ +# undef SCNx64 +# define SCNx64 _SCNu64_PREFIX "x" +# endif +#endif + +#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST8 +# define SCNdLEAST8 "hhd" +#endif +#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST8 +# define SCNiLEAST8 "hhi" +#endif +#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST8 +# define SCNoLEAST8 "hho" +#endif +#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST8 +# define SCNuLEAST8 "hhu" +#endif +#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST8 +# define SCNxLEAST8 "hhx" +#endif +#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST16 +# define SCNdLEAST16 "hd" +#endif +#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST16 +# define SCNiLEAST16 "hi" +#endif +#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST16 +# define SCNoLEAST16 "ho" +#endif +#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST16 +# define SCNuLEAST16 "hu" +#endif +#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST16 +# define SCNxLEAST16 "hx" +#endif +#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST32 +# define SCNdLEAST32 "d" +#endif +#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST32 +# define SCNiLEAST32 "i" +#endif +#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST32 +# define SCNoLEAST32 "o" +#endif +#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST32 +# define SCNuLEAST32 "u" +#endif +#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST32 +# define SCNxLEAST32 "x" +#endif +#ifdef INT64_MAX +# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST64 +# define SCNdLEAST64 SCNd64 +# endif +# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST64 +# define SCNiLEAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST64 +# define SCNoLEAST64 SCNo64 +# endif +# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST64 +# define SCNuLEAST64 SCNu64 +# endif +# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST64 +# define SCNxLEAST64 SCNx64 +# endif +#endif + +#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNdFAST8 SCNd64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNdFAST8 "hd" +# elif INT_FAST8_MAX == 0x7f +# define SCNdFAST8 "hhd" +# else +# define SCNdFAST8 "d" +# endif +#endif +#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNiFAST8 SCNi64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNiFAST8 "hi" +# elif INT_FAST8_MAX == 0x7f +# define SCNiFAST8 "hhi" +# else +# define SCNiFAST8 "i" +# endif +#endif +#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNoFAST8 SCNo64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNoFAST8 "ho" +# elif UINT_FAST8_MAX == 0xff +# define SCNoFAST8 "hho" +# else +# define SCNoFAST8 "o" +# endif +#endif +#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNuFAST8 SCNu64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNuFAST8 "hu" +# elif UINT_FAST8_MAX == 0xff +# define SCNuFAST8 "hhu" +# else +# define SCNuFAST8 "u" +# endif +#endif +#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNxFAST8 SCNx64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNxFAST8 "hx" +# elif UINT_FAST8_MAX == 0xff +# define SCNxFAST8 "hhx" +# else +# define SCNxFAST8 "x" +# endif +#endif +#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNdFAST16 SCNd64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNdFAST16 "hd" +# else +# define SCNdFAST16 "d" +# endif +#endif +#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNiFAST16 SCNi64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNiFAST16 "hi" +# else +# define SCNiFAST16 "i" +# endif +#endif +#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNoFAST16 SCNo64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNoFAST16 "ho" +# else +# define SCNoFAST16 "o" +# endif +#endif +#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNuFAST16 SCNu64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNuFAST16 "hu" +# else +# define SCNuFAST16 "u" +# endif +#endif +#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNxFAST16 SCNx64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNxFAST16 "hx" +# else +# define SCNxFAST16 "x" +# endif +#endif +#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNdFAST32 SCNd64 +# else +# define SCNdFAST32 "d" +# endif +#endif +#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNiFAST32 SCNi64 +# else +# define SCNiFAST32 "i" +# endif +#endif +#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNoFAST32 SCNo64 +# else +# define SCNoFAST32 "o" +# endif +#endif +#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNuFAST32 SCNu64 +# else +# define SCNuFAST32 "u" +# endif +#endif +#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNxFAST32 SCNx64 +# else +# define SCNxFAST32 "x" +# endif +#endif +#ifdef INT64_MAX +# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST64 +# define SCNdFAST64 SCNd64 +# endif +# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST64 +# define SCNiFAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST64 +# define SCNoFAST64 SCNo64 +# endif +# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST64 +# define SCNuFAST64 SCNu64 +# endif +# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST64 +# define SCNxFAST64 SCNx64 +# endif +#endif + +#if !defined SCNdMAX || @PRI_MACROS_BROKEN@ +# undef SCNdMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" +# endif +#endif +#if !defined SCNiMAX || @PRI_MACROS_BROKEN@ +# undef SCNiMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" +# endif +#endif +#if !defined SCNoMAX || @PRI_MACROS_BROKEN@ +# undef SCNoMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" +# endif +#endif +#if !defined SCNuMAX || @PRI_MACROS_BROKEN@ +# undef SCNuMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" +# endif +#endif +#if !defined SCNxMAX || @PRI_MACROS_BROKEN@ +# undef SCNxMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNxMAX SCNx64 +# else +# define SCNxMAX "lx" +# endif +#endif + +#if !defined SCNdPTR || @PRI_MACROS_BROKEN@ +# undef SCNdPTR +# ifdef INTPTR_MAX +# define SCNdPTR @PRIPTR_PREFIX@ "d" +# endif +#endif +#if !defined SCNiPTR || @PRI_MACROS_BROKEN@ +# undef SCNiPTR +# ifdef INTPTR_MAX +# define SCNiPTR @PRIPTR_PREFIX@ "i" +# endif +#endif +#if !defined SCNoPTR || @PRI_MACROS_BROKEN@ +# undef SCNoPTR +# ifdef UINTPTR_MAX +# define SCNoPTR @PRIPTR_PREFIX@ "o" +# endif +#endif +#if !defined SCNuPTR || @PRI_MACROS_BROKEN@ +# undef SCNuPTR +# ifdef UINTPTR_MAX +# define SCNuPTR @PRIPTR_PREFIX@ "u" +# endif +#endif +#if !defined SCNxPTR || @PRI_MACROS_BROKEN@ +# undef SCNxPTR +# ifdef UINTPTR_MAX +# define SCNxPTR @PRIPTR_PREFIX@ "x" +# endif +#endif + +/* 7.8.2 Functions for greatest-width integer types */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if @GNULIB_IMAXABS@ +# if !@HAVE_DECL_IMAXABS@ +extern intmax_t imaxabs (intmax_t); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxabs +# if HAVE_RAW_DECL_IMAXABS +_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " + "use gnulib module imaxabs for portability"); +# endif +#endif + +#if @GNULIB_IMAXDIV@ +# if !@HAVE_IMAXDIV_T@ +# if !GNULIB_defined_imaxdiv_t +typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; +# define GNULIB_defined_imaxdiv_t 1 +# endif +# endif +# if !@HAVE_DECL_IMAXDIV@ +extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxdiv +# if HAVE_RAW_DECL_IMAXDIV +_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " + "use gnulib module imaxdiv for portability"); +# endif +#endif + +#if @GNULIB_STRTOIMAX@ +# if @REPLACE_STRTOIMAX@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoimax +# define strtoimax rpl_strtoimax +# endif +_GL_FUNCDECL_RPL (strtoimax, intmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int)); +# else +# if !@HAVE_DECL_STRTOIMAX@ +# undef strtoimax +_GL_FUNCDECL_SYS (strtoimax, intmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int)); +# endif +_GL_CXXALIASWARN (strtoimax); +#elif defined GNULIB_POSIXCHECK +# undef strtoimax +# if HAVE_RAW_DECL_STRTOIMAX +_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " + "use gnulib module strtoimax for portability"); +# endif +#endif + +#if @GNULIB_STRTOUMAX@ +# if @REPLACE_STRTOUMAX@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoumax +# define strtoumax rpl_strtoumax +# endif +_GL_FUNCDECL_RPL (strtoumax, uintmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int)); +# else +# if !@HAVE_DECL_STRTOUMAX@ +# undef strtoumax +_GL_FUNCDECL_SYS (strtoumax, uintmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); +# endif +_GL_CXXALIASWARN (strtoumax); +#elif defined GNULIB_POSIXCHECK +# undef strtoumax +# if HAVE_RAW_DECL_STRTOUMAX +_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " + "use gnulib module strtoumax for portability"); +# endif +#endif + +/* Don't bother defining or declaring wcstoimax and wcstoumax, since + wide-character functions like this are hardly ever useful. */ + +#ifdef __cplusplus +} +#endif + +#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ diff --git a/lib/lc-charset-dispatch.c b/lib/lc-charset-dispatch.c new file mode 100644 index 0000000..79057d4 --- /dev/null +++ b/lib/lc-charset-dispatch.c @@ -0,0 +1,82 @@ +/* Dispatching based on the current locale's character encoding. + Copyright (C) 2018-2020 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 . */ + +/* Written by Bruno Haible , 2018. */ + +#include + +/* Specification. */ +#include "lc-charset-dispatch.h" + +#if GNULIB_defined_mbstate_t + +# include "localcharset.h" +# include "streq.h" + +# if GNULIB_WCHAR_SINGLE +/* When we know that the locale does not change, provide a speedup by + caching the value of locale_encoding_classification. */ +# define locale_encoding_classification_cached locale_encoding_classification +# else +/* By default, don't make assumptions, hence no caching. */ +# define locale_encoding_classification_uncached locale_encoding_classification +# endif + +# if GNULIB_WCHAR_SINGLE +static inline +# endif +enc_t +locale_encoding_classification_uncached (void) +{ + const char *encoding = locale_charset (); + if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) + return enc_utf8; + if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) + return enc_eucjp; + if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) + || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) + || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) + return enc_94; + if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) + return enc_euctw; + if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) + return enc_gb18030; + if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) + return enc_sjis; + return enc_other; +} + +# if GNULIB_WCHAR_SINGLE + +static int cached_locale_enc = -1; + +enc_t +locale_encoding_classification_cached (void) +{ + if (cached_locale_enc < 0) + cached_locale_enc = locale_encoding_classification_uncached (); + return cached_locale_enc; +} + +# endif + +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + +#endif diff --git a/lib/lc-charset-dispatch.h b/lib/lc-charset-dispatch.h new file mode 100644 index 0000000..95c2316 --- /dev/null +++ b/lib/lc-charset-dispatch.h @@ -0,0 +1,40 @@ +/* Dispatching based on the current locale's character encoding. + Copyright (C) 2018-2020 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 . */ + +/* Written by Bruno Haible , 2018. */ + +#include + +#if GNULIB_defined_mbstate_t + +/* A classification of special values of the encoding of the current locale. */ +typedef enum + { + enc_other, /* other */ + enc_utf8, /* UTF-8 */ + enc_eucjp, /* EUC-JP */ + enc_94, /* EUC-KR, GB2312, BIG5 */ + enc_euctw, /* EUC-TW */ + enc_gb18030, /* GB18030 */ + enc_sjis /* SJIS */ + } + enc_t; + +/* Returns a classification of special values of the encoding of the current + locale. */ +extern enc_t locale_encoding_classification (void); + +#endif diff --git a/lib/limits.in.h b/lib/limits.in.h index 39750b3..90c273f 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright 2016-2019 Free Software Foundation, Inc. + Copyright 2016-2020 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 diff --git a/lib/localcharset.c b/lib/localcharset.c index 479fcb9..721c8a9 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2020 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 @@ -58,6 +58,9 @@ #elif defined WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include + /* For the use of setlocale() below, the Gnulib override in setlocale.c is + not needed; see the platform lists in setlocale_null.m4. */ +# undef setlocale #endif #if defined OS2 # define INCL_DOS @@ -150,7 +153,8 @@ static const struct table_entry alias_table[] = { "ISO8859-2", "ISO-8859-2" }, { "ISO8859-4", "ISO-8859-4" }, { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" } + { "ISO8859-7", "ISO-8859-7" }, + { "US-ASCII", "ASCII" } # define alias_table_defined # endif # if defined __APPLE__ && defined __MACH__ /* Mac OS X */ @@ -812,8 +816,11 @@ static const struct table_entry locale_table[] = /* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in localcharset.h. - The result must not be freed; it is statically allocated. + into one of the canonical names listed below. + The result must not be freed; it is statically allocated. The result + becomes invalid when setlocale() is used to change the global locale, or + when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG + is changed; threads in multithreaded programs should not do this. If the canonical name cannot be determined, the result is a non-canonical name. */ @@ -825,6 +832,13 @@ locale_charset (void) { const char *codeset; + /* This function must be multithread-safe. To achieve this without using + thread-local storage, we use a simple strcpy or memcpy to fill this static + buffer. Filling it through, for example, strcpy + strcat would not be + guaranteed to leave the buffer's contents intact if another thread is + currently accessing it. If necessary, the contents is first assembled in + a stack-allocated buffer. */ + #if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2 # if HAVE_LANGINFO_CODESET @@ -839,7 +853,7 @@ locale_charset (void) if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; - static char buf[2 + 10 + 1]; + static char resultbuf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') @@ -863,11 +877,12 @@ locale_charset (void) modifier = strchr (dot, '@'); if (modifier == NULL) return dot; - if (modifier - dot < sizeof (buf)) + if (modifier - dot < sizeof (resultbuf)) { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; + /* This way of filling resultbuf is multithread-safe. */ + memcpy (resultbuf, dot, modifier - dot); + resultbuf [modifier - dot] = '\0'; + return resultbuf; } } } @@ -883,8 +898,13 @@ locale_charset (void) converting to GetConsoleOutputCP(). This leads to correct results, except when SetConsoleOutputCP has been called and a raster font is in use. */ - sprintf (buf, "CP%u", GetACP ()); - codeset = buf; + { + char buf[2 + 10 + 1]; + + sprintf (buf, "CP%u", GetACP ()); + strcpy (resultbuf, buf); + codeset = resultbuf; + } } # endif @@ -894,34 +914,28 @@ locale_charset (void) # elif defined WINDOWS_NATIVE - static char buf[2 + 10 + 1]; + char buf[2 + 10 + 1]; + static char resultbuf[2 + 10 + 1]; /* The Windows API has a function returning the locale's codepage as a number, but the value doesn't change according to what the 'setlocale' call specified. So we use it as a last resort, in case the string returned by 'setlocale' doesn't specify the codepage. */ - char *current_locale = setlocale (LC_ALL, NULL); - char *pdot; + char *current_locale = setlocale (LC_CTYPE, NULL); + char *pdot = strrchr (current_locale, '.'); - /* If they set different locales for different categories, - 'setlocale' will return a semi-colon separated list of locale - values. To make sure we use the correct one, we choose LC_CTYPE. */ - if (strchr (current_locale, ';')) - current_locale = setlocale (LC_CTYPE, NULL); - - pdot = strrchr (current_locale, '.'); if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf)) sprintf (buf, "CP%s", pdot + 1); else { /* The Windows API has a function returning the locale's codepage as a - number: GetACP(). - When the output goes to a console window, it needs to be provided in - GetOEMCP() encoding if the console is using a raster font, or in - GetConsoleOutputCP() encoding if it is using a TrueType font. - But in GUI programs and for output sent to files and pipes, GetACP() - encoding is the best bet. */ + number: GetACP(). + When the output goes to a console window, it needs to be provided in + GetOEMCP() encoding if the console is using a raster font, or in + GetConsoleOutputCP() encoding if it is using a TrueType font. + But in GUI programs and for output sent to files and pipes, GetACP() + encoding is the best bet. */ sprintf (buf, "CP%u", GetACP ()); } /* For a locale name such as "French_France.65001", in Windows 10, @@ -929,12 +943,15 @@ locale_charset (void) if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0) codeset = "UTF-8"; else - codeset = buf; + { + strcpy (resultbuf, buf); + codeset = resultbuf; + } # elif defined OS2 const char *locale; - static char buf[2 + 10 + 1]; + static char resultbuf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; @@ -963,11 +980,12 @@ locale_charset (void) modifier = strchr (dot, '@'); if (modifier == NULL) return dot; - if (modifier - dot < sizeof (buf)) + if (modifier - dot < sizeof (resultbuf)) { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; + /* This way of filling resultbuf is multithread-safe. */ + memcpy (resultbuf, dot, modifier - dot); + resultbuf [modifier - dot] = '\0'; + return resultbuf; } } @@ -983,8 +1001,11 @@ locale_charset (void) codeset = ""; else { + char buf[2 + 10 + 1]; + sprintf (buf, "CP%u", cp[0]); - codeset = buf; + strcpy (resultbuf, buf); + codeset = resultbuf; } } diff --git a/lib/localcharset.h b/lib/localcharset.h index 7d0d771..aa623be 100644 --- a/lib/localcharset.h +++ b/lib/localcharset.h @@ -1,5 +1,5 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2020 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify @@ -26,7 +26,10 @@ extern "C" { /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed below. - The result must not be freed; it is statically allocated. + The result must not be freed; it is statically allocated. The result + becomes invalid when setlocale() is used to change the global locale, or + when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG + is changed; threads in multithreaded programs should not do this. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); @@ -45,15 +48,15 @@ extern const char * locale_charset (void); (darwin = Mac OS X, windows = native Windows) ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin - ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos + ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos ISO-8859-3 Y glibc solaris cygwin ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin - ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos ISO-8859-6 Y glibc aix hpux solaris cygwin - ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-8 Y glibc aix hpux osf solaris cygwin - ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin + ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos + ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos + ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin ISO-8859-14 glibc cygwin ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin @@ -76,7 +79,7 @@ extern const char * locale_charset (void); CP874 windows dos CP922 aix CP932 aix cygwin windows dos - CP943 aix + CP943 aix zos CP949 osf darwin windows dos CP950 windows dos CP1046 aix @@ -92,17 +95,17 @@ extern const char * locale_charset (void); CP1255 glibc windows CP1256 windows CP1257 windows - GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin + GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin - EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin + EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos EUC-TW glibc aix hpux irix osf solaris netbsd - BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin + BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos BIG5-HKSCS glibc hpux solaris netbsd darwin GBK glibc aix osf solaris freebsd darwin cygwin windows dos GB18030 glibc hpux solaris freebsd netbsd darwin SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin JOHAB glibc solaris windows - TIS-620 glibc aix hpux osf solaris cygwin + TIS-620 glibc aix hpux osf solaris cygwin zos VISCII Y glibc TCVN5712-1 glibc ARMSCII-8 glibc freebsd netbsd darwin @@ -116,7 +119,7 @@ extern const char * locale_charset (void); HP-KANA8 hpux DEC-KANJI osf DEC-HANYU osf - UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin + UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos Note: Names which are not marked as being a MIME name should not be used in Internet protocols for information interchange (mail, news, etc.). diff --git a/lib/locale.in.h b/lib/locale.in.h index 97479db..4e9b3f3 100644 --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -1,5 +1,5 @@ /* A POSIX . - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-2020 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 @@ -64,6 +64,18 @@ # define LC_MESSAGES 1729 #endif +/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and + int_n_*. Instead of overriding 'struct lconv', merely define these member + names as macros. This avoids trouble in C++ mode. */ +#if defined _MSC_VER +# define int_p_cs_precedes p_cs_precedes +# define int_p_sign_posn p_sign_posn +# define int_p_sep_by_space p_sep_by_space +# define int_n_cs_precedes n_cs_precedes +# define int_n_sign_posn n_sign_posn +# define int_n_sep_by_space n_sep_by_space +#endif + /* Bionic libc's 'struct lconv' is just a dummy. */ #if @REPLACE_STRUCT_LCONV@ # define lconv rpl_lconv @@ -156,7 +168,9 @@ _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); # else _GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (localeconv); +# endif #elif @REPLACE_STRUCT_LCONV@ # undef localeconv # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv @@ -181,7 +195,9 @@ _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); # else _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (setlocale); +# endif #elif defined GNULIB_POSIXCHECK # undef setlocale # if HAVE_RAW_DECL_SETLOCALE @@ -190,6 +206,11 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " # endif #endif +#if @GNULIB_SETLOCALE_NULL@ +/* Included here for convenience. */ +# include "setlocale_null.h" +#endif + #if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@) # if @REPLACE_NEWLOCALE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -211,6 +232,11 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, # if @HAVE_NEWLOCALE@ _GL_CXXALIASWARN (newlocale); # endif +# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@ +# ifndef HAVE_WORKING_NEWLOCALE +# define HAVE_WORKING_NEWLOCALE 1 +# endif +# endif #elif defined GNULIB_POSIXCHECK # undef newlocale # if HAVE_RAW_DECL_NEWLOCALE @@ -235,6 +261,11 @@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # if @HAVE_DUPLOCALE@ _GL_CXXALIASWARN (duplocale); # endif +# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@ +# ifndef HAVE_WORKING_DUPLOCALE +# define HAVE_WORKING_DUPLOCALE 1 +# endif +# endif #elif defined GNULIB_POSIXCHECK # undef duplocale # if HAVE_RAW_DECL_DUPLOCALE @@ -254,7 +285,9 @@ _GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); # else # if @HAVE_FREELOCALE@ -_GL_CXXALIAS_SYS (freelocale, void, (locale_t locale)); +/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); # endif # endif # if @HAVE_FREELOCALE@ diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c index b65ea45..141849c 100644 --- a/lib/localtime-buffer.c +++ b/lib/localtime-buffer.c @@ -1,6 +1,6 @@ /* Provide access to the last buffer returned by localtime() or gmtime(). - Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/localtime-buffer.h b/lib/localtime-buffer.h index 031111a..3801742 100644 --- a/lib/localtime-buffer.h +++ b/lib/localtime-buffer.h @@ -1,6 +1,6 @@ /* Provide access to the last buffer returned by localtime() or gmtime(). - Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/mbrtowc-impl-utf8.h b/lib/mbrtowc-impl-utf8.h new file mode 100644 index 0000000..a826b1b --- /dev/null +++ b/lib/mbrtowc-impl-utf8.h @@ -0,0 +1,138 @@ +/* Convert multibyte character to wide character. + Copyright (C) 1999-2002, 2005-2020 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 . */ + +/* Written by Bruno Haible , 2008. */ + +/* This file contains the part of the body of the mbrtowc and mbrtoc32 functions + that handles the special case of the UTF-8 encoding. */ + + /* Cf. unistr/u8-mbtouc.c. */ + unsigned char c = (unsigned char) p[0]; + + if (c < 0x80) + { + if (pwc != NULL) + *pwc = c; + res = (c == 0 ? 0 : 1); + goto success; + } + if (c >= 0xc2) + { + if (c < 0xe0) + { + if (m == 1) + goto incomplete; + else /* m >= 2 */ + { + unsigned char c2 = (unsigned char) p[1]; + + if ((c2 ^ 0x80) < 0x40) + { + if (pwc != NULL) + *pwc = ((unsigned int) (c & 0x1f) << 6) + | (unsigned int) (c2 ^ 0x80); + res = 2; + goto success; + } + } + } + else if (c < 0xf0) + { + if (m == 1) + goto incomplete; + else + { + unsigned char c2 = (unsigned char) p[1]; + + if ((c2 ^ 0x80) < 0x40 + && (c >= 0xe1 || c2 >= 0xa0) + && (c != 0xed || c2 < 0xa0)) + { + if (m == 2) + goto incomplete; + else /* m >= 3 */ + { + unsigned char c3 = (unsigned char) p[2]; + + if ((c3 ^ 0x80) < 0x40) + { + unsigned int wc = + (((unsigned int) (c & 0x0f) << 12) + | ((unsigned int) (c2 ^ 0x80) << 6) + | (unsigned int) (c3 ^ 0x80)); + + if (FITS_IN_CHAR_TYPE (wc)) + { + if (pwc != NULL) + *pwc = wc; + res = 3; + goto success; + } + } + } + } + } + } + else if (c <= 0xf4) + { + if (m == 1) + goto incomplete; + else + { + unsigned char c2 = (unsigned char) p[1]; + + if ((c2 ^ 0x80) < 0x40 + && (c >= 0xf1 || c2 >= 0x90) + && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) + { + if (m == 2) + goto incomplete; + else + { + unsigned char c3 = (unsigned char) p[2]; + + if ((c3 ^ 0x80) < 0x40) + { + if (m == 3) + goto incomplete; + else /* m >= 4 */ + { + unsigned char c4 = (unsigned char) p[3]; + + if ((c4 ^ 0x80) < 0x40) + { + unsigned int wc = + (((unsigned int) (c & 0x07) << 18) + | ((unsigned int) (c2 ^ 0x80) << 12) + | ((unsigned int) (c3 ^ 0x80) << 6) + | (unsigned int) (c4 ^ 0x80)); + + if (FITS_IN_CHAR_TYPE (wc)) + { + if (pwc != NULL) + *pwc = wc; + res = 4; + goto success; + } + } + } + } + } + } + } + } + } + goto invalid; diff --git a/lib/mbrtowc-impl.h b/lib/mbrtowc-impl.h new file mode 100644 index 0000000..c970439 --- /dev/null +++ b/lib/mbrtowc-impl.h @@ -0,0 +1,262 @@ +/* Convert multibyte character to wide character. + Copyright (C) 1999-2002, 2005-2020 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 . */ + +/* Written by Bruno Haible , 2008. */ + +/* This file contains the body of the mbrtowc and mbrtoc32 functions, + when GNULIB_defined_mbstate_t is defined. */ + + char *pstate = (char *)ps; + + if (s == NULL) + { + pwc = NULL; + s = ""; + n = 1; + } + + if (n == 0) + return (size_t)(-2); + + /* Here n > 0. */ + + if (pstate == NULL) + pstate = internal_state; + + { + size_t nstate = pstate[0]; + char buf[4]; + const char *p; + size_t m; + enc_t enc; + int res; + + switch (nstate) + { + case 0: + p = s; + m = n; + break; + case 3: + buf[2] = pstate[3]; + FALLTHROUGH; + case 2: + buf[1] = pstate[2]; + FALLTHROUGH; + case 1: + buf[0] = pstate[1]; + p = buf; + m = nstate; + buf[m++] = s[0]; + if (n >= 2 && m < 4) + { + buf[m++] = s[1]; + if (n >= 3 && m < 4) + buf[m++] = s[2]; + } + break; + default: + errno = EINVAL; + return (size_t)(-1); + } + + /* Here m > 0. */ + + enc = locale_encoding_classification (); + + if (enc == enc_utf8) /* UTF-8 */ + { + /* Achieve + - multi-thread safety and + - the ability to produce wide character values > WCHAR_MAX + by not calling mbtowc() at all. */ +#include "mbrtowc-impl-utf8.h" + } + else + { + /* The hidden internal state of mbtowc would make this function not + multi-thread safe. Achieve multi-thread safety through a lock. */ + wchar_t wc; + res = mbtowc_with_lock (&wc, p, m); + + if (res >= 0) + { + if ((wc == 0) != (res == 0)) + abort (); + if (pwc != NULL) + *pwc = wc; + goto success; + } + + /* mbtowc does not distinguish between invalid and incomplete multibyte + sequences. But mbrtowc needs to make this distinction. + There are two possible approaches: + - Use iconv() and its return value. + - Use built-in knowledge about the possible encodings. + Given the low quality of implementation of iconv() on the systems + that lack mbrtowc(), we use the second approach. + The possible encodings are: + - 8-bit encodings, + - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, + - UTF-8 (already handled above). + Use specialized code for each. */ + if (m >= 4 || m >= MB_CUR_MAX) + goto invalid; + /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ + switch (enc) + { + /* As a reference for this code, you can use the GNU libiconv + implementation. Look for uses of the RET_TOOFEW macro. */ + + case enc_eucjp: /* EUC-JP */ + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) + goto incomplete; + } + if (m == 2) + { + unsigned char c = (unsigned char) p[0]; + + if (c == 0x8f) + { + unsigned char c2 = (unsigned char) p[1]; + + if (c2 >= 0xa1 && c2 < 0xff) + goto incomplete; + } + } + goto invalid; + } + + case enc_94: /* EUC-KR, GB2312, BIG5 */ + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if (c >= 0xa1 && c < 0xff) + goto incomplete; + } + goto invalid; + } + + case enc_euctw: /* EUC-TW */ + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0xa1 && c < 0xff) || c == 0x8e) + goto incomplete; + } + else /* m == 2 || m == 3 */ + { + unsigned char c = (unsigned char) p[0]; + + if (c == 0x8e) + goto incomplete; + } + goto invalid; + } + + case enc_gb18030: /* GB18030 */ + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) + goto incomplete; + } + else /* m == 2 || m == 3 */ + { + unsigned char c = (unsigned char) p[0]; + + if (c >= 0x90 && c <= 0xe3) + { + unsigned char c2 = (unsigned char) p[1]; + + if (c2 >= 0x30 && c2 <= 0x39) + { + if (m == 2) + goto incomplete; + else /* m == 3 */ + { + unsigned char c3 = (unsigned char) p[2]; + + if (c3 >= 0x81 && c3 <= 0xfe) + goto incomplete; + } + } + } + } + goto invalid; + } + + case enc_sjis: /* SJIS */ + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) + || (c >= 0xf0 && c <= 0xf9)) + goto incomplete; + } + goto invalid; + } + + default: + /* An unknown multibyte encoding. */ + goto incomplete; + } + } + + success: + /* res >= 0 is the corrected return value of + mbtowc_with_lock (&wc, p, m). */ + if (nstate >= (res > 0 ? res : 1)) + abort (); + res -= nstate; + pstate[0] = 0; + return res; + + incomplete: + { + size_t k = nstate; + /* Here 0 <= k < m < 4. */ + pstate[++k] = s[0]; + if (k < m) + { + pstate[++k] = s[1]; + if (k < m) + pstate[++k] = s[2]; + } + if (k != m) + abort (); + } + pstate[0] = m; + return (size_t)(-2); + + invalid: + errno = EILSEQ; + /* The conversion state is undefined, says POSIX. */ + return (size_t)(-1); + } diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c index 1aad22c..6cb5267 100644 --- a/lib/mbrtowc.c +++ b/lib/mbrtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -20,21 +20,39 @@ /* Specification. */ #include -#if C_LOCALE_MAYBE_EILSEQ -# include "hard-locale.h" -# include -#endif - #if GNULIB_defined_mbstate_t -/* Implement mbrtowc() on top of mbtowc(). */ +/* Implement mbrtowc() on top of mbtowc() for the non-UTF-8 locales + and directly for the UTF-8 locales. */ # include +# include # include -# include "localcharset.h" -# include "streq.h" +# if defined _WIN32 && !defined __CYGWIN__ + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# elif HAVE_PTHREAD_API + +# include +# if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS +# include +# pragma weak thrd_exit +# define c11_threads_in_use() (thrd_exit != NULL) +# else +# define c11_threads_in_use() 0 +# endif + +# elif HAVE_THREADS_H + +# include + +# endif + # include "verify.h" -# include "glthread/lock.h" +# include "lc-charset-dispatch.h" +# include "mbtowc-lock.h" # ifndef FALLTHROUGH # if __GNUC__ < 7 @@ -44,417 +62,24 @@ # endif # endif -/* Returns a classification of special values of the encoding of the current - locale. */ -typedef enum { - enc_other, /* other */ - enc_utf8, /* UTF-8 */ - enc_eucjp, /* EUC-JP */ - enc_94, /* EUC-KR, GB2312, BIG5 */ - enc_euctw, /* EUC-TW */ - enc_gb18030, /* GB18030 */ - enc_sjis /* SJIS */ -} enc_t; -static inline enc_t -locale_enc (void) -{ - const char *encoding = locale_charset (); - if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) - return enc_utf8; - if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) - return enc_eucjp; - if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) - || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) - return enc_94; - if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) - return enc_euctw; - if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) - return enc_gb18030; - if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) - return enc_sjis; - return enc_other; -} - -# if GNULIB_WCHAR_SINGLE -/* When we know that the locale does not change, provide a speedup by - caching the value of locale_enc. */ -static int cached_locale_enc = -1; -static inline enc_t -locale_enc_cached (void) -{ - if (cached_locale_enc < 0) - cached_locale_enc = locale_enc (); - return cached_locale_enc; -} -# else -/* By default, don't make assumptions, hence no caching. */ -# define locale_enc_cached locale_enc -# endif - -/* This lock protects the internal state of mbtowc against multiple simultaneous - calls of mbrtowc. */ -gl_lock_define_initialized(static, mbtowc_lock) - verify (sizeof (mbstate_t) >= 4); - static char internal_state[4]; size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { - char *pstate = (char *)ps; - - if (s == NULL) - { - pwc = NULL; - s = ""; - n = 1; - } - - if (n == 0) - return (size_t)(-2); - - /* Here n > 0. */ - - if (pstate == NULL) - pstate = internal_state; - - { - size_t nstate = pstate[0]; - char buf[4]; - const char *p; - size_t m; - enc_t enc; - int res; - - switch (nstate) - { - case 0: - p = s; - m = n; - break; - case 3: - buf[2] = pstate[3]; - FALLTHROUGH; - case 2: - buf[1] = pstate[2]; - FALLTHROUGH; - case 1: - buf[0] = pstate[1]; - p = buf; - m = nstate; - buf[m++] = s[0]; - if (n >= 2 && m < 4) - { - buf[m++] = s[1]; - if (n >= 3 && m < 4) - buf[m++] = s[2]; - } - break; - default: - errno = EINVAL; - return (size_t)(-1); - } - - /* Here m > 0. */ - - enc = locale_enc_cached (); - - if (enc == enc_utf8) /* UTF-8 */ - { - /* Achieve multi-thread safety by not calling mbtowc() at all. */ - /* Cf. unistr/u8-mbtouc.c. */ - unsigned char c = (unsigned char) p[0]; - - if (c < 0x80) - { - if (pwc != NULL) - *pwc = c; - res = (c == 0 ? 0 : 1); - goto success; - } - if (c >= 0xc2) - { - if (c < 0xe0) - { - if (m == 1) - goto incomplete; - else /* m >= 2 */ - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40) - { - if (pwc != NULL) - *pwc = ((unsigned int) (c & 0x1f) << 6) - | (unsigned int) (c2 ^ 0x80); - res = 2; - goto success; - } - } - } - else if (c < 0xf0) - { - if (m == 1) - goto incomplete; - else - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40 - && (c >= 0xe1 || c2 >= 0xa0) - && (c != 0xed || c2 < 0xa0)) - { - if (m == 2) - goto incomplete; - else /* m >= 3 */ - { - unsigned char c3 = (unsigned char) p[2]; - - if ((c3 ^ 0x80) < 0x40) - { - if (pwc != NULL) - *pwc = ((unsigned int) (c & 0x0f) << 12) - | ((unsigned int) (c2 ^ 0x80) << 6) - | (unsigned int) (c3 ^ 0x80); - res = 3; - goto success; - } - } - } - } - } - else if (c <= 0xf4) - { - if (m == 1) - goto incomplete; - else - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40 - && (c >= 0xf1 || c2 >= 0x90) - && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) - { - if (m == 2) - goto incomplete; - else - { - unsigned char c3 = (unsigned char) p[2]; - - if ((c3 ^ 0x80) < 0x40) - { - if (m == 3) - goto incomplete; - else /* m >= 4 */ - { - unsigned char c4 = (unsigned char) p[3]; - - if ((c4 ^ 0x80) < 0x40) - { - if (pwc != NULL) - *pwc = ((unsigned int) (c & 0x07) << 18) - | ((unsigned int) (c2 ^ 0x80) << 12) - | ((unsigned int) (c3 ^ 0x80) << 6) - | (unsigned int) (c4 ^ 0x80); - res = 4; - goto success; - } - } - } - } - } - } - } - } - goto invalid; - } - else - { - /* The hidden internal state of mbtowc would make this function not - multi-thread safe. Achieve multi-thread safety through a lock. */ - gl_lock_lock (mbtowc_lock); - - /* Put the hidden internal state of mbtowc into its initial state. - This is needed at least with glibc, uClibc, and MSVC CRT. - See . */ - mbtowc (NULL, NULL, 0); - - res = mbtowc (pwc, p, m); - - gl_lock_unlock (mbtowc_lock); - - if (res >= 0) - { - if (pwc != NULL && ((*pwc == 0) != (res == 0))) - abort (); - goto success; - } - - /* mbtowc does not distinguish between invalid and incomplete multibyte - sequences. But mbrtowc needs to make this distinction. - There are two possible approaches: - - Use iconv() and its return value. - - Use built-in knowledge about the possible encodings. - Given the low quality of implementation of iconv() on the systems - that lack mbrtowc(), we use the second approach. - The possible encodings are: - - 8-bit encodings, - - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - - UTF-8 (already handled above). - Use specialized code for each. */ - if (m >= 4 || m >= MB_CUR_MAX) - goto invalid; - /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ - switch (enc) - { - /* As a reference for this code, you can use the GNU libiconv - implementation. Look for uses of the RET_TOOFEW macro. */ - - case enc_eucjp: /* EUC-JP */ - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) - goto incomplete; - } - if (m == 2) - { - unsigned char c = (unsigned char) p[0]; - - if (c == 0x8f) - { - unsigned char c2 = (unsigned char) p[1]; - - if (c2 >= 0xa1 && c2 < 0xff) - goto incomplete; - } - } - goto invalid; - } - - case enc_94: /* EUC-KR, GB2312, BIG5 */ - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if (c >= 0xa1 && c < 0xff) - goto incomplete; - } - goto invalid; - } - - case enc_euctw: /* EUC-TW */ - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0xa1 && c < 0xff) || c == 0x8e) - goto incomplete; - } - else /* m == 2 || m == 3 */ - { - unsigned char c = (unsigned char) p[0]; - - if (c == 0x8e) - goto incomplete; - } - goto invalid; - } - - case enc_gb18030: /* GB18030 */ - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) - goto incomplete; - } - else /* m == 2 || m == 3 */ - { - unsigned char c = (unsigned char) p[0]; - - if (c >= 0x90 && c <= 0xe3) - { - unsigned char c2 = (unsigned char) p[1]; - - if (c2 >= 0x30 && c2 <= 0x39) - { - if (m == 2) - goto incomplete; - else /* m == 3 */ - { - unsigned char c3 = (unsigned char) p[2]; - - if (c3 >= 0x81 && c3 <= 0xfe) - goto incomplete; - } - } - } - } - goto invalid; - } - - case enc_sjis: /* SJIS */ - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) - || (c >= 0xf0 && c <= 0xf9)) - goto incomplete; - } - goto invalid; - } - - default: - /* An unknown multibyte encoding. */ - goto incomplete; - } - } - - success: - /* res >= 0 is the corrected return value of mbtowc (pwc, p, m). */ - if (nstate >= (res > 0 ? res : 1)) - abort (); - res -= nstate; - pstate[0] = 0; - return res; - - incomplete: - { - size_t k = nstate; - /* Here 0 <= k < m < 4. */ - pstate[++k] = s[0]; - if (k < m) - { - pstate[++k] = s[1]; - if (k < m) - pstate[++k] = s[2]; - } - if (k != m) - abort (); - } - pstate[0] = m; - return (size_t)(-2); - - invalid: - errno = EILSEQ; - /* The conversion state is undefined, says POSIX. */ - return (size_t)(-1); - } +# define FITS_IN_CHAR_TYPE(wc) ((wc) <= WCHAR_MAX) +# include "mbrtowc-impl.h" } #else /* Override the system's mbrtowc() function. */ +# if MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ +# include "hard-locale.h" +# include +# endif + # undef mbrtowc size_t @@ -512,14 +137,20 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } # endif +# if MBRTOWC_STORES_INCOMPLETE_BUG + ret = mbrtowc (&wc, s, n, ps); + if (ret < (size_t) -2 && pwc != NULL) + *pwc = wc; +# else ret = mbrtowc (pwc, s, n, ps); +# endif # if MBRTOWC_NUL_RETVAL_BUG if (ret < (size_t) -2 && !*pwc) return 0; # endif -# if C_LOCALE_MAYBE_EILSEQ +# if MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE)) { unsigned char uc = *s; diff --git a/lib/mbsinit.c b/lib/mbsinit.c index 5ecaef7..981a894 100644 --- a/lib/mbsinit.c +++ b/lib/mbsinit.c @@ -1,5 +1,5 @@ /* Test for initial conversion state. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -56,13 +56,10 @@ mbsinit (const mbstate_t *ps) { # if defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ -# ifdef __MINGW32__ - /* On mingw, 'mbstate_t' is defined as 'int'. */ - return ps == NULL || *ps == 0; -# else - /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */ + /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4 bytes matter. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined as + an 8-byte struct, of which the first 4 bytes matter. */ return ps == NULL || *(const unsigned int *)ps == 0; -# endif # else /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */ /* Maybe this definition works, maybe not... */ diff --git a/lib/mbsrtowcs-impl.h b/lib/mbsrtowcs-impl.h index 110d692..06ecec2 100644 --- a/lib/mbsrtowcs-impl.h +++ b/lib/mbsrtowcs-impl.h @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -16,16 +16,16 @@ along with this program. If not, see . */ size_t -mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) +FUNC (DCHAR_T *dest, const char **srcp, size_t len, mbstate_t *ps) { if (ps == NULL) - ps = &_gl_mbsrtowcs_state; + ps = &INTERNAL_STATE; { const char *src = *srcp; if (dest != NULL) { - wchar_t *destptr = dest; + DCHAR_T *destptr = dest; for (; len > 0; destptr++, len--) { @@ -46,7 +46,7 @@ mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); /* Parse the next multibyte character. */ - ret = mbrtowc (destptr, src, src_avail, ps); + ret = MBRTOWC (destptr, src, src_avail, ps); if (ret == (size_t)(-2)) /* Encountered a multibyte character that extends past a '\0' byte @@ -93,7 +93,7 @@ mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); /* Parse the next multibyte character. */ - ret = mbrtowc (NULL, src, src_avail, &state); + ret = MBRTOWC (NULL, src, src_avail, &state); if (ret == (size_t)(-2)) /* Encountered a multibyte character that extends past a '\0' byte diff --git a/lib/mbsrtowcs-state.c b/lib/mbsrtowcs-state.c index 59525e7..aca1ad8 100644 --- a/lib/mbsrtowcs-state.c +++ b/lib/mbsrtowcs-state.c @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/lib/mbsrtowcs.c b/lib/mbsrtowcs.c index 14f241e..6d1c685 100644 --- a/lib/mbsrtowcs.c +++ b/lib/mbsrtowcs.c @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -29,4 +29,8 @@ extern mbstate_t _gl_mbsrtowcs_state; +#define FUNC mbsrtowcs +#define DCHAR_T wchar_t +#define INTERNAL_STATE _gl_mbsrtowcs_state +#define MBRTOWC mbrtowc #include "mbsrtowcs-impl.h" diff --git a/lib/mbtowc-impl.h b/lib/mbtowc-impl.h index f4ab981..22e414a 100644 --- a/lib/mbtowc-impl.h +++ b/lib/mbtowc-impl.h @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/lib/mbtowc-lock.c b/lib/mbtowc-lock.c new file mode 100644 index 0000000..85ad3c4 --- /dev/null +++ b/lib/mbtowc-lock.c @@ -0,0 +1,150 @@ +/* Return the internal lock used by mbrtowc and mbrtoc32. + Copyright (C) 2019-2020 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 . */ + +/* Written by Bruno Haible , 2019-2020. */ + +#include + +/* When it is known that the gl_get_mbtowc_lock function is defined + by a dependency library, it should not be defined here. */ +#if OMIT_MBTOWC_LOCK + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + +#else + +/* This file defines the internal lock used by mbrtowc and mbrtoc32. + It is a separate compilation unit, so that only one copy of it is + present when linking statically. */ + +/* Prohibit renaming this symbol. */ +# undef gl_get_mbtowc_lock + +/* Macro for exporting a symbol (function, not variable) defined in this file, + when compiled into a shared library. */ +# ifndef DLL_EXPORTED +# if HAVE_VISIBILITY + /* Override the effect of the compiler option '-fvisibility=hidden'. */ +# define DLL_EXPORTED __attribute__((__visibility__("default"))) +# elif defined _WIN32 || defined __CYGWIN__ +# define DLL_EXPORTED __declspec(dllexport) +# else +# define DLL_EXPORTED +# endif +# endif + +# if defined _WIN32 && !defined __CYGWIN__ + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# include "windows-initguard.h" + +/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *', + because the latter is not guaranteed to be a stable ABI in the future. */ + +/* Make sure the function gets exported from DLLs. */ +DLL_EXPORTED CRITICAL_SECTION *gl_get_mbtowc_lock (void); + +static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT; +static CRITICAL_SECTION lock; + +/* Returns the internal lock used by mbrtowc and mbrtoc32. */ +CRITICAL_SECTION * +gl_get_mbtowc_lock (void) +{ + if (!guard.done) + { + if (InterlockedIncrement (&guard.started) == 0) + { + /* This thread is the first one to need the lock. Initialize it. */ + InitializeCriticalSection (&lock); + guard.done = 1; + } + else + { + /* Don't let guard.started grow and wrap around. */ + InterlockedDecrement (&guard.started); + /* Yield the CPU while waiting for another thread to finish + initializing this mutex. */ + while (!guard.done) + Sleep (0); + } + } + return &lock; +} + +# elif HAVE_PTHREAD_API + +# include + +static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + +/* Make sure the function gets exported from shared libraries. */ +DLL_EXPORTED pthread_mutex_t *gl_get_mbtowc_lock (void); + +/* Returns the internal lock used by mbrtowc and mbrtoc32. */ +pthread_mutex_t * +gl_get_mbtowc_lock (void) +{ + return &mutex; +} + +# elif HAVE_THREADS_H + +# include +# include + +static int volatile init_needed = 1; +static once_flag init_once = ONCE_FLAG_INIT; +static mtx_t mutex; + +static void +atomic_init (void) +{ + if (mtx_init (&mutex, mtx_plain) != thrd_success) + abort (); + init_needed = 0; +} + +/* Make sure the function gets exported from shared libraries. */ +DLL_EXPORTED mtx_t *gl_get_mbtowc_lock (void); + +/* Returns the internal lock used by mbrtowc and mbrtoc32. */ +mtx_t * +gl_get_mbtowc_lock (void) +{ + if (init_needed) + call_once (&init_once, atomic_init); + return &mutex; +} + +# endif + +# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER +/* Make sure the '__declspec(dllimport)' in mbrtowc.c and mbrtoc32.c does not + cause a link failure when no DLLs are involved. */ +# if defined _WIN64 || defined _LP64 +# define IMP(x) __imp_##x +# else +# define IMP(x) _imp__##x +# endif +void * IMP(gl_get_mbtowc_lock) = &gl_get_mbtowc_lock; +# endif + +#endif diff --git a/lib/mbtowc-lock.h b/lib/mbtowc-lock.h new file mode 100644 index 0000000..e101978 --- /dev/null +++ b/lib/mbtowc-lock.h @@ -0,0 +1,115 @@ +/* Use the internal lock used by mbrtowc and mbrtoc32. + Copyright (C) 2019-2020 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 . */ + +/* Written by Bruno Haible , 2019-2020. */ + +/* Use a lock, so that no two threads can invoke mbtowc at the same time. */ + +static inline int +mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m) +{ + /* Put the hidden internal state of mbtowc into its initial state. + This is needed at least with glibc, uClibc, and MSVC CRT. + See . */ + mbtowc (NULL, NULL, 0); + + return mbtowc (pwc, p, m); +} + +/* Prohibit renaming this symbol. */ +#undef gl_get_mbtowc_lock + +#if defined _WIN32 && !defined __CYGWIN__ + +extern __declspec(dllimport) CRITICAL_SECTION *gl_get_mbtowc_lock (void); + +static int +mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) +{ + CRITICAL_SECTION *lock = gl_get_mbtowc_lock (); + int ret; + + EnterCriticalSection (lock); + ret = mbtowc_unlocked (pwc, p, m); + LeaveCriticalSection (lock); + + return ret; +} + +#elif HAVE_PTHREAD_API /* AIX, IRIX, Cygwin */ + +extern +# if defined _WIN32 || defined __CYGWIN__ + __declspec(dllimport) +# endif + pthread_mutex_t *gl_get_mbtowc_lock (void); + +# if HAVE_WEAK_SYMBOLS /* IRIX */ + + /* Avoid the need to link with '-lpthread'. */ +# pragma weak pthread_mutex_lock +# pragma weak pthread_mutex_unlock + + /* Determine whether libpthread is in use. */ +# pragma weak pthread_mutexattr_gettype + /* See the comments in lock.h. */ +# define pthread_in_use() \ + (pthread_mutexattr_gettype != NULL || c11_threads_in_use ()) + +# else +# define pthread_in_use() 1 +# endif + +static int +mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) +{ + if (pthread_in_use()) + { + pthread_mutex_t *lock = gl_get_mbtowc_lock (); + int ret; + + if (pthread_mutex_lock (lock)) + abort (); + ret = mbtowc_unlocked (pwc, p, m); + if (pthread_mutex_unlock (lock)) + abort (); + + return ret; + } + else + return mbtowc_unlocked (pwc, p, m); +} + +#elif HAVE_THREADS_H + +extern mtx_t *gl_get_mbtowc_lock (void); + +static int +mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) +{ + mtx_t *lock = gl_get_mbtowc_lock (); + int ret; + + if (mtx_lock (lock) != thrd_success) + abort (); + ret = mbtowc_unlocked (pwc, p, m); + if (mtx_unlock (lock) != thrd_success) + abort (); + + return ret; +} + +#endif diff --git a/lib/mbtowc.c b/lib/mbtowc.c index 77a8472..5fc2d28 100644 --- a/lib/mbtowc.c +++ b/lib/mbtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/lib/memchr.c b/lib/memchr.c index 4e0c5f9..bff63da 100644 --- a/lib/memchr.c +++ b/lib/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2019 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2020 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), diff --git a/lib/memchr.valgrind b/lib/memchr.valgrind index 1d60e29..f6dd209 100644 --- a/lib/memchr.valgrind +++ b/lib/memchr.valgrind @@ -1,6 +1,6 @@ # Suppress a valgrind message about use of uninitialized memory in memchr(). -# Copyright (C) 2009-2019 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/lib/monetary.in.h b/lib/monetary.in.h index be02910..1d3d3b1 100644 --- a/lib/monetary.in.h +++ b/lib/monetary.in.h @@ -1,5 +1,5 @@ /* Wrapper around . - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -91,7 +91,9 @@ _GL_CXXALIAS_SYS (strfmon_l, ssize_t, (char *s, size_t maxsize, locale_t locale, const char *format, ...)); # endif # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (strfmon_l); +# endif #elif defined GNULIB_POSIXCHECK # undef strfmon_l # if HAVE_RAW_DECL_STRFMON_L diff --git a/lib/setlocale-lock.c b/lib/setlocale-lock.c new file mode 100644 index 0000000..7dde32d --- /dev/null +++ b/lib/setlocale-lock.c @@ -0,0 +1,150 @@ +/* Return the internal lock used by setlocale_null_r. + Copyright (C) 2019-2020 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 . */ + +/* Written by Bruno Haible , 2019. */ + +#include + +/* When it is known that the gl_get_setlocale_null_lock function is defined + by a dependency library, it should not be defined here. */ +#if OMIT_SETLOCALE_LOCK + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + +#else + +/* This file defines the internal lock used by setlocale_null_r. + It is a separate compilation unit, so that only one copy of it is + present when linking statically. */ + +/* Prohibit renaming this symbol. */ +# undef gl_get_setlocale_null_lock + +/* Macro for exporting a symbol (function, not variable) defined in this file, + when compiled into a shared library. */ +# ifndef DLL_EXPORTED +# if HAVE_VISIBILITY + /* Override the effect of the compiler option '-fvisibility=hidden'. */ +# define DLL_EXPORTED __attribute__((__visibility__("default"))) +# elif defined _WIN32 || defined __CYGWIN__ +# define DLL_EXPORTED __declspec(dllexport) +# else +# define DLL_EXPORTED +# endif +# endif + +# if defined _WIN32 && !defined __CYGWIN__ + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# include "windows-initguard.h" + +/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *', + because the latter is not guaranteed to be a stable ABI in the future. */ + +/* Make sure the function gets exported from DLLs. */ +DLL_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void); + +static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT; +static CRITICAL_SECTION lock; + +/* Returns the internal lock used by setlocale_null_r. */ +CRITICAL_SECTION * +gl_get_setlocale_null_lock (void) +{ + if (!guard.done) + { + if (InterlockedIncrement (&guard.started) == 0) + { + /* This thread is the first one to need the lock. Initialize it. */ + InitializeCriticalSection (&lock); + guard.done = 1; + } + else + { + /* Don't let guard.started grow and wrap around. */ + InterlockedDecrement (&guard.started); + /* Yield the CPU while waiting for another thread to finish + initializing this mutex. */ + while (!guard.done) + Sleep (0); + } + } + return &lock; +} + +# elif HAVE_PTHREAD_API + +# include + +static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + +/* Make sure the function gets exported from shared libraries. */ +DLL_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void); + +/* Returns the internal lock used by setlocale_null_r. */ +pthread_mutex_t * +gl_get_setlocale_null_lock (void) +{ + return &mutex; +} + +# elif HAVE_THREADS_H + +# include +# include + +static int volatile init_needed = 1; +static once_flag init_once = ONCE_FLAG_INIT; +static mtx_t mutex; + +static void +atomic_init (void) +{ + if (mtx_init (&mutex, mtx_plain) != thrd_success) + abort (); + init_needed = 0; +} + +/* Make sure the function gets exported from shared libraries. */ +DLL_EXPORTED mtx_t *gl_get_setlocale_null_lock (void); + +/* Returns the internal lock used by setlocale_null_r. */ +mtx_t * +gl_get_setlocale_null_lock (void) +{ + if (init_needed) + call_once (&init_once, atomic_init); + return &mutex; +} + +# endif + +# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER +/* Make sure the '__declspec(dllimport)' in setlocale_null.c does not cause + a link failure when no DLLs are involved. */ +# if defined _WIN64 || defined _LP64 +# define IMP(x) __imp_##x +# else +# define IMP(x) _imp__##x +# endif +void * IMP(gl_get_setlocale_null_lock) = &gl_get_setlocale_null_lock; +# endif + +#endif diff --git a/lib/setlocale_null.c b/lib/setlocale_null.c new file mode 100644 index 0000000..abe55b5 --- /dev/null +++ b/lib/setlocale_null.c @@ -0,0 +1,411 @@ +/* Query the name of the current global locale. + Copyright (C) 2019-2020 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 . */ + +/* Written by Bruno Haible , 2019. */ + +#include + +/* Specification. */ +#include "setlocale_null.h" + +#include +#include +#include +#include +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) +# if defined _WIN32 && !defined __CYGWIN__ + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# elif HAVE_PTHREAD_API + +# include +# if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS +# include +# pragma weak thrd_exit +# define c11_threads_in_use() (thrd_exit != NULL) +# else +# define c11_threads_in_use() 0 +# endif + +# elif HAVE_THREADS_H + +# include + +# endif +#endif + +/* Use the system's setlocale() function, not the gnulib override, here. */ +#undef setlocale + +static const char * +setlocale_null_androidfix (int category) +{ + const char *result = setlocale (category, NULL); + +#ifdef __ANDROID__ + if (result == NULL) + switch (category) + { + case LC_CTYPE: + case LC_NUMERIC: + case LC_TIME: + case LC_COLLATE: + case LC_MONETARY: + case LC_MESSAGES: + case LC_ALL: + case LC_PAPER: + case LC_NAME: + case LC_ADDRESS: + case LC_TELEPHONE: + case LC_MEASUREMENT: + result = "C"; + break; + default: + break; + } +#endif + + return result; +} + +static int +setlocale_null_unlocked (int category, char *buf, size_t bufsize) +{ +#if defined _WIN32 && !defined __CYGWIN__ && defined _MSC_VER + /* On native Windows, nowadays, the setlocale() implementation is based + on _wsetlocale() and uses malloc() for the result. We are better off + using _wsetlocale() directly. */ + const wchar_t *result = _wsetlocale (category, NULL); + + if (result == NULL) + { + /* CATEGORY is invalid. */ + if (bufsize > 0) + /* Return an empty string in BUF. + This is a convenience for callers that don't want to write explicit + code for handling EINVAL. */ + buf[0] = '\0'; + return EINVAL; + } + else + { + size_t length = wcslen (result); + if (length < bufsize) + { + size_t i; + + /* Convert wchar_t[] -> char[], assuming plain ASCII. */ + for (i = 0; i <= length; i++) + buf[i] = result[i]; + + return 0; + } + else + { + if (bufsize > 0) + { + /* Return a truncated result in BUF. + This is a convenience for callers that don't want to write + explicit code for handling ERANGE. */ + size_t i; + + /* Convert wchar_t[] -> char[], assuming plain ASCII. */ + for (i = 0; i < bufsize; i++) + buf[i] = result[i]; + buf[bufsize - 1] = '\0'; + } + return ERANGE; + } + } +#else + const char *result = setlocale_null_androidfix (category); + + if (result == NULL) + { + /* CATEGORY is invalid. */ + if (bufsize > 0) + /* Return an empty string in BUF. + This is a convenience for callers that don't want to write explicit + code for handling EINVAL. */ + buf[0] = '\0'; + return EINVAL; + } + else + { + size_t length = strlen (result); + if (length < bufsize) + { + memcpy (buf, result, length + 1); + return 0; + } + else + { + if (bufsize > 0) + { + /* Return a truncated result in BUF. + This is a convenience for callers that don't want to write + explicit code for handling ERANGE. */ + memcpy (buf, result, bufsize - 1); + buf[bufsize - 1] = '\0'; + } + return ERANGE; + } + } +#endif +} + +#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */ + +/* Use a lock, so that no two threads can invoke setlocale_null_unlocked + at the same time. */ + +/* Prohibit renaming this symbol. */ +# undef gl_get_setlocale_null_lock + +# if defined _WIN32 && !defined __CYGWIN__ + +extern __declspec(dllimport) CRITICAL_SECTION *gl_get_setlocale_null_lock (void); + +static int +setlocale_null_with_lock (int category, char *buf, size_t bufsize) +{ + CRITICAL_SECTION *lock = gl_get_setlocale_null_lock (); + int ret; + + EnterCriticalSection (lock); + ret = setlocale_null_unlocked (category, buf, bufsize); + LeaveCriticalSection (lock); + + return ret; +} + +# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */ + +extern +# if defined _WIN32 || defined __CYGWIN__ + __declspec(dllimport) +# endif + pthread_mutex_t *gl_get_setlocale_null_lock (void); + +# if HAVE_WEAK_SYMBOLS /* musl libc, FreeBSD, NetBSD, OpenBSD, Haiku */ + + /* Avoid the need to link with '-lpthread'. */ +# pragma weak pthread_mutex_lock +# pragma weak pthread_mutex_unlock + + /* Determine whether libpthread is in use. */ +# pragma weak pthread_mutexattr_gettype + /* See the comments in lock.h. */ +# define pthread_in_use() \ + (pthread_mutexattr_gettype != NULL || c11_threads_in_use ()) + +# else +# define pthread_in_use() 1 +# endif + +static int +setlocale_null_with_lock (int category, char *buf, size_t bufsize) +{ + if (pthread_in_use()) + { + pthread_mutex_t *lock = gl_get_setlocale_null_lock (); + int ret; + + if (pthread_mutex_lock (lock)) + abort (); + ret = setlocale_null_unlocked (category, buf, bufsize); + if (pthread_mutex_unlock (lock)) + abort (); + + return ret; + } + else + return setlocale_null_unlocked (category, buf, bufsize); +} + +# elif HAVE_THREADS_H + +extern mtx_t *gl_get_setlocale_null_lock (void); + +static int +setlocale_null_with_lock (int category, char *buf, size_t bufsize) +{ + mtx_t *lock = gl_get_setlocale_null_lock (); + int ret; + + if (mtx_lock (lock) != thrd_success) + abort (); + ret = setlocale_null_unlocked (category, buf, bufsize); + if (mtx_unlock (lock) != thrd_success) + abort (); + + return ret; +} + +# endif + +#endif + +int +setlocale_null_r (int category, char *buf, size_t bufsize) +{ +#if SETLOCALE_NULL_ALL_MTSAFE +# if SETLOCALE_NULL_ONE_MTSAFE + + return setlocale_null_unlocked (category, buf, bufsize); + +# else + + if (category == LC_ALL) + return setlocale_null_unlocked (category, buf, bufsize); + else + return setlocale_null_with_lock (category, buf, bufsize); + +# endif +#else +# if SETLOCALE_NULL_ONE_MTSAFE + + if (category == LC_ALL) + return setlocale_null_with_lock (category, buf, bufsize); + else + return setlocale_null_unlocked (category, buf, bufsize); + +# else + + return setlocale_null_with_lock (category, buf, bufsize); + +# endif +#endif +} + +const char * +setlocale_null (int category) +{ +#if SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE + return setlocale_null_androidfix (category); +#else + + /* This call must be multithread-safe. To achieve this without using + thread-local storage: + 1. We use a specific static buffer for each possible CATEGORY + argument. So that different threads can call setlocale_mtsafe + with different CATEGORY arguments, without interfering. + 2. We use a simple strcpy or memcpy to fill this static buffer. + Filling it through, for example, strcpy + strcat would not be + guaranteed to leave the buffer's contents intact if another thread + is currently accessing it. If necessary, the contents is first + assembled in a stack-allocated buffer. */ + if (category == LC_ALL) + { +# if SETLOCALE_NULL_ALL_MTSAFE + return setlocale_null_androidfix (LC_ALL); +# else + char buf[SETLOCALE_NULL_ALL_MAX]; + static char resultbuf[SETLOCALE_NULL_ALL_MAX]; + + if (setlocale_null_r (LC_ALL, buf, sizeof (buf))) + return "C"; + strcpy (resultbuf, buf); + return resultbuf; +# endif + } + else + { +# if SETLOCALE_NULL_ONE_MTSAFE + return setlocale_null_androidfix (category); +# else + enum + { + LC_CTYPE_INDEX, + LC_NUMERIC_INDEX, + LC_TIME_INDEX, + LC_COLLATE_INDEX, + LC_MONETARY_INDEX, + LC_MESSAGES_INDEX, +# ifdef LC_PAPER + LC_PAPER_INDEX, +# endif +# ifdef LC_NAME + LC_NAME_INDEX, +# endif +# ifdef LC_ADDRESS + LC_ADDRESS_INDEX, +# endif +# ifdef LC_TELEPHONE + LC_TELEPHONE_INDEX, +# endif +# ifdef LC_MEASUREMENT + LC_MEASUREMENT_INDEX, +# endif +# ifdef LC_IDENTIFICATION + LC_IDENTIFICATION_INDEX, +# endif + LC_INDICES_COUNT + } + i; + char buf[SETLOCALE_NULL_MAX]; + static char resultbuf[LC_INDICES_COUNT][SETLOCALE_NULL_MAX]; + int err; + + err = setlocale_null_r (category, buf, sizeof (buf)); + if (err == EINVAL) + return NULL; + if (err) + return "C"; + + switch (category) + { + case LC_CTYPE: i = LC_CTYPE_INDEX; break; + case LC_NUMERIC: i = LC_NUMERIC_INDEX; break; + case LC_TIME: i = LC_TIME_INDEX; break; + case LC_COLLATE: i = LC_COLLATE_INDEX; break; + case LC_MONETARY: i = LC_MONETARY_INDEX; break; + case LC_MESSAGES: i = LC_MESSAGES_INDEX; break; +# ifdef LC_PAPER + case LC_PAPER: i = LC_PAPER_INDEX; break; +# endif +# ifdef LC_NAME + case LC_NAME: i = LC_NAME_INDEX; break; +# endif +# ifdef LC_ADDRESS + case LC_ADDRESS: i = LC_ADDRESS_INDEX; break; +# endif +# ifdef LC_TELEPHONE + case LC_TELEPHONE: i = LC_TELEPHONE_INDEX; break; +# endif +# ifdef LC_MEASUREMENT + case LC_MEASUREMENT: i = LC_MEASUREMENT_INDEX; break; +# endif +# ifdef LC_IDENTIFICATION + case LC_IDENTIFICATION: i = LC_IDENTIFICATION_INDEX; break; +# endif + default: + /* If you get here, a #ifdef LC_xxx is missing. */ + abort (); + } + + strcpy (resultbuf[i], buf); + return resultbuf[i]; +# endif + } +#endif +} diff --git a/lib/setlocale_null.h b/lib/setlocale_null.h new file mode 100644 index 0000000..6844be5 --- /dev/null +++ b/lib/setlocale_null.h @@ -0,0 +1,82 @@ +/* Query the name of the current global locale. + Copyright (C) 2019-2020 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 . */ + +/* Written by Bruno Haible , 2019. */ + +#ifndef _SETLOCALE_NULL_H +#define _SETLOCALE_NULL_H + +#include + +#include "arg-nonnull.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Recommended size of a buffer for a locale name for a single category. + On glibc systems, you can have locale names that are relative file names; + assume a maximum length 256. + In native Windows, in 2018 the longest locale name was of length 58 + ("FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251"). */ +#define SETLOCALE_NULL_MAX (256+1) + +/* Recommended size of a buffer for a locale name with all categories. + On glibc systems, you can have locale names that are relative file names; + assume maximum length 256 for each. There are 12 categories; so, the + maximum total length is 148+12*256. + In native Windows, there are 5 categories, and the maximum total length is + 55+5*58. */ +#define SETLOCALE_NULL_ALL_MAX (148+12*256+1) + +/* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL), + except that + - it is guaranteed to be multithread-safe, + - it returns the resulting locale category name or locale name in the + user-supplied buffer BUF, which must be BUFSIZE bytes long. + The recommended minimum buffer size is + - SETLOCALE_NULL_MAX for CATEGORY != LC_ALL, and + - SETLOCALE_NULL_ALL_MAX for CATEGORY == LC_ALL. + The return value is an error code: 0 if the call is successful, EINVAL if + CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed + size (including the trailing NUL byte). In the latter case, a truncated + result is returned in BUF, but still NUL-terminated if BUFSIZE > 0. + For this call to be multithread-safe, *all* calls to + setlocale (CATEGORY, NULL) in all other threads must have been converted + to use setlocale_null_r or setlocale_null as well, and the other threads + must not make other setlocale invocations (since changing the global locale + has side effects on all threads). */ +extern int setlocale_null_r (int category, char *buf, size_t bufsize) + _GL_ARG_NONNULL ((2)); + +/* setlocale_null (CATEGORY) is like setlocale (CATEGORY, NULL), except that + it is guaranteed to be multithread-safe. + The return value is NULL if CATEGORY is invalid. + For this call to be multithread-safe, *all* calls to + setlocale (CATEGORY, NULL) in all other threads must have been converted + to use setlocale_null_r or setlocale_null as well, and the other threads + must not make other setlocale invocations (since changing the global locale + has side effects on all threads). */ +extern const char *setlocale_null (int category); + + +#ifdef __cplusplus +} +#endif + +#endif /* _SETLOCALE_NULL_H */ diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h index 8158b00..baacf98 100644 --- a/lib/stdbool.in.h +++ b/lib/stdbool.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2019 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 945f192..2e50a1f 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2009-2020 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 @@ -83,20 +83,26 @@ /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is a hack in case the configure-time test was done with g++ even though - we are currently compiling with gcc. */ -#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -# if !GNULIB_defined_max_align_t + we are currently compiling with gcc. + On MSVC, max_align_t is defined only in C++ mode, after was + included. Its definition is good since it has an alignment of 8 (on x86 + and x86_64). */ +#if defined _MSC_VER && defined __cplusplus +# include +#else +# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) +# if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ -# define _GL_STDDEF_ALIGNAS(type) \ - __attribute__ ((__aligned__ (__alignof__ (type)))) -# else -# define _GL_STDDEF_ALIGNAS(type) /* */ -# endif +# ifdef __GNUC__ +# define _GL_STDDEF_ALIGNAS(type) \ + __attribute__ ((__aligned__ (__alignof__ (type)))) +# else +# define _GL_STDDEF_ALIGNAS(type) /* */ +# endif typedef union { char *__p _GL_STDDEF_ALIGNAS (char *); @@ -104,8 +110,9 @@ typedef union long double __ld _GL_STDDEF_ALIGNAS (long double); long int __i _GL_STDDEF_ALIGNAS (long int); } rpl_max_align_t; -# define max_align_t rpl_max_align_t -# define GNULIB_defined_max_align_t 1 +# define max_align_t rpl_max_align_t +# define GNULIB_defined_max_align_t 1 +# endif # endif #endif diff --git a/lib/stdint.in.h b/lib/stdint.in.h index d32de34..994c0c7 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2019 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -188,7 +188,7 @@ typedef long int gl_int64_t; typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T -# elif @HAVE_LONG_LONG_INT@ +# else # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t @@ -209,7 +209,7 @@ typedef unsigned long int gl_uint64_t; typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# else # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t @@ -299,16 +299,26 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* 7.18.1.4. Integer types capable of holding object pointers */ -/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own +/* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. */ -# ifndef _INTPTR_T_DECLARED -# undef intptr_t -# undef uintptr_t + to avoid clashes with declarations of system functions like sbrk. + Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and + _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + uintptr_t to avoid conflicting declarations of system functions like + _findclose in . */ +# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ + || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) +# undef intptr_t +# undef uintptr_t +# ifdef _WIN64 +typedef long long int gl_intptr_t; +typedef unsigned long long int gl_uintptr_t; +# else typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t +# endif +# define intptr_t gl_intptr_t +# define uintptr_t gl_uintptr_t # endif /* 7.18.1.5. Greatest-width integer types */ @@ -323,7 +333,7 @@ typedef unsigned long int gl_uintptr_t; # ifndef INTMAX_MAX # undef INTMAX_C # undef intmax_t -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# if LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t # elif defined GL_INT64_T @@ -337,7 +347,7 @@ typedef long int gl_intmax_t; # ifndef UINTMAX_MAX # undef UINTMAX_C # undef uintmax_t -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# if ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t # elif defined GL_UINT64_T @@ -485,9 +495,15 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef INTPTR_MIN # undef INTPTR_MAX # undef UINTPTR_MAX -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX +# ifdef _WIN64 +# define INTPTR_MIN LLONG_MIN +# define INTPTR_MAX LLONG_MAX +# define UINTPTR_MAX ULLONG_MAX +# else +# define INTPTR_MIN LONG_MIN +# define INTPTR_MAX LONG_MAX +# define UINTPTR_MAX ULONG_MAX +# endif /* 7.18.2.5. Limits of greatest-width integer types */ @@ -586,17 +602,21 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ -# undef WINT_MIN -# undef WINT_MAX -# if @HAVE_SIGNED_WINT_T@ -# define WINT_MIN \ - _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +/* If gnulib's or overrides wint_t, @WINT_T_SUFFIX@ is not + accurate, therefore use the definitions from above. */ +# if !@GNULIB_OVERRIDES_WINT_T@ +# undef WINT_MIN +# undef WINT_MAX +# if @HAVE_SIGNED_WINT_T@ +# define WINT_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# else +# define WINT_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# endif +# define WINT_MAX \ + _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) # endif -# define WINT_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) /* 7.18.4. Macros for integer constants */ @@ -627,21 +647,21 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # define INT64_C(x) x##L # elif defined _MSC_VER # define INT64_C(x) x##i64 -# elif @HAVE_LONG_LONG_INT@ +# else # define INT64_C(x) x##LL # endif # if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL # elif defined _MSC_VER # define UINT64_C(x) x##ui64 -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# else # define UINT64_C(x) x##ULL # endif /* 7.18.4.2. Macros for greatest-width integer constants */ # ifndef INTMAX_C -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# if LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL # elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) @@ -651,7 +671,7 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # endif # ifndef UINTMAX_C -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# if ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL # elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 4a8aa55..ebcbfaf 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2020 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 @@ -203,7 +203,9 @@ _GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fclose); +# endif #elif defined GNULIB_POSIXCHECK # undef fclose /* Assume fclose is always declared. */ @@ -247,7 +249,9 @@ _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); # else _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fflush); +# endif #elif defined GNULIB_POSIXCHECK # undef fflush /* Assume fflush is always declared. */ @@ -266,7 +270,9 @@ _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fgetc); +# endif #endif #if @GNULIB_FGETS@ @@ -281,7 +287,9 @@ _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream)); # else _GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fgets); +# endif #endif #if @GNULIB_FOPEN@ @@ -296,7 +304,9 @@ _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); # else _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); +# endif #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ @@ -324,7 +334,9 @@ _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); # else _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fprintf); +# endif #endif #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_fprintf @@ -375,7 +387,9 @@ _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fputc); +# endif #endif #if @GNULIB_FPUTS@ @@ -390,7 +404,9 @@ _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); # else _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fputs); +# endif #endif #if @GNULIB_FREAD@ @@ -405,7 +421,9 @@ _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); # else _GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fread); +# endif #endif #if @GNULIB_FREOPEN@ @@ -423,7 +441,9 @@ _GL_CXXALIAS_RPL (freopen, FILE *, _GL_CXXALIAS_SYS (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (freopen); +# endif #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ @@ -445,7 +465,9 @@ _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); # else _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fscanf); +# endif #endif @@ -496,7 +518,9 @@ _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); # else _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fseek); +# endif #endif #if @GNULIB_FSEEKO@ @@ -559,7 +583,9 @@ _GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); # else _GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ftell); +# endif #endif #if @GNULIB_FTELLO@ @@ -639,7 +665,9 @@ extern size_t __REDIRECT (rpl_fwrite_unlocked, # define fwrite_unlocked rpl_fwrite_unlocked # endif # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fwrite); +# endif #endif #if @GNULIB_GETC@ @@ -653,7 +681,9 @@ _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (getc, int, (FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getc); +# endif #endif #if @GNULIB_GETCHAR@ @@ -667,7 +697,9 @@ _GL_CXXALIAS_RPL (getchar, int, (void)); # else _GL_CXXALIAS_SYS (getchar, int, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getchar); +# endif #endif #if @GNULIB_GETDELIM@ @@ -832,7 +864,9 @@ _GL_CXXALIAS_RPL (perror, void, (const char *string)); # else _GL_CXXALIAS_SYS (perror, void, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (perror); +# endif #elif defined GNULIB_POSIXCHECK # undef perror /* Assume perror is always declared. */ @@ -903,7 +937,9 @@ _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); # else _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (printf); +# endif #endif #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_printf @@ -926,7 +962,9 @@ _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (putc); +# endif #endif #if @GNULIB_PUTCHAR@ @@ -940,7 +978,9 @@ _GL_CXXALIAS_RPL (putchar, int, (int c)); # else _GL_CXXALIAS_SYS (putchar, int, (int c)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (putchar); +# endif #endif #if @GNULIB_PUTS@ @@ -954,7 +994,9 @@ _GL_CXXALIAS_RPL (puts, int, (const char *string)); # else _GL_CXXALIAS_SYS (puts, int, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (puts); +# endif #endif #if @GNULIB_REMOVE@ @@ -968,7 +1010,9 @@ _GL_CXXALIAS_RPL (remove, int, (const char *name)); # else _GL_CXXALIAS_SYS (remove, int, (const char *name)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (remove); +# endif #elif defined GNULIB_POSIXCHECK # undef remove /* Assume remove is always declared. */ @@ -991,7 +1035,9 @@ _GL_CXXALIAS_RPL (rename, int, _GL_CXXALIAS_SYS (rename, int, (const char *old_filename, const char *new_filename)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (rename); +# endif #elif defined GNULIB_POSIXCHECK # undef rename /* Assume rename is always declared. */ @@ -1056,7 +1102,9 @@ _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); # else _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (scanf); +# endif #endif #if @GNULIB_SNPRINTF@ @@ -1110,7 +1158,9 @@ _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); # else _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef sprintf /* Assume sprintf is always declared. */ @@ -1129,7 +1179,9 @@ _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); +# endif #elif defined GNULIB_POSIXCHECK # undef tmpfile # if HAVE_RAW_DECL_TMPFILE @@ -1207,7 +1259,9 @@ _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) _GL_CXXALIAS_SYS_CAST (vdprintf, int, (int fd, const char *format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vdprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vdprintf # if HAVE_RAW_DECL_VDPRINTF @@ -1240,7 +1294,9 @@ _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); _GL_CXXALIAS_SYS_CAST (vfprintf, int, (FILE *fp, const char *format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfprintf); +# endif #endif #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vfprintf @@ -1294,7 +1350,9 @@ _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vprintf); +# endif #endif #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vprintf @@ -1370,7 +1428,9 @@ _GL_CXXALIAS_RPL (vsprintf, int, _GL_CXXALIAS_SYS_CAST (vsprintf, int, (char *str, const char *format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsprintf /* Assume vsprintf is always declared. */ diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index e5583d9..49bbf6f 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2019 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2020 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 @@ -176,7 +176,9 @@ _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (calloc); +# endif #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ @@ -199,6 +201,10 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif +# ifndef GNULIB_defined_canonicalize_file_name +# define GNULIB_defined_canonicalize_file_name \ + (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@) +# endif _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name @@ -288,7 +294,9 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (malloc); +# endif #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef malloc /* Assume malloc is always declared. */ @@ -311,7 +319,9 @@ _GL_FUNCDECL_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbtowc); +# endif #elif defined GNULIB_POSIXCHECK # undef mbtowc # if HAVE_RAW_DECL_MBTOWC @@ -510,6 +520,9 @@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif +# ifndef GNULIB_defined_ptsname_r +# define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@) +# endif _GL_CXXALIASWARN (ptsname_r); #elif defined GNULIB_POSIXCHECK # undef ptsname_r @@ -593,7 +606,9 @@ _GL_CXXALIAS_RPL (random, long, (void)); # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (random, long, (void)); # endif -_GL_CXXALIAS_SYS (random, long, (void)); +/* Need to cast, because on Haiku, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (random, long, (void)); # endif _GL_CXXALIASWARN (random); #elif defined GNULIB_POSIXCHECK @@ -616,7 +631,9 @@ _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); # endif -_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); # endif _GL_CXXALIASWARN (srandom); #elif defined GNULIB_POSIXCHECK @@ -644,8 +661,10 @@ _GL_FUNCDECL_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size) _GL_ARG_NONNULL ((2))); # endif -_GL_CXXALIAS_SYS (initstate, char *, - (unsigned int seed, char *buf, size_t buf_size)); +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); # endif _GL_CXXALIASWARN (initstate); #elif defined GNULIB_POSIXCHECK @@ -668,7 +687,9 @@ _GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); # if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); # endif -_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); +/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter + is const char *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); # endif _GL_CXXALIASWARN (setstate); #elif defined GNULIB_POSIXCHECK @@ -754,9 +775,11 @@ _GL_FUNCDECL_SYS (initstate_r, int, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif -_GL_CXXALIAS_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); +/* Need to cast, because on Haiku, the third parameter is + unsigned long buf_size. */ +_GL_CXXALIAS_SYS_CAST (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); # endif _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK @@ -784,8 +807,10 @@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif -_GL_CXXALIAS_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); +/* Need to cast, because on Haiku, the first parameter is + void *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK @@ -809,7 +834,9 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (realloc); +# endif #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef realloc /* Assume realloc is always declared. */ @@ -940,7 +967,9 @@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) # endif _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (strtod); +# endif #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD @@ -1079,7 +1108,9 @@ _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); # else _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctomb); +# endif #endif diff --git a/lib/streq.h b/lib/streq.h index 326537b..d06c272 100644 --- a/lib/streq.h +++ b/lib/streq.h @@ -1,5 +1,5 @@ /* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/striconv.c b/lib/striconv.c index 26b8c0e..d6a1159 100644 --- a/lib/striconv.c +++ b/lib/striconv.c @@ -1,5 +1,5 @@ /* Charset conversion. - Copyright (C) 2001-2007, 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2007, 2010-2020 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/lib/striconv.h b/lib/striconv.h index 1098f63..8beef35 100644 --- a/lib/striconv.h +++ b/lib/striconv.h @@ -1,5 +1,5 @@ /* Charset conversion. - Copyright (C) 2001-2004, 2006-2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2007, 2009-2020 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/lib/string.in.h b/lib/string.in.h index c57f041..2c04e5f 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2019 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2020 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 @@ -149,7 +149,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); _GL_CXXALIASWARN1 (memchr, void const *, (void const *__s, int __c, size_t __n)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memchr); # endif #elif defined GNULIB_POSIXCHECK @@ -417,7 +417,9 @@ _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); # else _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (strncat); +# endif #elif defined GNULIB_POSIXCHECK # undef strncat # if HAVE_RAW_DECL_STRNCAT @@ -512,7 +514,7 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); _GL_CXXALIASWARN1 (strpbrk, char const *, (char const *__s, char const *__accept)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strpbrk); # endif # if defined GNULIB_POSIXCHECK @@ -614,7 +616,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strstr, const char *, (const char *haystack, const char *needle)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strstr); # endif #elif defined GNULIB_POSIXCHECK @@ -980,7 +982,9 @@ _GL_CXXALIAS_RPL (strerror, char *, (int)); # else _GL_CXXALIAS_SYS (strerror, char *, (int)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (strerror); +# endif #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ diff --git a/lib/strnlen1.c b/lib/strnlen1.c index 666a557..88edc18 100644 --- a/lib/strnlen1.c +++ b/lib/strnlen1.c @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/strnlen1.h b/lib/strnlen1.h index 5d95244..2e21fea 100644 --- a/lib/strnlen1.h +++ b/lib/strnlen1.h @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 9ddd1a8..c1e3243 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index 5397688..d30b267 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-2020 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 @@ -112,8 +112,12 @@ _GL_CXXALIASWARN (gettimeofday); # if defined __cplusplus && defined GNULIB_NAMESPACE namespace GNULIB_NAMESPACE { typedef ::timeval -#undef timeval +# undef timeval timeval; +# if @REPLACE_STRUCT_TIMEVAL@ +# define timeval rpl_timeval + typedef ::timeval timeval; +# endif } # endif #elif defined GNULIB_POSIXCHECK diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h index 237e206..e7e1a22 100644 --- a/lib/sys_types.in.h +++ b/lib/sys_types.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/time.in.h b/lib/time.in.h index 40e5b20..3f942b7 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-2020 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 @@ -37,6 +37,12 @@ # define _@GUARD_PREFIX@_TIME_H +/* mingw's provides the functions asctime_r, ctime_r, gmtime_r, + localtime_r only if or has been included before. */ +# if defined __MINGW32__ +# include +# endif + # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ @@ -149,7 +155,9 @@ _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); # else _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mktime); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See @@ -217,7 +225,9 @@ _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); # else _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (localtime); +# endif # endif # if 0 || @REPLACE_GMTIME@ @@ -264,7 +274,9 @@ _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); # else _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ctime); +# endif # endif /* Convert *TP to a date and time string. See @@ -283,7 +295,9 @@ _GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize, _GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize, const char *__fmt, const struct tm *__tp)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (strftime); +# endif # endif # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ diff --git a/lib/unistd.in.h b/lib/unistd.in.h index cc57ce6..d6176ad 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2003-2019 Free Software Foundation, Inc. + Copyright (C) 2003-2020 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 @@ -21,7 +21,7 @@ #endif @PRAGMA_COLUMNS@ -#ifdef _GL_INCLUDING_UNISTD_H +#if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H /* Special invocation convention: - On Mac OS X 10.3.9 we have a sequence of nested includes -> -> -> @@ -141,7 +141,7 @@ /* Get getopt(), optarg, optind, opterr, optopt. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT +#if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT # include # include #endif @@ -749,7 +749,9 @@ _GL_CXXALIAS_RPL (getdtablesize, int, (void)); # if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); # endif -_GL_CXXALIAS_SYS (getdtablesize, int, (void)); +/* Need to cast, because on AIX, the parameter list is + (...). */ +_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); # endif _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK @@ -903,6 +905,11 @@ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " _GL_FUNCDECL_RPL (getpagesize, int, (void)); _GL_CXXALIAS_RPL (getpagesize, int, (void)); # else +/* On HP-UX, getpagesize exists, but it is not declared in even if + the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ +# if defined __hpux +_GL_FUNCDECL_SYS (getpagesize, int, (void)); +# endif # if !@HAVE_GETPAGESIZE@ # if !defined getpagesize /* This is for POSIX systems. */ @@ -1670,7 +1677,9 @@ _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); # if !@HAVE_USLEEP@ _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); # endif -_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); +/* Need to cast, because on Haiku, the first parameter is + unsigned int n. */ +_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); # endif _GL_CXXALIASWARN (usleep); #elif defined GNULIB_POSIXCHECK diff --git a/lib/unistr.in.h b/lib/unistr.in.h index 68f60f1..f5152ca 100644 --- a/lib/unistr.in.h +++ b/lib/unistr.in.h @@ -1,5 +1,5 @@ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/unistr/u8-mbtoucr.c b/lib/unistr/u8-mbtoucr.c index a1ff0b4..afc43b6 100644 --- a/lib/unistr/u8-mbtoucr.c +++ b/lib/unistr/u8-mbtoucr.c @@ -1,5 +1,5 @@ /* Look at first character in UTF-8 string, returning an error code. - Copyright (C) 1999-2002, 2006-2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2006-2007, 2009-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software: you can redistribute it and/or modify it diff --git a/lib/unistr/u8-uctomb-aux.c b/lib/unistr/u8-uctomb-aux.c index fa63fd6..19b857b 100644 --- a/lib/unistr/u8-uctomb-aux.c +++ b/lib/unistr/u8-uctomb-aux.c @@ -1,5 +1,5 @@ /* Conversion UCS-4 to UTF-8. - Copyright (C) 2002, 2006-2007, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2002, 2006-2007, 2009-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it diff --git a/lib/unistr/u8-uctomb.c b/lib/unistr/u8-uctomb.c index 1ebcb49..bb646a2 100644 --- a/lib/unistr/u8-uctomb.c +++ b/lib/unistr/u8-uctomb.c @@ -1,5 +1,5 @@ /* Store a character in UTF-8 string. - Copyright (C) 2002, 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it diff --git a/lib/unitypes.in.h b/lib/unitypes.in.h index 631654b..f87acd2 100644 --- a/lib/unitypes.in.h +++ b/lib/unitypes.in.h @@ -1,5 +1,5 @@ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/unused-parameter.h b/lib/unused-parameter.h index 5e57de1..f5cf21e 100644 --- a/lib/unused-parameter.h +++ b/lib/unused-parameter.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/verify.h b/lib/verify.h index a58005c..d9ab89a 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h index 7d11a15..1be2cbb 100644 --- a/lib/warn-on-use.h +++ b/lib/warn-on-use.h @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2010-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/wchar.in.h b/lib/wchar.in.h index f0a0de5..63a02a4 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,7 +33,8 @@ #if (((defined __need_mbstate_t || defined __need_wint_t) \ && !defined __MINGW32__) \ || (defined __hpux \ - && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \ + && ((defined _INTTYPES_INCLUDED \ + && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ || defined _GL_ALREADY_INCLUDING_WCHAR_H) @@ -137,12 +138,16 @@ typedef unsigned int rpl_wint_t; /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for - implementing mbrtowc for encodings like UTF-8. */ -#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ + implementing mbrtowc for encodings like UTF-8. + On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is + large enough and overriding it would cause problems in C++ mode. */ +#if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ # if !GNULIB_defined_mbstate_t +# if !(defined _AIX || defined _MSC_VER) typedef int rpl_mbstate_t; -# undef mbstate_t -# define mbstate_t rpl_mbstate_t +# undef mbstate_t +# define mbstate_t rpl_mbstate_t +# endif # define GNULIB_defined_mbstate_t 1 # endif #endif @@ -161,9 +166,12 @@ _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # if !@HAVE_BTOWC@ _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); # endif -_GL_CXXALIAS_SYS (btowc, wint_t, (int c)); +/* Need to cast, because on mingw, the return type is 'unsigned short'. */ +_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (btowc); +# endif #elif defined GNULIB_POSIXCHECK # undef btowc # if HAVE_RAW_DECL_BTOWC @@ -189,7 +197,9 @@ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctob); +# endif #elif defined GNULIB_POSIXCHECK # undef wctob # if HAVE_RAW_DECL_WCTOB @@ -214,7 +224,9 @@ _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsinit); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsinit # if HAVE_RAW_DECL_MBSINIT @@ -243,7 +255,9 @@ _GL_FUNCDECL_SYS (mbrtowc, size_t, _GL_CXXALIAS_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbrtowc); +# endif #elif defined GNULIB_POSIXCHECK # undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC @@ -268,7 +282,9 @@ _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbrlen); +# endif #elif defined GNULIB_POSIXCHECK # undef mbrlen # if HAVE_RAW_DECL_MBRLEN @@ -301,7 +317,9 @@ _GL_CXXALIAS_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsrtowcs); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS @@ -361,7 +379,9 @@ _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcrtomb); +# endif #elif defined GNULIB_POSIXCHECK # undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB @@ -394,7 +414,9 @@ _GL_CXXALIAS_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsrtombs); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS @@ -419,7 +441,7 @@ _GL_CXXALIAS_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else -# if !@HAVE_WCSNRTOMBS@ +# if !@HAVE_WCSNRTOMBS@ || (defined __cplusplus && defined __sun) _GL_FUNCDECL_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) @@ -429,7 +451,9 @@ _GL_CXXALIAS_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsnrtombs); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS @@ -455,7 +479,9 @@ _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcwidth); +# endif #elif defined GNULIB_POSIXCHECK # undef wcwidth # if HAVE_RAW_DECL_WCWIDTH @@ -484,7 +510,7 @@ _GL_CXXALIAS_SYS_CAST2 (wmemchr, _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN1 (wmemchr, const wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemchr); # endif #elif defined GNULIB_POSIXCHECK @@ -505,7 +531,9 @@ _GL_FUNCDECL_SYS (wmemcmp, int, # endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemcmp); +# endif #elif defined GNULIB_POSIXCHECK # undef wmemcmp # if HAVE_RAW_DECL_WMEMCMP @@ -523,7 +551,9 @@ _GL_FUNCDECL_SYS (wmemcpy, wchar_t *, # endif _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef wmemcpy # if HAVE_RAW_DECL_WMEMCPY @@ -542,7 +572,9 @@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *, # endif _GL_CXXALIAS_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemmove); +# endif #elif defined GNULIB_POSIXCHECK # undef wmemmove # if HAVE_RAW_DECL_WMEMMOVE @@ -558,7 +590,9 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); # endif _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemset); +# endif #elif defined GNULIB_POSIXCHECK # undef wmemset # if HAVE_RAW_DECL_WMEMSET @@ -574,7 +608,9 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcslen); +# endif #elif defined GNULIB_POSIXCHECK # undef wcslen # if HAVE_RAW_DECL_WCSLEN @@ -607,7 +643,9 @@ _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscpy); +# endif #elif defined GNULIB_POSIXCHECK # undef wcscpy # if HAVE_RAW_DECL_WCSCPY @@ -641,7 +679,9 @@ _GL_FUNCDECL_SYS (wcsncpy, wchar_t *, # endif _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncpy); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsncpy # if HAVE_RAW_DECL_WCSNCPY @@ -676,7 +716,9 @@ _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscat); +# endif #elif defined GNULIB_POSIXCHECK # undef wcscat # if HAVE_RAW_DECL_WCSCAT @@ -694,7 +736,9 @@ _GL_FUNCDECL_SYS (wcsncat, wchar_t *, # endif _GL_CXXALIAS_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncat); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsncat # if HAVE_RAW_DECL_WCSNCAT @@ -711,7 +755,9 @@ _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscmp); +# endif #elif defined GNULIB_POSIXCHECK # undef wcscmp # if HAVE_RAW_DECL_WCSCMP @@ -730,7 +776,9 @@ _GL_FUNCDECL_SYS (wcsncmp, int, # endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncmp); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsncmp # if HAVE_RAW_DECL_WCSNCMP @@ -783,7 +831,9 @@ _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscoll); +# endif #elif defined GNULIB_POSIXCHECK # undef wcscoll # if HAVE_RAW_DECL_WCSCOLL @@ -801,7 +851,9 @@ _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsxfrm); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsxfrm # if HAVE_RAW_DECL_WCSXFRM @@ -845,7 +897,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcschr, && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (wcschr); # endif #elif defined GNULIB_POSIXCHECK @@ -875,7 +927,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsrchr, && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsrchr); # endif #elif defined GNULIB_POSIXCHECK @@ -895,7 +947,9 @@ _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscspn); +# endif #elif defined GNULIB_POSIXCHECK # undef wcscspn # if HAVE_RAW_DECL_WCSCSPN @@ -913,7 +967,9 @@ _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsspn); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsspn # if HAVE_RAW_DECL_WCSSPN @@ -944,7 +1000,7 @@ _GL_CXXALIASWARN1 (wcspbrk, wchar_t *, (wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (wcspbrk); # endif #elif defined GNULIB_POSIXCHECK @@ -977,7 +1033,7 @@ _GL_CXXALIASWARN1 (wcsstr, wchar_t *, (wchar_t *haystack, const wchar_t *needle)); _GL_CXXALIASWARN1 (wcsstr, const wchar_t *, (const wchar_t *haystack, const wchar_t *needle)); -# else +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsstr); # endif #elif defined GNULIB_POSIXCHECK @@ -991,13 +1047,26 @@ _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " /* Divide WCS into tokens separated by characters in DELIM. */ #if @GNULIB_WCSTOK@ -# if !@HAVE_WCSTOK@ +# if @REPLACE_WCSTOK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcstok +# define wcstok rpl_wcstok +# endif +_GL_FUNCDECL_RPL (wcstok, wchar_t *, + (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); +_GL_CXXALIAS_RPL (wcstok, wchar_t *, + (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); +# else +# if !@HAVE_WCSTOK@ _GL_FUNCDECL_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); -# endif +# endif _GL_CXXALIAS_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcstok); +# endif #elif defined GNULIB_POSIXCHECK # undef wcstok # if HAVE_RAW_DECL_WCSTOK @@ -1025,7 +1094,9 @@ _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) # endif _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcswidth); +# endif #elif defined GNULIB_POSIXCHECK # undef wcswidth # if HAVE_RAW_DECL_WCSWIDTH @@ -1057,7 +1128,9 @@ _GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, _GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, const wchar_t *__fmt, const struct tm *__tp)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsftime); +# endif #elif defined GNULIB_POSIXCHECK # undef wcsftime # if HAVE_RAW_DECL_WCSFTIME diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c index 8e56732..06105f1 100644 --- a/lib/wcrtomb.c +++ b/lib/wcrtomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -26,6 +26,7 @@ size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) +#undef wcrtomb { /* This implementation of wcrtomb supports only stateless encodings. ps must be in the initial state. */ @@ -35,12 +36,17 @@ wcrtomb (char *s, wchar_t wc, mbstate_t *ps) return (size_t)(-1); } +#if !HAVE_WCRTOMB /* IRIX 6.5 */ \ + || WCRTOMB_RETVAL_BUG /* Solaris 11.3, MSVC */ \ + || WCRTOMB_C_LOCALE_BUG /* Android */ if (s == NULL) /* We know the NUL wide character corresponds to the NUL character. */ return 1; else +#endif { -#if defined __ANDROID__ +#if HAVE_WCRTOMB +# if WCRTOMB_C_LOCALE_BUG /* Android */ /* Implement consistently with mbrtowc(): through a 1:1 correspondence, as in ISO-8859-1. */ if (wc >= 0 && wc <= 0xff) @@ -48,17 +54,27 @@ wcrtomb (char *s, wchar_t wc, mbstate_t *ps) *s = (unsigned char) wc; return 1; } -#else - /* Implement on top of wctomb(). */ - int ret = wctomb (s, wc); - - if (ret >= 0) - return ret; -#endif else { errno = EILSEQ; return (size_t)(-1); } +# else + return wcrtomb (s, wc, ps); +# endif +#else /* IRIX 6.5 */ + /* Fallback for platforms that don't have wcrtomb(). + Implement on top of wctomb(). + This code is not multithread-safe. */ + int ret = wctomb (s, wc); + + if (ret >= 0) + return ret; + else + { + errno = EILSEQ; + return (size_t)(-1); + } +#endif } } diff --git a/lib/wcsdup-impl.h b/lib/wcsdup-impl.h index 820eb5a..c4e25e7 100644 --- a/lib/wcsdup-impl.h +++ b/lib/wcsdup-impl.h @@ -1,5 +1,5 @@ /* Duplicate a wide string. - Copyright (C) 1999, 2011-2019 Free Software Foundation, Inc. + Copyright (C) 1999, 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 1999. This program is free software: you can redistribute it and/or modify diff --git a/lib/wcsdup.c b/lib/wcsdup.c index 4986324..eefeb97 100644 --- a/lib/wcsdup.c +++ b/lib/wcsdup.c @@ -1,5 +1,5 @@ /* Duplicate a wide string. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/lib/wctob.c b/lib/wctob.c index b4f7d92..7d08863 100644 --- a/lib/wctob.c +++ b/lib/wctob.c @@ -1,5 +1,5 @@ /* Convert wide character to unibyte character. - Copyright (C) 2008, 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/lib/wctomb-impl.h b/lib/wctomb-impl.h index 810063b..cca56bb 100644 --- a/lib/wctomb-impl.h +++ b/lib/wctomb-impl.h @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/lib/wctomb.c b/lib/wctomb.c index c35dc7b..55ec077 100644 --- a/lib/wctomb.c +++ b/lib/wctomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/lib/wctype.in.h b/lib/wctype.in.h index fd973f3..df72be4 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2019 Free Software Foundation, Inc. + Copyright (C) 2006-2020 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 @@ -133,33 +133,113 @@ typedef unsigned int rpl_wint_t; /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. + mingw and MSVC have and the functions but they take a wchar_t + as argument, not an rpl_wint_t. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ -/* IRIX 5.3 has macros but no functions, its isw* macros refer to an - undefined variable _ctmp_ and to macros like _P, and they - refer to system functions like _iswctype that are not in the - standard C library. Rather than try to get ancient buggy - implementations like this to work, just disable them. */ -# undef iswalnum -# undef iswalpha -# undef iswblank -# undef iswcntrl -# undef iswdigit -# undef iswgraph -# undef iswlower -# undef iswprint -# undef iswpunct -# undef iswspace -# undef iswupper -# undef iswxdigit -# undef towlower -# undef towupper +# if @GNULIB_OVERRIDES_WINT_T@ /* implies @REPLACE_ISWCNTRL@ */ + +_GL_WCTYPE_INLINE int +rpl_iswalnum (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswalnum ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswalpha (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswalpha ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswblank (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswblank ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswcntrl (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswcntrl ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswdigit (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswdigit ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswgraph (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswgraph ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswlower (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswlower ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswprint (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswpunct (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswpunct ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswspace (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswspace ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswupper (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswupper ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswxdigit (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswxdigit ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE wint_t +rpl_towlower (wint_t wc) +{ + return ((wchar_t) wc == wc ? (wchar_t) towlower ((wchar_t) wc) : wc); +} + +_GL_WCTYPE_INLINE wint_t +rpl_towupper (wint_t wc) +{ + return ((wchar_t) wc == wc ? (wchar_t) towupper ((wchar_t) wc) : wc); +} -/* Linux libc5 has and the functions but they are broken. */ -# if @REPLACE_ISWCNTRL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit +# undef towlower +# undef towupper # define iswalnum rpl_iswalnum # define iswalpha rpl_iswalpha # define iswblank rpl_iswblank @@ -172,21 +252,62 @@ typedef unsigned int rpl_wint_t; # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit -# endif -# endif -# if @REPLACE_TOWLOWER@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # define towupper rpl_towupper # endif -# endif + +# else + +/* IRIX 5.3 has macros but no functions, its isw* macros refer to an + undefined variable _ctmp_ and to macros like _P, and they + refer to system functions like _iswctype that are not in the + standard C library. Rather than try to get ancient buggy + implementations like this to work, just disable them. */ +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit +# undef towlower +# undef towupper + +/* Linux libc5 has and the functions but they are broken. */ +# if @REPLACE_ISWCNTRL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define iswalnum rpl_iswalnum +# define iswalpha rpl_iswalpha +# define iswblank rpl_iswblank +# define iswcntrl rpl_iswcntrl +# define iswdigit rpl_iswdigit +# define iswgraph rpl_iswgraph +# define iswlower rpl_iswlower +# define iswprint rpl_iswprint +# define iswpunct rpl_iswpunct +# define iswspace rpl_iswspace +# define iswupper rpl_iswupper +# define iswxdigit rpl_iswxdigit +# endif +# endif +# if @REPLACE_TOWLOWER@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towlower rpl_towlower +# define towupper rpl_towupper +# endif +# endif _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswalnum -# else +# else iswalnum -# endif +# endif (wint_t wc) { return ((wc >= '0' && wc <= '9') @@ -194,88 +315,88 @@ iswalnum } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswalpha -# else +# else iswalpha -# endif +# endif (wint_t wc) { return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswblank -# else +# else iswblank -# endif +# endif (wint_t wc) { return wc == ' ' || wc == '\t'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswcntrl -# else +# else iswcntrl -# endif +# endif (wint_t wc) { return (wc & ~0x1f) == 0 || wc == 0x7f; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswdigit -# else +# else iswdigit -# endif +# endif (wint_t wc) { return wc >= '0' && wc <= '9'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswgraph -# else +# else iswgraph -# endif +# endif (wint_t wc) { return wc >= '!' && wc <= '~'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswlower -# else +# else iswlower -# endif +# endif (wint_t wc) { return wc >= 'a' && wc <= 'z'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswprint -# else +# else iswprint -# endif +# endif (wint_t wc) { return wc >= ' ' && wc <= '~'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswpunct -# else +# else iswpunct -# endif +# endif (wint_t wc) { return (wc >= '!' && wc <= '~' @@ -284,11 +405,11 @@ iswpunct } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswspace -# else +# else iswspace -# endif +# endif (wint_t wc) { return (wc == ' ' || wc == '\t' @@ -296,22 +417,22 @@ iswspace } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswupper -# else +# else iswupper -# endif +# endif (wint_t wc) { return wc >= 'A' && wc <= 'Z'; } _GL_WCTYPE_INLINE int -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_ISWCNTRL@ rpl_iswxdigit -# else +# else iswxdigit -# endif +# endif (wint_t wc) { return ((wc >= '0' && wc <= '9') @@ -319,27 +440,29 @@ iswxdigit } _GL_WCTYPE_INLINE wint_t -# if @REPLACE_TOWLOWER@ +# if @REPLACE_TOWLOWER@ rpl_towlower -# else +# else towlower -# endif +# endif (wint_t wc) { return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); } _GL_WCTYPE_INLINE wint_t -# if @REPLACE_TOWLOWER@ +# if @REPLACE_TOWLOWER@ rpl_towupper -# else +# else towupper -# endif +# endif (wint_t wc) { return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); } +# endif + # elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) /* Only the iswblank function is missing. */ @@ -354,7 +477,7 @@ _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); # endif -# if defined __MINGW32__ +# if defined __MINGW32__ && !@GNULIB_OVERRIDES_WINT_T@ /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. The functions towlower and towupper are implemented in the MSVCRT library @@ -387,7 +510,7 @@ rpl_towupper (wint_t wc) # define towupper rpl_towupper # endif -# endif /* __MINGW32__ */ +# endif /* __MINGW32__ && !@GNULIB_OVERRIDES_WINT_T@ */ # define GNULIB_defined_wctype_functions 1 #endif @@ -417,6 +540,7 @@ _GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); #endif +#if __GLIBC__ >= 2 _GL_CXXALIASWARN (iswalnum); _GL_CXXALIASWARN (iswalpha); _GL_CXXALIASWARN (iswcntrl); @@ -428,6 +552,7 @@ _GL_CXXALIASWARN (iswpunct); _GL_CXXALIASWARN (iswspace); _GL_CXXALIASWARN (iswupper); _GL_CXXALIASWARN (iswxdigit); +#endif #if @GNULIB_ISWBLANK@ # if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ @@ -435,7 +560,9 @@ _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); # else _GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (iswblank); +# endif #endif #if !@HAVE_WCTYPE_T@ @@ -451,7 +578,9 @@ typedef void * wctype_t; _GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctype); +# endif #elif defined GNULIB_POSIXCHECK # undef wctype # if HAVE_RAW_DECL_WCTYPE @@ -464,11 +593,22 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if @GNULIB_ISWCTYPE@ -# if !@HAVE_WCTYPE_T@ +# if @GNULIB_OVERRIDES_WINT_T@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswctype +# define iswctype rpl_iswctype +# endif +_GL_FUNCDECL_RPL (iswctype, int, (wint_t wc, wctype_t desc)); +_GL_CXXALIAS_RPL (iswctype, int, (wint_t wc, wctype_t desc)); +# else +# if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); -# endif +# endif _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (iswctype); +# endif #elif defined GNULIB_POSIXCHECK # undef iswctype # if HAVE_RAW_DECL_ISWCTYPE @@ -484,8 +624,10 @@ _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); _GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); #endif +#if __GLIBC__ >= 2 _GL_CXXALIASWARN (towlower); _GL_CXXALIASWARN (towupper); +#endif #if !@HAVE_WCTRANS_T@ # if !GNULIB_defined_wctrans_t @@ -500,7 +642,9 @@ typedef void * wctrans_t; _GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctrans); +# endif #elif defined GNULIB_POSIXCHECK # undef wctrans # if HAVE_RAW_DECL_WCTRANS @@ -517,7 +661,9 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); # endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (towctrans); +# endif #elif defined GNULIB_POSIXCHECK # undef towctrans # if HAVE_RAW_DECL_TOWCTRANS diff --git a/lib/windows-initguard.h b/lib/windows-initguard.h index 8aefd0b..c4be45a 100644 --- a/lib/windows-initguard.h +++ b/lib/windows-initguard.h @@ -1,5 +1,5 @@ /* Init guards, somewhat like spinlocks (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/windows-mutex.c b/lib/windows-mutex.c deleted file mode 100644 index 9433881..0000000 --- a/lib/windows-mutex.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Plain mutexes (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#include - -/* Specification. */ -#include "windows-mutex.h" - -#include - -void -glwthread_mutex_init (glwthread_mutex_t *mutex) -{ - InitializeCriticalSection (&mutex->lock); - mutex->guard.done = 1; -} - -int -glwthread_mutex_lock (glwthread_mutex_t *mutex) -{ - if (!mutex->guard.done) - { - if (InterlockedIncrement (&mutex->guard.started) == 0) - /* This thread is the first one to need this mutex. Initialize it. */ - glwthread_mutex_init (mutex); - else - { - /* Don't let mutex->guard.started grow and wrap around. */ - InterlockedDecrement (&mutex->guard.started); - /* Yield the CPU while waiting for another thread to finish - initializing this mutex. */ - while (!mutex->guard.done) - Sleep (0); - } - } - EnterCriticalSection (&mutex->lock); - return 0; -} - -int -glwthread_mutex_trylock (glwthread_mutex_t *mutex) -{ - if (!mutex->guard.done) - { - if (InterlockedIncrement (&mutex->guard.started) == 0) - /* This thread is the first one to need this mutex. Initialize it. */ - glwthread_mutex_init (mutex); - else - { - /* Don't let mutex->guard.started grow and wrap around. */ - InterlockedDecrement (&mutex->guard.started); - /* Let another thread finish initializing this mutex, and let it also - lock this mutex. */ - return EBUSY; - } - } - if (!TryEnterCriticalSection (&mutex->lock)) - return EBUSY; - return 0; -} - -int -glwthread_mutex_unlock (glwthread_mutex_t *mutex) -{ - if (!mutex->guard.done) - return EINVAL; - LeaveCriticalSection (&mutex->lock); - return 0; -} - -int -glwthread_mutex_destroy (glwthread_mutex_t *mutex) -{ - if (!mutex->guard.done) - return EINVAL; - DeleteCriticalSection (&mutex->lock); - mutex->guard.done = 0; - return 0; -} diff --git a/lib/windows-mutex.h b/lib/windows-mutex.h deleted file mode 100644 index 5364f92..0000000 --- a/lib/windows-mutex.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Plain mutexes (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#ifndef _WINDOWS_MUTEX_H -#define _WINDOWS_MUTEX_H - -#define WIN32_LEAN_AND_MEAN /* avoid including junk */ -#include - -#include "windows-initguard.h" - -typedef struct - { - glwthread_initguard_t guard; /* protects the initialization */ - CRITICAL_SECTION lock; - } - glwthread_mutex_t; - -#define GLWTHREAD_MUTEX_INIT { GLWTHREAD_INITGUARD_INIT } - -#ifdef __cplusplus -extern "C" { -#endif - -extern void glwthread_mutex_init (glwthread_mutex_t *mutex); -extern int glwthread_mutex_lock (glwthread_mutex_t *mutex); -extern int glwthread_mutex_trylock (glwthread_mutex_t *mutex); -extern int glwthread_mutex_unlock (glwthread_mutex_t *mutex); -extern int glwthread_mutex_destroy (glwthread_mutex_t *mutex); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS_MUTEX_H */ diff --git a/lib/windows-once.c b/lib/windows-once.c deleted file mode 100644 index 455c50e..0000000 --- a/lib/windows-once.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Once-only control (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#include - -/* Specification. */ -#include "windows-once.h" - -#include - -void -glwthread_once (glwthread_once_t *once_control, void (*initfunction) (void)) -{ - if (once_control->inited <= 0) - { - if (InterlockedIncrement (&once_control->started) == 0) - { - /* This thread is the first one to come to this once_control. */ - InitializeCriticalSection (&once_control->lock); - EnterCriticalSection (&once_control->lock); - once_control->inited = 0; - initfunction (); - once_control->inited = 1; - LeaveCriticalSection (&once_control->lock); - } - else - { - /* Don't let once_control->started grow and wrap around. */ - InterlockedDecrement (&once_control->started); - /* Some other thread has already started the initialization. - Yield the CPU while waiting for the other thread to finish - initializing and taking the lock. */ - while (once_control->inited < 0) - Sleep (0); - if (once_control->inited <= 0) - { - /* Take the lock. This blocks until the other thread has - finished calling the initfunction. */ - EnterCriticalSection (&once_control->lock); - LeaveCriticalSection (&once_control->lock); - if (!(once_control->inited > 0)) - abort (); - } - } - } -} diff --git a/lib/windows-once.h b/lib/windows-once.h deleted file mode 100644 index 1599983..0000000 --- a/lib/windows-once.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Once-only control (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#ifndef _WINDOWS_ONCE_H -#define _WINDOWS_ONCE_H - -#define WIN32_LEAN_AND_MEAN /* avoid including junk */ -#include - -typedef struct - { - volatile int inited; - volatile LONG started; - CRITICAL_SECTION lock; - } - glwthread_once_t; - -#define GLWTHREAD_ONCE_INIT { -1, -1 } - -#ifdef __cplusplus -extern "C" { -#endif - -extern void glwthread_once (glwthread_once_t *once_control, - void (*initfunction) (void)); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS_ONCE_H */ diff --git a/lib/windows-recmutex.c b/lib/windows-recmutex.c deleted file mode 100644 index 7e6e446..0000000 --- a/lib/windows-recmutex.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Plain recursive mutexes (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#include - -/* Specification. */ -#include "windows-recmutex.h" - -#include - -void -glwthread_recmutex_init (glwthread_recmutex_t *mutex) -{ - mutex->owner = 0; - mutex->depth = 0; - InitializeCriticalSection (&mutex->lock); - mutex->guard.done = 1; -} - -int -glwthread_recmutex_lock (glwthread_recmutex_t *mutex) -{ - if (!mutex->guard.done) - { - if (InterlockedIncrement (&mutex->guard.started) == 0) - /* This thread is the first one to need this mutex. Initialize it. */ - glwthread_recmutex_init (mutex); - else - { - /* Don't let mutex->guard.started grow and wrap around. */ - InterlockedDecrement (&mutex->guard.started); - /* Yield the CPU while waiting for another thread to finish - initializing this mutex. */ - while (!mutex->guard.done) - Sleep (0); - } - } - { - DWORD self = GetCurrentThreadId (); - if (mutex->owner != self) - { - EnterCriticalSection (&mutex->lock); - mutex->owner = self; - } - if (++(mutex->depth) == 0) /* wraparound? */ - { - mutex->depth--; - return EAGAIN; - } - } - return 0; -} - -int -glwthread_recmutex_trylock (glwthread_recmutex_t *mutex) -{ - if (!mutex->guard.done) - { - if (InterlockedIncrement (&mutex->guard.started) == 0) - /* This thread is the first one to need this mutex. Initialize it. */ - glwthread_recmutex_init (mutex); - else - { - /* Don't let mutex->guard.started grow and wrap around. */ - InterlockedDecrement (&mutex->guard.started); - /* Let another thread finish initializing this mutex, and let it also - lock this mutex. */ - return EBUSY; - } - } - { - DWORD self = GetCurrentThreadId (); - if (mutex->owner != self) - { - if (!TryEnterCriticalSection (&mutex->lock)) - return EBUSY; - mutex->owner = self; - } - if (++(mutex->depth) == 0) /* wraparound? */ - { - mutex->depth--; - return EAGAIN; - } - } - return 0; -} - -int -glwthread_recmutex_unlock (glwthread_recmutex_t *mutex) -{ - if (mutex->owner != GetCurrentThreadId ()) - return EPERM; - if (mutex->depth == 0) - return EINVAL; - if (--(mutex->depth) == 0) - { - mutex->owner = 0; - LeaveCriticalSection (&mutex->lock); - } - return 0; -} - -int -glwthread_recmutex_destroy (glwthread_recmutex_t *mutex) -{ - if (mutex->owner != 0) - return EBUSY; - DeleteCriticalSection (&mutex->lock); - mutex->guard.done = 0; - return 0; -} diff --git a/lib/windows-recmutex.h b/lib/windows-recmutex.h deleted file mode 100644 index d143108..0000000 --- a/lib/windows-recmutex.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Plain recursive mutexes (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#ifndef _WINDOWS_RECMUTEX_H -#define _WINDOWS_RECMUTEX_H - -#define WIN32_LEAN_AND_MEAN /* avoid including junk */ -#include - -#include "windows-initguard.h" - -/* The native Windows documentation says that CRITICAL_SECTION already - implements a recursive lock. But we need not rely on it: It's easy to - implement a recursive lock without this assumption. */ - -typedef struct - { - glwthread_initguard_t guard; /* protects the initialization */ - DWORD owner; - unsigned long depth; - CRITICAL_SECTION lock; - } - glwthread_recmutex_t; - -#define GLWTHREAD_RECMUTEX_INIT { GLWTHREAD_INITGUARD_INIT, 0, 0 } - -#ifdef __cplusplus -extern "C" { -#endif - -extern void glwthread_recmutex_init (glwthread_recmutex_t *mutex); -extern int glwthread_recmutex_lock (glwthread_recmutex_t *mutex); -extern int glwthread_recmutex_trylock (glwthread_recmutex_t *mutex); -extern int glwthread_recmutex_unlock (glwthread_recmutex_t *mutex); -extern int glwthread_recmutex_destroy (glwthread_recmutex_t *mutex); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS_RECMUTEX_H */ diff --git a/lib/windows-rwlock.c b/lib/windows-rwlock.c deleted file mode 100644 index 9207d1b..0000000 --- a/lib/windows-rwlock.c +++ /dev/null @@ -1,373 +0,0 @@ -/* Read-write locks (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#include - -/* Specification. */ -#include "windows-rwlock.h" - -#include -#include - -/* In this file, the waitqueues are implemented as circular arrays. */ -#define glwthread_waitqueue_t glwthread_carray_waitqueue_t - -static void -glwthread_waitqueue_init (glwthread_waitqueue_t *wq) -{ - wq->array = NULL; - wq->count = 0; - wq->alloc = 0; - wq->offset = 0; -} - -/* Enqueues the current thread, represented by an event, in a wait queue. - Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ -static HANDLE -glwthread_waitqueue_add (glwthread_waitqueue_t *wq) -{ - HANDLE event; - unsigned int index; - - if (wq->count == wq->alloc) - { - unsigned int new_alloc = 2 * wq->alloc + 1; - HANDLE *new_array = - (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); - if (new_array == NULL) - /* No more memory. */ - return INVALID_HANDLE_VALUE; - /* Now is a good opportunity to rotate the array so that its contents - starts at offset 0. */ - if (wq->offset > 0) - { - unsigned int old_count = wq->count; - unsigned int old_alloc = wq->alloc; - unsigned int old_offset = wq->offset; - unsigned int i; - if (old_offset + old_count > old_alloc) - { - unsigned int limit = old_offset + old_count - old_alloc; - for (i = 0; i < limit; i++) - new_array[old_alloc + i] = new_array[i]; - } - for (i = 0; i < old_count; i++) - new_array[i] = new_array[old_offset + i]; - wq->offset = 0; - } - wq->array = new_array; - wq->alloc = new_alloc; - } - /* Whether the created event is a manual-reset one or an auto-reset one, - does not matter, since we will wait on it only once. */ - event = CreateEvent (NULL, TRUE, FALSE, NULL); - if (event == INVALID_HANDLE_VALUE) - /* No way to allocate an event. */ - return INVALID_HANDLE_VALUE; - index = wq->offset + wq->count; - if (index >= wq->alloc) - index -= wq->alloc; - wq->array[index] = event; - wq->count++; - return event; -} - -/* Notifies the first thread from a wait queue and dequeues it. */ -static void -glwthread_waitqueue_notify_first (glwthread_waitqueue_t *wq) -{ - SetEvent (wq->array[wq->offset + 0]); - wq->offset++; - wq->count--; - if (wq->count == 0 || wq->offset == wq->alloc) - wq->offset = 0; -} - -/* Notifies all threads from a wait queue and dequeues them all. */ -static void -glwthread_waitqueue_notify_all (glwthread_waitqueue_t *wq) -{ - unsigned int i; - - for (i = 0; i < wq->count; i++) - { - unsigned int index = wq->offset + i; - if (index >= wq->alloc) - index -= wq->alloc; - SetEvent (wq->array[index]); - } - wq->count = 0; - wq->offset = 0; -} - -void -glwthread_rwlock_init (glwthread_rwlock_t *lock) -{ - InitializeCriticalSection (&lock->lock); - glwthread_waitqueue_init (&lock->waiting_readers); - glwthread_waitqueue_init (&lock->waiting_writers); - lock->runcount = 0; - lock->guard.done = 1; -} - -int -glwthread_rwlock_rdlock (glwthread_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glwthread_rwlock_init (lock); - else - { - /* Don't let lock->guard.started grow and wrap around. */ - InterlockedDecrement (&lock->guard.started); - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - } - EnterCriticalSection (&lock->lock); - /* Test whether only readers are currently running, and whether the runcount - field will not overflow, and whether no writer is waiting. The latter - condition is because POSIX recommends that "write locks shall take - precedence over read locks", to avoid "writer starvation". */ - if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ - HANDLE event = glwthread_waitqueue_add (&lock->waiting_readers); - if (event != INVALID_HANDLE_VALUE) - { - DWORD result; - LeaveCriticalSection (&lock->lock); - /* Wait until another thread signals this event. */ - result = WaitForSingleObject (event, INFINITE); - if (result == WAIT_FAILED || result == WAIT_TIMEOUT) - abort (); - CloseHandle (event); - /* The thread which signalled the event already did the bookkeeping: - removed us from the waiting_readers, incremented lock->runcount. */ - if (!(lock->runcount > 0)) - abort (); - return 0; - } - else - { - /* Allocation failure. Weird. */ - do - { - LeaveCriticalSection (&lock->lock); - Sleep (1); - EnterCriticalSection (&lock->lock); - } - while (!(lock->runcount + 1 > 0)); - } - } - lock->runcount++; - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glwthread_rwlock_wrlock (glwthread_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glwthread_rwlock_init (lock); - else - { - /* Don't let lock->guard.started grow and wrap around. */ - InterlockedDecrement (&lock->guard.started); - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - } - EnterCriticalSection (&lock->lock); - /* Test whether no readers or writers are currently running. */ - if (!(lock->runcount == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_writers. */ - HANDLE event = glwthread_waitqueue_add (&lock->waiting_writers); - if (event != INVALID_HANDLE_VALUE) - { - DWORD result; - LeaveCriticalSection (&lock->lock); - /* Wait until another thread signals this event. */ - result = WaitForSingleObject (event, INFINITE); - if (result == WAIT_FAILED || result == WAIT_TIMEOUT) - abort (); - CloseHandle (event); - /* The thread which signalled the event already did the bookkeeping: - removed us from the waiting_writers, set lock->runcount = -1. */ - if (!(lock->runcount == -1)) - abort (); - return 0; - } - else - { - /* Allocation failure. Weird. */ - do - { - LeaveCriticalSection (&lock->lock); - Sleep (1); - EnterCriticalSection (&lock->lock); - } - while (!(lock->runcount == 0)); - } - } - lock->runcount--; /* runcount becomes -1 */ - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glwthread_rwlock_tryrdlock (glwthread_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glwthread_rwlock_init (lock); - else - { - /* Don't let lock->guard.started grow and wrap around. */ - InterlockedDecrement (&lock->guard.started); - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - } - /* It's OK to wait for this critical section, because it is never taken for a - long time. */ - EnterCriticalSection (&lock->lock); - /* Test whether only readers are currently running, and whether the runcount - field will not overflow, and whether no writer is waiting. The latter - condition is because POSIX recommends that "write locks shall take - precedence over read locks", to avoid "writer starvation". */ - if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0)) - { - /* This thread would have to wait for a while. Return instead. */ - LeaveCriticalSection (&lock->lock); - return EBUSY; - } - lock->runcount++; - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glwthread_rwlock_trywrlock (glwthread_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glwthread_rwlock_init (lock); - else - { - /* Don't let lock->guard.started grow and wrap around. */ - InterlockedDecrement (&lock->guard.started); - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - } - /* It's OK to wait for this critical section, because it is never taken for a - long time. */ - EnterCriticalSection (&lock->lock); - /* Test whether no readers or writers are currently running. */ - if (!(lock->runcount == 0)) - { - /* This thread would have to wait for a while. Return instead. */ - LeaveCriticalSection (&lock->lock); - return EBUSY; - } - lock->runcount--; /* runcount becomes -1 */ - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glwthread_rwlock_unlock (glwthread_rwlock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - EnterCriticalSection (&lock->lock); - if (lock->runcount < 0) - { - /* Drop a writer lock. */ - if (!(lock->runcount == -1)) - abort (); - lock->runcount = 0; - } - else - { - /* Drop a reader lock. */ - if (!(lock->runcount > 0)) - { - LeaveCriticalSection (&lock->lock); - return EPERM; - } - lock->runcount--; - } - if (lock->runcount == 0) - { - /* POSIX recommends that "write locks shall take precedence over read - locks", to avoid "writer starvation". */ - if (lock->waiting_writers.count > 0) - { - /* Wake up one of the waiting writers. */ - lock->runcount--; - glwthread_waitqueue_notify_first (&lock->waiting_writers); - } - else - { - /* Wake up all waiting readers. */ - lock->runcount += lock->waiting_readers.count; - glwthread_waitqueue_notify_all (&lock->waiting_readers); - } - } - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glwthread_rwlock_destroy (glwthread_rwlock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - if (lock->runcount != 0) - return EBUSY; - DeleteCriticalSection (&lock->lock); - if (lock->waiting_readers.array != NULL) - free (lock->waiting_readers.array); - if (lock->waiting_writers.array != NULL) - free (lock->waiting_writers.array); - lock->guard.done = 0; - return 0; -} diff --git a/lib/windows-rwlock.h b/lib/windows-rwlock.h deleted file mode 100644 index 9002040..0000000 --- a/lib/windows-rwlock.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Read-write locks (native Windows implementation). - Copyright (C) 2005-2019 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, 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 . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-win32.h. */ - -#ifndef _WINDOWS_RWLOCK_H -#define _WINDOWS_RWLOCK_H - -#define WIN32_LEAN_AND_MEAN /* avoid including junk */ -#include - -#include "windows-initguard.h" - -/* It is impossible to implement read-write locks using plain locks, without - introducing an extra thread dedicated to managing read-write locks. - Therefore here we need to use the low-level Event type. */ - -typedef struct - { - HANDLE *array; /* array of waiting threads, each represented by an event */ - unsigned int count; /* number of waiting threads */ - unsigned int alloc; /* length of allocated array */ - unsigned int offset; /* index of first waiting thread in array */ - } - glwthread_carray_waitqueue_t; -typedef struct - { - glwthread_initguard_t guard; /* protects the initialization */ - CRITICAL_SECTION lock; /* protects the remaining fields */ - glwthread_carray_waitqueue_t waiting_readers; /* waiting readers */ - glwthread_carray_waitqueue_t waiting_writers; /* waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - glwthread_rwlock_t; - -#define GLWTHREAD_RWLOCK_INIT { GLWTHREAD_INITGUARD_INIT } - -#ifdef __cplusplus -extern "C" { -#endif - -extern void glwthread_rwlock_init (glwthread_rwlock_t *lock); -extern int glwthread_rwlock_rdlock (glwthread_rwlock_t *lock); -extern int glwthread_rwlock_wrlock (glwthread_rwlock_t *lock); -extern int glwthread_rwlock_tryrdlock (glwthread_rwlock_t *lock); -extern int glwthread_rwlock_trywrlock (glwthread_rwlock_t *lock); -extern int glwthread_rwlock_unlock (glwthread_rwlock_t *lock); -extern int glwthread_rwlock_destroy (glwthread_rwlock_t *lock); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS_RWLOCK_H */ diff --git a/lib/wmemcpy-impl.h b/lib/wmemcpy-impl.h index 90ed44b..cd471cf 100644 --- a/lib/wmemcpy-impl.h +++ b/lib/wmemcpy-impl.h @@ -1,5 +1,5 @@ /* Copy wide character array. - Copyright (C) 1999, 2011-2019 Free Software Foundation, Inc. + Copyright (C) 1999, 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 1999. This program is free software: you can redistribute it and/or modify diff --git a/lib/wmemcpy.c b/lib/wmemcpy.c index e62c81b..05e5c0c 100644 --- a/lib/wmemcpy.c +++ b/lib/wmemcpy.c @@ -1,5 +1,5 @@ /* Copy wide character array. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/lib/xopen-source.h b/lib/xopen-source.h index d3cf6a7..4ef7c15 100644 --- a/lib/xopen-source.h +++ b/lib/xopen-source.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4 index e3e0fb6..77503ea 100644 --- a/m4/00gnulib.m4 +++ b/m4/00gnulib.m4 @@ -1,13 +1,14 @@ -# 00gnulib.m4 serial 3 -dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. +# 00gnulib.m4 serial 4 +dnl Copyright (C) 2009-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. dnl This file must be named something that sorts before all other -dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and -dnl m4_divert semantics. +dnl gnulib-provided .m4 files. The first part is needed until such time +dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and +dnl m4_divert semantics. The second part is needed until the clang fix +dnl has been included in Autoconf. # Until autoconf 2.63, handling of the diversion stack required m4_init # to be called first; but this does not happen with aclocal. Wrapping @@ -39,6 +40,66 @@ m4_version_prereq([2.63.263], [], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) +# The following definitions arrange to use a compiler option +# -Werror=implicit-function-declaration in AC_CHECK_DECL, when the +# compiler is clang. Without it, clang implicitly declares "known" +# library functions in C mode, but not in C++ mode, which would cause +# Gnulib to omit a declaration and thus later produce an error in C++ +# mode. As of clang 9.0, these "known" functions are identified through +# LIBBUILTIN invocations in the LLVM source file +# llvm/tools/clang/include/clang/Basic/Builtins.def. +AC_DEFUN([gl_COMPILER_CLANG], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([whether the compiler is clang], + [gl_cv_compiler_clang], + [AC_EGREP_CPP([barfbarf],[ +#ifdef __clang__ +barfbarf +#endif + ], + [gl_cv_compiler_clang=yes], + [gl_cv_compiler_clang=no]) + ]) +]) +AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_COMPILER_CLANG]) + AC_CACHE_CHECK([for compiler option needed when checking for declarations], + [gl_cv_compiler_check_decl_option], + [if test $gl_cv_compiler_clang = yes; then + dnl Test whether the compiler supports the option + dnl '-Werror=implicit-function-declaration'. + save_ac_compile="$ac_compile" + ac_compile="$ac_compile -Werror=implicit-function-declaration" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])], + [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'], + [gl_cv_compiler_check_decl_option=none]) + ac_compile="$save_ac_compile" + else + gl_cv_compiler_check_decl_option=none + fi + ]) + if test "x$gl_cv_compiler_check_decl_option" != xnone; then + ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option" + else + ac_compile_for_check_decl="$ac_compile" + fi +]) +dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl +dnl instead of ac_compile. +m4_define([_AC_CHECK_DECL_BODY], +[ ac_save_ac_compile="$ac_compile" + ac_compile="$ac_compile_for_check_decl"] +m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile" +]) + ]) +dnl Redefine AC_CHECK_DECL so that it starts with +dnl AC_REQUIRE([gl_COMPILER_PREPARE_CHECK_DECL]). +m4_define([AC_CHECK_DECL], + [AC_REQUIRE([gl_COMPILER_PREPARE_CHECK_DECL])]m4_defn([AC_CHECK_DECL])) + # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force diff --git a/m4/Makefile.am b/m4/Makefile.am index 85dc5ba..77a16b0 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/m4/Makefile.in b/m4/Makefile.in index d7c937c..0e6c613 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -17,12 +17,12 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### # Author: John Zaitseff -# $Id: 85dc5bad90f8d9bb845a4750ad60271e2304bed2 $ +# $Id: 77a16b01f36991beaa6625528320ded6287cd242 $ # # This file, m4/Makefile.am, contains the m4 macro directory Makefile for # Star Traders. It needs to be processed by automake to produce the @@ -134,20 +134,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ - $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ - $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ - $(top_srcdir)/m4/monetary_h.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ + $(top_srcdir)/m4/localtime-buffer.m4 \ + $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ + $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ + $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ + $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/monetary_h.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/setlocale_null.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ @@ -155,12 +154,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ - $(top_srcdir)/m4/wcsdup.m4 $(top_srcdir)/m4/wctob.m4 \ - $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemcpy.m4 \ - $(top_srcdir)/m4/xopen-source.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wcsdup.m4 \ + $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \ + $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/wmemcpy.m4 $(top_srcdir)/m4/xopen-source.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -208,6 +208,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSES_CFLAGS = @CURSES_CFLAGS@ @@ -286,6 +287,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ @@ -295,6 +297,8 @@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -384,6 +388,7 @@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ @@ -408,10 +413,12 @@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLD = @GNULIB_STRTOLD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ @@ -503,6 +510,8 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ @@ -517,7 +526,9 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ @@ -556,6 +567,7 @@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -564,7 +576,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ @@ -649,11 +660,11 @@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ @@ -705,6 +716,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ @@ -712,12 +725,16 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPMULTITHREAD = @LIBPMULTITHREAD@ +LIBPTHREAD = @LIBPTHREAD@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIB_HARD_LOCALE = @LIB_HARD_LOCALE@ +LIB_MBRTOWC = @LIB_MBRTOWC@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -726,9 +743,7 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -738,6 +753,7 @@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MONETARY_H = @NEXT_AS_FIRST_DIRECTIVE_MONETARY_H@ @@ -755,6 +771,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MONETARY_H = @NEXT_MONETARY_H@ @@ -785,6 +802,8 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ @@ -905,8 +924,10 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOLD = @REPLACE_STRTOLD@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ @@ -932,6 +953,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSTOK = @REPLACE_WCSTOK@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ @@ -948,6 +970,8 @@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 index a8f2cba..39726ba 100644 --- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 @@ -1,5 +1,5 @@ # absolute-header.m4 serial 16 -dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2006-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. diff --git a/m4/assert.m4 b/m4/assert.m4 index 15048a7..d823b9f 100644 --- a/m4/assert.m4 +++ b/m4/assert.m4 @@ -1,6 +1,6 @@ #serial 7 -# Copyright (C) 1998-1999, 2001, 2004, 2008-2019 Free Software Foundation, Inc. +# Copyright (C) 1998-1999, 2001, 2004, 2008-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/btowc.m4 b/m4/btowc.m4 index 85c2cbf..c28ccb2 100644 --- a/m4/btowc.m4 +++ b/m4/btowc.m4 @@ -1,5 +1,5 @@ # btowc.m4 serial 11 -dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2008-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. diff --git a/m4/codeset.m4 b/m4/codeset.m4 index 280f556..9b019cf 100644 --- a/m4/codeset.m4 +++ b/m4/codeset.m4 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019 Free Software +dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2020 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/config-h.m4 b/m4/config-h.m4 index 7379df7..213b1cf 100644 --- a/m4/config-h.m4 +++ b/m4/config-h.m4 @@ -1,6 +1,6 @@ # Say that -DHAVE_CONFIG_H is not needed. -dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-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. diff --git a/m4/extensions.m4 b/m4/extensions.m4 index fd1ce81..d7c95ef 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 @@ -1,7 +1,7 @@ # serial 18 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2019 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 84421ce..75c5008 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -1,6 +1,6 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012-2019 Free Software Foundation, Inc. +dnl Copyright 2012-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. diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 8cc7827..595483d 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,5 +1,5 @@ # getopt.m4 serial 47 -dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-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. diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index 7eebabd..c72b3ea 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,6 +1,6 @@ # serial 27 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index 9a9d31e..6edf97a 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 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 diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 479c9de..6c4cad6 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 45 -dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +# gnulib-common.m4 serial 46 +dnl Copyright (C) 2007-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. @@ -19,7 +19,14 @@ AC_DEFUN([gl_COMMON_BODY], [ #ifndef _Noreturn # if (defined __cplusplus \ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER))) + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ # define _Noreturn [[noreturn]] # elif ((!defined __cplusplus || defined __clang__) \ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ @@ -408,12 +415,13 @@ AC_DEFUN([AC_C_RESTRICT], nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ # define _Restrict # define __restrict__ #endif]) diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 44a1468..c42146a 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2019 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 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 @@ -64,11 +64,11 @@ AC_DEFUN([gl_EARLY], # Code from module iconv_open: # Code from module include_next: # Code from module inline: + # Code from module inttypes-incomplete: # Code from module limits-h: # Code from module localcharset: # Code from module locale: # Code from module localtime-buffer: - # Code from module lock: # Code from module mbrtowc: # Code from module mbsinit: # Code from module mbsrtowcs: @@ -77,6 +77,7 @@ AC_DEFUN([gl_EARLY], # Code from module monetary: # Code from module multiarch: # Code from module nocrash: + # Code from module setlocale-null: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: @@ -95,8 +96,6 @@ AC_DEFUN([gl_EARLY], # Code from module sys_stat: # Code from module sys_time: # Code from module sys_types: - # Code from module threadlib: - gl_THREADLIB_EARLY # Code from module time: # Code from module unistd: # Code from module unistr/base: @@ -110,10 +109,6 @@ AC_DEFUN([gl_EARLY], # Code from module wctob: # Code from module wctomb: # Code from module wctype-h: - # Code from module windows-mutex: - # Code from module windows-once: - # Code from module windows-recmutex: - # Code from module windows-rwlock: # Code from module wmemcpy: ]) @@ -154,6 +149,7 @@ AC_DEFUN([gl_INIT], GNULIB_GL_UNISTD_H_GETOPT=1 fi AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) + gl_UNISTD_MODULE_INDICATOR([getopt-posix]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_FUNC_GETTIMEOFDAY @@ -175,11 +171,17 @@ AC_DEFUN([gl_INIT], AC_LIBOBJ([iconv_close]) fi gl_INLINE + gl_INTTYPES_INCOMPLETE gl_LIMITS_H gl_LOCALE_H gl_FUNC_MBRTOWC if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then AC_LIBOBJ([mbrtowc]) + if test $REPLACE_MBSTATE_T = 1; then + AC_LIBOBJ([lc-charset-dispatch]) + AC_LIBOBJ([mbtowc-lock]) + gl_PREREQ_MBTOWC_LOCK + fi gl_PREREQ_MBRTOWC fi gl_WCHAR_MODULE_INDICATOR([mbrtowc]) @@ -238,26 +240,25 @@ AC_DEFUN([gl_INIT], gl_gnulib_enabled_30838f5439487421042f2225bed3af76=false gl_gnulib_enabled_localcharset=false gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=false - gl_gnulib_enabled_lock=false gl_gnulib_enabled_mbsinit=false gl_gnulib_enabled_mbtowc=false gl_gnulib_enabled_memchr=false + gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd=false gl_gnulib_enabled_b3ae4a413a1340415f34a52d1dafb147=false gl_gnulib_enabled_stdlib=false gl_gnulib_enabled_streq=false gl_gnulib_enabled_strnlen1=false - gl_gnulib_enabled_threadlib=false gl_gnulib_enabled_verify=false gl_gnulib_enabled_wctomb=false - gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440=false - gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab=false - gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354=false - gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef=false gl_gnulib_enabled_wmemcpy=false func_gl_gnulib_m4code_30838f5439487421042f2225bed3af76 () { if ! $gl_gnulib_enabled_30838f5439487421042f2225bed3af76; then + AC_REQUIRE([gl_FUNC_SETLOCALE_NULL]) + LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL" + AC_SUBST([LIB_HARD_LOCALE]) gl_gnulib_enabled_30838f5439487421042f2225bed3af76=true + func_gl_gnulib_m4code_e7e881d32ca02f1c997b13c737c64bbd fi } func_gl_gnulib_m4code_localcharset () @@ -278,27 +279,6 @@ AC_DEFUN([gl_INIT], gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=true fi } - func_gl_gnulib_m4code_lock () - { - if ! $gl_gnulib_enabled_lock; then - gl_LOCK - gl_MODULE_INDICATOR([lock]) - gl_gnulib_enabled_lock=true - func_gl_gnulib_m4code_threadlib - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_503a4cb75d69c787103d0aa2ab7d8440 - fi - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_68a4501daeca58988392c7e60b4917ab - fi - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_f0efff84a70f4afba30902bb8ffe9354 - fi - if test $gl_threads_api = windows; then - func_gl_gnulib_m4code_8bb827fe37eaccf1b97feb0c87bc92ef - fi - fi - } func_gl_gnulib_m4code_mbsinit () { if ! $gl_gnulib_enabled_mbsinit; then @@ -339,6 +319,18 @@ AC_DEFUN([gl_INIT], gl_gnulib_enabled_memchr=true fi } + func_gl_gnulib_m4code_e7e881d32ca02f1c997b13c737c64bbd () + { + if ! $gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd; then + gl_FUNC_SETLOCALE_NULL + if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then + AC_LIBOBJ([setlocale-lock]) + gl_PREREQ_SETLOCALE_LOCK + fi + gl_LOCALE_MODULE_INDICATOR([setlocale_null]) + gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd=true + fi + } func_gl_gnulib_m4code_b3ae4a413a1340415f34a52d1dafb147 () { if ! $gl_gnulib_enabled_b3ae4a413a1340415f34a52d1dafb147; then @@ -366,13 +358,6 @@ AC_DEFUN([gl_INIT], func_gl_gnulib_m4code_memchr fi } - func_gl_gnulib_m4code_threadlib () - { - if ! $gl_gnulib_enabled_threadlib; then - AC_REQUIRE([gl_THREADLIB]) - gl_gnulib_enabled_threadlib=true - fi - } func_gl_gnulib_m4code_verify () { if ! $gl_gnulib_enabled_verify; then @@ -392,54 +377,6 @@ AC_DEFUN([gl_INIT], func_gl_gnulib_m4code_stdlib fi } - func_gl_gnulib_m4code_503a4cb75d69c787103d0aa2ab7d8440 () - { - if ! $gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440; then - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-mutex]) - ;; - esac - gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440=true - fi - } - func_gl_gnulib_m4code_68a4501daeca58988392c7e60b4917ab () - { - if ! $gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab; then - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-once]) - ;; - esac - gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab=true - fi - } - func_gl_gnulib_m4code_f0efff84a70f4afba30902bb8ffe9354 () - { - if ! $gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354; then - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-recmutex]) - ;; - esac - gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354=true - fi - } - func_gl_gnulib_m4code_8bb827fe37eaccf1b97feb0c87bc92ef () - { - if ! $gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef; then - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-rwlock]) - ;; - esac - gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef=true - fi - } func_gl_gnulib_m4code_wmemcpy () { if ! $gl_gnulib_enabled_wmemcpy; then @@ -457,16 +394,13 @@ AC_DEFUN([gl_INIT], if test $NEED_LOCALTIME_BUFFER = 1; then func_gl_gnulib_m4code_2049e887c7e5308faad27b3f894bb8c9 fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then + if { test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0; then func_gl_gnulib_m4code_30838f5439487421042f2225bed3af76 fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then func_gl_gnulib_m4code_localcharset fi - if test $HAVE_MBRTOWC = 0 || { test $REPLACE_MBRTOWC = 1 && { test $HAVE_MBSINIT = 0 || test $REPLACE_MBSTATE_T = 1; }; }; then - func_gl_gnulib_m4code_lock - fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then + if { test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0; then func_gl_gnulib_m4code_mbsinit fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then @@ -491,21 +425,16 @@ AC_DEFUN([gl_INIT], AM_CONDITIONAL([gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76], [$gl_gnulib_enabled_30838f5439487421042f2225bed3af76]) AM_CONDITIONAL([gl_GNULIB_ENABLED_localcharset], [$gl_gnulib_enabled_localcharset]) AM_CONDITIONAL([gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9], [$gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_lock], [$gl_gnulib_enabled_lock]) AM_CONDITIONAL([gl_GNULIB_ENABLED_mbsinit], [$gl_gnulib_enabled_mbsinit]) AM_CONDITIONAL([gl_GNULIB_ENABLED_mbtowc], [$gl_gnulib_enabled_mbtowc]) AM_CONDITIONAL([gl_GNULIB_ENABLED_memchr], [$gl_gnulib_enabled_memchr]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd], [$gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd]) AM_CONDITIONAL([gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147], [$gl_gnulib_enabled_b3ae4a413a1340415f34a52d1dafb147]) AM_CONDITIONAL([gl_GNULIB_ENABLED_stdlib], [$gl_gnulib_enabled_stdlib]) AM_CONDITIONAL([gl_GNULIB_ENABLED_streq], [$gl_gnulib_enabled_streq]) AM_CONDITIONAL([gl_GNULIB_ENABLED_strnlen1], [$gl_gnulib_enabled_strnlen1]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_threadlib], [$gl_gnulib_enabled_threadlib]) AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify]) AM_CONDITIONAL([gl_GNULIB_ENABLED_wctomb], [$gl_gnulib_enabled_wctomb]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_503a4cb75d69c787103d0aa2ab7d8440], [$gl_gnulib_enabled_503a4cb75d69c787103d0aa2ab7d8440]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_68a4501daeca58988392c7e60b4917ab], [$gl_gnulib_enabled_68a4501daeca58988392c7e60b4917ab]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_f0efff84a70f4afba30902bb8ffe9354], [$gl_gnulib_enabled_f0efff84a70f4afba30902bb8ffe9354]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_8bb827fe37eaccf1b97feb0c87bc92ef], [$gl_gnulib_enabled_8bb827fe37eaccf1b97feb0c87bc92ef]) AM_CONDITIONAL([gl_GNULIB_ENABLED_wmemcpy], [$gl_gnulib_enabled_wmemcpy]) # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ @@ -671,9 +600,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/getopt_int.h lib/gettext.h lib/gettimeofday.c - lib/glthread/lock.c - lib/glthread/lock.h - lib/glthread/threadlib.c lib/hard-locale.c lib/hard-locale.h lib/iconv.c @@ -684,23 +610,34 @@ AC_DEFUN([gl_FILE_LIST], [ lib/iconv_open-irix.gperf lib/iconv_open-osf.gperf lib/iconv_open-solaris.gperf + lib/iconv_open-zos.gperf lib/iconv_open.c + lib/inttypes.in.h + lib/lc-charset-dispatch.c + lib/lc-charset-dispatch.h lib/limits.in.h lib/localcharset.c lib/localcharset.h lib/locale.in.h lib/localtime-buffer.c lib/localtime-buffer.h + lib/mbrtowc-impl-utf8.h + lib/mbrtowc-impl.h lib/mbrtowc.c lib/mbsinit.c lib/mbsrtowcs-impl.h lib/mbsrtowcs-state.c lib/mbsrtowcs.c lib/mbtowc-impl.h + lib/mbtowc-lock.c + lib/mbtowc-lock.h lib/mbtowc.c lib/memchr.c lib/memchr.valgrind lib/monetary.in.h + lib/setlocale-lock.c + lib/setlocale_null.c + lib/setlocale_null.h lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h @@ -736,14 +673,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/wctype-h.c lib/wctype.in.h lib/windows-initguard.h - lib/windows-mutex.c - lib/windows-mutex.h - lib/windows-once.c - lib/windows-once.h - lib/windows-recmutex.c - lib/windows-recmutex.h - lib/windows-rwlock.c - lib/windows-rwlock.h lib/wmemcpy-impl.h lib/wmemcpy.c m4/00gnulib.m4 @@ -763,6 +692,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/iconv_open.m4 m4/include_next.m4 m4/inline.m4 + m4/inttypes.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 @@ -774,8 +704,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/locale-zh.m4 m4/locale_h.m4 m4/localtime-buffer.m4 - m4/lock.m4 - m4/longlong.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbsrtowcs.m4 @@ -787,7 +715,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/multiarch.m4 m4/nocrash.m4 m4/off_t.m4 - m4/pthread_rwlock_rdlock.m4 + m4/setlocale_null.m4 m4/ssize_t.m4 m4/stdbool.m4 m4/stddef_h.m4 @@ -802,6 +730,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/threadlib.m4 m4/time_h.m4 m4/unistd_h.m4 + m4/visibility.m4 m4/warn-on-use.m4 m4/wchar_h.m4 m4/wchar_t.m4 diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 index af8c05c..6db2aa2 100644 --- a/m4/host-cpu-c-abi.m4 +++ b/m4/host-cpu-c-abi.m4 @@ -1,5 +1,5 @@ -# host-cpu-c-abi.m4 serial 12 -dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. +# host-cpu-c-abi.m4 serial 13 +dnl Copyright (C) 2002-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. @@ -457,7 +457,8 @@ EOF dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI -dnl (application binary interface) is a 32-bit one, or to 'no' otherwise. +dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit +dnl one, or to 'unknown' if unknown. dnl This is a simplified variant of gl_HOST_CPU_C_ABI. AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT], [ @@ -467,8 +468,10 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT], case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; - *) + x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else case "$host_cpu" in @@ -493,6 +496,14 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT], gl_cv_host_cpu_c_abi_32bit=yes ;; + # CPUs that only support a 64-bit ABI. +changequote(,)dnl + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) +changequote([,])dnl + gl_cv_host_cpu_c_abi_32bit=no + ;; + changequote(,)dnl i[34567]86 ) changequote([,])dnl @@ -654,7 +665,7 @@ changequote([,])dnl ;; *) - gl_cv_host_cpu_c_abi_32bit=no + gl_cv_host_cpu_c_abi_32bit=unknown ;; esac fi diff --git a/m4/iconv.m4 b/m4/iconv.m4 index a285e9d..e593b72 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,5 +1,5 @@ # iconv.m4 serial 21 -dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/iconv_h.m4 b/m4/iconv_h.m4 index abd3fa7..0c0164c 100644 --- a/m4/iconv_h.m4 +++ b/m4/iconv_h.m4 @@ -1,5 +1,5 @@ # iconv_h.m4 serial 11 -dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2007-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. diff --git a/m4/iconv_open.m4 b/m4/iconv_open.m4 index bfcd354..2d2f5e1 100644 --- a/m4/iconv_open.m4 +++ b/m4/iconv_open.m4 @@ -1,5 +1,5 @@ -# iconv_open.m4 serial 15 -dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +# iconv_open.m4 serial 16 +dnl Copyright (C) 2007-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. @@ -23,11 +23,12 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN], if test $gl_func_iconv_gnu = no; then iconv_flavor= case "$host_os" in - aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; - irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; - hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; - osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; - solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;; + aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; + irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; + hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; + osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; + solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;; + openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;; esac if test -n "$iconv_flavor"; then AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor], diff --git a/m4/include_next.m4 b/m4/include_next.m4 index 86eb2c9..9009e29 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 24 -dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2006-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. diff --git a/m4/inline.m4 b/m4/inline.m4 index 525b7e0..0a7cd8b 100644 --- a/m4/inline.m4 +++ b/m4/inline.m4 @@ -1,5 +1,5 @@ # inline.m4 serial 4 -dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-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. diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 new file mode 100644 index 0000000..d0487d6 --- /dev/null +++ b/m4/inttypes.m4 @@ -0,0 +1,157 @@ +# inttypes.m4 serial 28 +dnl Copyright (C) 2006-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. + +dnl From Derek Price, Bruno Haible. +dnl Test whether is supported or must be substituted. + +AC_DEFUN([gl_INTTYPES_H], +[ + AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) + gl_INTTYPES_PRI_SCN +]) + +AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], +[ + AC_REQUIRE([gl_STDINT_H]) + AC_CHECK_HEADERS_ONCE([inttypes.h]) + + dnl Override always, so that the portability warnings work. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([inttypes.h]) + + AC_REQUIRE([gl_MULTIARCH]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [imaxabs imaxdiv strtoimax strtoumax]) +]) + +# Ensure that the PRI* and SCN* macros are defined appropriately. +AC_DEFUN([gl_INTTYPES_PRI_SCN], +[ + AC_REQUIRE([gt_INTTYPES_PRI]) + + PRIPTR_PREFIX= + if test -n "$STDINT_H"; then + dnl Using the gnulib . It always defines intptr_t to 'long'. + PRIPTR_PREFIX='"l"' + else + dnl Using the system's . + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + extern intptr_t foo; + extern $gltype1 foo;]])], + [PRIPTR_PREFIX='"'$glpfx'"']) + test -n "$PRIPTR_PREFIX" && break + done + fi + AC_SUBST([PRIPTR_PREFIX]) + + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT32_MAX_LT_INTMAX_MAX], + [defined INT32_MAX && defined INTMAX_MAX], + [INT32_MAX < INTMAX_MAX], + [sizeof (int) < sizeof (long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT64_MAX_EQ_LONG_MAX], + [defined INT64_MAX], + [INT64_MAX == LONG_MAX], + [sizeof (long long int) == sizeof (long int)]) + else + INT64_MAX_EQ_LONG_MAX=-1 + fi + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT32_MAX_LT_UINTMAX_MAX], + [defined UINT32_MAX && defined UINTMAX_MAX], + [UINT32_MAX < UINTMAX_MAX], + [sizeof (unsigned int) < sizeof (unsigned long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT64_MAX_EQ_ULONG_MAX], + [defined UINT64_MAX], + [UINT64_MAX == ULONG_MAX], + [sizeof (unsigned long long int) == sizeof (unsigned long int)]) + else + UINT64_MAX_EQ_ULONG_MAX=-1 + fi +]) + +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. +AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], +[ + AC_CACHE_CHECK([whether $3], + [gl_cv_test_$1], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if $2 + #define CONDITION ($3) + #else + #define CONDITION ($4) + #endif + int test[CONDITION ? 1 : -1];]])], + [gl_cv_test_$1=yes], + [gl_cv_test_$1=no])]) + if test $gl_cv_test_$1 = yes; then + $1=1; + else + $1=0; + fi + AC_SUBST([$1]) +]) + +AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_INTTYPES_H_DEFAULTS], +[ + GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) + GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) + GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) + GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) + HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) + HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) + HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) + HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T]) + REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) + REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) + INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) + INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) + PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) + PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX]) + UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX]) + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX]) +]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index a187196..98c348f 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 @@ -1,5 +1,5 @@ # lib-ld.m4 serial 9 -dnl Copyright (C) 1996-2003, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2009-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. diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index 0ff1073..eecf70e 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 @@ -1,5 +1,5 @@ -# lib-link.m4 serial 28 -dnl Copyright (C) 2001-2019 Free Software Foundation, Inc. +# lib-link.m4 serial 31 +dnl Copyright (C) 2001-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. @@ -192,6 +192,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], [[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib @@ -204,17 +206,23 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && test ! -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= @@ -270,58 +278,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -331,14 +295,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -349,7 +313,57 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], fi dnl Then look for a static library. if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + fi + done + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -375,7 +389,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -475,6 +490,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. @@ -525,19 +547,21 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -548,29 +572,29 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" fi fi fi @@ -718,7 +742,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= @@ -728,7 +753,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= ;; diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 8adb17b..c8a0b46 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -1,5 +1,5 @@ -# lib-prefix.m4 serial 14 -dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc. +# lib-prefix.m4 serial 17 +dnl Copyright (C) 2001-2005, 2008-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. @@ -147,21 +147,24 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], ]) dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". +dnl - a function acl_is_expected_elfclass, that tests whether standard input +dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, +dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing +dnl the basename of the libdir to try in turn, either "lib" or "lib64" or +dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting + dnl There is no formal standard regarding lib, lib32, and lib64. + dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on + dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go + dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. + dnl We determine the compiler's default mode by looking at the compiler's + dnl library search path. If at least one of its elements ends in /lib64 or + dnl points to a directory whose absolute pathname ends in /lib64, we use that + dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, + dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or @@ -169,27 +172,72 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) - case "$host_os" in - solaris*) - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifdef _LP64 - int ok; - #else - error fail - #endif - ]])], - [gl_cv_solaris_64bit=yes], - [gl_cv_solaris_64bit=no]) - ]);; - esac + AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], + [AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_elf=yes], + [gl_cv_elf=no]) + ]) + if test $gl_cv_elf; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi +changequote(,)dnl + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac +changequote([,])dnl + else + acl_is_expected_elfclass () + { + : + } + fi dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], - [acl_libdirstem=lib + [dnl Try 'lib' first, because that's the default for libdir in GNU, see + dnl . + acl_libdirstem=lib acl_libdirstem2= + acl_libdirstem3= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment @@ -197,53 +245,76 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) dnl If $CC generates code for a 32-bit ABI, the libraries are - dnl surely under $prefix/lib, not $prefix/lib64. - if test "$HOST_CPU_C_ABI_32BIT" != yes; then - dnl The result is a property of the system. However, non-system - dnl compilers sometimes have odd library search paths. Therefore - dnl prefer asking /usr/bin/gcc, if available, rather than $CC. - searchpath=`(if test -f /usr/bin/gcc \ - && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ - LC_ALL=C /usr/bin/gcc -print-search-dirs; \ - else \ - LC_ALL=C $CC -print-search-dirs; \ - fi) 2>/dev/null \ - | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" + dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. + dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries + dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. + dnl Find the compiler's search path. However, non-system compilers + dnl sometimes have odd library search paths. But we can't simply invoke + dnl '/usr/bin/gcc -print-search-dirs' because that would not take into + dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" - acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ]) - # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and + dnl acl_libdirstem3. +changequote(,)dnl acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` - acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` +changequote([,])dnl ]) diff --git a/m4/libunistring-base.m4 b/m4/libunistring-base.m4 index 829e71c..268ec5f 100644 --- a/m4/libunistring-base.m4 +++ b/m4/libunistring-base.m4 @@ -1,5 +1,5 @@ # libunistring-base.m4 serial 5 -dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2010-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. diff --git a/m4/limits-h.m4 b/m4/limits-h.m4 index 68f724c..0b4f092 100644 --- a/m4/limits-h.m4 +++ b/m4/limits-h.m4 @@ -1,6 +1,6 @@ dnl Check whether limits.h has needed features. -dnl Copyright 2016-2019 Free Software Foundation, Inc. +dnl Copyright 2016-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. diff --git a/m4/localcharset.m4 b/m4/localcharset.m4 index 2a7f82d..9d21c4f 100644 --- a/m4/localcharset.m4 +++ b/m4/localcharset.m4 @@ -1,5 +1,5 @@ # localcharset.m4 serial 8 -dnl Copyright (C) 2002, 2004, 2006, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2009-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. diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4 index cfa068d..5abe052 100644 --- a/m4/locale-fr.m4 +++ b/m4/locale-fr.m4 @@ -1,5 +1,5 @@ # locale-fr.m4 serial 19 -dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-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. diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4 index 487f68b..0982ab1 100644 --- a/m4/locale-ja.m4 +++ b/m4/locale-ja.m4 @@ -1,5 +1,5 @@ # locale-ja.m4 serial 14 -dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-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. diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4 index 8b81326..cde5140 100644 --- a/m4/locale-zh.m4 +++ b/m4/locale-zh.m4 @@ -1,5 +1,5 @@ # locale-zh.m4 serial 14 -dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-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. diff --git a/m4/locale_h.m4 b/m4/locale_h.m4 index d28ba0c..32494cf 100644 --- a/m4/locale_h.m4 +++ b/m4/locale_h.m4 @@ -1,5 +1,5 @@ -# locale_h.m4 serial 21 -dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. +# locale_h.m4 serial 24 +dnl Copyright (C) 2007, 2009-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. @@ -17,6 +17,8 @@ AC_DEFUN([gl_LOCALE_H], dnl If is replaced, then must also be replaced. AC_REQUIRE([gl_STDDEF_H]) + AC_REQUIRE([gl_LOCALE_T]) + dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv' dnl only if _LCONV_C99 is defined. AC_REQUIRE([AC_CANONICAL_HOST]) @@ -37,34 +39,6 @@ AC_DEFUN([gl_LOCALE_H], [gl_cv_header_locale_h_posix2001=yes], [gl_cv_header_locale_h_posix2001=no])]) - dnl Check for . - AC_CHECK_HEADERS_ONCE([xlocale.h]) - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - dnl Check whether use of locale_t requires inclusion of , - dnl e.g. on Mac OS X 10.5. If does not define locale_t by - dnl itself, we assume that will do so. - AC_CACHE_CHECK([whether locale.h defines locale_t], - [gl_cv_header_locale_has_locale_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - locale_t x;]], - [[]])], - [gl_cv_header_locale_has_locale_t=yes], - [gl_cv_header_locale_has_locale_t=no]) - ]) - if test $gl_cv_header_locale_has_locale_t = yes; then - gl_cv_header_locale_h_needs_xlocale_h=no - else - gl_cv_header_locale_h_needs_xlocale_h=yes - fi - else - HAVE_XLOCALE_H=0 - gl_cv_header_locale_h_needs_xlocale_h=no - fi - AC_SUBST([HAVE_XLOCALE_H]) - dnl Check whether 'struct lconv' is complete. dnl Bionic libc's 'struct lconv' is just a dummy. dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, @@ -82,7 +56,20 @@ AC_DEFUN([gl_LOCALE_H], [gl_cv_sys_struct_lconv_ok=no]) ]) if test $gl_cv_sys_struct_lconv_ok = no; then - REPLACE_STRUCT_LCONV=1 + dnl On native Windows with MSVC, merely define these member names as macros. + dnl This avoids trouble in C++ mode. + case "$host_os" in + mingw*) + AC_EGREP_CPP([Special], [ +#ifdef _MSC_VER + Special +#endif + ], + [], + [REPLACE_STRUCT_LCONV=1]) + ;; + *) REPLACE_STRUCT_LCONV=1 ;; + esac fi dnl is always overridden, because of GNULIB_POSIXCHECK. @@ -99,6 +86,49 @@ AC_DEFUN([gl_LOCALE_H], [setlocale newlocale duplocale freelocale]) ]) +dnl Checks to determine whether the system has the locale_t type, +dnl and how to obtain it. +AC_DEFUN([gl_LOCALE_T], +[ + dnl Persuade glibc and Solaris to define locale_t. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + dnl Check whether use of locale_t requires inclusion of , + dnl e.g. on Mac OS X 10.5. If does not define locale_t by + dnl itself, we assume that will do so. + AC_CACHE_CHECK([whether locale.h defines locale_t], + [gl_cv_header_locale_has_locale_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + locale_t x;]], + [[]])], + [gl_cv_header_locale_has_locale_t=yes], + [gl_cv_header_locale_has_locale_t=no]) + ]) + + dnl Check for . + AC_CHECK_HEADERS_ONCE([xlocale.h]) + if test $ac_cv_header_xlocale_h = yes; then + HAVE_XLOCALE_H=1 + if test $gl_cv_header_locale_has_locale_t = yes; then + gl_cv_header_locale_h_needs_xlocale_h=no + else + gl_cv_header_locale_h_needs_xlocale_h=yes + fi + HAVE_LOCALE_T=1 + else + HAVE_XLOCALE_H=0 + gl_cv_header_locale_h_needs_xlocale_h=no + if test $gl_cv_header_locale_has_locale_t = yes; then + HAVE_LOCALE_T=1 + else + HAVE_LOCALE_T=0 + fi + fi + AC_SUBST([HAVE_XLOCALE_H]) +]) + AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. @@ -110,10 +140,11 @@ AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], AC_DEFUN([gl_LOCALE_H_DEFAULTS], [ - GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) - GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) - GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) - GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME]) + GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) + GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) + GNULIB_SETLOCALE_NULL=0; AC_SUBST([GNULIB_SETLOCALE_NULL]) + GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) + GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE]) HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) diff --git a/m4/localtime-buffer.m4 b/m4/localtime-buffer.m4 index 6d99828..09df3c9 100644 --- a/m4/localtime-buffer.m4 +++ b/m4/localtime-buffer.m4 @@ -1,5 +1,5 @@ # localtime-buffer.m4 serial 1 -dnl Copyright (C) 2017-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2017-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. diff --git a/m4/lock.m4 b/m4/lock.m4 deleted file mode 100644 index 93b76fa..0000000 --- a/m4/lock.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# lock.m4 serial 14 -dnl Copyright (C) 2005-2019 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. - -dnl From Bruno Haible. - -AC_DEFUN([gl_LOCK], -[ - AC_REQUIRE([gl_THREADLIB]) - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - has_rwlock=false - AC_CHECK_TYPE([pthread_rwlock_t], - [has_rwlock=true - AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], - [Define if the POSIX multithreading library has read/write locks.])], - [], - [#include ]) - if $has_rwlock; then - gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER - fi - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[#include ]], - [[ -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ - && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) -error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - ]])], - [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], - [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) - fi - gl_PREREQ_LOCK -]) - -# Prerequisites of lib/glthread/lock.c. -AC_DEFUN([gl_PREREQ_LOCK], [:]) diff --git a/m4/longlong.m4 b/m4/longlong.m4 deleted file mode 100644 index 08d0e36..0000000 --- a/m4/longlong.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# longlong.m4 serial 18 -dnl Copyright (C) 1999-2007, 2009-2019 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. - -dnl From Paul Eggert. - -AC_PREREQ([2.62]) - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This can be faster than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug is not important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [], - [ac_cv_type_long_long_int=no], - [:]) - fi - fi]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This can be faster than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [], - [ac_cv_type_unsigned_long_long_int=no]) - fi]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4 index 255e5b0..755f8c9 100644 --- a/m4/mbrtowc.m4 +++ b/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 32 -*- coding: utf-8 -*- -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2019 Free Software Foundation, +# mbrtowc.m4 serial 37 -*- coding: utf-8 -*- +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2020 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,6 +8,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBRTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_REQUIRE([gl_PTHREADLIB]) + AC_CHECK_HEADERS_ONCE([threads.h]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN @@ -39,6 +41,7 @@ AC_DEFUN([gl_FUNC_MBRTOWC], gl_MBRTOWC_NULL_ARG2 gl_MBRTOWC_RETVAL gl_MBRTOWC_NUL_RETVAL + gl_MBRTOWC_STORES_INCOMPLETE gl_MBRTOWC_EMPTY_INPUT gl_MBRTOWC_C_LOCALE case "$gl_cv_func_mbrtowc_null_arg1" in @@ -69,6 +72,13 @@ AC_DEFUN([gl_FUNC_MBRTOWC], REPLACE_MBRTOWC=1 ;; esac + case "$gl_cv_func_mbrtowc_stores_incomplete" in + *no) ;; + *) AC_DEFINE([MBRTOWC_STORES_INCOMPLETE_BUG], [1], + [Define if the mbrtowc function stores a wide character when reporting incomplete input.]) + REPLACE_MBRTOWC=1 + ;; + esac case "$gl_cv_func_mbrtowc_empty_input" in *yes) ;; *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1], @@ -77,15 +87,32 @@ AC_DEFUN([gl_FUNC_MBRTOWC], REPLACE_MBRTOWC=1 ;; esac - case $gl_cv_C_locale_sans_EILSEQ in + case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in *yes) ;; - *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1], - [Define to 1 if the C locale may have encoding errors.]) + *) AC_DEFINE([MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ], [1], + [Define if the mbrtowc function may signal encoding errors in the C locale.]) REPLACE_MBRTOWC=1 ;; esac fi fi + if test $REPLACE_MBSTATE_T = 1; then + case "$host_os" in + mingw*) LIB_MBRTOWC= ;; + *) + gl_WEAK_SYMBOLS + case "$gl_cv_have_weak" in + *yes) LIB_MBRTOWC= ;; + *) LIB_MBRTOWC="$LIBPTHREAD" ;; + esac + ;; + esac + else + LIB_MBRTOWC= + fi + dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX + dnl with gcc or xlc, and empty otherwise. + AC_SUBST([LIB_MBRTOWC]) ]) dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that @@ -97,11 +124,19 @@ dnl avoid inconsistencies. AC_DEFUN([gl_MBSTATE_T_BROKEN], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_FUNCS_ONCE([mbsinit]) AC_CHECK_FUNCS_ONCE([mbrtowc]) - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + dnl On native Windows, we know exactly how mbsinit() behaves and don't need + dnl to override it, even if - like on MSVC - mbsinit() is only defined as + dnl an inline function, not as a global function. + if case "$host_os" in + mingw*) true ;; + *) test $ac_cv_func_mbsinit = yes ;; + esac \ + && test $ac_cv_func_mbrtowc = yes; then gl_MBRTOWC_INCOMPLETE_STATE gl_MBRTOWC_SANITYCHECK REPLACE_MBSTATE_T=0 @@ -126,6 +161,7 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_JA]) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], [gl_cv_func_mbrtowc_incomplete_state], @@ -171,6 +207,39 @@ int main () [gl_cv_func_mbrtowc_incomplete_state=yes], [gl_cv_func_mbrtowc_incomplete_state=no], [:]) + else + if test $LOCALE_FR_UTF8 != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 2; + } + return 0; +}]])], + [gl_cv_func_mbrtowc_incomplete_state=yes], + [gl_cv_func_mbrtowc_incomplete_state=no], + [:]) + fi fi ]) ]) @@ -550,6 +619,126 @@ int main () ]) ]) +dnl Test whether mbrtowc stores a wide character when reporting incomplete +dnl input. + +AC_DEFUN([gl_MBRTOWC_STORES_INCOMPLETE], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc stores incomplete characters], + [gl_cv_func_mbrtowc_stores_incomplete], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;; + *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;; + esac +changequote([,])dnl + case "$host_os" in + mingw*) + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + if (setlocale (LC_ALL, "French_France.65001") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 1; + } + if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 2; + } + if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 4; + } + if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + result |= 8; + } + return result; +}]])], + [gl_cv_func_mbrtowc_stores_incomplete=no], + [gl_cv_func_mbrtowc_stores_incomplete=yes], + [:]) + ;; + *) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) + if test $LOCALE_FR_UTF8 != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + wchar_t wc = (wchar_t) 0xBADFACE; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) + && wc != (wchar_t) 0xBADFACE) + return 1; + } + return 0; +}]])], + [gl_cv_func_mbrtowc_stores_incomplete=no], + [gl_cv_func_mbrtowc_stores_incomplete=yes], + [:]) + fi + ;; + esac + ]) +]) + dnl Test whether mbrtowc returns the correct value on empty input. AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT], @@ -595,11 +784,11 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether the C locale is free of encoding errors], - [gl_cv_C_locale_sans_EILSEQ], + [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. - gl_cv_C_locale_sans_EILSEQ="$gl_cross_guess_normal" + gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" AC_RUN_IFELSE( [AC_LANG_PROGRAM( @@ -622,22 +811,28 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE], } return 0; ]])], - [gl_cv_C_locale_sans_EILSEQ=yes], - [gl_cv_C_locale_sans_EILSEQ=no], + [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes], + [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no], [case "$host_os" in # Guess yes on native Windows. - mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;; esac ]) ]) ]) -# Prerequisites of lib/mbrtowc.c. +# Prerequisites of lib/mbrtowc.c and lib/lc-charset-dispatch.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ AC_REQUIRE([AC_C_INLINE]) : ]) +# Prerequisites of lib/mbtowc-lock.c. +AC_DEFUN([gl_PREREQ_MBTOWC_LOCK], +[ + gl_VISIBILITY +]) + dnl From Paul Eggert diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4 index e2f45e7..8c26b6b 100644 --- a/m4/mbsinit.m4 +++ b/m4/mbsinit.m4 @@ -1,5 +1,5 @@ # mbsinit.m4 serial 8 -dnl Copyright (C) 2008, 2010-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-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. diff --git a/m4/mbsrtowcs.m4 b/m4/mbsrtowcs.m4 index cbdde2c..e0bc229 100644 --- a/m4/mbsrtowcs.m4 +++ b/m4/mbsrtowcs.m4 @@ -1,5 +1,5 @@ # mbsrtowcs.m4 serial 13 -dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2008-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. diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4 index f669753..057ce12 100644 --- a/m4/mbstate_t.m4 +++ b/m4/mbstate_t.m4 @@ -1,5 +1,5 @@ # mbstate_t.m4 serial 13 -dnl Copyright (C) 2000-2002, 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-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. diff --git a/m4/mbtowc.m4 b/m4/mbtowc.m4 index 5a4b92e..befcffa 100644 --- a/m4/mbtowc.m4 +++ b/m4/mbtowc.m4 @@ -1,5 +1,5 @@ # mbtowc.m4 serial 3 -dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2011-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. diff --git a/m4/memchr.m4 b/m4/memchr.m4 index c12d20a..91eec88 100644 --- a/m4/memchr.m4 +++ b/m4/memchr.m4 @@ -1,5 +1,5 @@ # memchr.m4 serial 15 -dnl Copyright (C) 2002-2004, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2009-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. diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4 index 50c3808..d5c69df 100644 --- a/m4/mmap-anon.m4 +++ b/m4/mmap-anon.m4 @@ -1,5 +1,5 @@ # mmap-anon.m4 serial 10 -dnl Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-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. diff --git a/m4/monetary_h.m4 b/m4/monetary_h.m4 index 0763769..0b3c7c7 100644 --- a/m4/monetary_h.m4 +++ b/m4/monetary_h.m4 @@ -1,5 +1,5 @@ # monetary_h.m4 serial 4 -dnl Copyright (C) 2017-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2017-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. diff --git a/m4/multiarch.m4 b/m4/multiarch.m4 index d48316e..3c2034c 100644 --- a/m4/multiarch.m4 +++ b/m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 7 -dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2008-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. diff --git a/m4/nocrash.m4 b/m4/nocrash.m4 index 8577038..637a0ea 100644 --- a/m4/nocrash.m4 +++ b/m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 5 -dnl Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-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. diff --git a/m4/off_t.m4 b/m4/off_t.m4 index 711a2d4..6e19af8 100644 --- a/m4/off_t.m4 +++ b/m4/off_t.m4 @@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2012-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. diff --git a/m4/pthread_rwlock_rdlock.m4 b/m4/pthread_rwlock_rdlock.m4 deleted file mode 100644 index 87886a3..0000000 --- a/m4/pthread_rwlock_rdlock.m4 +++ /dev/null @@ -1,185 +0,0 @@ -# pthread_rwlock_rdlock.m4 serial 4 -dnl Copyright (C) 2017-2019 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. - -dnl From Bruno Haible. -dnl Inspired by -dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c -dnl by Intel Corporation. - -dnl Test whether in a situation where -dnl - an rwlock is taken by a reader and has a writer waiting, -dnl - an additional reader requests the lock, -dnl - the waiting writer and the requesting reader threads have the same -dnl priority, -dnl the requesting reader thread gets blocked, so that at some point the -dnl waiting writer can acquire the lock. -dnl Without such a guarantee, when there a N readers and each of the readers -dnl spends more than 1/Nth of the time with the lock held, there is a high -dnl probability that the waiting writer will not get the lock in a given finite -dnl time, a phenomenon called "writer starvation". -dnl Without such a guarantee, applications have a hard time avoiding writer -dnl starvation. -dnl -dnl POSIX:2017 makes this requirement only for implementations that support TPS -dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO -dnl and SCHED_RR, see -dnl https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html -dnl but this test verifies the guarantee regardless of TPS and regardless of -dnl scheduling policy. -dnl Glibc does not provide this guarantee (and never will on Linux), see -dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701 -dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052 -AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], -[ - AC_REQUIRE([gl_THREADLIB_EARLY]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader], - [gl_cv_pthread_rwlock_rdlock_prefer_writer], - [save_LIBS="$LIBS" - LIBS="$LIBS $LIBMULTITHREAD" - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -#include - -#define SUCCEED() exit (0) -#define FAILURE() exit (1) -#define UNEXPECTED(n) (exit (10 + (n))) - -/* The main thread creates the waiting writer and the requesting reader threads - in the default way; this guarantees that they have the same priority. - We can reuse the main thread as first reader thread. */ - -static pthread_rwlock_t lock; -static pthread_t reader1; -static pthread_t writer; -static pthread_t reader2; -static pthread_t timer; -/* Used to pass control from writer to reader2 and from reader2 to timer, - as in a relay race. - Passing control from one running thread to another running thread - is most likely faster than to create the second thread. */ -static pthread_mutex_t baton; - -static void * -timer_func (void *ignored) -{ - /* Step 13 (can be before or after step 12): - The timer thread takes the baton, then waits a moment to make sure - it can tell whether the second reader thread is blocked at step 12. */ - if (pthread_mutex_lock (&baton)) - UNEXPECTED (13); - usleep (100000); - /* By the time we get here, it's clear that the second reader thread is - blocked at step 12. This is the desired behaviour. */ - SUCCEED (); -} - -static void * -reader2_func (void *ignored) -{ - int err; - - /* Step 8 (can be before or after step 7): - The second reader thread takes the baton, then waits a moment to make sure - the writer thread has reached step 7. */ - if (pthread_mutex_lock (&baton)) - UNEXPECTED (8); - usleep (100000); - /* Step 9: The second reader thread requests the lock. */ - err = pthread_rwlock_tryrdlock (&lock); - if (err == 0) - FAILURE (); - else if (err != EBUSY) - UNEXPECTED (9); - /* Step 10: Launch a timer, to test whether the next call blocks. */ - if (pthread_create (&timer, NULL, timer_func, NULL)) - UNEXPECTED (10); - /* Step 11: Release the baton. */ - if (pthread_mutex_unlock (&baton)) - UNEXPECTED (11); - /* Step 12: The second reader thread requests the lock. */ - err = pthread_rwlock_rdlock (&lock); - if (err == 0) - FAILURE (); - else - UNEXPECTED (12); -} - -static void * -writer_func (void *ignored) -{ - /* Step 4: Take the baton, so that the second reader thread does not go ahead - too early. */ - if (pthread_mutex_lock (&baton)) - UNEXPECTED (4); - /* Step 5: Create the second reader thread. */ - if (pthread_create (&reader2, NULL, reader2_func, NULL)) - UNEXPECTED (5); - /* Step 6: Release the baton. */ - if (pthread_mutex_unlock (&baton)) - UNEXPECTED (6); - /* Step 7: The writer thread requests the lock. */ - if (pthread_rwlock_wrlock (&lock)) - UNEXPECTED (7); - return NULL; -} - -int -main () -{ - reader1 = pthread_self (); - - /* Step 1: The main thread initializes the lock and the baton. */ - if (pthread_rwlock_init (&lock, NULL)) - UNEXPECTED (1); - if (pthread_mutex_init (&baton, NULL)) - UNEXPECTED (1); - /* Step 2: The main thread acquires the lock as a reader. */ - if (pthread_rwlock_rdlock (&lock)) - UNEXPECTED (2); - /* Step 3: Create the writer thread. */ - if (pthread_create (&writer, NULL, writer_func, NULL)) - UNEXPECTED (3); - /* Job done. Go to sleep. */ - for (;;) - { - sleep (1); - } -} -]])], - [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes], - [gl_cv_pthread_rwlock_rdlock_prefer_writer=no], - [case "$host_os" in - # Guess no on glibc systems. - *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; - # Guess no on musl systems. - *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; - # Guess no on bionic systems. - *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; - # Guess yes on native Windows with the mingw-w64 winpthreads library. - # Guess no on native Windows with the gnulib windows-rwlock module. - mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" - else - gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" - fi - ;; - # If we don't know, obey --enable-cross-guesses. - *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; - esac - ]) - LIBS="$save_LIBS" - ]) - case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in - *yes) - AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1], - [Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.]) - ;; - esac -]) diff --git a/m4/setlocale_null.m4 b/m4/setlocale_null.m4 new file mode 100644 index 0000000..c1ee1f7 --- /dev/null +++ b/m4/setlocale_null.m4 @@ -0,0 +1,98 @@ +# setlocale_null.m4 serial 2 +dnl Copyright (C) 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. + +AC_DEFUN([gl_FUNC_SETLOCALE_NULL], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_PTHREADLIB]) + AC_CHECK_HEADERS_ONCE([threads.h]) + + AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe], + [gl_cv_func_setlocale_null_all_mtsafe], + [case "$host_os" in + # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. + *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) + gl_cv_func_setlocale_null_all_mtsafe=no ;; + # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. + *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) + gl_cv_func_setlocale_null_all_mtsafe=yes ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; + esac + ]) + dnl On platforms without multithreading, there is no issue. + case "$host_os" in + mingw*) ;; + *) + if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then + gl_cv_func_setlocale_null_all_mtsafe="trivially yes" + fi + ;; + esac + case "$gl_cv_func_setlocale_null_all_mtsafe" in + *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; + *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; + esac + AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ALL_MTSAFE], [$SETLOCALE_NULL_ALL_MTSAFE], + [Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe.]) + + dnl This is about a single category (not LC_ALL). + AC_CACHE_CHECK([whether setlocale (category, NULL) is multithread-safe], + [gl_cv_func_setlocale_null_one_mtsafe], + [case "$host_os" in + # Guess no on OpenBSD, AIX. + openbsd* | aix*) + gl_cv_func_setlocale_null_one_mtsafe=no ;; + # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. + *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) + gl_cv_func_setlocale_null_one_mtsafe=yes ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; + esac + ]) + dnl On platforms without multithreading, there is no issue. + case "$host_os" in + mingw*) ;; + *) + if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then + gl_cv_func_setlocale_null_one_mtsafe="trivially yes" + fi + ;; + esac + case "$gl_cv_func_setlocale_null_one_mtsafe" in + *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; + *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; + esac + AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ONE_MTSAFE], [$SETLOCALE_NULL_ONE_MTSAFE], + [Define to 1 if setlocale (category, NULL) is multithread-safe.]) + + dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c. + if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then + case "$host_os" in + mingw*) LIB_SETLOCALE_NULL= ;; + *) + gl_WEAK_SYMBOLS + case "$gl_cv_have_weak" in + *yes) LIB_SETLOCALE_NULL= ;; + *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; + esac + ;; + esac + else + LIB_SETLOCALE_NULL= + fi + dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX + dnl with gcc or xlc, and empty otherwise. + AC_SUBST([LIB_SETLOCALE_NULL]) +]) + +# Prerequisites of lib/setlocale-lock.c. +AC_DEFUN([gl_PREREQ_SETLOCALE_LOCK], +[ + gl_VISIBILITY +]) diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4 index 38bcee1..6c0a588 100644 --- a/m4/ssize_t.m4 +++ b/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-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. diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 index acb8522..6bb087e 100644 --- a/m4/stdbool.m4 +++ b/m4/stdbool.m4 @@ -1,22 +1,36 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-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. -#serial 7 +#serial 8 # Prepare for substituting if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) + AC_REQUIRE([AC_CANONICAL_HOST]) - # Define two additional variables used in the Makefile substitution. - + dnl On some platforms, does not exist or does not conform to C99. + dnl On Solaris 10 with CC=cc CXX=CC, exists but is not usable + dnl in C++ mode (and no exists). In this case, we use our + dnl replacement, also in C mode (for binary compatibility between C and C++). if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' + case "$host_os" in + solaris*) + if test -z "$GCC"; then + STDBOOL_H='stdbool.h' + else + STDBOOL_H='' + fi + ;; + *) + STDBOOL_H='' + ;; + esac else STDBOOL_H='stdbool.h' fi diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4 index 979e3cf..6bcfadb 100644 --- a/m4/stddef_h.m4 +++ b/m4/stddef_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for , for platforms that have issues. # stddef_h.m4 serial 6 -dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2009-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. diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 11d8e8e..29ad826 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 53 -dnl Copyright (C) 2001-2019 Free Software Foundation, Inc. +# stdint.m4 serial 54 +dnl Copyright (C) 2001-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. @@ -17,21 +17,12 @@ AC_DEFUN_ONCE([gl_STDINT_H], AC_REQUIRE([gl_LIMITS_H]) AC_REQUIRE([gt_TYPE_WINT_T]) - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) + dnl For backward compatibility. Some packages may still be testing these + dnl macros. + AC_DEFINE([HAVE_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'long long int'.]) + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'unsigned long long int'.]) dnl Check for , in the same way as gl_WCHAR_H does. AC_CHECK_HEADERS_ONCE([wchar.h]) diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 6c9c104..c603b51 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,5 +1,5 @@ # stdio_h.m4 serial 49 -dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2007-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. diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 6121602..61a3e31 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ # stdlib_h.m4 serial 48 -dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2007-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. diff --git a/m4/string_h.m4 b/m4/string_h.m4 index 0c0e3a7..4c1f685 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -1,6 +1,6 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2019 Free Software Foundation, Inc. +# Copyright (C) 2007-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 index d0a9020..1471aea 100644 --- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -1,5 +1,5 @@ # sys_socket_h.m4 serial 24 -dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2005-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. diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 index 361ac3f..d63df9e 100644 --- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ # sys_stat_h.m4 serial 31 -*- Autoconf -*- -dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2006-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. diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index 3d9233a..8fc8599 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for . # serial 9 -# Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 index be06559..be918dc 100644 --- a/m4/sys_types_h.m4 +++ b/m4/sys_types_h.m4 @@ -1,5 +1,5 @@ # sys_types_h.m4 serial 9 -dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2011-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. diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 index 045d9da..e64ad62 100644 --- a/m4/threadlib.m4 +++ b/m4/threadlib.m4 @@ -1,5 +1,5 @@ -# threadlib.m4 serial 20 -dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. +# threadlib.m4 serial 26 +dnl Copyright (C) 2005-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. @@ -8,6 +8,319 @@ dnl From Bruno Haible. AC_PREREQ([2.60]) +dnl The general structure of the multithreading modules in gnulib is that we +dnl have three set of modules: +dnl +dnl * POSIX API: +dnl pthread, which combines +dnl pthread-h +dnl pthread-thread +dnl pthread-once +dnl pthread-mutex +dnl pthread-rwlock +dnl pthread-cond +dnl pthread-tss +dnl pthread-spin +dnl sched_yield +dnl +dnl * ISO C API: +dnl threads, which combines +dnl threads-h +dnl thrd +dnl mtx +dnl cnd +dnl tss +dnl +dnl * Gnulib API, with an implementation that can be chosen at configure +dnl time through the option --enable-threads=... +dnl thread +dnl lock +dnl cond +dnl tls +dnl yield +dnl +dnl They are independent, except for the fact that +dnl - the implementation of the ISO C API may use the POSIX (or some other +dnl platform dependent) API, +dnl - the implementation of the Gnulib API may use the POSIX or ISO C or +dnl some other platform dependent API, depending on the --enable-threads +dnl option. +dnl +dnl This file contains macros for all of these APIs! + +dnl ============================================================================ +dnl Macros for all thread APIs + +AC_DEFUN([gl_ANYTHREADLIB_EARLY], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + if test -z "$gl_anythreadlib_early_done"; then + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + gl_anythreadlib_early_done=done + fi +]) + +dnl Checks whether the compiler and linker support weak declarations of symbols. + +AC_DEFUN([gl_WEAK_SYMBOLS], +[ + AC_CACHE_CHECK([whether imported symbols can be declared weak], + [gl_cv_have_weak], + [gl_cv_have_weak=no + dnl First, test whether the compiler accepts it syntactically. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[extern void xyzzy (); +#pragma weak xyzzy]], + [[xyzzy();]])], + [gl_cv_have_weak=maybe]) + if test $gl_cv_have_weak = maybe; then + dnl Second, test whether it actually works. On Cygwin 1.7.2, with + dnl gcc 4.3, symbols declared weak always evaluate to the address 0. + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +}]])], + [gl_cv_have_weak=yes], + [gl_cv_have_weak=no], + [dnl When cross-compiling, assume that only ELF platforms support + dnl weak symbols. + AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_have_weak="guessing yes"], + [gl_cv_have_weak="guessing no"]) + ]) + fi + dnl But when linking statically, weak symbols don't work. + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + ]) + case "$gl_cv_have_weak" in + *yes) + AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], + [Define to 1 if the compiler and linker support weak declarations of symbols.]) + ;; + esac +]) + +dnl ============================================================================ +dnl Macros for the POSIX API + +dnl gl_PTHREADLIB +dnl ------------- +dnl Tests for the libraries needs for using the POSIX threads API. +dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile. +dnl Sets the variable LIBPMULTITHREAD, for programs that really need +dnl multithread functionality. The difference between LIBPTHREAD and +dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically +dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not. +dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the +dnl sched_yield() function. +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. +dnl Defines the C macro HAVE_PTHREAD_API if (at least parts of) the POSIX +dnl threads API is available. + +dnl The guts of gl_PTHREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_PTHREADLIB_BODY], +[ + AC_REQUIRE([gl_ANYTHREADLIB_EARLY]) + if test -z "$gl_pthreadlib_body_done"; then + gl_pthread_api=no + LIBPTHREAD= + LIBPMULTITHREAD= + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_ANYTHREADLIB_EARLY. + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + ]], + [[pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma);]])], + [gl_pthread_api=yes + LIBPTHREAD=$gl_pthread + LIBPMULTITHREAD=$gl_pthread]) + LIBS=$save_LIBS + test $gl_pthread_api = yes && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], + [LIBPMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + elif test $gl_pthread_api != yes; then + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB([pthread], [pthread_kill], + [gl_pthread_api=yes + LIBPTHREAD=-lpthread + LIBPMULTITHREAD=-lpthread]) + if test $gl_pthread_api != yes; then + # For FreeBSD 4. + AC_CHECK_LIB([c_r], [pthread_kill], + [gl_pthread_api=yes + LIBPTHREAD=-lc_r + LIBPMULTITHREAD=-lc_r]) + fi + fi + fi + AC_MSG_CHECKING([whether POSIX threads API is available]) + AC_MSG_RESULT([$gl_pthread_api]) + AC_SUBST([LIBPTHREAD]) + AC_SUBST([LIBPMULTITHREAD]) + if test $gl_pthread_api = yes; then + AC_DEFINE([HAVE_PTHREAD_API], [1], + [Define if you have the header and the POSIX threads API.]) + fi + + dnl On some systems, sched_yield is in librt, rather than in libpthread. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[sched_yield ();]])], + [LIB_SCHED_YIELD= + ], + [dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc. + AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt], + [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. + AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])]) + ]) + AC_SUBST([LIB_SCHED_YIELD]) + + gl_pthreadlib_body_done=done + fi +]) + +AC_DEFUN([gl_PTHREADLIB], +[ + AC_REQUIRE([gl_ANYTHREADLIB_EARLY]) + gl_PTHREADLIB_BODY +]) + +dnl ============================================================================ +dnl Macros for the ISO C API + +dnl gl_STDTHREADLIB +dnl --------------- +dnl Tests for the libraries needs for using the ISO C threads API. +dnl Sets the variable LIBSTDTHREAD to the linker options for use in a Makefile. +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. +dnl Defines the C macro HAVE_THREADS_H if (at least parts of) the ISO C threads +dnl API is available. + +dnl The guts of gl_STDTHREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_STDTHREADLIB_BODY], +[ + AC_REQUIRE([gl_ANYTHREADLIB_EARLY]) + AC_REQUIRE([AC_CANONICAL_HOST]) + if test -z "$gl_stdthreadlib_body_done"; then + AC_CHECK_HEADERS_ONCE([threads.h]) + + case "$host_os" in + mingw*) + LIBSTDTHREAD= + ;; + *) + gl_PTHREADLIB_BODY + if test $ac_cv_header_threads_h = yes; then + dnl glibc >= 2.29 has thrd_create in libpthread. + dnl FreeBSD >= 10 has thrd_create in libstdthreads; this library depends + dnl on libpthread (for the symbol 'pthread_mutexattr_gettype'). + dnl AIX >= 7.1 and Solaris >= 11.4 have thrd_create in libc. + AC_CHECK_FUNCS([thrd_create]) + if test $ac_cv_func_thrd_create = yes; then + LIBSTDTHREAD= + else + AC_CHECK_LIB([stdthreads], [thrd_create], [ + LIBSTDTHREAD='-lstdthreads -lpthread' + ], [ + dnl Guess that thrd_create is in libpthread. + LIBSTDTHREAD="$LIBPMULTITHREAD" + ]) + fi + else + dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c. + LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD" + fi + ;; + esac + AC_SUBST([LIBSTDTHREAD]) + + AC_MSG_CHECKING([whether ISO C threads API is available]) + AC_MSG_RESULT([$ac_cv_header_threads_h]) + gl_stdthreadlib_body_done=done + fi +]) + +AC_DEFUN([gl_STDTHREADLIB], +[ + AC_REQUIRE([gl_ANYTHREADLIB_EARLY]) + gl_STDTHREADLIB_BODY +]) + +dnl ============================================================================ +dnl Macros for the Gnulib API + dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. @@ -16,7 +329,13 @@ dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the dnl default is 'no', otherwise it is system dependent. In both cases, the user dnl can change the choice through the options --enable-threads=choice or dnl --disable-threads. -dnl Defines at most one of the macros USE_POSIX_THREADS, USE_WINDOWS_THREADS. +dnl Defines at most one of the macros USE_ISOC_THREADS, USE_POSIX_THREADS, +dnl USE_ISOC_AND_POSIX_THREADS, USE_WINDOWS_THREADS. +dnl The choice --enable-threads=isoc+posix is available only on platforms that +dnl have both the ISO C and the POSIX threads APIs. It has the effect of using +dnl the ISO C API for most things and the POSIX API only for creating and +dnl controlling threads (because there is no equivalent to pthread_atfork in +dnl the ISO C API). dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). @@ -54,7 +373,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY], [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=]) AC_ARG_ENABLE([threads], -AC_HELP_STRING([--enable-threads={posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ +AC_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ AC_HELP_STRING([--disable-threads], [build without multithread safety])]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then @@ -88,26 +407,12 @@ changequote(,)dnl changequote([,])dnl fi ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_LINK_IFELSE test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac + if test "$gl_use_threads" = yes \ + || test "$gl_use_threads" = isoc \ + || test "$gl_use_threads" = posix \ + || test "$gl_use_threads" = isoc+posix; then + # For using or : + gl_ANYTHREADLIB_EARLY fi ]) @@ -123,45 +428,7 @@ AC_DEFUN([gl_THREADLIB_BODY], LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then dnl Check whether the compiler and linker support weak declarations. - AC_CACHE_CHECK([whether imported symbols can be declared weak], - [gl_cv_have_weak], - [gl_cv_have_weak=no - dnl First, test whether the compiler accepts it syntactically. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[extern void xyzzy (); -#pragma weak xyzzy]], - [[xyzzy();]])], - [gl_cv_have_weak=maybe]) - if test $gl_cv_have_weak = maybe; then - dnl Second, test whether it actually works. On Cygwin 1.7.2, with - dnl gcc 4.3, symbols declared weak always evaluate to the address 0. - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#pragma weak fputs -int main () -{ - return (fputs == NULL); -}]])], - [gl_cv_have_weak=yes], - [gl_cv_have_weak=no], - [dnl When cross-compiling, assume that only ELF platforms support - dnl weak symbols. - AC_EGREP_CPP([Extensible Linking Format], - [#ifdef __ELF__ - Extensible Linking Format - #endif - ], - [gl_cv_have_weak="guessing yes"], - [gl_cv_have_weak="guessing no"]) - ]) - fi - dnl But when linking statically, weak symbols don't work. - case " $LDFLAGS " in - *" -static "*) gl_cv_have_weak=no ;; - esac - ]) + gl_WEAK_SYMBOLS if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then dnl If we use weak symbols to implement pthread_in_use / pth_in_use / dnl thread_in_use, we also need to test whether the ISO C 11 thrd_create @@ -169,75 +436,23 @@ int main () AC_CHECK_HEADERS_ONCE([threads.h]) : fi - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - AC_CHECK_HEADER([pthread.h], - [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - # - # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 - # needs -pthread for some reason. See: - # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html - save_LIBS=$LIBS - for gl_pthread in '' '-pthread'; do - LIBS="$LIBS $gl_pthread" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include - pthread_mutex_t m; - pthread_mutexattr_t ma; - ]], - [[pthread_mutex_lock (&m); - pthread_mutexattr_init (&ma);]])], - [gl_have_pthread=yes - LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread - LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread]) - LIBS=$save_LIBS - test -n "$gl_have_pthread" && break - done - - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB([pthread], [pthread_kill], - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - # On Solaris 10 or newer, this test is no longer needed, because - # libc contains the fully functional pthread functions. - case "$host_os" in - solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], - [Define if the pthread_in_use() detection is hard.]) - esac - ]) - elif test -z "$gl_have_pthread"; then - # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB([pthread], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - AC_CHECK_LIB([c_r], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) - fi - fi - if test -n "$gl_have_pthread"; then + if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then + AC_CHECK_HEADERS_ONCE([threads.h]) + gl_have_isoc_threads="$ac_cv_header_threads_h" + fi + if test "$gl_use_threads" = yes \ + || test "$gl_use_threads" = posix \ + || test "$gl_use_threads" = isoc+posix; then + gl_PTHREADLIB_BODY + LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD + LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD + if test $gl_pthread_api = yes; then + if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then + gl_threads_api='isoc+posix' + AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1], + [Define if the combination of the ISO C and POSIX multithreading APIs can be used.]) + LIBTHREAD= LTLIBTHREAD= + else gl_threads_api=posix AC_DEFINE([USE_POSIX_THREADS], [1], [Define if the POSIX multithreading library can be used.]) @@ -245,14 +460,23 @@ int main () if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], [Define if references to the POSIX multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= + LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi - if test -z "$gl_have_pthread"; then + if test $gl_threads_api = none; then + if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then + gl_STDTHREADLIB_BODY + LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD + LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD + gl_threads_api=isoc + AC_DEFINE([USE_ISOC_THREADS], [1], + [Define if the ISO C multithreading library can be used.]) + fi + fi + if test $gl_threads_api = none; then case "$gl_use_threads" in yes | windows | win32) # The 'win32' is for backward compatibility. if { case "$host_os" in @@ -306,6 +530,9 @@ AC_DEFUN([gl_AVOID_WINPTHREAD], [ ]) +dnl ============================================================================ + + dnl Survey of platforms: dnl dnl Platform Available Compiler Supports test-lock diff --git a/m4/time_h.m4 b/m4/time_h.m4 index f08f29b..aae0ae2 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -1,6 +1,6 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2019 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2020 Free Software Foundation, Inc. # serial 11 diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index 18b7140..ea2bb01 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 76 -dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +# unistd_h.m4 serial 77 +dnl Copyright (C) 2006-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. @@ -84,6 +84,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) + GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) diff --git a/m4/visibility.m4 b/m4/visibility.m4 new file mode 100644 index 0000000..9f493ba --- /dev/null +++ b/m4/visibility.m4 @@ -0,0 +1,77 @@ +# visibility.m4 serial 6 +dnl Copyright (C) 2005, 2008, 2010-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. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl Mac OS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([gl_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_CACHE_CHECK([whether the -Werror option is usable], + [gl_cv_cc_vis_werror], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS" + ]) + dnl Now check whether visibility declarations are supported. + AC_CACHE_CHECK([for simple visibility declarations], + [gl_cv_cc_visibility], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS" + ]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4 index 7ebe2d3..5c8ee45 100644 --- a/m4/warn-on-use.m4 +++ b/m4/warn-on-use.m4 @@ -1,5 +1,5 @@ # warn-on-use.m4 serial 6 -dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2010-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. diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 index cd20e7a..d1b7228 100644 --- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -1,13 +1,13 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2007-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. dnl Written by Eric Blake. -# wchar_h.m4 serial 43 +# wchar_h.m4 serial 44 AC_DEFUN([gl_WCHAR_H], [ @@ -237,4 +237,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME]) + REPLACE_WCSTOK=0; AC_SUBST([REPLACE_WCSTOK]) ]) diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 index 5db5815..e48d464 100644 --- a/m4/wchar_t.m4 +++ b/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-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. diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4 index fec22f3..c45fd98 100644 --- a/m4/wcrtomb.m4 +++ b/m4/wcrtomb.m4 @@ -1,5 +1,5 @@ -# wcrtomb.m4 serial 14 -dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. +# wcrtomb.m4 serial 16 +dnl Copyright (C) 2008-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. @@ -31,9 +31,11 @@ AC_DEFUN([gl_FUNC_WCRTOMB], REPLACE_WCRTOMB=1 fi else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_WCRTOMB=1 - fi + dnl We don't actually need to override wcrtomb when redefining the semantics + dnl of the mbstate_t type. Tested on 32-bit AIX. + dnl if test $REPLACE_MBSTATE_T = 1; then + dnl REPLACE_WCRTOMB=1 + dnl fi if test $REPLACE_WCRTOMB = 0; then dnl On Android 4.3, wcrtomb produces wrong characters in the C locale. dnl On AIX 4.3, OSF/1 5.1 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL) @@ -79,7 +81,9 @@ int main () ]) case "$gl_cv_func_wcrtomb_works" in *yes) ;; - *) REPLACE_WCRTOMB=1 ;; + *) AC_DEFINE([WCRTOMB_C_LOCALE_BUG], [1], + [Define if the wcrtomb function does not work in the C locale.]) + REPLACE_WCRTOMB=1 ;; esac fi if test $REPLACE_WCRTOMB = 0; then @@ -90,12 +94,10 @@ int main () dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; + # Guess no on AIX 4, OSF/1, Solaris, native Windows. + aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then @@ -111,6 +113,7 @@ changequote([,])dnl #include #include #include +#include int main () { int result = 0; @@ -123,6 +126,12 @@ int main () { if (wcrtomb (NULL, 0, NULL) != 1) result |= 2; + { + wchar_t wc = (wchar_t) 0xBADFACE; + if (mbtowc (&wc, "\303\274", 2) == 2) + if (wcrtomb (NULL, wc, NULL) != 1) + result |= 2; + } } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { @@ -143,7 +152,9 @@ int main () ]) case "$gl_cv_func_wcrtomb_retval" in *yes) ;; - *) REPLACE_WCRTOMB=1 ;; + *) AC_DEFINE([WCRTOMB_RETVAL_BUG], [1], + [Define if the wcrtomb function has an incorrect return value.]) + REPLACE_WCRTOMB=1 ;; esac fi fi diff --git a/m4/wcsdup.m4 b/m4/wcsdup.m4 index 7a0588c..662f65a 100644 --- a/m4/wcsdup.m4 +++ b/m4/wcsdup.m4 @@ -1,5 +1,5 @@ # wcsdup.m4 serial 2 -dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2011-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. diff --git a/m4/wctob.m4 b/m4/wctob.m4 index a906828..8013326 100644 --- a/m4/wctob.m4 +++ b/m4/wctob.m4 @@ -1,5 +1,5 @@ # wctob.m4 serial 12 -dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2008-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. diff --git a/m4/wctomb.m4 b/m4/wctomb.m4 index 79d29f1..8e8c6a2 100644 --- a/m4/wctomb.m4 +++ b/m4/wctomb.m4 @@ -1,5 +1,5 @@ # wctomb.m4 serial 2 -dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2011-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. diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4 index 6903d75..dc854e6 100644 --- a/m4/wctype_h.m4 +++ b/m4/wctype_h.m4 @@ -1,8 +1,8 @@ -# wctype_h.m4 serial 21 +# wctype_h.m4 serial 22 dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2006-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. @@ -69,10 +69,14 @@ AC_DEFUN([gl_WCTYPE_H], fi AC_SUBST([HAVE_WCTYPE_H]) - case "$gl_cv_func_iswcntrl_works" in - *yes) REPLACE_ISWCNTRL=0 ;; - *) REPLACE_ISWCNTRL=1 ;; - esac + if test $GNULIB_OVERRIDES_WINT_T = 1; then + REPLACE_ISWCNTRL=1 + else + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + fi AC_SUBST([REPLACE_ISWCNTRL]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 index 61e8a23..877fd86 100644 --- a/m4/wint_t.m4 +++ b/m4/wint_t.m4 @@ -1,5 +1,5 @@ # wint_t.m4 serial 7 -dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-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. diff --git a/m4/wmemcpy.m4 b/m4/wmemcpy.m4 index 94cb025..3309248 100644 --- a/m4/wmemcpy.m4 +++ b/m4/wmemcpy.m4 @@ -1,5 +1,5 @@ # wmemcpy.m4 serial 3 -dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. +dnl Copyright (C) 2011-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. diff --git a/m4/xopen-source.m4 b/m4/xopen-source.m4 index 1bd5641..a479b09 100644 --- a/m4/xopen-source.m4 +++ b/m4/xopen-source.m4 @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/po/LINGUAS b/po/LINGUAS index 90a2532..142819d 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### @@ -40,6 +40,7 @@ fr hr hu nb +pt_BR ru sr sv diff --git a/po/Makevars b/po/Makevars index 684799a..2180ed1 100644 --- a/po/Makevars +++ b/po/Makevars @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/po/POTFILES.in b/po/POTFILES.in index 5c6748f..ec5bc01 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/po/da.gmo b/po/da.gmo index 5b3af1c..ae889b1 100644 Binary files a/po/da.gmo and b/po/da.gmo differ diff --git a/po/da.po b/po/da.po index a403baa..8533686 100644 --- a/po/da.po +++ b/po/da.po @@ -1,7 +1,7 @@ # ************************************************************************* # * * # * Danish Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * +# * Copyright (C) 2012-20, John Zaitseff * # * * # ************************************************************************* # @@ -12,10 +12,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:34+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:21+1100\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "Language: da\n" @@ -349,49 +349,54 @@ msgstr "Indtast spilnummer [^{1^}-^{9^}] eller ^{^} for at afbryde: " msgid "Please enter your name: " msgstr "Indtast dit navn: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Har du brug for instruktioner? [^{J^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Indtast spillernavne " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Spiller %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Har en spiller brug for instruktioner? [^{J^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Spillet er slut " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "Spillet er slut efter en runde." msgstr[1] "Spillet er slut efter %d runder." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Samlet formue " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Din samlede formue var ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -400,7 +405,7 @@ msgstr "" "Vinderen er ^{%ls^}\n" "som er ^[*** KONKURS ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -409,14 +414,14 @@ msgstr "" "Vinderen er ^{%ls^}\n" "med en formue på ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Spillets vinder " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -425,47 +430,47 @@ msgstr "Spiller" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Samlet formue (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Spiller: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Runde: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Sidste runde ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Aktieportefølje " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * K O N K U R S * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Ingen firmaer på kortet" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -480,7 +485,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -495,7 +500,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -509,7 +514,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -525,7 +530,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -544,25 +549,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Samlet formue: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Kontanter: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Gæld: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/de.gmo b/po/de.gmo index 11a1072..1f40c30 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index cf34687..fb5ae14 100644 --- a/po/de.po +++ b/po/de.po @@ -1,7 +1,7 @@ # ************************************************************************* # * * # * German Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * +# * Copyright (C) 2012-20, John Zaitseff * # * * # ************************************************************************* # @@ -12,10 +12,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:35+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:21+1100\n" "Last-Translator: Philipp Thomas \n" "Language-Team: German \n" "Language: de\n" @@ -357,49 +357,54 @@ msgstr "" msgid "Please enter your name: " msgstr "Bitte geben Sie Ihren Namen ein: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Brauchen Sie Instruktionen? [^{J^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Eingabe der Spielernamen " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Spieler %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Braucht einer der Spieler Anweisungen? [^{J^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Spielende " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "Das Spiel ist nach einer Runde vorbei." msgstr[1] "Das Spiel ist nach %d Runden vorbei." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Wert des Besitzes " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Der Wert Ihres Besitzes ist ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -408,7 +413,7 @@ msgstr "" "Der Gewinner ist ^{%ls^}\n" "er ist ^[*** BANKROTT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -417,14 +422,14 @@ msgstr "" "Der Gewinner ist ^{%ls^}\n" "mit einem Besitzwert von ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Gewinner des Spiels " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -433,47 +438,47 @@ msgstr "Spieler" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Wert des Besitzes (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Spieler: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Runde: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Letzte Runde ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Aktienportfolio " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R O T T * * * ^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Keine Firmen auf der Karte" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -488,7 +493,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -503,7 +508,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -517,7 +522,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -533,7 +538,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -552,25 +557,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Gesamtwert: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Bargeld: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Schulden: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/en@quot.gmo b/po/en@quot.gmo index e35e8af..2755341 100644 Binary files a/po/en@quot.gmo and b/po/en@quot.gmo differ diff --git a/po/en@quot.po b/po/en@quot.po index 92e06fa..441e051 100644 --- a/po/en@quot.po +++ b/po/en@quot.po @@ -1,7 +1,7 @@ # English translations for trader package. -# Copyright (C) 2019 John Zaitseff +# Copyright (C) 2020 John Zaitseff # This file is distributed under the same license as the trader package. -# Automatically generated, 2019. +# Automatically generated, 2020. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation @@ -27,10 +27,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-11-13 08:14+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-09 08:05+1100\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en@quot\n" @@ -358,49 +358,54 @@ msgstr "Enter game number [^{1^}-^{9^}] or ^{^} to cancel: " msgid "Please enter your name: " msgstr "Please enter your name: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Do you need any instructions? [^{Y^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Enter Player Names " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Player %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Does any player need instructions? [^{Y^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Game Over " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "The game is over after one turn." msgstr[1] "The game is over after %d turns." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Total Value " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Your total value was ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -409,7 +414,7 @@ msgstr "" "The winner is ^{%ls^}\n" "who is ^[*** BANKRUPT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -418,14 +423,14 @@ msgstr "" "The winner is ^{%ls^}\n" "with a value of ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Game Winner " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -434,47 +439,47 @@ msgstr "Player" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Total Value (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Player: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Turn: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Last Turn ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Stock Portfolio " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R U P T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "No companies on the map" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -489,7 +494,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -504,7 +509,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -518,7 +523,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -534,7 +539,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -553,25 +558,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Total value: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Current cash: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Current debt: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/en_AU.gmo b/po/en_AU.gmo index 6c47a0b..b356de7 100644 Binary files a/po/en_AU.gmo and b/po/en_AU.gmo differ diff --git a/po/en_AU.po b/po/en_AU.po index accb2ca..112b4b6 100644 --- a/po/en_AU.po +++ b/po/en_AU.po @@ -1,21 +1,21 @@ # ************************************************************************* # * * # * English (Australian) Translations for Star Traders * -# * Copyright (C) 1990-2019, John Zaitseff * +# * Copyright (C) 1990-2020, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# John Zaitseff , 2011-2019. +# John Zaitseff , 2011-2020. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:35+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:35+1100\n" "Last-Translator: John Zaitseff \n" "Language-Team: English (Australian) <(nothing)>\n" "Language: en_AU\n" @@ -343,49 +343,54 @@ msgstr "Enter game number [^{1^}-^{9^}] or ^{^} to cancel: " msgid "Please enter your name: " msgstr "Please enter your name: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Do you need any instructions? [^{Y^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Enter Player Names " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Player %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Does any player need instructions? [^{Y^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Game Over " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "The game is over after one turn." msgstr[1] "The game is over after %d turns." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Total Value " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Your total value was ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -394,7 +399,7 @@ msgstr "" "The winner is ^{%ls^}\n" "who is ^[*** BANKRUPT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -403,14 +408,14 @@ msgstr "" "The winner is ^{%ls^}\n" "with a value of ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Game Winner " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -419,47 +424,47 @@ msgstr "Player" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Total Value (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Player: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Turn: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Last Turn ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Stock Portfolio " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R U P T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "No companies on the map" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -474,7 +479,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -489,7 +494,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -503,7 +508,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -519,7 +524,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -538,25 +543,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Total value: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Current cash: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Current debt: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/en_CA.gmo b/po/en_CA.gmo index 41c794a..ad73ebc 100644 Binary files a/po/en_CA.gmo and b/po/en_CA.gmo differ diff --git a/po/en_CA.po b/po/en_CA.po index 204d1f3..9538b05 100644 --- a/po/en_CA.po +++ b/po/en_CA.po @@ -1,21 +1,21 @@ # ************************************************************************* # * * # * English (Canadian) Translations for Star Traders * -# * Copyright (C) 1990-2019, John Zaitseff * +# * Copyright (C) 1990-2020, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# John Zaitseff , 2011-2019. +# John Zaitseff , 2011-2020. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:35+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: John Zaitseff \n" "Language-Team: English (Canadian) <(nothing)>\n" "Language: en_CA\n" @@ -343,49 +343,54 @@ msgstr "Enter game number [^{1^}-^{9^}] or ^{^} to cancel: " msgid "Please enter your name: " msgstr "Please enter your name: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Do you need any instructions? [^{Y^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Enter Player Names " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Player %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Does any player need instructions? [^{Y^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Game Over " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "The game is over after one turn." msgstr[1] "The game is over after %d turns." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Total Value " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Your total value was ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -394,7 +399,7 @@ msgstr "" "The winner is ^{%ls^}\n" "who is ^[*** BANKRUPT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -403,14 +408,14 @@ msgstr "" "The winner is ^{%ls^}\n" "with a value of ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Game Winner " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -419,47 +424,47 @@ msgstr "Player" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Total Value (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Player: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Turn: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Last Turn ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Stock Portfolio " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R U P T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "No companies on the map" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -474,7 +479,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -489,7 +494,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -503,7 +508,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -519,7 +524,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -538,25 +543,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Total value: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Current cash: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Current debt: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/en_GB.gmo b/po/en_GB.gmo index 9f47922..cab0241 100644 Binary files a/po/en_GB.gmo and b/po/en_GB.gmo differ diff --git a/po/en_GB.po b/po/en_GB.po index 6bd38f9..0efdbab 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -1,21 +1,21 @@ # ************************************************************************* # * * # * English (British) Translations for Star Traders * -# * Copyright (C) 1990-2019, John Zaitseff * +# * Copyright (C) 1990-2020, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# John Zaitseff , 2011-2019. +# John Zaitseff , 2011-2020. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:35+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: John Zaitseff \n" "Language-Team: English (British) <(nothing)>\n" "Language: en_GB\n" @@ -343,49 +343,54 @@ msgstr "Enter game number [^{1^}-^{9^}] or ^{^} to cancel: " msgid "Please enter your name: " msgstr "Please enter your name: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Do you need any instructions? [^{Y^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Enter Player Names " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Player %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Does any player need instructions? [^{Y^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Game Over " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "The game is over after one turn." msgstr[1] "The game is over after %d turns." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Total Value " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Your total value was ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -394,7 +399,7 @@ msgstr "" "The winner is ^{%ls^}\n" "who is ^[*** BANKRUPT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -403,14 +408,14 @@ msgstr "" "The winner is ^{%ls^}\n" "with a value of ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Game Winner " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -419,47 +424,47 @@ msgstr "Player" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Total Value (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Player: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Turn: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Last Turn ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Stock Portfolio " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R U P T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "No companies on the map" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -474,7 +479,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -489,7 +494,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -503,7 +508,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -519,7 +524,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -538,25 +543,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Total value: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Current cash: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Current debt: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/en_US.gmo b/po/en_US.gmo index c6f3c2a..405204d 100644 Binary files a/po/en_US.gmo and b/po/en_US.gmo differ diff --git a/po/en_US.po b/po/en_US.po index ad2c435..0724d6f 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -1,21 +1,21 @@ # ************************************************************************* # * * # * English (US) Translations for Star Traders * -# * Copyright (C) 1990-2019, John Zaitseff * +# * Copyright (C) 1990-2020, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# John Zaitseff , 2011-2019. +# John Zaitseff , 2011-2020. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:35+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: John Zaitseff \n" "Language-Team: English (US) <(nothing)>\n" "Language: en_US\n" @@ -343,49 +343,54 @@ msgstr "Enter game number [^{1^}-^{9^}] or ^{^} to cancel: " msgid "Please enter your name: " msgstr "Please enter your name: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Do you need any instructions? [^{Y^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Enter Player Names " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Player %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Does any player need instructions? [^{Y^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Game Over " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "The game is over after one turn." msgstr[1] "The game is over after %d turns." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Total Value " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Your total value was ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -394,7 +399,7 @@ msgstr "" "The winner is ^{%ls^}\n" "who is ^[*** BANKRUPT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -403,14 +408,14 @@ msgstr "" "The winner is ^{%ls^}\n" "with a value of ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Game Winner " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -419,47 +424,47 @@ msgstr "Player" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Total Value (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Player: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Turn: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Last Turn ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Stock Portfolio " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R U P T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "No companies on the map" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -474,7 +479,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -489,7 +494,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -503,7 +508,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -519,7 +524,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -538,25 +543,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Total value: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Current cash: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Current debt: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/eo.gmo b/po/eo.gmo index 77fa4a9..536ed50 100644 Binary files a/po/eo.gmo and b/po/eo.gmo differ diff --git a/po/eo.po b/po/eo.po index f9f2221..5eb2d16 100644 --- a/po/eo.po +++ b/po/eo.po @@ -1,22 +1,22 @@ # ************************************************************************* # * * # * Esperanto Translations for Star Traders * -# * Copyright (C) 2013-19, John Zaitseff * -# * Copyright (C) 2013-18, Free Software Foundation, Inc. * +# * Copyright (C) 2013-20, John Zaitseff * +# * Copyright (C) 2013-20, Free Software Foundation, Inc. * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# Felipe Castro , 2013, 2016, 2018. +# Felipe Castro , 2013, 2016, 2018, 2019, 2020. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:36+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-08 09:09+1100\n" "Last-Translator: Felipe Castro \n" "Language-Team: Esperanto \n" "Language: eo\n" @@ -350,49 +350,54 @@ msgstr "Indiku seanc-numeron [^{1^}-^{9^}] aŭ ^{^} por nuligi: " msgid "Please enter your name: " msgstr "Bonvolu indiki vian nomon: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Ĉu vi bezonas instrukciojn? [^{J^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Indiku ludant-nomojn " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Ludanto %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Ĉu iu ludanto bezonas instrukciojn? [^{J^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Ludo-fino " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "La ludo finiĝas post unu ciklo." msgstr[1] "La ludo finiĝas post %d cikloj." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Totalo " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Via totalo estis ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -401,7 +406,7 @@ msgstr "" "La venkanto estas ^{%ls^}\n" "kiu estas ^[*** BANKROTINTO ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -410,14 +415,14 @@ msgstr "" "La venkanto estas ^{%ls^}\n" "kun totalo ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Lud-venkanto " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -426,47 +431,47 @@ msgstr "Ludanto" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Totalo (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Ludanto: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Ciklo: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Lasta ciklo ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Akcio-portalo " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R O T A * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Neniu kompanio sur la mapo" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -481,7 +486,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -496,7 +501,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -510,7 +515,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -526,7 +531,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -545,25 +550,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Totalo: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Nuna mono: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Nuna ŝuldo: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/fi.gmo b/po/fi.gmo index 2e39d7a..4f2bbb7 100644 Binary files a/po/fi.gmo and b/po/fi.gmo differ diff --git a/po/fi.po b/po/fi.po index dc6450f..6a45eae 100644 --- a/po/fi.po +++ b/po/fi.po @@ -1,7 +1,7 @@ # ************************************************************************* # * * # * Finnish Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * +# * Copyright (C) 2012-20, John Zaitseff * # * Copyright (C) 2012, Free Software Foundation, Inc. * # * * # ************************************************************************* @@ -13,10 +13,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:37+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Jorma Karvonen \n" "Language-Team: Finnish \n" "Language: fi\n" @@ -354,49 +354,54 @@ msgstr "Kirjoita pelin numero [^{1^}-^{9^}] tai ^{^} peruuttamiseksi: " msgid "Please enter your name: " msgstr "Kirjoita nimesi: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Tarvitsetko lisäohjeita? [^{K^}/^{E^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Kirjoita pelaajanimet " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Pelaaja %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Tarvitseeko kukaan pelaaja ohjeita? [^{K^}/^{E^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Peli päättyi " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "Peli päättyi yhden kierroksen jälkeen." msgstr[1] "Peli päättyi %d kierroksen jälkeen." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Kokonaisarvo " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Kokonaisarvosi oli ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -405,7 +410,7 @@ msgstr "" "Voittaja on ^{%ls^}\n" "joka on ^[*** KONKURSSISSA ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -414,14 +419,14 @@ msgstr "" "Voittaja on ^{%ls^}\n" "arvolla ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Pelin voittaja " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -430,47 +435,47 @@ msgstr "Pelaaja" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Kokonaisarvo (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Pelaaja: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Kierros: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Viimeinen kierros ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Osakesalkku " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * K O N K U R S S I * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Kartalla ei ole yrityksiä" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -485,7 +490,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -500,7 +505,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -514,7 +519,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -530,7 +535,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -549,25 +554,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Kokonaisarvo: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Käteiskassa: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Velat: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/fr.gmo b/po/fr.gmo index bf75644..31914d9 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index 6e3641c..3282c13 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,15 +1,15 @@ # ************************************************************************* # * * # * French Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * -# * Copyright (C) 2012-17, Free Software Foundation, Inc. * +# * Copyright (C) 2012-20, John Zaitseff * +# * Copyright (C) 2012-19, Free Software Foundation, Inc. * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# Frédéric Marchal , 2012, 2015, 2017. +# Frédéric Marchal , 2012, 2015, 2017, 2019. # # Attention: ce fichier ne doit pas contenir d'espace insécable car le # programme est compilé avec Ncurses qui n'affiche pas correctement @@ -19,10 +19,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:37+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Frédéric Marchal \n" "Language-Team: French \n" "Language: fr\n" @@ -30,7 +30,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=(n >= 2);\n" #. TRANSLATORS: The name of the game. You may choose to translate it into #. your own language (recommended) or keep it the same as the English @@ -357,49 +357,54 @@ msgstr "Entrez le numéro de jeu [^{1^}-^{9^}] ou ^{^} pour annuler: " msgid "Please enter your name: " msgstr "Veuillez entrer votre nom: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Avez-vous besoin des instructions ? [^{O^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Entrez les noms des joueurs " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Joueur %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "L'un des joueurs a-t-il besoin des instructions ? [^{O^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Jeu terminé " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "Le jeu est terminé après un tour." msgstr[1] "Le jeu est terminé après %d tours." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Valeur totale " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Votre valeur totale était ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -408,7 +413,7 @@ msgstr "" "Le gagnant est ^{%ls^}\n" "qui est en ^[*** BANQUEROUTE ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -417,14 +422,14 @@ msgstr "" "Le gagnant est ^{%ls^}\n" "avec une valeur de ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Gagnant du jeu " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -433,47 +438,47 @@ msgstr "Joueurs" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Valeur totale (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Joueur: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Tour: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Dernier tour ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Portefeuille d'actions " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N Q U E R O U T E * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Aucune compagnie sur la carte" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -488,7 +493,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -503,7 +508,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -517,7 +522,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -533,7 +538,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -552,25 +557,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Valeur totale: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Liquidité: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Dette: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/hr.gmo b/po/hr.gmo index 973e4e6..1e65401 100644 Binary files a/po/hr.gmo and b/po/hr.gmo differ diff --git a/po/hr.po b/po/hr.po index a3f9956..578cdf3 100644 --- a/po/hr.po +++ b/po/hr.po @@ -1,7 +1,7 @@ # ************************************************************************* # * * # * Croatian Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * +# * Copyright (C) 2012-20, John Zaitseff * # * * # ************************************************************************* # @@ -12,10 +12,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:37+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Tomislav Krznar \n" "Language-Team: Croatian \n" "Language: hr\n" @@ -348,32 +348,37 @@ msgstr "Unesite broj igre [^{1^}-^{9^}] ili ^{^} za otkazivanje: " msgid "Please enter your name: " msgstr "Molim unesite vaše ime: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Trebate li upute? [^{D^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Unesite imena igrača " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Igrač %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Trebaju li ostali igrači upute? [^{D^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Igra gotova " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." @@ -381,17 +386,17 @@ msgstr[0] "Igra je gotova nakon %d poteza." msgstr[1] "Igra je gotova nakon %d poteza." msgstr[2] "Igra je gotova nakon %d poteza." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Ukupna vrijednost " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Vaša ukupna vrijednost je ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -400,7 +405,7 @@ msgstr "" "Pobjednik je ^{%ls^}\n" "koji je ^[*** BANKROTIRAO ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -409,14 +414,14 @@ msgstr "" "Pobjednik je ^{%ls^}\n" "koji ima vrijednost ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Pobjednik igre " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -425,47 +430,47 @@ msgstr "Igrač" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Ukupna vrijednost (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Igrač: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Potez: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Posljednji potez ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Portfelj dionica " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R O T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Nema tvrtki na mapi" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -480,7 +485,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -495,7 +500,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -509,7 +514,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -525,7 +530,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -544,25 +549,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Ukupna vrijednost: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Trenutna gotovina: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Trenutni dug: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/hu.gmo b/po/hu.gmo index 1f51aaf..b7587a5 100644 Binary files a/po/hu.gmo and b/po/hu.gmo differ diff --git a/po/hu.po b/po/hu.po index becc0f4..a00b5fe 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,22 +1,22 @@ # ************************************************************************* # * * # * Hungarian Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * +# * Copyright (C) 2012-20, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# Balázs Úr , 2014, 2015, 2017. +# Balázs Úr , 2014, 2015, 2017, 2019. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:37+1100\n" -"Last-Translator: Balázs Úr \n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" +"Last-Translator: Balázs Úr \n" "Language-Team: Hungarian \n" "Language: hu\n" "MIME-Version: 1.0\n" @@ -346,49 +346,54 @@ msgstr "Adja meg a játék számát [^{1^}-^{9^}] vagy ^{^} a megszakí msgid "Please enter your name: " msgstr "Kérem adja meg a nevét: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Szüksége van utasításokra? [^{I^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Játékosok nevének megadása " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "%d. játékos: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Szüksége van valamelyik játékosnak utasításokra? [^{I^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Vége a játéknak " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "A játék egy kör után ért véget." msgstr[1] "A játék %d kör után ért véget." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Összérték " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Az összértéke ^{%N^} volt." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -397,7 +402,7 @@ msgstr "" "A győztes ^{%ls^},\n" "aki ^[*** BECSŐDÖLT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -406,14 +411,14 @@ msgstr "" "A győztes ^{%ls^},\n" "^{%N^} értékkel." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " A játék győztese " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -422,47 +427,47 @@ msgstr "Játékos" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Összérték (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Játékos: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Kör: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Utolsó kör ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Részvényportfólió " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B E C S Ő D Ö L T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Nincsenek társaságok a térképen" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -477,7 +482,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -492,7 +497,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -506,7 +511,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -522,7 +527,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -541,25 +546,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Összérték: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Jelenlegi készpénz: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Jelenlegi adósság: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " @@ -1720,7 +1725,7 @@ msgstr "%s: érvénytelen kapcsoló -- „%c”\n" #: lib/getopt.c:636 lib/getopt.c:682 lib/obsolete-strings.c:57 #, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: a kapcsoló egy argumentumot igényel -- „%c”\n" +msgstr "%s: a kapcsolóhoz egy argumentum szükséges -- „%c”\n" #. TRANSLATORS: These strings are used in older versions of various #. libraries, such as the GNU C Library as released with various @@ -1758,7 +1763,7 @@ msgstr "%s: érvénytelen kapcsoló -- „%c”\n" #: lib/obsolete-strings.c:56 #, c-format msgid "%s: option requires an argument -- `%c'\n" -msgstr "%s: a kapcsoló egy argumentumot igényel -- „%c”\n" +msgstr "%s: a kapcsolóhoz egy argumentum szükséges -- „%c”\n" #: lib/obsolete-strings.c:59 #, c-format @@ -1833,29 +1838,29 @@ msgstr "%s: ismeretlen „%c%s” kapcsoló\n" #: lib/obsolete-strings.c:73 #, c-format msgid "%s: option `-W %s' is ambiguous\n" -msgstr "%s: a(z) „-W %s” kapcsoló nem egyértelmű\n" +msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n" #: lib/obsolete-strings.c:74 #, c-format msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: a(z) „-W %s” kapcsoló nem egyértelmű\n" +msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n" #: lib/obsolete-strings.c:75 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "%s: a(z) „-W %s” kapcsoló nem enged meg argumentumot\n" +msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n" #: lib/obsolete-strings.c:76 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: a(z) „-W %s” kapcsoló nem enged meg argumentumot\n" +msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n" #: lib/obsolete-strings.c:77 #, c-format msgid "%s: option `-W %s' requires an argument\n" -msgstr "%s: a(z) „-W %s” kapcsolóhoz egy argumentum szükséges\n" +msgstr "%s: a „-W %s” kapcsolóhoz egy argumentum szükséges\n" #: lib/obsolete-strings.c:78 #, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: a(z) „-W %s” kapcsolóhoz egy argumentum szükséges\n" +msgstr "%s: a „-W %s” kapcsolóhoz egy argumentum szükséges\n" diff --git a/po/nb.gmo b/po/nb.gmo index 95a1d5e..a351f55 100644 Binary files a/po/nb.gmo and b/po/nb.gmo differ diff --git a/po/nb.po b/po/nb.po index e78808a..354b512 100644 --- a/po/nb.po +++ b/po/nb.po @@ -1,21 +1,21 @@ # ************************************************************************* # * * # * Norwegian Bokmål Translations for Star Traders * -# * Copyright (C) 2012-19, John Zaitseff * +# * Copyright (C) 2012-20, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# Johnny A. Solbu , 2012, 2015, 2017. +# Johnny A. Solbu , 2012-2019. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:37+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Johnny A. Solbu \n" "Language-Team: Norwegian Bokmaal \n" "Language: nb\n" @@ -349,49 +349,54 @@ msgstr "Tast inn spill nummer [^{1^}-^{9^}] eller ^{^} for å avbryte: msgid "Please enter your name: " msgstr "Skriv inn navnet ditt: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Trenger du noen instruksjoner? [^{J^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Angi Spillernavn " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Spiller %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Trenger noen av deltakere instruksjoner? [^{J^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Spillet er slutt " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "Spillet er over etter en runde." msgstr[1] "Spillet er over etter %d runder." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Total verdi " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Din samlede verdi var ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -400,7 +405,7 @@ msgstr "" "Vinneren er ^{%ls^}\n" "som er ^[*** KONKURS ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -409,14 +414,14 @@ msgstr "" "Vinneren er ^{%ls^}\n" "med en verdi på ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Vinner av spillet " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -425,47 +430,47 @@ msgstr "Spiller" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Total verdi (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Spiller: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Runde: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Forrige runde ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Aksjeportefølje " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * K O N K U R S * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Ingen bedrifter på kartet" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -480,7 +485,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -495,7 +500,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -509,7 +514,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -525,7 +530,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -544,25 +549,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Total verdi: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Nåværende kontanter: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Eksisterende gjeld: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " @@ -1754,7 +1759,7 @@ msgstr "%s: valget «%s%s» krever et argument\n" #: lib/obsolete-strings.c:54 #, c-format msgid "%s: invalid option -- `%c'\n" -msgstr "%s: ugyldig valg -- «%c»\n" +msgstr "%s: ugyldig alternativ -- «%c»\n" #: lib/obsolete-strings.c:56 #, c-format @@ -1854,9 +1859,9 @@ msgstr "%s: valget «-W %s» tillater ikke argumenter\n" #: lib/obsolete-strings.c:77 #, c-format msgid "%s: option `-W %s' requires an argument\n" -msgstr "%s: valget «-W %s» krever et argument\n" +msgstr "%s: valg «-W %s» trenger et argument\n" #: lib/obsolete-strings.c:78 #, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: valget «-W %s» krever et argument\n" +msgstr "%s: valg «-W %s» trenger et argument\n" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo new file mode 100644 index 0000000..f3c8281 Binary files /dev/null and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 0000000..83f68e5 --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,1868 @@ +# ************************************************************************* +# * * +# * Brazilian Portuguese Translations for Star Traders * +# * Traduções em português brasileiro para o pacote trader * +# * Copyright (C) 2019-20, John Zaitseff * +# * * +# ************************************************************************* +# +# This file is distributed under the same license as the trader package. +# +# Contributors: +# Rafael Fontenelle , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: trader 7.14\n" +"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" +"Last-Translator: Rafael Fontenelle \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. TRANSLATORS: The name of the game. You may choose to translate it into +#. your own language (recommended) or keep it the same as the English +#. version. Feel free to look through other translations to see how +#. others have done this. +#: data/trader.desktop.in:23 src/intf.c:611 +#, c-format +msgid "Star Traders" +msgstr "Comerciantes Estelares" + +#: data/trader.desktop.in:24 +msgid "Play Star Traders, a simple game of interstellar trading" +msgstr "Jogue Comerciantes Estelares, um jogo simples de comércio interestelar" + +#. TRANSLATORS: A list of keywords describing Star Traders. By all means +#. add your own keywords! +#: data/trader.desktop.in:27 +msgid "game;interstellar;trading;strategy;" +msgstr "jogo;interestelar;comércio;estratégia;" + +#. TRANSLATORS: This string is the name of the icon to use. The Desktop +#. Entry Specification states it is translatable, but unless you provide a +#. matching icon, please leave it as "trader": this will use trader.svg +#. and the various trader.png files in the data source code directory. +#: data/trader.desktop.in:32 +msgid "trader" +msgstr "trader" + +#: src/trader.c:235 +#, c-format +msgid "%s: invalid value for --max-turn: '%s'\n" +msgstr "%s: valor inválido para --max-turn: “%s”\n" + +#: src/trader.c:251 +#, c-format +msgid "%s: invalid operand '%s'\n" +msgstr "%s: operando inválido “%s”\n" + +#: src/trader.c:260 +#, c-format +msgid "%s: invalid game number '%s'\n" +msgstr "%s: número de jogo inválido “%s”\n" + +#: src/trader.c:269 +#, c-format +msgid "%s: extra operand '%s'\n" +msgstr "%s: operando extra “%s”\n" + +#. TRANSLATORS: "John Zaitseff" [IPA d͡ʒɒn ˈzaɪ̯t͡səf] is the proper +#. name of the author. The IPA pronunciation in this comment is in +#. UTF-8 encoding. +#: src/trader.c:284 +#, c-format +msgid "" +"Star Traders (%s) %s\n" +"Copyright (C) %s, John Zaitseff.\n" +"\n" +"Star Traders is a simple game of interstellar trading, where the object\n" +"of the game is to create companies, buy and sell shares, borrow and repay\n" +"money, in order to become the wealthiest player (the winner).\n" +"\n" +"This program is free software that is distributed under the terms of the\n" +"GNU General Public License, version 3 or later. You are welcome to\n" +"modify and/or distribute it under certain conditions. This program has\n" +"NO WARRANTY, to the extent permitted by law; see the License for details.\n" +msgstr "" +"Comerciantes Estelares (%s) %s\n" +"Copyright (C) %s, John Zaitseff.\n" +"\n" +"Comerciantes Estelares é um jogo simples de negociação interestelar,\n" +"cujo objetivo é criar empresas, comprar e vender ações, emprestar e\n" +"pagar dinheiro, para se tornar o jogador mais rico (o vencedor).\n" +"\n" +"Este programa é um software livre que é distribuído sob os termos da\n" +"Licença Pública Geral GNU, versão 3 ou posterior. Você pode modificá-lo\n" +"e/ou distribuí-lo sob certas condições. Este programa NÃO TEM GARANTIA,\n" +"na extensão permitida por lei; consulte a licença para obter detalhes.\n" + +#: src/trader.c:308 +#, c-format +msgid "%s: Try '%s --help' for more information.\n" +msgstr "%s: Tente “%s --help” para mais informações.\n" + +#: src/trader.c:311 +#, c-format +msgid "Usage: %s [OPTION ...] [GAME]\n" +msgstr "Uso: %s [OPÇÃO ...] [JOGO]\n" + +#: src/trader.c:312 +#, c-format +msgid "" +"Play Star Traders, a simple game of interstellar trading.\n" +"\n" +msgstr "" +"Jogue Comerciantes Estelares, um jogo simples de comércio interestelar.\n" +"\n" + +#: src/trader.c:315 +#, c-format +msgid "" +"Options:\n" +" -V, --version output version information and exit\n" +" -h, --help display this help and exit\n" +" --no-color don't use color for displaying text\n" +" --max-turn=NUM set the number of turns to NUM\n" +"\n" +msgstr "" +"Opções:\n" +" -V, --version exibe informações da versão e sai\n" +" -h, --help exibe esta ajuda e sai\n" +" --no-color não usa cores para exibir texto\n" +" --max-turn=NÚM define o número de turnos para NÚM\n" +"\n" + +#: src/trader.c:322 +#, c-format +msgid "" +"If GAME is specified as a number between 1 and 9, load and continue\n" +"playing that game. If GAME is not specified, start a new game.\n" +"\n" +msgstr "" +"Se JOGO for especificado como um número entre 1 e 9, carrega e continua\n" +"jogando esse jogo. Se JOGO não for especificado, inicia um novo jogo.\n" +"\n" + +#. TRANSLATORS: The first %s is the proper name of the package +#. author, John Zaitseff [IPA d͡ʒɒn ˈzaɪ̯t͡səf]; the second %s is +#. the email address for reporting bugs. Please add ANOTHER line +#. with the (translated) text "Report translation bugs to +#.
\n", with ADDRESS replaced with either an email +#. address or web URL for reporting bugs in your translation. +#: src/trader.c:334 +#, c-format +msgid "Report bugs to %s <%s>.\n" +msgstr "" +"Relate erros para %s <%s>.\n" +"Relate erros de tradução para \n" + +#. TRANSLATORS: %s is the email address for reporting bugs. As +#. with the previous string, please add ANOTHER line with the +#. (translated) text "Report translation bugs to
\n", +#. with ADDRESS replaced with either an email address or web URL +#. for reporting bugs in your translation. +#: src/trader.c:341 +#, c-format +msgid "Report bugs to <%s>.\n" +msgstr "" +"Relate erros para <%s>.\n" +"Relate erros de tradução para \n" + +#. TRANSLATORS: The first %s is for packagers and may be +#. something like "Debian". +#: src/trader.c:346 +#, c-format +msgid "Report %s bugs to <%s>.\n" +msgstr "Relate erros de %s para <%s>.\n" + +#: src/trader.c:349 +#, c-format +msgid "Star Traders home page: <%s>.\n" +msgstr "Site do Comerciantes Estelares: <%s>.\n" + +#. TRANSLATORS: The eight company names do NOT have to be literal +#. translations of the English names. In fact, if possible, the +#. names should start with successive letters of your alphabet (in +#. English, for example, "A" to "H"), and, ideally, be related to +#. constellations or stars in our galaxy. No company name should be +#. more than 24 characters (column positions, to be precise) long. +#: src/globals.c:47 +msgid "Altair Starways" +msgstr "Altair Starways" + +#: src/globals.c:48 +msgid "Betelgeuse, Ltd" +msgstr "Betelgeuse, Ltd" + +#: src/globals.c:49 +msgid "Capella Freight Co" +msgstr "Capella Freight Co" + +#: src/globals.c:50 +msgid "Denebola Shippers" +msgstr "Denebola Shippers" + +#: src/globals.c:51 +msgid "Eridani Expediters" +msgstr "Eridani Expediters" + +#: src/globals.c:52 +msgid "Fornax Express" +msgstr "Fornax Express" + +#: src/globals.c:53 +msgid "Gemini Inc" +msgstr "Gemini Inc" + +#: src/globals.c:54 +msgid "Hercules and Co" +msgstr "Hercules e Co" + +#. TRANSLATORS: This string specifies the keycodes (keyboard input +#. codes) used to enter the Stock Transaction window for each +#. company. There must be exactly eight characters, one for each +#. company in order, before the ASCII vertical line "|"; these must +#. be EITHER all in upper-case or all in lower-case. If at all +#. possible, these should be successive letters in your alphabet (in +#. English, "A" to "H"). Do NOT use digits or control characters. +#. Do not change or translate anything after the vertical line. +#: src/globals.c:68 +msgid "ABCDEFGH|input|Companies" +msgstr "ABCDEFGH|input|Companies" + +#. TRANSLATORS: This string specifies the keycodes used to select a +#. game move. There must be exactly 20 characters, one for each +#. move, before the ASCII vertical line "|"; these must be EITHER all +#. in upper-case or all in lower-case. If at all possible, these +#. should be successive letters in your alphabet. Do NOT use digits +#. or control characters. Do not change or translate anything after +#. the vertical line. +#: src/globals.c:80 +msgid "ABCDEFGHIJKLMNOPQRST|input|GameMoves" +msgstr "ABCDEFGHIJKLMNOPQRST|input|GameMoves" + +#. TRANSLATORS: This string is used to display the galaxy map to +#. screen. There must be exactly 11 characters before the ASCII +#. vertical line. The first ("." in English) is used for empty +#. space, the second ("+") for outposts, the third ("*") for stars, +#. the remaining for the eight companies. Do not change or translate +#. anything after the vertical line. Double-width characters ARE +#. handled correctly. +#: src/globals.c:92 +msgid ".+*ABCDEFGH|output|MapVals" +msgstr ".+*ABCDEFGH|output|MapVals" + +#. TRANSLATORS: This string is used to display the game moves +#. (choices). There must be exactly 20 characters (NUMBER_MOVES) +#. before the ASCII vertical line. The first character corresponds +#. to the first character in the "input|GameMoves" string, and so on. +#. Do not change or translate anything after the vertical line. +#. Double-width characters ARE handled correctly. +#: src/globals.c:103 +msgid "abcdefghijklmnopqrst|output|GameMoves" +msgstr "abcdefghijklmnopqrst|output|GameMoves" + +#. TRANSLATORS: The ordinal strings "1st" to "8th" are used in the +#. Game Winner dialog box at the end of the game. If ordinals depend +#. on the gender of the player, it may be simpler to list cardinal +#. numbers instead (eg, "No. 1"). Up to five characters are allowed +#. (see ORDINAL_COLS in src/intf.h). +#: src/globals.c:114 +msgid "1st" +msgstr "Nº. 1" + +#: src/globals.c:115 +msgid "2nd" +msgstr "Nº. 2" + +#: src/globals.c:116 +msgid "3rd" +msgstr "Nº. 3" + +#: src/globals.c:117 +msgid "4th" +msgstr "Nº. 4" + +#: src/globals.c:118 +msgid "5th" +msgstr "Nº. 5" + +#: src/globals.c:119 +msgid "6th" +msgstr "Nº. 6" + +#: src/globals.c:120 +msgid "7th" +msgstr "Nº. 7" + +#: src/globals.c:121 +msgid "8th" +msgstr "Nº. 8" + +#: src/game.c:117 src/game.c:152 +#, c-format +msgid "Loading game %d... " +msgstr "Carregando o jogo %d... " + +#: src/game.c:226 +#, c-format +msgid " First Player " +msgstr " Primeiro jogador " + +#: src/game.c:227 +#, c-format +msgid "The first player to go is ^{%ls^}." +msgstr "O primeiro jogador a ir é ^{%ls^}." + +#. TRANSLATORS: The keycode should be modified to +#. match that (or those) specified with msgctxt +#. "input|ContinueGame". +#: src/game.c:259 +#, c-format +msgid "Enter number of players [^{1^}-^{%d^}] or ^{^} to continue a game: " +msgstr "Insira o número de jogadores [^{1^}-^{%d^}] ou ^{^} para continuar um jogo: " + +#. TRANSLATORS: This string specifies the keycodes used to continue a +#. game; these must NOT contain any numeric digit from 1 to 9. The +#. first character (keyboard input code) is used to print the user's +#. response if one of those keys is pressed. Both upper and +#. lower-case versions should be present. +#: src/game.c:276 +msgctxt "input|ContinueGame" +msgid "Cc" +msgstr "Cc" + +#: src/game.c:341 src/move.c:413 +#, c-format +msgid "Enter game number [^{1^}-^{9^}] or ^{^} to cancel: " +msgstr "Insira o número de jogos [^{1^}-^{9^}] ou ^{^} para cancelar: " + +#: src/game.c:406 +#, c-format +msgid "Please enter your name: " +msgstr "Insira o seu nome: " + +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 +#, c-format +msgid "Do you need any instructions? [^{Y^}/^{N^}] " +msgstr "Você precisa de alguma instrução? [^{S^}/^{N^}] " + +#: src/game.c:448 +#, c-format +msgid " Enter Player Names " +msgstr " Insira nomes dos jogadores " + +#: src/game.c:456 +#, c-format, range: 1..8 +msgid "Player %d: " +msgstr "Jogador %d: " + +#: src/game.c:534 +#, c-format +msgid "Does any player need instructions? [^{Y^}/^{N^}] " +msgstr "Algum jogador precisa de instruções? [^{S^}/^{N^}] " + +#: src/game.c:568 +#, c-format +msgid " Game Over " +msgstr " Fim do jogo " + +#: src/game.c:569 +#, c-format +msgid "The game is over after one turn." +msgid_plural "The game is over after %d turns." +msgstr[0] "O jogo acabou após um turno." +msgstr[1] "O jogo acabou após %d turnos." + +#: src/game.c:580 +#, c-format +msgid " Total Value " +msgstr " Valor total " + +#: src/game.c:582 +#, c-format +msgid "Your total value was ^{%N^}." +msgstr "Seu valor total era ^{%N^}." + +#: src/game.c:593 +#, c-format +msgid "" +"The winner is ^{%ls^}\n" +"who is ^[*** BANKRUPT ***^]" +msgstr "" +"O ganhador é ^{%ls^}\n" +"que está ^[*** FALIDO ***^]" + +#: src/game.c:596 +#, c-format +msgid "" +"The winner is ^{%ls^}\n" +"with a value of ^{%N^}." +msgstr "" +"O ganhador é ^{%ls^}\n" +"com um valor de ^{%N^}." + +#: src/game.c:602 +#, c-format +msgid " Game Winner " +msgstr " Vencedor do jogo " + +#. TRANSLATORS: "Player" is used as a column title in a +#. table containing all player names. +#: src/game.c:611 src/move.c:882 +#, c-format +msgctxt "subtitle" +msgid "Player" +msgstr "Jogador" + +#. TRANSLATORS: "Total Value" refers to the total worth +#. (shares, cash and debt) of any given player. %ls is the +#. currency symbol of the current locale. +#: src/game.c:616 +#, c-format +msgctxt "subtitle" +msgid "Total Value (%ls)" +msgstr "Valor total (%ls)" + +#: src/game.c:650 src/game.c:700 src/exch.c:100 +#, c-format +msgid "Player: ^{%ls^}" +msgstr "Jogador: ^{%ls^}" + +#: src/game.c:653 +#, c-format +msgid " Turn: ^{%d^} " +msgstr " Turno: ^{%d^} " + +#: src/game.c:654 +#, c-format +msgid " ^[*** Last Turn ***^] " +msgstr " ^[*** Último turno ***^] " + +#: src/game.c:698 +#, c-format +msgid " Stock Portfolio " +msgstr " Portfólio de ações " + +#. TRANSLATORS: The current player is bankrupt (has no +#. shares or cash, ie, whose total value is zero) +#: src/game.c:707 +#, c-format +msgid "^[* * * B A N K R U P T * * *^]" +msgstr "^[* * * F A L Ê N C I A * * *^]" + +#: src/game.c:722 src/exch.c:112 +#, c-format +msgid "No companies on the map" +msgstr "Nenhuma empresa no mapa" + +#. TRANSLATORS: "Company" is a two-line column label in +#. a table containing a list of companies. +#: src/game.c:730 src/exch.c:120 +#, c-format +msgctxt "subtitle" +msgid "" +" \n" +"Company" +msgstr "" +" \n" +"Empresa" + +#. TRANSLATORS: "Ownership" is a two-line column label +#. in a table containing the current player's +#. percentage ownership in any given company. The +#. maximum column width is 10 characters (see +#. OWNERSHIP_COLS in src/intf.h). +#: src/game.c:737 +#, c-format +msgctxt "subtitle" +msgid "" +"Ownership\n" +"(%%)" +msgstr "" +"Posse\n" +"(%%)" + +#. TRANSLATORS: "Holdings" is a two-line column label +#. in a table containing the number of shares the +#. current player owns in any given company. The +#. maximum column width is 10 characters (see +#. STOCK_OWNED_COLS in src/intf.h). +#: src/game.c:744 +#, c-format +msgctxt "subtitle" +msgid "" +"Holdings\n" +"(shares)" +msgstr "" +"Holdings\n" +"(ações)" + +#. TRANSLATORS: "Return" is a two-line column label in +#. a table containing the share return as a percentage +#. in any given company. The maximum column width is +#. 10 characters (see SHARE_RETURN_COLS in src/intf.h). +#: src/game.c:751 src/exch.c:141 +#, c-format +msgctxt "subtitle" +msgid "" +"Return\n" +"(%%)" +msgstr "" +"Retorno\n" +"(%%)" + +#. TRANSLATORS: "Price per share" is a two-line column +#. label in a table containing the price per share in +#. any given company. %ls is the currency symbol in +#. the current locale. The maximum column width is 12 +#. characters INCLUDING the currency symbol (see +#. SHARE_PRICE_COLS in src/intf.h). +#: src/game.c:760 src/exch.c:150 +#, c-format +msgctxt "subtitle" +msgid "" +"Price per\n" +"share (%ls)" +msgstr "" +"Preço por\n" +"ação (%ls)" + +#. TRANSLATORS: The "Total value", "Current cash", +#. "Current debt" and "Interest rate" labels MUST all be +#. the same length (ie, right-padded with spaces as +#. needed) and must have at least one trailing space so +#. that the display routines work correctly. The maximum +#. length of each label is 36 characters. +#. +#. Note that some of these labels are used for both the +#. Player Status window and the Trading Bank window. +#: src/game.c:801 +#, c-format +msgctxt "label" +msgid "Total value: " +msgstr "Valor total: " + +#: src/game.c:805 src/exch.c:324 +#, c-format +msgctxt "label" +msgid "Current cash: " +msgstr "Dinheiro atual: " + +#: src/game.c:812 src/exch.c:332 +#, c-format +msgctxt "label" +msgid "Current debt: " +msgstr "Dívida atual: " + +#: src/game.c:818 src/exch.c:337 +#, c-format +msgctxt "label" +msgid "Interest rate: " +msgstr "Taxa de juro: " + +#. TRANSLATORS: Each label may be up to 37 characters wide +#. (for <1> and <2>) or 38 characters wide (for <3> and +#. ). The sequences "^{" and "^}" change the +#. character rendition (attributes) and take up no space. +#: src/move.c:246 src/exch.c:182 +#, c-format +msgid "^{<1>^} Display stock portfolio" +msgstr "^{<1>^} Exibir portfólio de ações" + +#: src/move.c:248 +#, c-format +msgid "^{<2>^} Declare bankruptcy" +msgstr "^{<2>^} Declarar falência" + +#: src/move.c:250 +#, c-format +msgid "^{<3>^} Save and end the game" +msgstr "^{<3>^} Salvar e encerrar o jogo" + +#: src/move.c:252 +#, c-format +msgid "^{^} Quit the game" +msgstr "^{^} Sair do jogo" + +#. TRANSLATORS: The maximum column width is either 38 +#. characters (including the trailing space), or 76 +#. characters minus the length of the longest of the four +#. strings above this one. The sequences "^{", "^}", +#. "^[" and "^]" do not take up any room. "%lc" takes up +#. either one or two columns, depending on the appropriate +#. "output|GameMoves" string in the current PO file. +#: src/move.c:263 +#, c-format +msgid "Select move [^[%lc^]-^[%lc^]/^{1^}-^{3^}/^{^}]: " +msgstr "Selecione um movimento [^[%lc^]-^[%lc^]/^{1^}-^{3^}/^{^}]: " + +#. TRANSLATORS: A game usually consists of +#. DEFAULT_MAX_TURN (50) turns. On each +#. turn, the computer randomly selects +#. NUMBER_MOVES (20) moves (positions on the +#. map); each player selects just one move +#. per turn. "Move" refers to the player's +#. choice. +#: src/move.c:309 +#, c-format +msgid "Move ^{%lc^}" +msgstr "Mover ^{%lc^}" + +#: src/move.c:330 +#, c-format +msgid "^{<2>^} (Declare bankruptcy)" +msgstr "^{<2>^} (Declarar falência)" + +#: src/move.c:339 +#, c-format +msgid "^{<3>^} (Save and end the game)" +msgstr "^{<3>^} (Salvar e encerrar o jogo)" + +#: src/move.c:360 +#, c-format +msgid "^{^} (Quit the game)" +msgstr "^{^} (Sair do jogo)" + +#: src/move.c:375 +#, c-format +msgid "Are you sure? [^{Y^}/^{N^}] " +msgstr "Tem certeza? [^{S^}/^{N^}] " + +#: src/move.c:392 src/move.c:470 +#, c-format +msgid "Saving game %d... " +msgstr "Salvando o jogo %d... " + +#: src/move.c:700 src/move.c:708 src/move.c:1066 src/move.c:1103 +#, c-format +msgid " Bankruptcy Court " +msgstr " Tribunal de Falências " + +#. TRANSLATORS: %ls is the player's name. +#: src/move.c:702 +#, c-format +msgid "%ls has been declared bankrupt by the Interstellar Trading Bank." +msgstr "%ls teve sua falência declarada pelo Banco de Comércio Interestelar." + +#. TRANSLATORS: %ls is the player's name. +#: src/move.c:710 +#, c-format +msgid "%ls has declared bankruptcy." +msgstr "%ls teve sua falência declarada." + +#: src/move.c:778 +#, c-format +msgid " New Company " +msgstr " Nova empresa " + +#: src/move.c:779 +#, c-format +msgid "" +"A new company has been formed!\n" +"Its name is ^{%ls^}." +msgstr "" +"Uma nova empresa foi formada!\n" +"O nome dela é ^{%ls^}." + +#: src/move.c:838 +#, c-format +msgid "" +"^{%ls^} has just merged into ^{%ls^}.\n" +"Please note the following transactions:\n" +msgstr "" +"^{%ls^} acabou ser fundida com ^{%ls^}.\n" +"Observe as seguintes transações:\n" + +#: src/move.c:844 +#, c-format +msgid " Company Merger " +msgstr " Fusão de empresas " + +#. TRANSLATORS: "Old stock" refers to the company that has +#. just ceased existence due to a merger. +#. +#. Note that the "Old stock" and "New stock" labels MUST be +#. the same length and must contain a trailing space for the +#. display routines to work correctly. The maximum length of +#. each label is 36 characters. +#: src/move.c:864 +#, c-format +msgctxt "label" +msgid "Old stock: " +msgstr "Ações antigas: " + +#. TRANSLATORS: "New stock" refers to the company that has +#. absorbed the other due to a merger. +#: src/move.c:875 +#, c-format +msgctxt "label" +msgid "New stock: " +msgstr "Novas ações: " + +#. TRANSLATORS: "Bonus" refers to the bonus cash amount paid to +#. each player after two companies merge. %ls is the currency +#. symbol in the current locale. The maximum column width is +#. 12 characters INCLUDING the currency symbol (see +#. MERGE_BONUS_COLS in src/intf.h). +#: src/move.c:889 +#, c-format +msgctxt "subtitle" +msgid "Bonus (%ls)" +msgstr "Bônus (%ls)" + +#. TRANSLATORS: "Total" refers to the total number of shares in +#. the new company after a merger. The maximum column width is +#. 8 characters (see MERGE_TOTAL_STOCK_COLS in src/intf.h). +#: src/move.c:894 +#, c-format +msgctxt "subtitle" +msgid "Total" +msgstr "Total" + +#. TRANSLATORS: "New" refers to how many (new) shares each +#. player receives in the surviving company after a merger. +#. The maximum column width is 8 characters (see +#. MERGE_NEW_STOCK_COLS in src/intf.h). +#: src/move.c:901 +#, c-format +msgctxt "subtitle" +msgid "New" +msgstr "Novas" + +#. TRANSLATORS: "Old" refers to how many shares each player had +#. in the company ceasing existence. The maximum column width +#. is 8 characters (see MERGE_OLD_STOCK_COLS in src/intf.h). +#: src/move.c:907 +#, c-format +msgctxt "subtitle" +msgid "Old" +msgstr "Antigas" + +#. TRANSLATORS: %ls represents the company name. +#: src/move.c:1068 +#, c-format +msgid "" +"%ls has been declared bankrupt by the Interstellar Trading Bank.\n" +"\n" +"^{All assets have been taken to repay outstanding loans.^}" +msgstr "" +"%ls teve a falência declarada pelo Banco de Comércio Interestelar.\n" +"\n" +"^{Todos os ativos foram penhorados para pagar empréstimos em aberto.^}" + +#. TRANSLATORS: %ls represents the company name. +#: src/move.c:1092 +#, c-format +msgid "" +"%ls has been declared bankrupt by the Interstellar Trading Bank.\n" +"\n" +"^{The Bank has agreed to pay stock holders ^}%.2f%%^{ of the share value on each share owned.^}" +msgstr "" +"%ls teve a falência declarada pelo Banco de Comércio Interestelar.\n" +"\n" +"^{O Banco concordou em pagar os acionistas ^}%.2f%%^{ o valor de cada uma das ações.^}" + +#. TRANSLATORS: The label "Amount paid per share" +#. refers to payment made by the Interstellar +#. Trading Bank to each player upon company +#. bankruptcy. This label MUST be the same +#. length as "Old share value" and MUST have at +#. least one trailing space for the display +#. routines to work correctly. The maximum +#. length is 28 characters. +#: src/move.c:1120 +#, c-format +msgctxt "label" +msgid "Amount paid per share: " +msgstr "Quantidade paga por ação: " + +#. TRANSLATORS: "Old share value" refers to the +#. share price of a company before it was forced +#. into bankruptcy by the Bank. This label must be +#. the same width as "Amount paid per share". +#: src/move.c:1128 +#, c-format +msgctxt "label" +msgid "Old share value: " +msgstr "Valor ação anterior: " + +#: src/move.c:1211 src/move.c:1246 src/exch.c:321 +#, c-format +msgid " Interstellar Trading Bank " +msgstr " Banco de Comércio Interestelar " + +#: src/move.c:1213 +#, c-format +msgid "" +"You were forced to borrow %N\n" +"to cover losses from company shares." +msgstr "" +"Você foi forçado a pedir emprestado %N\n" +"para cobrir perdas de ações da empresa." + +#: src/move.c:1248 +#, c-format +msgid "" +"Your debt has amounted to %N!\n" +"^{The Bank has impounded ^}%N^{ from your cash.^}" +msgstr "" +"Sua dívida está acumulada em %N!\n" +"^{O Banco apreendeu ^}%N^{ de seu dinheiro.^}" + +#: src/exch.c:98 +#, c-format +msgid " Interstellar Stock Exchange " +msgstr " Bolsa de Valores Interestelar " + +#. TRANSLATORS: "Shares left" is a two-line column +#. label in a table containing the number of shares +#. left to be purchased in any given company. The +#. maximum column width is 10 characters (see +#. STOCK_LEFT_COLS in src/intf.h). +#: src/exch.c:127 +#, c-format +msgctxt "subtitle" +msgid "" +"Shares\n" +"left" +msgstr "" +"Ações\n" +"restantes" + +#. TRANSLATORS: "Shares issued" is a two-line column +#. label in a table containing the number of shares +#. already sold (ie, bought by all players) in any +#. given company. The maximum column width is 10 +#. characters (see STOCK_ISSUED_COLS in src/intf.h). +#: src/exch.c:134 +#, c-format +msgctxt "subtitle" +msgid "" +"Shares\n" +"issued" +msgstr "" +"Ações\n" +"emitidas" + +#. TRANSLATORS: Each label may be up to 37 characters wide +#. (for <1> and <2>) or 38 characters wide (for <3> and <4>). +#: src/exch.c:186 +#, c-format +msgid "^{<2>^} Display galaxy map" +msgstr "^{<2>^} Exibir mapa da galáxia" + +#: src/exch.c:188 +#, c-format +msgid "^{<3>^} Visit the Trading Bank" +msgstr "^{<3>^} Visitar o Banco de Comércio" + +#: src/exch.c:190 +#, c-format +msgid "^{<4>^} Exit the Stock Exchange" +msgstr "^{<4>^} Sair da Bolsa de Valores" + +#: src/exch.c:193 +#, c-format +msgid "Enter selection [^[Company letter^]/^{1^}-^{4^}]: " +msgstr "Insira uma seleção [^[Letra da empresa^]/^{1^}-^{4^}]: " + +#. TRANSLATORS: The "Total value", "Current cash", "Current +#. debt", "Interest rate" and "Credit limit" labels MUST all be +#. the same length (ie, right-padded with spaces as needed) and +#. must have at least one trailing space so that the display +#. routines work correctly. The maximum length of each label +#. is 36 characters. +#. +#. Note that some of these labels are used for both the Player +#. Status window and the Trading Bank window. +#: src/exch.c:351 +#, c-format +msgctxt "label" +msgid "Credit limit: " +msgstr "Limite de crédito: " + +#. TRANSLATORS: The "Borrow money", "Repay debt" and "Exit +#. from the Bank" menu options must all be the same length +#. (ie, padded with trailing spaces as required). The maximum +#. length is 72 characters. +#: src/exch.c:366 +#, c-format +msgid "^{<1>^} Borrow money " +msgstr "^{<1>^} Pegar dinheiro" + +#: src/exch.c:368 +#, c-format +msgid "^{<2>^} Repay debt " +msgstr "^{<2>^} Pagar dívida " + +#: src/exch.c:370 +#, c-format +msgid "^{<3>^} Exit from the Bank" +msgstr "^{<3>^} Sair do Banco " + +#: src/exch.c:373 +#, c-format +msgid "Enter selection [^{1^}-^{3^}]: " +msgstr "Insira uma seleção [^{1^}-^{3^}]: " + +#: src/exch.c:426 +#, c-format +msgid " Insufficient Credit Limit " +msgstr " Limite de crédito insuficiente " + +#: src/exch.c:427 +#, c-format +msgid "The Bank will not lend you any more money." +msgstr "O Banco não vai lhe emprestar mais dinheiro." + +#: src/exch.c:447 +#, c-format +msgid "How much do you wish to borrow? " +msgstr "Quanto você deseja pegar emprestado? " + +#: src/exch.c:479 +#, c-format +msgid " No Debt " +msgstr " Nenhuma dívida " + +#: src/exch.c:480 +#, c-format +msgid "You have no debt to repay." +msgstr "Você não tem dívida para pagar." + +#: src/exch.c:484 +#, c-format +msgid " No Cash " +msgstr " Sem dinheiro " + +#: src/exch.c:485 +#, c-format +msgid "You have no cash with which to repay the debt!" +msgstr "Você não tem dinheiro para pagar a dívida!" + +#: src/exch.c:505 +#, c-format +msgid "How much do you wish to repay? " +msgstr "Quanto você deseja pagar? " + +#. TRANSLATORS: %ls represents the company name. +#: src/exch.c:581 +#, c-format +msgid " Stock Transaction in %ls " +msgstr " Transação de ação em %ls " + +#. TRANSLATORS: "Shares issued" represents the number of +#. shares already sold by the company to all players. +#. +#. Note that the labels "Shares issued", "Shares left", +#. "Price per share" and "Return" must all be the same length +#. and must have at least one trailing space for the output +#. routines to work correctly. The maximum length of each +#. label is 22 characters. +#: src/exch.c:592 +#, c-format +msgctxt "label|Stock A" +msgid "Shares issued: " +msgstr "Ações emitidas: " + +#. TRANSLATORS: "Shares left" is the number of shares that are +#. left to be purchased in the current company. +#: src/exch.c:600 +#, c-format +msgctxt "label|Stock A" +msgid "Shares left: " +msgstr "Ações restantes: " + +#. TRANSLATORS: "Price per share" is the cost of each share in +#. the current company. +#: src/exch.c:607 +#, c-format +msgctxt "label|Stock A" +msgid "Price per share: " +msgstr "Preço por ação: " + +#. TRANSLATORS: "Return" is the share return as a percentage. +#: src/exch.c:613 +#, c-format +msgctxt "label|Stock A" +msgid "Return: " +msgstr "Retorno: " + +#. TRANSLATORS: "Current holdings" is the number of shares +#. the current player owns in this particular company. +#. +#. Note that the labels "Current holdings", "Percentage owned" +#. and "Current cash" MUST all be the same length and contain at +#. least one trailing space for the display routines to work +#. correctly. The maximum length of each label is 18 +#. characters. +#: src/exch.c:626 +#, c-format +msgctxt "label|Stock B" +msgid "Current holdings: " +msgstr "Participações atuais: " + +#. TRANSLATORS: "Percentage owned" is the current player's +#. percentage ownership in this particular company. +#: src/exch.c:636 +#, c-format +msgctxt "label|Stock B" +msgid "Percentage owned: " +msgstr "Porcentagem possuída: " + +#: src/exch.c:641 +#, c-format +msgctxt "label|Stock B" +msgid "Current cash: " +msgstr "Dinheiro atual: " + +#. TRANSLATORS: Each label may be up to 35 characters wide +#. (for <1> and <2>) or 36 characters wide (for <3> and <4>). +#: src/exch.c:654 +#, c-format +msgid "^{<1>^} Buy stock from company" +msgstr "^{<1>^} Comprar ação da empresa" + +#: src/exch.c:656 +#, c-format +msgid "^{<2>^} Sell stock back to company" +msgstr "^{<2>^} Vender ação de volta à empresa" + +#: src/exch.c:658 +#, c-format +msgid "^{<3>^} Bid company to issue more shares" +msgstr "^{<3>^} Requisitar emissão de mais ações" + +#: src/exch.c:660 +#, c-format +msgid "^{<4>^} Exit to the Stock Exchange" +msgstr "^{<4>^} Sair para Bolsa de Valores" + +#: src/exch.c:663 +#, c-format +msgid "Enter selection [^{1^}-^{4^}]: " +msgstr "Insira uma seleção [^{1^}-^{4^}]: " + +#: src/exch.c:719 +#, c-format +msgid " No Shares Available " +msgstr " Sem ação disponível " + +#: src/exch.c:720 +#, c-format +msgid "No more shares are available for purchase." +msgstr "Não há mais ações disponíveis para compra." + +#: src/exch.c:724 +#, c-format +msgid " Insufficient Cash " +msgstr " Dinheiro insuficiente " + +#: src/exch.c:725 +#, c-format +msgid "" +"You do not have enough cash\n" +"to purchase additional shares." +msgstr "" +"Você não tem dinheiro suficiente\n" +"para comprar ações adicionais." + +#: src/exch.c:736 +#, c-format +msgid "You can purchase ^{one^} share." +msgid_plural "You can purchase up to ^{%'ld^} shares." +msgstr[0] "Você pode comprar ^{uma^} ação." +msgstr[1] "Você pode comprar até ^{%'ld^} ações." + +#: src/exch.c:742 +#, c-format +msgid "How many shares do you wish to purchase? " +msgstr "Quantas ações você deseja comprar? " + +#: src/exch.c:763 +#, c-format +msgid " No Shares " +msgstr " Sem ações " + +#: src/exch.c:764 +#, c-format +msgid "You do not have any shares to sell." +msgstr "Você não possui ações para vender." + +#: src/exch.c:771 +#, c-format +msgid "You can sell ^{one^} share." +msgid_plural "You can sell up to ^{%'ld^} shares." +msgstr[0] "Você pode vender ^{uma^} ação." +msgstr[1] "Você pode vender até ^{%'ld^} ações." + +#: src/exch.c:777 +#, c-format +msgid "How many shares do you wish to sell? " +msgstr "Quantas ações você deseja vender? " + +#: src/exch.c:805 +#, c-format +msgid " No Shares Issued " +msgstr " Nenhuma ação emitida " + +#. TRANSLATORS: %ls represents the company name. +#: src/exch.c:807 +#, c-format +msgid "" +"%ls has refused\n" +"to issue more shares." +msgstr "" +"%ls se recusou a\n" +"emitir mais ações." + +#: src/exch.c:812 +#, c-format +msgid " Shares Issued " +msgstr " Ações emitidas " + +#. TRANSLATORS: %ls represents the company name. +#: src/exch.c:814 +#, c-format +msgid "" +"%ls has issued\n" +"^{one^} more share." +msgid_plural "" +"%ls has issued\n" +"^{%'ld^} more shares." +msgstr[0] "" +"%ls emitiu\n" +"mais ^{uma^} ação." +msgstr[1] "" +"%ls emitiu\n" +"mais ^{%'ld^} ações." + +#: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387 +#, c-format +msgid "%s: missing field on line %d" +msgstr "%s: faltando campo na linha %d" + +#: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393 +#, c-format +msgid "%s: illegal field on line %d" +msgstr "%s: campo ilegal na linha %d" + +#: src/fileio.c:51 +#, c-format +msgid "%s: illegal field on line %d: '%s'" +msgstr "%s: campo ilegal na linha %d: “%s”" + +#: src/fileio.c:55 +#, c-format +msgid "%s: illegal value on line %d: '%s'" +msgstr "%s: valor ilegal na linha %d: “%s”" + +#: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402 +#, c-format +msgid "%s: illegal value on line %d" +msgstr "%s: valor ilegal na linha %d" + +#: src/fileio.c:98 +#, c-format +msgid "%s: illegal characters on line %d" +msgstr "%s: caracteres ilegais na linha %d" + +#: src/fileio.c:183 +#, c-format +msgid "%s: could not convert string" +msgstr "%s: não foi possível converter string" + +#: src/fileio.c:257 +#, c-format +msgid " Game Not Found " +msgstr " Jogo não encontrado " + +#: src/fileio.c:258 +#, c-format +msgid "Game %d has not been saved to disk." +msgstr "O jogo %d não foi salvo no disco." + +#: src/fileio.c:265 +#, c-format +msgid " Game Not Loaded " +msgstr " Jogo não carregado " + +#: src/fileio.c:266 +#, c-format +msgid "" +"Game %d could not be loaded from disk.\n" +"\n" +"^{File %s: %s^}" +msgstr "" +"O jogo %d não pôde ser carregado do disco.\n" +"\n" +"^{Arquivo %s: %s^}" + +#: src/fileio.c:319 +#, c-format +msgid "%s: missing header in game file" +msgstr "%s: faltando cabeçalho no arquivo de jogo" + +#: src/fileio.c:322 +#, c-format +msgid "%s: not a valid game file" +msgstr "%s: não é um arquivo de jogo válido" + +#: src/fileio.c:325 src/fileio.c:332 +#, c-format +msgid "%s: missing subheader in game file" +msgstr "%s: faltando subcabeçalho no arquivo de jogo" + +#: src/fileio.c:328 +#, c-format +msgid "%s: saved under a different version of Star Traders" +msgstr "%s: salvo com uma versão diferente do Comerciantes Estelares" + +#: src/fileio.c:335 +#, c-format +msgid "%s: saved under an incompatible character encoding" +msgstr "%s: salvo com uma codificação de caracteres incompatível" + +#: src/fileio.c:343 +#, c-format +msgid "%s: illegal or missing field on line %d" +msgstr "%s: campo ilegal ou faltando na linha %d" + +#: src/fileio.c:479 src/fileio.c:501 +#, c-format +msgid " Game Not Saved " +msgstr " Jogo não salvo " + +#: src/fileio.c:480 +#, c-format +msgid "" +"Game %d could not be saved to disk.\n" +"\n" +"^{Directory %s: %s^}" +msgstr "" +"O jogo %d não pôde ser salvo no disco.\n" +"\n" +"^{Diretório %s: %s^}" + +#: src/fileio.c:502 +#, c-format +msgid "" +"Game %d could not be saved to disk.\n" +"\n" +"^{File %s: %s^}" +msgstr "" +"O jogo %d não pôde ser salvo no disco.\n" +"\n" +"^{Arquivo %s: %s^}" + +#. TRANSLATORS: The help text for Star Traders is marked up using a +#. custom mark-up format NOT used anywhere else in the source code. +#. +#. Each string is a single page of text that is displayed in an area 76 +#. columns wide by 16 lines high. Each line is delimited by "\n". NO +#. word-wrapping is performed: you must place the "\n" characters in the +#. appropriate place. Ideally, each line within the string should be +#. also (manually) space-justified or centred. TAB characters and other +#. control codes must NOT be used. If a string starts with "@" as the +#. very first character, that string is ignored (as are all strings +#. following): this allows a variable number of help text pages (from +#. one to ten). Multibyte strings are handled correctly (even those +#. requiring shift sequences!). +#. +#. The ASCII circumflex accent character "^" switches to a different +#. character rendition (also called attributes), depending on the +#. character following the "^": +#. +#. ^^ - Print the circumflex accent (ASCII code U+005E) +#. ^N - Switch to using the normal character rendition +#. ^B - Switch to using the bold character rendition +#. ^H - Switch to using the highlight character rendition +#. ^K - Switch to using the keycode character rendition (such as used for "") +#. ^e - Switch to using the character rendition used for empty space +#. ^o - Switch to using the character rendition used for outposts +#. ^s - Switch to using the character rendition used for stars +#. ^c - Switch to using the character rendition used for companies +#. ^k - Switch to using the character rendition used for keyboard choices on the galaxy map +#. +#. The help text parsing routines also understand the following "value +#. escapes" introduced by the ASCII tilde character "~"; these act like +#. "%" conversion specifiers in printf(): +#. +#. ~~ - Print the tilde character (ASCII code U+007E) [*] +#. ~x - Print the width of the galaxy map (MAX_X) [**] +#. ~y - Print the height of the galaxy map (MAX_Y) [**] +#. ~m - Print the number of moves available (NUMBER_MOVES) [**] +#. ~c - Print the maximum number of companies that can be formed (MAX_COMPANIES) [*] +#. ~t - Print the default number of turns in the game (DEFAULT_MAX_TURN) [**] +#. ~1 to ~9 - Print the keycode for the N-th choice of move [***] +#. ~M - Print the keycode for the last choice of move [***] +#. ~A to ~H - Print the character used to represent the company on the galaxy map [***] +#. ~. - Print the character used to represent empty space on the map [***] +#. ~+ - Print the character used to represent outposts on the map [***] +#. ~* - Print the character used to represent stars on the map [***] +#. +#. [*] Takes one character space (column space) in the output +#. [**] Takes two column spaces in the output +#. [***] Takes one or two column spaces in the output, depending on the +#. appropriate strings in the current PO file. +#. +#. Note that all keycodes and map representation characters use locale- +#. specific characters; double-width characters ARE supported. Note +#. also that the tilde value escapes do NOT change the current character +#. rendition: a circumflex accent escape is needed for that. For +#. example, to display the first choice of move as it would be shown on +#. the galaxy map, use something like "^k~1^N" (a six-character sequence +#. that would translate to just one character (or maybe two) in the +#. output text). +#. +#. Formatting the help text is probably the most complicated and tedious +#. part of translating Star Traders. The author and maintainer of this +#. game is more than happy to help you with this task: if you are able +#. to provide a translation, even if it is not formatted correctly, the +#. maintainer will perform the necessary adjustments for word-wrapping +#. and justification. In addition, remember that you have up to 10 +#. pages in which to display your help text: the translation does not +#. need to correspond exactly to the original text. This text will not +#. be changing any time soon! +#. +#: src/help.c:113 +msgid "" +"^BStar Traders^N is a simple game of interstellar trading. The object of the\n" +"game is to amass the greatest amount of wealth possible. This is done by\n" +"creating interstellar shipping lanes, expanding them and buying shares in\n" +"the companies controlling them. Shares appreciate in value as company\n" +"operations expand. In addition, the return on each share (as a percentage)\n" +"also changes. Players may also borrow from the Interstellar Trading Bank to\n" +"finance additional purchases on the Stock Exchange.\n" +"\n" +"The map of the galaxy is represented by a ^B~x^N x ^B~y^N grid. A typical section\n" +"of it may be:\n" +"\n" +" ^e ~. ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ~. ~. ~. ~. ~. ~. ^N ^e ~. ^N represents ^Bempty space^N,\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ~. ~. ~. ^N ^s ~* ^N represents a ^Bstar^N.\n" +" ^e ~. ~. ~. ~. ~. ~. ~. ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ~. ^N\n" +msgstr "" +"^BComerciantes Estelares^N é um jogo simples de comércio interestelar. O\n" +"objetivo do jogo é acumular a maior quantidade de riqueza possível. Isso é\n" +"feito criando faixas de expedição interestelar, expandindo-as e comprando\n" +"ações nas empresas que as controlam. As ações se valorizam à medida que as\n" +"operações da empresa se expandem. Além disso, o retorno de cada ação (como\n" +"porcentagem) também muda. Jogadores também podem pedir emprestado ao Banco\n" +"de Comércio Interestelar para financiar outras compras na Bolsa de Valores.\n" +"\n" +"O mapa da galáxia é representado por uma grade ^B~x^N × ^B~y^N. Uma seção típica\n" +"disso pode ser:\n" +"\n" +" ^e ~. ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ~. ~. ~. ~. ~. ~. ^N ^e ~. ^N representa ^Bespaço vazio^N,\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ~. ~. ~. ^N ^s ~* ^N representa uma ^Bestrela^N.\n" +" ^e ~. ~. ~. ~. ~. ~. ~. ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ~. ^N\n" + +#: src/help.c:132 +msgid "" +"The computer selects ^B~m^N moves (labeled ^k~1^N to ^k~M^N) at random, and places these\n" +"on the map. To select any of the highlighted positions, press that letter.\n" +"For example, some of the moves on the map may be:\n" +"\n" +"\n" +" ^e ^k~1^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ^k~3^e ~. ~. ~. ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ^k~5^e ~. ~. ^N Moves ^k~1^N to ^k~5^N shown.\n" +" ^e ~. ^k~2^e ~. ~. ^k~4^e ~. ~. ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ~. ^N\n" +"\n" +"\n" +"Selecting a position that is ^Bnot^N next to a star (such as moves ^k~1^N, ^k~3^N or ^k~5^N)\n" +"will set up an ^Boutpost^N, not belonging to any company. Thus, if move ^k~3^N is\n" +"selected on the above map, a ^o ~+ ^N would be placed at that position.\n" +msgstr "" +"O computador seleciona ^B~m^N movimentos (rotulados de ^k~1^N até ^k~M^N) aleatoriamente\n" +"e os coloca no mapa. Para selecionar qualquer uma das posições destacadas,\n" +"pressione essa letra. Por exemplo, alguns dos movimentos no mapa podem ser:\n" +"\n" +"\n" +" ^e ^k~1^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ^k~3^e ~. ~. ~. ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ^k~5^e ~. ~. ^N Movimentos ^k~1^N até ^k~5^N mostrados.\n" +" ^e ~. ^k~2^e ~. ~. ^k~4^e ~. ~. ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ~. ^N\n" +"\n" +"\n" +"Selecionar uma posição afastada de uma estrela (como os movimentos ^k~1^N, ^k~3^N, ^k~5^N)\n" +"configurará um ^Bposto avançado^N, que não pertence a qualquer empresa. Assim,\n" +"ao selecionar ^k~3^N no mapa acima, um ^o ~+ ^N seria colocado nesta exata posição.\n" + +#: src/help.c:150 +msgid "" +"If, on the other hand, a position next to a star (or another outpost) is\n" +"selected, a ^Bcompany^N would be formed and its letter would appear on the map.\n" +"As a reward for creating the company, you are granted the first five shares.\n" +"Up to ^B~c^N companies can be created in this way.\n" +"\n" +"If a position next to an existing company is selected, the company would\n" +"expand its operations by one square. This increases the cost of its shares\n" +"and hence your return. Thus, if the map was as shown below, selecting ^k~6^N\n" +"or ^k~8^N increases Company ^B~B^N's shipping lane:\n" +"\n" +" ^e ^k~1^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ^o~+^e ~. ~. ^k~6^e ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ^c~B^e ^c~B^e ^c~B^e ^N Move ^k~6^N or ^k~8^N increases Company ^B~B^N.\n" +" ^e ~. ^k~2^e ~. ~. ^k~4^e ~. ~. ^s~*^e ^c~B^e ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ^k~8^e ^N\n" +msgstr "" +"Se, por outro lado, uma posição próxima a uma estrela (ou posto avançado)\n" +"for selecionada, uma ^Bempresa^N será formada e sua letra aparecerá no mapa.\n" +"Como recompensa por criar a empresa, você recebe as cinco primeiras ações.\n" +"Até ^B~c^N empresas podem ser criadas dessa maneira.\n" +"\n" +"Se uma posição próxima a uma empresa existente for selecionada, a empresa\n" +"expandirá suas operações em um quadrado. Isso aumenta o preço de suas ações\n" +"e, portanto, seu retorno. Então, se o mapa abaixo foi mostrado, selecionar\n" +"^k~6^N ou ^k~8^N aumenta a faixa de expedição da empresa ^B~B^N:\n" +"\n" +" ^e ^k~1^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ^o~+^e ~. ~. ^k~6^e ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ^c~B^e ^c~B^e ^c~B^e ^N Movimento para ^k~6^N ou ^k~8^N aumenta empresa ^B~B^N.\n" +" ^e ~. ^k~2^e ~. ~. ^k~4^e ~. ~. ^s~*^e ^c~B^e ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ^k~8^e ^N\n" + +#: src/help.c:168 +msgid "" +"Selecting positions next to stars increases the value of your stock by about\n" +"five times as much as an extension not next to a star. Thus move ^k~6^N should\n" +"be preferred to move ^k~8^N.\n" +"\n" +" ^e ^c~C^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ^k~1^e ^o~+^e ~. ^o~+^e ~. ~. ^k~6^e ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ^c~B^e ^c~B^e ^c~B^e ^N Move ^k~6^N is preferred to ^k~8^N.\n" +" ^e ~. ^k~2^e ~. ~. ^k~4^e ~. ~. ^s~*^e ^c~B^e ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ^k~8^e ^N\n" +"\n" +"You may also expand any company by selecting positions next to outposts.\n" +"Such outposts will be swallowed up by that company. Thus, move ^k~1^N will\n" +"extend Company ^B~C^N by ^Btwo^N squares. As a bonus, outposts next to stars are\n" +"more valuable: the company's share price will increase by a greater amount\n" +"than it would for outposts not next to stars.\n" +msgstr "" +"Selecionar posições próximas a estrelas aumenta o valor de suas ações em\n" +"cerca de cinco vezes mais do que uma extensão afastada de uma estrela. Então\n" +"o movimento ^k~6^N deve ser preferido a mover ^k~8^N.\n" +"\n" +" ^e ^c~C^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ^k~1^e ^o~+^e ~. ^o~+^e ~. ~. ^k~6^e ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ~. ~. ^c~B^e ^c~B^e ^c~B^e ^N Movimento para ^k~6^N é preferível a ^k~8^N.\n" +" ^e ~. ^k~2^e ~. ~. ^k~4^e ~. ~. ^s~*^e ^c~B^e ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ~. ~. ^k~8^e ^N\n" +"\n" +"Você também pode expandir qualquer empresa selecionando posições próximas de\n" +"postos avançados. Esses postos avançados serão engolidos por essa empresa.\n" +"Assim, mover para ^k~1^N vai estender a empresa ^B~C^N em ^Bdois^N quadrados. Como bônus,\n" +"postos avançados próximos a estrelas são mais valiosos: o preço de ações da\n" +"empresa aumentará em uma quantidade maior do que para os postos avançados\n" +"afastados a estrelas.\n" + +#: src/help.c:186 +msgid "" +"If two companies are separated on the map by only one square, then they can\n" +"be ^Bmerged^N into one company by selecting that position (if available). For\n" +"example, on the map below, companies ^B~A^N and ^B~B^N can be merged by selecting ^k~5^N.\n" +"When this occurs, the company with the greater assets value takes over the\n" +"other one. Here, Company ^B~B^N might take over Company ^B~A^N. Company ^B~A^N ceases to\n" +"exist, although it may reappear as an entirely new company at a later stage.\n" +"\n" +" ^e ^k~1^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ^c~A^e ^c~A^e ^k~5^e ^c~B^e ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ^c~A^e ~. ^c~B^e ^c~B^e ^c~B^e ^N Move ^k~5^N merges companies ^B~A^N and ^B~B^N.\n" +" ^e ~. ^k~2^e ~. ~. ~. ~. ~. ^s~*^e ^c~B^e ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ^o~+^e ~. ~. ^N\n" +"\n" +"When companies merge, players are granted shares in the dominant company\n" +"proportional to the amount owned in the old company. As well, a cash bonus\n" +"is also paid, proportional to the percentage of the old company owned.\n" +msgstr "" +"Se duas empresas forem separadas no mapa por apenas um quadrado, elas podem\n" +"ser ^Bfundidas^N em uma empresa, selecionando a posição, caso esteja disponível.\n" +"Por exemplo, no mapa, as empresas ^B~A^N e ^B~B^N podem ser mescladas selecionando ^k~5^N.\n" +"Quando isso ocorre, a empresa com maior valor patrimonial assume a outra.\n" +"Aqui, a empresa ^B~B^N pode assumir a empresa ^B~A^N. A empresa ^B~A^N deixa de existir,\n" +"embora possa reaparecer como uma empresa inteiramente nova posteriormente.\n" +"\n" +" ^e ^k~1^e ~. ^s~*^e ~. ~. ~. ^s~*^e ^s~*^e ~. ^N\n" +" ^e ~. ~. ~. ^c~A^e ^c~A^e ^k~5^e ^c~B^e ~. ~. ^N\n" +" ^e ~. ^s~*^e ~. ~. ^c~A^e ~. ^c~B^e ^c~B^e ^c~B^e ^N Movimento ^k~5^N faz a fusão das empresas ^B~A^N e ^B~B^N.\n" +" ^e ~. ^k~2^e ~. ~. ~. ~. ~. ^s~*^e ^c~B^e ^N\n" +" ^e ~. ~. ~. ~. ^s~*^e ~. ^o~+^e ~. ~. ^N\n" +"\n" +"Quando empresas se fundem, os jogadores recebem ações da empresa dominante\n" +"proporcional ao valor de propriedade da empresa antiga. Além disso, também é\n" +"pago um bônus em dinheiro, proporcional à porcentagem da antiga empresa.\n" + +#: src/help.c:205 +msgid "" +"Once you select your move, you enter the ^BInterstellar Stock Exchange^N. Here\n" +"you may purchase shares, sell them, borrow from the Trading Bank or repay\n" +"some of your debt (if applicable). Note that each company issues a limited\n" +"number of shares -- you cannot go on buying for ever! You may, however, bid\n" +"for more shares to be issued. You have a better chance of succeeding if you\n" +"own a larger proportion of the company.\n" +"\n" +"The game usually ends after ^B~t^N turns. However, you may end the game sooner\n" +"by pressing ^K^N when asked to select a move. As well, individual\n" +"players can declare themselves bankrupt at any time. If your debt is large\n" +"enough, the Bank may do this for you! If you do not complete your game in\n" +"the time you have available, you may save the game and continue it later.\n" +"\n" +"\n" +"The ^Bwinner of the game^N is the person with the greatest net worth (total\n" +"value of cash, stock and debt). ^HGood luck^N and may the best person win!\n" +msgstr "" +"Selecionado o seu movimento, você entra na ^BBolsa de Valores Interestelar^N.\n" +"Aqui você pode comprar ações, vender, pedir emprestado ao Banco de Comércio\n" +"ou pagar parte de sua dívida (se aplicável). Observe que cada empresa emite\n" +"um número limitado de ações — você não pode continuar comprando para sempre!\n" +"Você pode, no entanto, requisitar que mais ações sejam emitidas. Você tem\n" +"melhores chances de ter sucesso se tiver uma proporção maior da empresa.\n" +"\n" +"O jogo geralmente termina após ^B~t^N turnos. Porém, você pode encerrar o jogo\n" +"mais cedo pressionando ^K^N quando solicitado a selecionar o movimento.\n" +"Além disso, jogadores individuais podem declarar sua própria falência. Caso\n" +"sua dívida for grande o suficiente, o Banco poderá fazer isso por você! Caso\n" +"você não conclua o jogo no tempo disponível, salve o jogo e continue depois.\n" +"\n" +"\n" +"O ^Bvencedor do jogo^N é a pessoa com o maior patrimônio líquido (valor total de\n" +"dinheiro, ações e dívidas). ^HBoa sorte^N e que a melhor pessoa vença!\n" + +#: src/help.c:225 +msgid "@ Help text, page 7\n" +msgstr "@ Texto de ajuda, página 7\n" + +#: src/help.c:226 +msgid "@ Help text, page 8\n" +msgstr "@ Texto de ajuda, página 8\n" + +#: src/help.c:227 +msgid "@ Help text, page 9\n" +msgstr "@ Texto de ajuda, página 9\n" + +#: src/help.c:228 +msgid "@ Help text, page 10\n" +msgstr "@ Texto de ajuda, página 10\n" + +#: src/help.c:280 +#, c-format +msgid " How to Play " +msgstr " Como jogar " + +#. TRANSLATORS: The parameter %1$d is the current page +#. number, %2$d is the number of pages your help text +#. takes (6, in English). +#: src/help.c:285 +#, c-format +msgid "Page %1$d of %2$d" +msgstr "Página %1$d de %2$d" + +#. TRANSLATORS: The reason the user is not asked "Press any +#. key to continue" is historical: many, many people used to +#. ask "where is the key?" :-) +#: src/help.c:486 src/intf.c:3026 +#, c-format +msgid "[ Press to continue ] " +msgstr "[ Pressione para continuar ] " + +#. TRANSLATORS: The specific use of and +#. is not essential: you can use , , , +#. or instead of , and almost +#. any other key instead of (other than , +#. , , , or <\>). +#. Note that the maximum label length is 76 characters, +#. including the trailing space. +#: src/help.c:494 +#, c-format +msgid "[ Press to continue or for the previous page ] " +msgstr "[ Pressione para continuar ou para página anterior ] " + +#: src/intf.c:110 +#, c-format +msgid "%s: string has incorrect format: '%s'" +msgstr "%s: a string possui um formato incorreto: “%s”" + +#: src/intf.c:126 +#, c-format +msgid "%s: character has illegal width: '%lc'" +msgstr "%s: o caractere possui largura ilegal: “%lc”" + +#: src/intf.c:435 +#, c-format +msgid "terminal size is too small (%d x %d required)" +msgstr "o tamanho do terminal é pequeno demais (%d x %d exigido)" + +#: src/intf.c:1267 +#, c-format +msgid "mkchstr_conv: NUL" +msgstr "mkchstr_conv: NULO" + +#: src/intf.c:1559 +#, c-format +msgid "mkchstr: '%s'" +msgstr "mkchstr: “%s”" + +#. TRANSLATORS: This string specifies the keycodes used to insert the +#. default value into the input string, if entered as the very first +#. character. Ideally, it should contain an easily-accessible +#. keycode that would NOT be used in ordinary input. Digits, ".", +#. ",", "+" and "-" are definitely NOT acceptable. +#: src/intf.c:2011 +msgctxt "input|DefaultValue" +msgid "=;" +msgstr "=;" + +#: src/intf.c:2025 src/intf.c:2070 +#, c-format +msgid "gettxline: illegal character in string: '%ls'" +msgstr "gettxline: caractere ilegal na string: “%ls”" + +#. TRANSLATORS: The strings with msgctxt "input|Yes" and +#. "input|No" contain the keycodes used to determine whether a +#. user is answering "Yes" or "No" in response to some question. +#. Both upper and lower-case versions should be present. +#: src/intf.c:2943 +msgctxt "input|Yes" +msgid "Yy" +msgstr "Ss" + +#: src/intf.c:2945 +msgctxt "input|No" +msgid "Nn" +msgstr "Nn" + +#. TRANSLATORS: The strings "Yes" and "No" are printed as a +#. response to user input in answer to questions like "Are you +#. sure? [Y/N] " +#: src/intf.c:2996 +msgctxt "answer" +msgid "Yes" +msgstr "Sim" + +#: src/intf.c:2998 +msgctxt "answer" +msgid "No" +msgstr "Não" + +#: src/utils.c:417 src/utils.c:438 +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/utils.c:443 +msgid ": " +msgstr ": " + +#: src/utils.c:456 +#, c-format +msgid "out of memory" +msgstr "memória esgotada" + +#: src/utils.c:1110 +#, c-format +msgid "xmbstowcs: '%s'" +msgstr "xmbstowcs: “%s”" + +#: src/utils.c:1150 +#, c-format +msgid "xwcrtomb: NUL" +msgstr "xwcrtomb: NULO" + +#: src/utils.c:1155 +#, c-format +msgid "xwcrtomb: '%lc'" +msgstr "xwcrtomb: “%lc”" + +#: lib/getopt.c:278 lib/obsolete-strings.c:45 +#, c-format +msgid "%s: option '%s%s' is ambiguous\n" +msgstr "%s: a opção “%s%s” é ambígua\n" + +#: lib/getopt.c:284 lib/obsolete-strings.c:47 +#, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: a opção “%s%s” é ambígua; possibilidades:" + +#: lib/getopt.c:319 lib/obsolete-strings.c:49 +#, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: opção desconhecida “%s%s”\n" + +#: lib/getopt.c:345 lib/obsolete-strings.c:51 +#, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" +msgstr "%s: a opção “%s%s” não permite um argumento\n" + +#: lib/getopt.c:360 lib/obsolete-strings.c:53 +#, c-format +msgid "%s: option '%s%s' requires an argument\n" +msgstr "%s: a opção “%s%s” exige um argumento\n" + +#: lib/getopt.c:621 lib/obsolete-strings.c:55 +#, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opção inválida -- “%c”\n" + +#: lib/getopt.c:636 lib/getopt.c:682 lib/obsolete-strings.c:57 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: a opção exige um argumento -- “%c”\n" + +#. TRANSLATORS: These strings are used in older versions of various +#. libraries, such as the GNU C Library as released with various +#. Linux distributions. +#: lib/obsolete-strings.c:44 +#, c-format +msgid "%s: option `%s%s' is ambiguous\n" +msgstr "%s: a opção “%s%s” é ambígua\n" + +#: lib/obsolete-strings.c:46 +#, c-format +msgid "%s: option `%s%s' is ambiguous; possibilities:" +msgstr "%s: a opção “%s%s” é ambígua; possibilidades:" + +#: lib/obsolete-strings.c:48 +#, c-format +msgid "%s: unrecognized option `%s%s'\n" +msgstr "%s: opção desconhecida “%s%s”\n" + +#: lib/obsolete-strings.c:50 +#, c-format +msgid "%s: option `%s%s' doesn't allow an argument\n" +msgstr "%s: a opção “%s%s” não permite um argumento\n" + +#: lib/obsolete-strings.c:52 +#, c-format +msgid "%s: option `%s%s' requires an argument\n" +msgstr "%s: a opção “%s%s” exige um argumento\n" + +#: lib/obsolete-strings.c:54 +#, c-format +msgid "%s: invalid option -- `%c'\n" +msgstr "%s: opção inválida -- “%c”\n" + +#: lib/obsolete-strings.c:56 +#, c-format +msgid "%s: option requires an argument -- `%c'\n" +msgstr "%s: a opção exige um argumento -- “%c”\n" + +#: lib/obsolete-strings.c:59 +#, c-format +msgid "%s: option `%s' is ambiguous; possibilities:" +msgstr "%s: a opção “%s” é ambígua; possibilidades:" + +#: lib/obsolete-strings.c:60 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: a opção “%s” é ambígua; possibilidades:" + +#: lib/obsolete-strings.c:61 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: a opção “%s” é ambígua\n" + +#: lib/obsolete-strings.c:62 +#, c-format +msgid "%s: option '%s' is ambiguous\n" +msgstr "%s: a opção “%s” é ambígua\n" + +#: lib/obsolete-strings.c:63 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: a opção “--%s” não permite um argumento\n" + +#: lib/obsolete-strings.c:64 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: a opção “--%s” não permite um argumento\n" + +#: lib/obsolete-strings.c:65 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: a opção “%c%s” não permite um argumento\n" + +#: lib/obsolete-strings.c:66 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: a opção “%c%s” não permite um argumento\n" + +#: lib/obsolete-strings.c:67 +#, c-format +msgid "%s: option `--%s' requires an argument\n" +msgstr "%s: a opção “--%s” exige um argumento\n" + +#: lib/obsolete-strings.c:68 +#, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: a opção “--%s” requer um argumento\n" + +#: lib/obsolete-strings.c:69 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: opção desconhecida “--%s”\n" + +#: lib/obsolete-strings.c:70 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: opção desconhecida “--%s”\n" + +#: lib/obsolete-strings.c:71 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opção desconhecida “%c%s”\n" + +#: lib/obsolete-strings.c:72 +#, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opção desconhecida “%c%s”\n" + +#: lib/obsolete-strings.c:73 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: a opção “-W %s” é ambígua\n" + +#: lib/obsolete-strings.c:74 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: a opção “-W %s” é ambígua\n" + +#: lib/obsolete-strings.c:75 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: a opção “-W %s” não permite um argumento\n" + +#: lib/obsolete-strings.c:76 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: a opção “-W %s” não permite um argumento\n" + +#: lib/obsolete-strings.c:77 +#, c-format +msgid "%s: option `-W %s' requires an argument\n" +msgstr "%s: a opção “-W %s” exige um argumento\n" + +#: lib/obsolete-strings.c:78 +#, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: a opção “-W %s” exige um argumento\n" diff --git a/po/ru.gmo b/po/ru.gmo index c08a866..90cb537 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 4294cca..b73db72 100644 --- a/po/ru.po +++ b/po/ru.po @@ -2,23 +2,23 @@ # * * # * Russian Translations for Star Traders * # * Русский перевод для игры «Звёздные торговцы» * -# * Copyright (C) 1990-2019, John Zaitseff * +# * Copyright (C) 1990-2020, John Zaitseff * # * * # ************************************************************************* # # This file is distributed under the same license as the trader package. # # Contributors: -# John Zaitseff , 2011-2019. +# John Zaitseff , 2011-2020. # Vladimir B. Tsarkov , 2012. # Pavel Maryanov , 2012. # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:38+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Pavel Maryanov \n" "Language-Team: Russian \n" "Language: ru\n" @@ -355,32 +355,37 @@ msgstr "Введите номер игры [^{1^}-^{9^}], или ^{^}, msgid "Please enter your name: " msgstr "Ваше имя: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Показать справку о том, как играть? [^{Д^}/^{Н^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Имена игроков " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Игрок №%d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Показать справку о том, как играть? [^{Д^}/^{Н^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Конец игры " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." @@ -388,17 +393,17 @@ msgstr[0] "Игра закончена после %d-го хода." msgstr[1] "Игра закончена после %d-го хода." msgstr[2] "Игра закончена после %d-го хода." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Нетто-стоимость " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Ваша нетто-стоимость равна ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -407,7 +412,7 @@ msgstr "" "Победитель игры — ^{%ls^},\n" "который является ^[*** БАНКРОТОМ ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -416,14 +421,14 @@ msgstr "" "Победитель игры — ^{%ls^}!\n" "Нетто-стоимость этого игрока равна ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Победитель игры " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -432,47 +437,47 @@ msgstr "Игрок" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Нетто-стоимость (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Игрок: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Ход: ^{%d-й^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Крайний ход ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Портфель акций " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * О Б А Н К Р О Т И В Ш И Й С Я * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Нет акционерных обществ на карте" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -487,7 +492,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -502,7 +507,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -516,7 +521,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -532,7 +537,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -551,25 +556,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Нетто-стоимость игрока: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Текущие наличные: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Текущая задолженность: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/sr.gmo b/po/sr.gmo index 84d8e1a..11bf46d 100644 Binary files a/po/sr.gmo and b/po/sr.gmo differ diff --git a/po/sr.po b/po/sr.po index 53ab30e..99918c1 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,7 +1,7 @@ # ************************************************************************* # * * # * Serbian Translation for Star Traders * -# * Copyright (C) 2016-19, John Zaitseff * +# * Copyright (C) 2016-20, John Zaitseff * # * Copyright (C) 2016-17, Free Software Foundation, Inc. * # * * # ************************************************************************* @@ -13,10 +13,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:38+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian <(nothing)>\n" "Language: sr\n" @@ -345,32 +345,37 @@ msgstr "Упишите број игара [^{1^}-^{9^}] или ^{<КТРЛ><Ц> msgid "Please enter your name: " msgstr "Упишите ваше име: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Да ли су вам потребна упутства? [^{Д^}/^{Н^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Упишите имена играча " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "%d. играч: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Да ли су неком играчу потребна упутства? [^{Д^}/^{Н^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Крај игре " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." @@ -378,17 +383,17 @@ msgstr[0] "Игра је завршена након %d круга." msgstr[1] "Игра је завршена након %d круга." msgstr[2] "Игра је завршена након %d кругова." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Укупан износ " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Ваш укупан износ је ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -397,7 +402,7 @@ msgstr "" "Победник је ^{%ls^}\n" "који је под ^[*** СТЕЧАЈЕМ ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -406,14 +411,14 @@ msgstr "" "Победник је ^{%ls^}\n" "са износом од ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Победник игре " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -422,47 +427,47 @@ msgstr "Играч" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Укупан износ (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Играч: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Круг: ^{%d^} " -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Последњи круг ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Портфељ удела " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * С Т Е Ч А Ј * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Нема предузећа на карти" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -477,7 +482,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -492,7 +497,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -506,7 +511,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -522,7 +527,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -541,25 +546,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Укупан износ: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Текућа готовина: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Текући дуг: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/sv.gmo b/po/sv.gmo index 500f778..285054e 100644 Binary files a/po/sv.gmo and b/po/sv.gmo differ diff --git a/po/sv.po b/po/sv.po index d6fc2ae..131c296 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1,7 +1,7 @@ # ************************************************************************* # * * # * Swedish Translations for Star Traders * -# * Copyright (C) 2015-19, John Zaitseff * +# * Copyright (C) 2015-20, John Zaitseff * # * * # ************************************************************************* # @@ -12,10 +12,10 @@ # msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" -"PO-Revision-Date: 2019-01-05 07:38+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" +"PO-Revision-Date: 2020-01-02 08:36+1100\n" "Last-Translator: Anders Jonsson \n" "Language-Team: Swedish \n" "Language: sv\n" @@ -348,49 +348,54 @@ msgstr "Ange spelnummer [^{1^}-^{9^}] eller ^{^} för att avbryta: " msgid "Please enter your name: " msgstr "Ange ditt namn: " -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "Behöver du instruktioner? [^{J^}/^{N^}] " -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr " Ange spelarnamn " -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "Spelare %d: " -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "Behöver någon spelare instruktioner? [^{J^}/^{N^}] " -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr " Spelet är slut " -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "Spelet är slut efter en omgång." msgstr[1] "Spelet är slut efter %d omgångar." -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr " Totalt värde " -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "Ditt totala värde var ^{%N^}." -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -399,7 +404,7 @@ msgstr "" "Vinnaren är ^{%ls^}\n" "som är ^[*** BANKRUTT ***^]" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" @@ -408,14 +413,14 @@ msgstr "" "Vinnaren är ^{%ls^}\n" "med ett värde på ^{%N^}." -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr " Vinnare av spelet " #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -424,48 +429,48 @@ msgstr "Spelare" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "Totalt värde (%ls)" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "Spelare: ^{%ls^}" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr " Omgång: ^{%d^} " # Turn vs move -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr " ^[*** Sista omgången ***^] " -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr " Aktieportfölj " #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "^[* * * B A N K R U T T * * *^]" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "Inga företag på kartan" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -480,7 +485,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -495,7 +500,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -509,7 +514,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -525,7 +530,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -544,25 +549,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "Totalt värde: " -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "Aktuella kontanter: " -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "Aktuell skuld: " -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/po/trader.pot b/po/trader.pot index 5e2b22f..e87c6be 100644 --- a/po/trader.pot +++ b/po/trader.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: trader 7.13\n" +"Project-Id-Version: trader 7.14\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" -"POT-Creation-Date: 2019-11-13 08:14+1100\n" +"POT-Creation-Date: 2020-01-09 08:05+1100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -315,70 +315,75 @@ msgstr "" msgid "Please enter your name: " msgstr "" -#: src/game.c:425 +#. TRANSLATORS: Note that you should replace "Y" and "N" +#. with the localised upper-case characters used in the +#. "input|Yes" and "input|No" strings. There are other +#. strings in this game, each with "[^{Y^}/^{N^}]", that +#. need the same replacement. +#: src/game.c:430 #, c-format msgid "Do you need any instructions? [^{Y^}/^{N^}] " msgstr "" -#: src/game.c:443 +#: src/game.c:448 #, c-format msgid " Enter Player Names " msgstr "" -#: src/game.c:451 +#: src/game.c:456 #, c-format, range: 1..8 msgid "Player %d: " msgstr "" -#: src/game.c:529 +#: src/game.c:534 #, c-format msgid "Does any player need instructions? [^{Y^}/^{N^}] " msgstr "" -#: src/game.c:563 +#: src/game.c:568 #, c-format msgid " Game Over " msgstr "" -#: src/game.c:564 +#: src/game.c:569 #, c-format msgid "The game is over after one turn." msgid_plural "The game is over after %d turns." msgstr[0] "" msgstr[1] "" -#: src/game.c:575 +#: src/game.c:580 #, c-format msgid " Total Value " msgstr "" -#: src/game.c:577 +#: src/game.c:582 #, c-format msgid "Your total value was ^{%N^}." msgstr "" -#: src/game.c:588 +#: src/game.c:593 #, c-format msgid "" "The winner is ^{%ls^}\n" "who is ^[*** BANKRUPT ***^]" msgstr "" -#: src/game.c:591 +#: src/game.c:596 #, c-format msgid "" "The winner is ^{%ls^}\n" "with a value of ^{%N^}." msgstr "" -#: src/game.c:597 +#: src/game.c:602 #, c-format msgid " Game Winner " msgstr "" #. TRANSLATORS: "Player" is used as a column title in a #. table containing all player names. -#: src/game.c:606 src/move.c:882 +#: src/game.c:611 src/move.c:882 #, c-format msgctxt "subtitle" msgid "Player" @@ -387,47 +392,47 @@ msgstr "" #. TRANSLATORS: "Total Value" refers to the total worth #. (shares, cash and debt) of any given player. %ls is the #. currency symbol of the current locale. -#: src/game.c:611 +#: src/game.c:616 #, c-format msgctxt "subtitle" msgid "Total Value (%ls)" msgstr "" -#: src/game.c:645 src/game.c:695 src/exch.c:100 +#: src/game.c:650 src/game.c:700 src/exch.c:100 #, c-format msgid "Player: ^{%ls^}" msgstr "" -#: src/game.c:648 +#: src/game.c:653 #, c-format msgid " Turn: ^{%d^} " msgstr "" -#: src/game.c:649 +#: src/game.c:654 #, c-format msgid " ^[*** Last Turn ***^] " msgstr "" -#: src/game.c:693 +#: src/game.c:698 #, c-format msgid " Stock Portfolio " msgstr "" #. TRANSLATORS: The current player is bankrupt (has no #. shares or cash, ie, whose total value is zero) -#: src/game.c:702 +#: src/game.c:707 #, c-format msgid "^[* * * B A N K R U P T * * *^]" msgstr "" -#: src/game.c:717 src/exch.c:112 +#: src/game.c:722 src/exch.c:112 #, c-format msgid "No companies on the map" msgstr "" #. TRANSLATORS: "Company" is a two-line column label in #. a table containing a list of companies. -#: src/game.c:725 src/exch.c:120 +#: src/game.c:730 src/exch.c:120 #, c-format msgctxt "subtitle" msgid "" @@ -440,7 +445,7 @@ msgstr "" #. percentage ownership in any given company. The #. maximum column width is 10 characters (see #. OWNERSHIP_COLS in src/intf.h). -#: src/game.c:732 +#: src/game.c:737 #, c-format msgctxt "subtitle" msgid "" @@ -453,7 +458,7 @@ msgstr "" #. current player owns in any given company. The #. maximum column width is 10 characters (see #. STOCK_OWNED_COLS in src/intf.h). -#: src/game.c:739 +#: src/game.c:744 #, c-format msgctxt "subtitle" msgid "" @@ -465,7 +470,7 @@ msgstr "" #. a table containing the share return as a percentage #. in any given company. The maximum column width is #. 10 characters (see SHARE_RETURN_COLS in src/intf.h). -#: src/game.c:746 src/exch.c:141 +#: src/game.c:751 src/exch.c:141 #, c-format msgctxt "subtitle" msgid "" @@ -479,7 +484,7 @@ msgstr "" #. the current locale. The maximum column width is 12 #. characters INCLUDING the currency symbol (see #. SHARE_PRICE_COLS in src/intf.h). -#: src/game.c:755 src/exch.c:150 +#: src/game.c:760 src/exch.c:150 #, c-format msgctxt "subtitle" msgid "" @@ -496,25 +501,25 @@ msgstr "" #. #. Note that some of these labels are used for both the #. Player Status window and the Trading Bank window. -#: src/game.c:796 +#: src/game.c:801 #, c-format msgctxt "label" msgid "Total value: " msgstr "" -#: src/game.c:800 src/exch.c:324 +#: src/game.c:805 src/exch.c:324 #, c-format msgctxt "label" msgid "Current cash: " msgstr "" -#: src/game.c:807 src/exch.c:332 +#: src/game.c:812 src/exch.c:332 #, c-format msgctxt "label" msgid "Current debt: " msgstr "" -#: src/game.c:813 src/exch.c:337 +#: src/game.c:818 src/exch.c:337 #, c-format msgctxt "label" msgid "Interest rate: " diff --git a/src/Makefile.am b/src/Makefile.am index e2d8ad6..e123d28 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### diff --git a/src/Makefile.in b/src/Makefile.in index 028de68..133a26b 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -17,12 +17,12 @@ ######################################################################### # # # Star Traders: A Game of Interstellar Trading # -# Copyright (C) 1990-2019, John Zaitseff # +# Copyright (C) 1990-2020, John Zaitseff # # # ######################################################################### # Author: John Zaitseff -# $Id: e2d8ad6f959a6aa76cabe5e0367f8a859a5f5eab $ +# $Id: e123d2859599dea4b7ef9e64c2424bf5bf525280 $ # # This file, src/Makefile.am, contains the source-code Makefile for Star # Traders. It needs to be processed by automake to produce the @@ -136,20 +136,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/iconv_h.m4 $(top_srcdir)/m4/iconv_open.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ - $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ - $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ - $(top_srcdir)/m4/monetary_h.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ + $(top_srcdir)/m4/localtime-buffer.m4 \ + $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ + $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ + $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ + $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/monetary_h.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/setlocale_null.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ @@ -157,12 +156,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ - $(top_srcdir)/m4/wcsdup.m4 $(top_srcdir)/m4/wctob.m4 \ - $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemcpy.m4 \ - $(top_srcdir)/m4/xopen-source.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \ + $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wcsdup.m4 \ + $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \ + $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/wmemcpy.m4 $(top_srcdir)/m4/xopen-source.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -263,6 +263,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSES_CFLAGS = @CURSES_CFLAGS@ @@ -341,6 +342,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ @@ -350,6 +352,8 @@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -439,6 +443,7 @@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ @@ -463,10 +468,12 @@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLD = @GNULIB_STRTOLD@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ @@ -558,6 +565,8 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ @@ -572,7 +581,9 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ @@ -611,6 +622,7 @@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INITSTATE = @HAVE_INITSTATE@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -619,7 +631,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ @@ -704,11 +715,11 @@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ @@ -760,6 +771,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ @@ -767,12 +780,16 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPMULTITHREAD = @LIBPMULTITHREAD@ +LIBPTHREAD = @LIBPTHREAD@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIB_HARD_LOCALE = @LIB_HARD_LOCALE@ +LIB_MBRTOWC = @LIB_MBRTOWC@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@ LIMITS_H = @LIMITS_H@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -781,9 +798,7 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -793,6 +808,7 @@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MONETARY_H = @NEXT_AS_FIRST_DIRECTIVE_MONETARY_H@ @@ -810,6 +826,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MONETARY_H = @NEXT_MONETARY_H@ @@ -840,6 +857,8 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ @@ -960,8 +979,10 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRTOLD = @REPLACE_STRTOLD@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ @@ -987,6 +1008,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSTOK = @REPLACE_WCSTOK@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ @@ -1003,6 +1025,8 @@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ diff --git a/src/exch.c b/src/exch.c index eed34c5..5afcafc 100644 --- a/src/exch.c +++ b/src/exch.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/exch.h b/src/exch.h index a85f2af..8b42e8e 100644 --- a/src/exch.h +++ b/src/exch.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/fileio.c b/src/fileio.c index b423a79..7e135e6 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/fileio.h b/src/fileio.h index 1a93165..42885c9 100644 --- a/src/fileio.h +++ b/src/fileio.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/game.c b/src/game.c index 6b41fe1..70e66dc 100644 --- a/src/game.c +++ b/src/game.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ @@ -422,6 +422,11 @@ void ask_player_names (void) mkchstr(chbuf, BUFSIZE, attr_normal, attr_keycode, 0, 1, WIN_COLS - YESNO_COLS - 6, &width, 1, + /* TRANSLATORS: Note that you should replace "Y" and "N" + with the localised upper-case characters used in the + "input|Yes" and "input|No" strings. There are other + strings in this game, each with "[^{Y^}/^{N^}]", that + need the same replacement. */ _("Do you need any instructions? [^{Y^}/^{N^}] ")); newtxwin(5, width + YESNO_COLS + 4, 6, WCENTER, true, attr_normal_window); diff --git a/src/game.h b/src/game.h index a8fb349..bc28b4a 100644 --- a/src/game.h +++ b/src/game.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/globals.c b/src/globals.c index 6128339..3fa022b 100644 --- a/src/globals.c +++ b/src/globals.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/globals.h b/src/globals.h index 107b8ce..baafd77 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/help.c b/src/help.c index 5352253..c0d4a71 100644 --- a/src/help.c +++ b/src/help.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/help.h b/src/help.h index 06eb4e7..c6df089 100644 --- a/src/help.h +++ b/src/help.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/intf.c b/src/intf.c index 6994d03..a0592ab 100644 --- a/src/intf.c +++ b/src/intf.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/intf.h b/src/intf.h index ec6479b..258b8b5 100644 --- a/src/intf.h +++ b/src/intf.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/move.c b/src/move.c index 9a5c7c4..d4aec39 100644 --- a/src/move.c +++ b/src/move.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/move.h b/src/move.h index e5f9d09..d270e30 100644 --- a/src/move.h +++ b/src/move.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/system.h b/src/system.h index 263a339..1d53708 100644 --- a/src/system.h +++ b/src/system.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/trader.c b/src/trader.c index 43c9473..88564ec 100644 --- a/src/trader.c +++ b/src/trader.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ @@ -293,7 +293,7 @@ This program is free software that is distributed under the terms of the\n\ GNU General Public License, version 3 or later. You are welcome to\n\ modify and/or distribute it under certain conditions. This program has\n\ NO WARRANTY, to the extent permitted by law; see the License for details.\n\ -"), program_name, PACKAGE_VERSION, "1990-2019"); +"), program_name, PACKAGE_VERSION, "1990-2020"); exit(EXIT_SUCCESS); } diff --git a/src/trader.h b/src/trader.h index 3225acf..0b22b77 100644 --- a/src/trader.h +++ b/src/trader.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/utils.c b/src/utils.c index 81e62f6..03bd86c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/ diff --git a/src/utils.h b/src/utils.h index fb434c0..7b774df 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,7 +1,7 @@ /************************************************************************ * * * Star Traders: A Game of Interstellar Trading * -* Copyright (C) 1990-2019, John Zaitseff * +* Copyright (C) 1990-2020, John Zaitseff * * * ************************************************************************/