mirror of
https://git.zap.org.au/git/trader.git
synced 2024-09-01 17:14:15 -04:00
Merge branch with-autogenerated into with-debian
This commit is contained in:
commit
50603337b7
2
COPYING
2
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
|
||||
|
15
INSTALL
15
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:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#########################################################################
|
||||
# #
|
||||
# Star Traders: A Game of Interstellar Trading #
|
||||
# Copyright (C) 1990-2019, John Zaitseff #
|
||||
# Copyright (C) 1990-2020, John Zaitseff #
|
||||
# #
|
||||
#########################################################################
|
||||
|
||||
|
72
Makefile.in
72
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 <J.Zaitseff@zap.org.au>
|
||||
# $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@
|
||||
|
13
NEWS
13
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)
|
||||
----------------------------------
|
||||
|
||||
|
5
README
5
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
|
||||
|
82
aclocal.m4
vendored
82
aclocal.m4
vendored
@ -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 <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
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])
|
||||
|
@ -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 <gord@gnu.ai.mit.edu>, 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'
|
||||
;;
|
||||
|
84
config.h.in
84
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 <ncurses.h> is present */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define if the <pthread.h> 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 <pthread.h> 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 <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
@ -321,6 +317,10 @@
|
||||
/* Define to 1 if you have the <wctype.h> 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 <winsock2.h> 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
|
||||
|
@ -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])
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#########################################################################
|
||||
# #
|
||||
# Star Traders: A Game of Interstellar Trading #
|
||||
# Copyright (C) 1990-2019, John Zaitseff #
|
||||
# Copyright (C) 1990-2020, John Zaitseff #
|
||||
# #
|
||||
#########################################################################
|
||||
|
||||
|
@ -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 <J.Zaitseff@zap.org.au>
|
||||
# $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@
|
||||
|
@ -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 <J.Zaitseff@zap.org.au>
|
||||
# $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
|
||||
|
@ -1,7 +1,7 @@
|
||||
#########################################################################
|
||||
# #
|
||||
# Star Traders: A Game of Interstellar Trading #
|
||||
# Copyright (C) 1990-2019, John Zaitseff #
|
||||
# Copyright (C) 1990-2020, John Zaitseff #
|
||||
# #
|
||||
#########################################################################
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
* *
|
||||
* Star Traders: A Game of Interstellar Trading *
|
||||
* Copyright (C) 1990-2019, John Zaitseff *
|
||||
* Copyright (C) 1990-2020, John Zaitseff *
|
||||
* *
|
||||
*************************************************************************
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
@ -1,7 +1,7 @@
|
||||
#########################################################################
|
||||
# #
|
||||
# Star Traders: A Game of Interstellar Trading #
|
||||
# Copyright (C) 1990-2019, John Zaitseff #
|
||||
# Copyright (C) 1990-2020, John Zaitseff #
|
||||
# #
|
||||
#########################################################################
|
||||
|
||||
|
@ -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 <J.Zaitseff@zap.org.au>
|
||||
# $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@
|
||||
|
13
doc/trader.6
13
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
|
||||
|
1
lib/.gitignore
vendored
1
lib/.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
/iconv.h
|
||||
/inttypes.h
|
||||
/limits.h
|
||||
/locale.h
|
||||
/monetary.h
|
||||
|
142
lib/Makefile.am
142
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 <inttypes.h> 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
|
||||
|
257
lib/Makefile.in
257
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 <inttypes.h> 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 <limits.h> 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)'; \
|
||||
|
@ -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) \
|
||||
|
@ -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
|
||||
|
@ -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 <bruno@clisp.org>, 2008.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -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
|
||||
|
@ -5,7 +5,7 @@
|
||||
<ctype.h> 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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
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
|
||||
|
@ -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
|
||||
|
0
lib/glthread/.gitignore
vendored
0
lib/glthread/.gitignore
vendored
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
|
||||
Based on GCC's gthr-posix.h, gthr-posix95.h. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#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
|
||||
|
||||
/* ========================================================================= */
|
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 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 <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined c11_threads_in_use
|
||||
# if HAVE_THREADS_H && USE_POSIX_THREADS_WEAK
|
||||
# include <threads.h>
|
||||
# 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 <pthread.h>
|
||||
|
||||
# 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 <windows.h>
|
||||
|
||||
# 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 */
|
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
#if USE_POSIX_THREADS
|
||||
|
||||
/* Use the POSIX threads library. */
|
||||
|
||||
# include <pthread.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
# 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;
|
@ -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 <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
@ -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 <stdbool.h>
|
||||
|
||||
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_ */
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* A GNU-like <iconv.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
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
68
lib/iconv_open-zos.gperf
Normal file
68
lib/iconv_open-zos.gperf
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
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"
|
297
lib/iconv_open-zos.h
Normal file
297
lib/iconv_open-zos.h
Normal file
@ -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 <bug-gperf@gnu.org>."
|
||||
#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;
|
||||
}
|
@ -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
|
||||
|
1148
lib/inttypes.in.h
Normal file
1148
lib/inttypes.in.h
Normal file
File diff suppressed because it is too large
Load Diff
82
lib/lc-charset-dispatch.c
Normal file
82
lib/lc-charset-dispatch.c
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2018. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* 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
|
40
lib/lc-charset-dispatch.h
Normal file
40
lib/lc-charset-dispatch.h
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2018. */
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#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
|
@ -1,6 +1,6 @@
|
||||
/* A GNU-like <limits.h>.
|
||||
|
||||
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
|
||||
|
@ -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 <windows.h>
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.).
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* A POSIX <locale.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
|
||||
@ -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@
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
138
lib/mbrtowc-impl-utf8.h
Normal file
138
lib/mbrtowc-impl-utf8.h
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 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;
|
262
lib/mbrtowc-impl.h
Normal file
262
lib/mbrtowc-impl.h
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 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);
|
||||
}
|
453
lib/mbrtowc.c
453
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 <bruno@clisp.org>, 2008.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -20,21 +20,39 @@
|
||||
/* Specification. */
|
||||
#include <wchar.h>
|
||||
|
||||
#if C_LOCALE_MAYBE_EILSEQ
|
||||
# include "hard-locale.h"
|
||||
# include <locale.h>
|
||||
#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 <errno.h>
|
||||
# include <stdint.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
# include "localcharset.h"
|
||||
# include "streq.h"
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
|
||||
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
|
||||
# include <windows.h>
|
||||
|
||||
# elif HAVE_PTHREAD_API
|
||||
|
||||
# include <pthread.h>
|
||||
# if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
|
||||
# include <threads.h>
|
||||
# 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 <threads.h>
|
||||
|
||||
# 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 <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>. */
|
||||
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 <locale.h>
|
||||
# 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;
|
||||
|
@ -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 <bruno@clisp.org>, 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... */
|
||||
|
@ -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 <bruno@clisp.org>, 2008.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -16,16 +16,16 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
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
|
||||
|
@ -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 <bruno@clisp.org>, 2008.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -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 <bruno@clisp.org>, 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"
|
||||
|
@ -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 <bruno@clisp.org>, 2011.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
150
lib/mbtowc-lock.c
Normal file
150
lib/mbtowc-lock.c
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2019-2020. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* 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 <windows.h>
|
||||
|
||||
# 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 <pthread.h>
|
||||
|
||||
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 <threads.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
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
|
115
lib/mbtowc-lock.h
Normal file
115
lib/mbtowc-lock.h
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 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 <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>. */
|
||||
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
|
@ -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 <bruno@clisp.org>, 2011.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Wrapper around <monetary.h>.
|
||||
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
|
||||
|
150
lib/setlocale-lock.c
Normal file
150
lib/setlocale-lock.c
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* 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 <windows.h>
|
||||
|
||||
# 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 <pthread.h>
|
||||
|
||||
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 <threads.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
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
|
411
lib/setlocale_null.c
Normal file
411
lib/setlocale_null.c
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include "setlocale_null.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE)
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
|
||||
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
|
||||
# include <windows.h>
|
||||
|
||||
# elif HAVE_PTHREAD_API
|
||||
|
||||
# include <pthread.h>
|
||||
# if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
|
||||
# include <threads.h>
|
||||
# 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 <threads.h>
|
||||
|
||||
# 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
|
||||
}
|
82
lib/setlocale_null.h
Normal file
82
lib/setlocale_null.h
Normal file
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
|
||||
|
||||
#ifndef _SETLOCALE_NULL_H
|
||||
#define _SETLOCALE_NULL_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#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 */
|
@ -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 <haible@clisp.cons.org>, 2001.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* A substitute for POSIX 2008 <stddef.h>, 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 <cstddef> 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 <cstddef>
|
||||
#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
|
||||
|
||||
|
@ -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 <stdint.h> 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 <crtdefs.h> 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 <io.h>. */
|
||||
# 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 <wchar.h> or <wctype.h> 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)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* A GNU-like <stdio.h>.
|
||||
|
||||
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. */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* A GNU-like <stdlib.h>.
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* A GNU-like <string.h>.
|
||||
|
||||
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. */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user