1
0
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:
John Zaitseff 2017-06-02 06:09:01 +10:00
commit 3f490e101f
283 changed files with 13760 additions and 9080 deletions

12
.gitattributes vendored Normal file
View File

@ -0,0 +1,12 @@
Makefile.am ident
/configure.ac ident
/build-aux/bootstrap ident
/build-aux/msgfmt-desktop ident
/data/trader.desktop.in ident
/data/trader.svg ident
/doc/trader.* ident
/po/LINGUAS ident
/po/Makevars ident
/po/POTFILES.in ident
/src/*.c ident
/src/*.h ident

2
.gitignore vendored
View File

@ -1,8 +1,8 @@
*.o
*.a
.deps/
Makefile
TAGS
.deps/
/autom4te.cache
/config.h

View File

@ -1,7 +1,7 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************

39
INSTALL
View File

@ -1,7 +1,7 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************
@ -39,7 +39,7 @@ and installation:
multibyte character sequences (such as UTF-8) require a wide-character
version of Curses, such as NcursesW, to work correctly.
4. The GNU Gettext library, version 0.19.5 or later, to allow the game to
4. The GNU Gettext library, version 0.19.8 or later, to allow the game to
use languages other than English; this is also called Native Language
Support. If you do not have this library (and do not wish to install
it), you may pass "--disable-nls" to the configure script.
@ -93,7 +93,7 @@ can specify the compiler flags to use by passing the CFLAGS variable:
./configure CFLAGS="-g -O2 -Wall"
The "configure" script has many other options. You may obtain a list of
The configure script has many other options. You may obtain a list of
these by running:
./configure --help
@ -102,12 +102,12 @@ You can also run configure in a separate build-only directory tree. 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.9, you could run
the Star Traders source code tree in $HOME/src/trader-7.10, you could run
something like:
mkdir $HOME/build/trader-build-7.9
cd $HOME/build/trader-build-7.9
$HOME/src/trader-7.9/configure
mkdir $HOME/build/trader-build-7.10
cd $HOME/build/trader-build-7.10
$HOME/src/trader-7.10/configure
Once again, the Autoconf manual describes these options (and many others):
@ -155,22 +155,21 @@ to remove the Makefiles that know the path to which those files were
installed!
Subversion Repository
=====================
Git Repository
==============
You can always download the latest version of Star Traders directly from
the Subversion repository on the ZAP Group server:
You can always download the latest version of Star Traders directly from
the Git repository on the ZAP Group server:
svn co http://svn.zap.org.au/svn/trader/unix/trunk/ trader
git clone git://git.zap.org.au/data/git/trader.git
Released versions of Star Traders include all scripts and files needed for
installation. If you are checking out the source code from the Subversion
repository, however, you will need to update these files yourself. You
will need the following additional tools installed on your system to do
so:
installation. If you are cloning the source code from the Git repository,
however, you will need to update these files yourself. You will need the
following additional tools installed on your system to do so:
1. Autoconf (http://www.gnu.org/software/autoconf/)
2. Automake (http://www.gnu.org/software/automake/)
1. Autoconf v2.69 or later (http://www.gnu.org/software/autoconf/)
2. Automake v1.15 or later (http://www.gnu.org/software/automake/)
3. GNU Portability Library (http://www.gnu.org/software/gnulib/)
The GNU Portability Library may be installed by retrieving the latest
@ -193,8 +192,8 @@ For Translators
Thank you for even considering to translate Star Traders into your native
language! You may use either a released version of Star Traders, or an
unreleased one, as discussed in the Subversion Repository section above.
In either case, you may find the following workflow useful.
unreleased one, as discussed in the Git Repository section above. In
either case, you may find the following workflow useful.
First, run "./build-aux/bootstrap" if needed (only for unreleased versions
of Star Traders).

View File

@ -1,12 +1,12 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2016, John Zaitseff #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id: Makefile.am 663 2016-01-04 22:25:51Z john $
# $Id$
#
# This file, Makefile.am, contains the top-level Makefile for Star
# Traders. It needs to be processed by automake to produce the
@ -27,11 +27,10 @@
# along with this program. If not, see http://www.gnu.org/licenses/.
# Find various M4 macro snippets
ACLOCAL_AMFLAGS = -I m4
# Subdirectories to recurse into
SUBDIRS = lib src doc po m4
SUBDIRS = lib src po data doc m4
# Additional files to distribute
EXTRA_DIST = build-aux/bootstrap
EXTRA_DIST = \
build-aux/bootstrap \
build-aux/msgfmt-desktop

View File

@ -17,12 +17,12 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2016, John Zaitseff #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id: Makefile.am 663 2016-01-04 22:25:51Z john $
# $Id: b00291c0fcd9d6b5823eea1ae09772f653b1928c $
#
# This file, Makefile.am, contains the top-level Makefile for Star
# Traders. It needs to be processed by automake to produce the
@ -123,28 +123,29 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/ax_with_curses.m4 $(top_srcdir)/m4/btowc.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
$(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/codeset.m4 \
$(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
$(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
$(top_srcdir)/m4/hard-locale.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/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.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/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/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/multiarch.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/ssize_t.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/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/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/off_t.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 $(top_srcdir)/m4/string_h.m4 \
@ -225,15 +226,15 @@ CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/build-aux/ar-lib $(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.rpath \
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/missing COPYING INSTALL NEWS README \
build-aux/README build-aux/ar-lib build-aux/compile \
build-aux/config.guess build-aux/config.rpath \
build-aux/config.sub build-aux/install-sh build-aux/missing
build-aux/README build-aux/compile build-aux/config.guess \
build-aux/config.rpath build-aux/config.sub \
build-aux/install-sh build-aux/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -269,9 +270,9 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip
DIST_TARGETS = dist-xz dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@ -297,7 +298,8 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
CURSES_CFLAGS = @CURSES_CFLAGS@
CURSES_LIBS = @CURSES_LIBS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -306,6 +308,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
@ -318,6 +321,7 @@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CTIME = @GNULIB_CTIME@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
@ -384,6 +388,7 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
@ -425,6 +430,8 @@ GNULIB_MKTIME = @GNULIB_MKTIME@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
@ -473,6 +480,7 @@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRFTIME = @GNULIB_STRFTIME@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
@ -494,7 +502,9 @@ GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_TZSET = @GNULIB_TZSET@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
@ -524,6 +534,7 @@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
GNULIB_WCSCPY = @GNULIB_WCSCPY@
GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
GNULIB_WCSDUP = @GNULIB_WCSDUP@
GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
GNULIB_WCSLEN = @GNULIB_WCSLEN@
GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
@ -554,8 +565,10 @@ GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
@ -566,6 +579,7 @@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
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@
@ -655,6 +669,7 @@ HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
@ -688,6 +703,7 @@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
@ -695,6 +711,8 @@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TRUNCATE = @HAVE_TRUNCATE@
HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@ -716,6 +734,7 @@ HAVE_WCSCOLL = @HAVE_WCSCOLL@
HAVE_WCSCPY = @HAVE_WCSCPY@
HAVE_WCSCSPN = @HAVE_WCSCSPN@
HAVE_WCSDUP = @HAVE_WCSDUP@
HAVE_WCSFTIME = @HAVE_WCSFTIME@
HAVE_WCSLEN = @HAVE_WCSLEN@
HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
HAVE_WCSNCAT = @HAVE_WCSNCAT@
@ -764,6 +783,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
@ -772,6 +792,7 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
@ -779,6 +800,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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
@ -794,6 +816,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_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
@ -816,6 +839,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
@ -827,6 +853,7 @@ REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CTIME = @REPLACE_CTIME@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
@ -922,6 +949,7 @@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRFTIME = @REPLACE_STRFTIME@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
@ -936,7 +964,9 @@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_TZSET = @REPLACE_TZSET@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
@ -949,6 +979,7 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
@ -976,6 +1007,8 @@ VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
@ -984,7 +1017,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@ -1000,6 +1032,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
desktopdir = @desktopdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
@ -1014,6 +1047,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
iconsdir = @iconsdir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@ -1039,21 +1073,21 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Find various M4 macro snippets
ACLOCAL_AMFLAGS = -I m4
# Subdirectories to recurse into
SUBDIRS = lib src doc po m4
SUBDIRS = lib src po data doc m4
# Additional files to distribute
EXTRA_DIST = build-aux/bootstrap
EXTRA_DIST = \
build-aux/bootstrap \
build-aux/msgfmt-desktop
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -1079,9 +1113,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
@ -1092,7 +1126,7 @@ config.h: stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
@ -1273,6 +1307,7 @@ distdir: $(DISTFILES)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
@ -1280,7 +1315,6 @@ dist-bzip2: distdir
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)

39
NEWS
View File

@ -1,7 +1,7 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************
@ -10,9 +10,40 @@ is to create companies, buy and sell shares, borrow and repay money, in
order to become the wealthiest player (the winner).
The following history is presented in reverse chronological order. If you
would like to see a list of detailed changes to this project, you should
consult the Subversion repository for "trader" on The ZAP Group web server
at http://www.zap.org.au/services/svn/.
would like to see a list of detailed changes to this project, you should
browse the Git repository on The ZAP Group web server at the following
location: http://www.zap.org.au/gitweb/trader.git
Version 7.10 (2nd June, 2017)
-----------------------------
Added a data directory that contains a desktop file and appropriate icons.
Adjusted the game constants for more dynamic play: allow the share prices
and returns to change a bit more frequently and more rapidly. Tweaked the
colours in the example monochrome retro-computing command lines, including
adding an amber monitor version.
Added a Serbian translation, with thanks to Мирослав Николић. Updated the
Danish, French, Swedish, Hungarian, Norwegian Bokmål and German transla-
tions, in that order, with thanks to Joe Hansen, Frédéric Marchal, Anders
Jonsson, Balázs Úr, Johnny A. Solbu and Philipp Thomas respectively.
Updated translatable strings to overcome a limitation of msgfmt(1): if a
string starts or ends with a new-line character, its translation must do
so as well. This has an impact on labels in particular. Also changed the
help text string "Page N of M" to allow translations of the form "Of M
pages, this is page N", and all quoted strings using the obsolete GNU form
`like this' to 'this'. In addition, newer versions of lib/getopt.c have
different strings. All translations have been updated as a result.
Removed the obsolete Gnulib gettext module and updated to the latest Git
snapshot of Gnulib. Updated the dependency version numbers for Autoconf,
Automake and Gettext. Also updated all macros from the Autoconf Archive.
Migrated the source code repository from Subversion to Git. Updated the
documentation to suit, and also listed specific required version numbers
for the Autoconf and Automake tools in the INSTALL file.
Version 7.9 (5th January, 2016)

8
README
View File

@ -1,7 +1,7 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************
@ -41,8 +41,8 @@ options, as well as some suggestions for running a retro-computing green-
screen nostalgia-tour version of the game... Try running the following,
for example (all on one line):
xterm -g 80x24 -fa Mono -fs 18 -bg black -fg '#009911' -bc +sb +bdc \
+fbx -xrm 'XTerm*colorBD: #00FF00' -e trader --no-colour &
xterm -g 80x24 -fa Mono -fs 18 -bg '#181818' -fg '#2CAB00' -bc +sb \
+bdc +fbx -xrm 'XTerm*colorBD: #41FF00' -e trader --no-colour &
To read the manual page, type "man trader" from the command line.
@ -67,7 +67,7 @@ welcomed! Please send these to:
Copyright
=========
Copyright (C) 1990-2016, John Zaitseff.
Copyright (C) 1990-2017, 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

1438
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

0
build-aux/.gitignore vendored Normal file
View File

View File

@ -1,11 +1,17 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************
This directory, build-aux, contains auxiliary build-related files for Star
Traders. Apart from "bootstrap" (and this README file, of course), all
files are generated by either Autoconf, Automake or Gnulib. The bootstrap
script generates these files by running those tools in the correct order.
Traders. The following scripts are specific to this package:
bootstrap - Generate auxiliary files needed for building
msgfmt-desktop - Use msgfmt(1) or cp(1) to copy desktop files
All other files in this directory (other than this README file, of course)
are generated by Autoconf, Automake or Gnulib. The bootstrap shell script
generates these files by running those tools in the correct order; see the
top-level INSTALL file for more details.

View File

@ -1,270 +0,0 @@
#! /bin/sh
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2012-03-01.08; # UTC
# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This 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 2, 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 <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# func_error message
func_error ()
{
echo "$me: $1" 1>&2
exit 1
}
file_conv=
# func_file_conv build_file
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv in
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin)
file=`cygpath -m "$file" || echo "$file"`
;;
wine)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_at_file at_file operation archive
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
# for each of them.
# When interpreting the content of the @FILE, do NOT use func_file_conv,
# since the user would need to supply preconverted file names to
# binutils ar, at least for MinGW.
func_at_file ()
{
operation=$2
archive=$3
at_file_contents=`cat "$1"`
eval set x "$at_file_contents"
shift
for member
do
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
done
}
case $1 in
'')
func_error "no command. Try '$0 --help' for more information."
;;
-h | --h*)
cat <<EOF
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
Members may be specified in a file named with @FILE.
EOF
exit $?
;;
-v | --v*)
echo "$me, version $scriptversion"
exit $?
;;
esac
if test $# -lt 3; then
func_error "you must specify a program, an action and an archive"
fi
AR=$1
shift
while :
do
if test $# -lt 2; then
func_error "you must specify a program, an action and an archive"
fi
case $1 in
-lib | -LIB \
| -ltcg | -LTCG \
| -machine* | -MACHINE* \
| -subsystem* | -SUBSYSTEM* \
| -verbose | -VERBOSE \
| -wx* | -WX* )
AR="$AR $1"
shift
;;
*)
action=$1
shift
break
;;
esac
done
orig_archive=$1
shift
func_file_conv "$orig_archive"
archive=$file
# strip leading dash in $action
action=${action#-}
delete=
extract=
list=
quick=
replace=
index=
create=
while test -n "$action"
do
case $action in
d*) delete=yes ;;
x*) extract=yes ;;
t*) list=yes ;;
q*) quick=yes ;;
r*) replace=yes ;;
s*) index=yes ;;
S*) ;; # the index is always updated implicitly
c*) create=yes ;;
u*) ;; # TODO: don't ignore the update modifier
v*) ;; # TODO: don't ignore the verbose modifier
*)
func_error "unknown action specified"
;;
esac
action=${action#?}
done
case $delete$extract$list$quick$replace,$index in
yes,* | ,yes)
;;
yesyes*)
func_error "more than one action specified"
;;
*)
func_error "no action specified"
;;
esac
if test -n "$delete"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
for member
do
case $1 in
@*)
func_at_file "${1#@}" -REMOVE "$archive"
;;
*)
func_file_conv "$1"
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
;;
esac
done
elif test -n "$extract"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
if test $# -gt 0; then
for member
do
case $1 in
@*)
func_at_file "${1#@}" -EXTRACT "$archive"
;;
*)
func_file_conv "$1"
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
;;
esac
done
else
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
fi
elif test -n "$quick$replace"; then
if test ! -f "$orig_archive"; then
if test -z "$create"; then
echo "$me: creating $orig_archive"
fi
orig_archive=
else
orig_archive=$archive
fi
for member
do
case $1 in
@*)
func_file_conv "${1#@}"
set x "$@" "@$file"
;;
*)
func_file_conv "$1"
set x "$@" "$file"
;;
esac
shift
shift
done
if test -n "$orig_archive"; then
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
else
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
fi
elif test -n "$list"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
$AR -NOLOGO -LIST "$archive" || exit $?
fi

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Import or update automatically-generated files for Star Traders
# $Id: bootstrap 229 2011-08-01 08:17:02Z john $
# $Id$
set -e

137
build-aux/config.guess vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-08-20'
timestamp='2016-10-02'
# 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
@ -27,7 +27,7 @@ timestamp='2015-08-20'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
# to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@ -268,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
@ -376,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@ -410,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
@ -635,13 +642,13 @@ EOF
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
@ -680,11 +687,11 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
@ -697,12 +704,12 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
HP_ARCH=hppa2.0w
else
HP_ARCH="hppa64"
HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@ -807,14 +814,14 @@ EOF
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@ -896,7 +903,7 @@ EOF
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
@ -919,7 +926,7 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
@ -965,6 +972,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
@ -990,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
@ -1022,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
@ -1120,7 +1136,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@ -1269,6 +1285,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
SX-ACE:SUPER-UX:*:*)
echo sxace-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1282,9 +1301,9 @@ EOF
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
@ -1306,7 +1325,7 @@ EOF
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@ -1337,7 +1356,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = "386"; then
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
@ -1379,7 +1398,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@ -1390,23 +1409,25 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 <<EOF
$0: unable to guess system type
This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite
config.guess and config.sub with the latest versions from:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.
config.guess timestamp = $timestamp

View File

@ -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-2016 Free Software Foundation, Inc.
# Copyright 1996-2017 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#

38
build-aux/config.sub vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-08-20'
timestamp='2016-11-04'
# 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
@ -33,7 +33,7 @@ timestamp='2015-08-20'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@ -53,8 +53,7 @@ timestamp='2015-08-20'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -118,7 +117,7 @@ case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -302,6 +301,7 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
@ -429,6 +429,7 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
@ -521,7 +522,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
asmjs)
asmjs)
basic_machine=asmjs-unknown
;;
aux)
@ -644,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@ -1023,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@ -1033,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@ -1383,14 +1392,14 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@ -1399,7 +1408,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix* | -fuchsia*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1531,6 +1541,8 @@ case $os in
;;
-nacl*)
;;
-ios)
;;
-none)
;;
*)

23
build-aux/msgfmt-desktop Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
# Create or update desktop files using msgfmt(1)
# $Id$
# Usage:
# msgfmt-desktop -d PODIR INPUT OUTPUT
set -e
if [ x"$1" != x"-d" ]; then
echo "$0: Missing parameters" 1>&2
exit 1
fi
PODIR="$2"
INPUT="$3"
OUTPUT="$4"
if ! msgfmt --desktop -d "$PODIR" --template "$INPUT" -o "$OUTPUT"; then
echo "$0: Using cp(1) program instead"
cp "$INPUT" "$OUTPUT"
fi

View File

@ -15,6 +15,9 @@
/* 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
@ -41,9 +44,6 @@
/* Define to 1 when the gnulib module btowc should be tested. */
#undef GNULIB_TEST_BTOWC
/* Define to 1 when the gnulib module getopt-gnu should be tested. */
#undef GNULIB_TEST_GETOPT_GNU
/* Define to 1 when the gnulib module gettimeofday should be tested. */
#undef GNULIB_TEST_GETTIMEOFDAY
@ -102,6 +102,9 @@
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define to 1 if you have the <crtdefs.h> header file. */
#undef HAVE_CRTDEFS_H
/* Define to 1 if a SysV or X/Open compatible Curses library is present */
#undef HAVE_CURSES
@ -125,10 +128,6 @@
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#undef HAVE_DECL_GETENV
/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you
don't. */
#undef HAVE_DECL_MBRTOWC
@ -188,6 +187,9 @@
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if the system has the type 'long long int'. */
#undef HAVE_LONG_LONG_INT
@ -478,6 +480,9 @@
/* Define to 1 if pwrite is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PWRITE
/* Define to 1 if qsort_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_QSORT_R
/* Define to 1 if random is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RANDOM
@ -604,6 +609,9 @@
/* Define to 1 if towctrans is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TOWCTRANS
/* Define to 1 if truncate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TRUNCATE
/* Define to 1 if ttyname_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TTYNAME_R
@ -664,6 +672,9 @@
/* Define to 1 if wcsdup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSDUP
/* Define to 1 if wcsftime is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSFTIME
/* Define to 1 if wcslen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSLEN
@ -766,6 +777,9 @@
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the <sys/cdefs.h> header file. */
#undef HAVE_SYS_CDEFS_H
/* Define to 1 if you have the <sys/inttypes.h> header file. */
#undef HAVE_SYS_INTTYPES_H
@ -778,9 +792,6 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/timeb.h> header file. */
#undef HAVE_SYS_TIMEB_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
@ -832,12 +843,19 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
/* Define to 1 if you have the `_ftime' function. */
#undef HAVE__FTIME
/* define if your compiler has __attribute__ */
#undef HAVE___ATTRIBUTE__
/* Define to 1 if the compiler supports __builtin_expect,
and to 2 if <builtins.h> does. */
#undef HAVE___BUILTIN_EXPECT
#ifndef HAVE___BUILTIN_EXPECT
# define __builtin_expect(e, c) (e)
#elif HAVE___BUILTIN_EXPECT == 2
# include <builtins.h>
#endif
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
@ -864,6 +882,12 @@
/* Define if the mbrtowc function returns a wrong return value. */
#undef MBRTOWC_RETVAL_BUG
/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
# undef __USE_MINGW_ANSI_STDIO
#endif
/* Define to 1 if assertions should be disabled. */
#undef NDEBUG
@ -913,7 +937,7 @@
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable general extensions on OS X. */
/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
@ -921,14 +945,38 @@
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
# undef __USE_MINGW_ANSI_STDIO
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# undef __STDC_WANT_IEC_60559_BFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# undef __STDC_WANT_LIB_EXT2__
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# undef __STDC_WANT_MATH_SPEC_FUNCS__
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
@ -956,10 +1004,6 @@
'wint_t'. */
#undef WINT_T_SUFFIX
/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
stat.st_size becomes 64-bit. */
#undef _GL_WINDOWS_64_BIT_ST_SIZE
/* Define to 1 on Solaris. */
#undef _LCONV_C99
@ -994,6 +1038,12 @@
used. */
#undef __GETOPT_PREFIX
/* Define to 1 if the system <stdint.h> predates C++11. */
#undef __STDC_CONSTANT_MACROS
/* Define to 1 if the system <stdint.h> predates C++11. */
#undef __STDC_LIMIT_MACROS
/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
@ -1040,6 +1090,7 @@
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !defined __PGI \
&& !(defined __SUNPRO_C && __STDC__))) \
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# define _GL_INLINE inline

4638
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
dnl *********************************************************************
dnl * *
dnl * Star Traders: A Game of Interstellar Trading *
dnl * Copyright (C) 1990-2016, John Zaitseff *
dnl * Copyright (C) 1990-2017, John Zaitseff *
dnl * *
dnl *********************************************************************
dnl
dnl Author: John Zaitseff <J.Zaitseff@zap.org.au>
dnl $Id: configure.ac 663 2016-01-04 22:25:51Z john $
dnl $Id$
dnl
dnl This file, configure.ac, contains information required by autoconf to
dnl generate the corresponding configure script.
@ -26,14 +26,17 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see http://www.gnu.org/licenses/.
AC_INIT([Star Traders], [7.9], [J.Zaitseff@zap.org.au], [trader], [http://www.zap.org.au/software/trader/])
AC_INIT([Star Traders], [7.10], [J.Zaitseff@zap.org.au], [trader],
[http://www.zap.org.au/software/trader/])
AC_DEFINE([PACKAGE_AUTHOR], ["John Zaitseff"], [Package author])
AC_PREREQ([2.69])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/trader.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign dist-bzip2])
AM_INIT_AUTOMAKE([1.15 -Wall -Werror foreign dist-xz])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_LIBOBJ_DIR([lib])
AC_PROG_CC
@ -51,7 +54,7 @@ AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.5])
AM_GNU_GETTEXT_VERSION([0.19.8])
gl_INIT
@ -68,10 +71,14 @@ AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [
])
])
AC_SUBST([desktopdir],['${datadir}/applications'])
AC_SUBST([iconsdir],['${datadir}/icons/hicolor'])
AC_CONFIG_FILES([
Makefile
lib/Makefile
src/Makefile
data/Makefile
doc/Makefile
po/Makefile.in
m4/Makefile

62
data/Makefile.am Normal file
View File

@ -0,0 +1,62 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id$
#
# This file, data/Makefile.am, contains the non-code data directory
# Makefile for Star Traders. It needs to be processed by automake to
# produce the corresponding Makefile.in.
#
#
# This 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 http://www.gnu.org/licenses/.
dist_desktop_DATA = trader.desktop
icons16dir = ${iconsdir}/16x16/apps
icons22dir = ${iconsdir}/22x22/apps
icons24dir = ${iconsdir}/24x24/apps
icons32dir = ${iconsdir}/32x32/apps
icons48dir = ${iconsdir}/48x48/apps
icons64dir = ${iconsdir}/64x64/apps
icons96dir = ${iconsdir}/96x96/apps
icons128dir = ${iconsdir}/128x128/apps
icons256dir = ${iconsdir}/256x256/apps
icons512dir = ${iconsdir}/512x512/apps
iconsscalabledir = ${iconsdir}/scalable/apps
dist_icons16_DATA = icons-16/trader.png
dist_icons22_DATA = icons-22/trader.png
dist_icons24_DATA = icons-24/trader.png
dist_icons32_DATA = icons-32/trader.png
dist_icons48_DATA = icons-48/trader.png
dist_icons64_DATA = icons-64/trader.png
dist_icons96_DATA = icons-96/trader.png
dist_icons128_DATA = icons-128/trader.png
dist_icons256_DATA = icons-256/trader.png
dist_icons512_DATA = icons-512/trader.png
dist_iconsscalable_DATA = trader.svg
EXTRA_DIST = \
README \
trader.desktop.in
trader.desktop: trader.desktop.in
$(top_srcdir)/build-aux/msgfmt-desktop -d $(top_srcdir)/po $< $@

1525
data/Makefile.in Normal file

File diff suppressed because it is too large Load Diff

9
data/README Normal file
View File

@ -0,0 +1,9 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************
This directory, data, contains non-code data related to Star Traders. In
particular, the desktop file and icons are located here.

BIN
data/icons-128/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
data/icons-16/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

BIN
data/icons-22/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
data/icons-24/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
data/icons-256/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
data/icons-32/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
data/icons-48/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
data/icons-512/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
data/icons-64/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
data/icons-96/trader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

96
data/trader.desktop Normal file
View File

@ -0,0 +1,96 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id: 6fa6bec365e5b1e17b2eaebf3a9843aa5c451e22 $
# This file provides a translated desktop entry for Star Traders and
# conforms to the Desktop Entry Specification v1.1.
#
# This file is distributed under the same licence as Star Traders itself:
# the GNU General Public License, version 3 or later.
[Desktop Entry]
# TRANSLATORS: The name of the game. You may choose to translate it into
# your own language (recommended) or keep it the same as the English
# version. Feel free to look through other translations to see how
# others have done this.
Name[en@quot]=Star Traders
Name[en_AU]=Star Traders
Name[en_CA]=Star Traders
Name[en_GB]=Star Traders
Name[en_US]=Star Traders
Name[da]=Star Traders
Name[de]=Star Traders
Name[eo]=Star Traders
Name[fi]=Tähtikauppiaat
Name[fr]=Star Traders
Name[hr]=Star Traders
Name[hu]=Star Traders
Name[nb]=Star Traders
Name[ru]=Звёздные торговцы
Name[sr]=Звездани трговци
Name[sv]=Star Traders
Name=Star Traders
Comment[en@quot]=Play Star Traders, a simple game of interstellar trading
Comment[en_AU]=Play Star Traders, a simple game of interstellar trading
Comment[en_CA]=Play Star Traders, a simple game of interstellar trading
Comment[en_GB]=Play Star Traders, a simple game of interstellar trading
Comment[en_US]=Play Star Traders, a simple game of interstellar trading
Comment[da]=Spil Star Traders, et simpelt spil med rumhandel
Comment[de]=Spielen Sie Star Trader, ein einfaches Spiel um interstellaren Handel
Comment[eo]=Ludi Star Traders, simpla ludo pri interstelara komerco
Comment[fi]=Pelaa Tähtikauppiaita, yksinkertaista tähtienvälisen kaupan peliä
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[ru]=Играть в «Звёздные торговцы», простую игру о межзвёздной торговле
Comment[sr]=Играјте Звездане трговце, једноставну игру међузвезданог трговања
Comment[sv]=Spela Star Traders, ett enkelt spel om interstellär handel
Comment=Play Star Traders, a simple game of interstellar trading
# TRANSLATORS: A list of keywords describing Star Traders. By all means
# add your own keywords!
Keywords[en@quot]=game;interstellar;trading;strategy;
Keywords[en_AU]=game;interstellar;trading;strategy;
Keywords[en_CA]=game;interstellar;trading;strategy;
Keywords[en_GB]=game;interstellar;trading;strategy;
Keywords[en_US]=game;interstellar;trading;strategy;
Keywords[da]=spil;interstellar;handel;strategi;
Keywords[de]=spiel;universum;galaxie;handel;strategie;
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[ru]=игра;межзвёздная;торговля;стратегия;
Keywords[sv]=spel;interstellär;handel;strategi;
Keywords=game;interstellar;trading;strategy;
# TRANSLATORS: This string is the name of the icon to use. The Desktop
# Entry Specification states it is translatable, but unless you provide a
# matching icon, please leave it as "trader": this will use trader.svg
# and the various trader.png files in the data source code directory.
Icon[en@quot]=trader
Icon[en_AU]=trader
Icon[en_CA]=trader
Icon[en_GB]=trader
Icon[en_US]=trader
Icon[da]=trader
Icon[de]=trader
Icon[eo]=trader
Icon[fi]=trader
Icon[fr]=trader
Icon[hr]=trader
Icon[hu]=trader
Icon[nb]=trader
Icon[ru]=trader
Icon[sr]=trader
Icon[sv]=trader
Icon=trader
Exec=trader
TryExec=trader
Type=Application
Terminal=true
Categories=Game;StrategyGame;

36
data/trader.desktop.in Normal file
View File

@ -0,0 +1,36 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id$
# This file provides a translated desktop entry for Star Traders and
# conforms to the Desktop Entry Specification v1.1.
#
# This file is distributed under the same licence as Star Traders itself:
# the GNU General Public License, version 3 or later.
[Desktop Entry]
# TRANSLATORS: The name of the game. You may choose to translate it into
# your own language (recommended) or keep it the same as the English
# version. Feel free to look through other translations to see how
# others have done this.
Name=Star Traders
Comment=Play Star Traders, a simple game of interstellar trading
# TRANSLATORS: A list of keywords describing Star Traders. By all means
# add your own keywords!
Keywords=game;interstellar;trading;strategy;
# TRANSLATORS: This string is the name of the icon to use. The Desktop
# Entry Specification states it is translatable, but unless you provide a
# matching icon, please leave it as "trader": this will use trader.svg
# and the various trader.png files in the data source code directory.
Icon=trader
Exec=trader
TryExec=trader
Type=Application
Terminal=true
Categories=Game;StrategyGame;

63
data/trader.svg Normal file
View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="512"
height="512"
viewBox="0 0 512 512"
id="trader-icon">
<!--
*************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2017, John Zaitseff *
* *
*************************************************************************
Author: John Zaitseff <J.Zaitseff@zap.org.au>
$Id$
This file, trader.svg, contains the icon image for Star Traders.
This 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 http://www.gnu.org/licenses/.
-->
<title>Star Traders icon</title>
<defs>
<linearGradient id="f-space" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#00005F" />
<stop offset="1" stop-color="#00002F" />
</linearGradient>
<radialGradient id="f-galaxy" cx="0.5" cy="0.5" r="0.5">
<stop offset="0" stop-color="#FFFFFF" />
<stop offset="0.7" stop-color="#FFFF80" />
<stop offset="1" stop-color="#FFFF00" />
</radialGradient>
<filter id="f-glow" x="-0.1" y="-0.1" width="1.2" height="1.2" style="color-interpolation-filters:sRGB">
<feGaussianBlur stdDeviation="6" />
</filter>
</defs>
<g id="space">
<circle cx="256" cy="256" r="250" opacity="0.4" fill="#FFFFFF" stroke="none" filter="url(#f-glow)" />
<circle cx="256" cy="256" r="250" fill="url(#f-space)" stroke="none" />
</g>
<g id="galaxy">
<path fill="url(#f-galaxy)" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"
d="m 395.4,132.1 c -1.4,0 -2.9,0 -4.3,0.1 -48.4,1.2 -115.8,18.5 -169.5,40.7 -53.4,22.1 -112.7,57.3 -147.8,90.4 25.9,-16 56.3,-32 90,-47.1 8.2,-3.7 16.5,-7.3 25.1,-10.8 74.6,-30.9 149.9,-49.7 194.9,-49.4 23.6,0.1 38.8,5.5 41.4,17.1 2.8,12.8 -12.7,32.6 -41.7,54 -28.9,21.5 -73.3,45.4 -123.9,63.1 -43.9,15.4 -79.5,20.2 -93.3,14.2 -6.9,-3 -7.2,-9.9 4.5,-20.1 5.3,-4.7 12.7,-9.7 21.7,-14.9 -0.3,-1.2 -0.5,-2.5 -0.7,-3.7 -7.9,4.6 -15.1,9.4 -21.6,14.2 -19.7,14.6 -30.9,29 -29,37.6 5.3,24.4 91.3,10.1 175.8,-24.9 96.4,-39.9 164.5,-92.7 162.8,-121 -0.2,-2.6 -1.1,-5.1 -2,-7.4 -8.4,-21.1 -38.1,-32.4 -82.3,-32 z m -55.3,50.3 c -17.5,0 -41.1,3.9 -67.6,10.8 3.8,1 7.4,2.3 11,3.9 6.1,2.9 11.8,6.7 16.7,11.3 21,-4.1 37.2,-4.5 45.4,-0.8 6.9,3 7.2,9.9 -4.5,20.1 -5.3,4.7 -12.7,9.7 -21.6,14.9 0.3,1.2 0.5,2.5 0.7,3.7 7.9,-4.6 15.1,-9.4 21.6,-14.2 19.7,-14.6 30.9,-29 29,-37.6 -1.8,-8.4 -13.2,-12.2 -30.8,-12.2 z m -82.9,29.5 c -13.4,-0.4 -26.3,5.4 -35,15.7 -11.6,13.8 -13.6,33.3 -5,49.2 4.9,6.2 32,-0.9 47.3,-5 12.6,-3.4 26.5,-11 35.6,-15.9 0,-18.5 -11.6,-35.1 -29,-41.4 -4.5,-1.6 -9.1,-2.5 -13.9,-2.6 z m -51.8,3.3 c -3.5,1.4 -6.9,2.7 -10.4,4.2 -96.2,39.8 -164.1,92.5 -162.8,120.8 0.1,2.8 1.1,5.2 2,7.6 18.6,46.1 133.7,42 256.2,-8.7 59.5,-24.7 112.8,-57.3 147.8,-90.5 -26,16 -56.3,32.1 -90,47.2 -8.2,3.7 -16.5,7.3 -25.1,10.8 -113.7,47 -228.8,66.1 -236.2,32.3 -2.8,-12.8 12.7,-32.6 41.7,-54 16.5,-12.3 38.1,-25.3 63.1,-37.6 1.6,-11.7 6.4,-22.8 13.8,-32 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,12 +1,12 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2016, John Zaitseff #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id: Makefile.am 663 2016-01-04 22:25:51Z john $
# $Id$
#
# This file, doc/Makefile.am, contains the documentation directory
# Makefile for Star Traders. It needs to be processed by automake to

View File

@ -17,12 +17,12 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2016, John Zaitseff #
# Copyright (C) 1990-2017, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id: Makefile.am 663 2016-01-04 22:25:51Z john $
# $Id: d327088affc02929d70a6b728e1255b51ce74f3f $
#
# This file, doc/Makefile.am, contains the documentation directory
# Makefile for Star Traders. It needs to be processed by automake to
@ -123,28 +123,29 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/ax_with_curses.m4 $(top_srcdir)/m4/btowc.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
$(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/codeset.m4 \
$(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
$(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
$(top_srcdir)/m4/hard-locale.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/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.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/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/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/multiarch.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/ssize_t.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/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/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/off_t.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 $(top_srcdir)/m4/string_h.m4 \
@ -238,7 +239,8 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
CURSES_CFLAGS = @CURSES_CFLAGS@
CURSES_LIBS = @CURSES_LIBS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -247,6 +249,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
@ -259,6 +262,7 @@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CTIME = @GNULIB_CTIME@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
@ -325,6 +329,7 @@ GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
@ -366,6 +371,8 @@ GNULIB_MKTIME = @GNULIB_MKTIME@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
@ -414,6 +421,7 @@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRFTIME = @GNULIB_STRFTIME@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
@ -435,7 +443,9 @@ GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_TZSET = @GNULIB_TZSET@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
@ -465,6 +475,7 @@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
GNULIB_WCSCPY = @GNULIB_WCSCPY@
GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
GNULIB_WCSDUP = @GNULIB_WCSDUP@
GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
GNULIB_WCSLEN = @GNULIB_WCSLEN@
GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
@ -495,8 +506,10 @@ GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
@ -507,6 +520,7 @@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
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@
@ -596,6 +610,7 @@ HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
@ -629,6 +644,7 @@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
@ -636,6 +652,8 @@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TRUNCATE = @HAVE_TRUNCATE@
HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@ -657,6 +675,7 @@ HAVE_WCSCOLL = @HAVE_WCSCOLL@
HAVE_WCSCPY = @HAVE_WCSCPY@
HAVE_WCSCSPN = @HAVE_WCSCSPN@
HAVE_WCSDUP = @HAVE_WCSDUP@
HAVE_WCSFTIME = @HAVE_WCSFTIME@
HAVE_WCSLEN = @HAVE_WCSLEN@
HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
HAVE_WCSNCAT = @HAVE_WCSNCAT@
@ -705,6 +724,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
@ -713,6 +733,7 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
@ -720,6 +741,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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
@ -735,6 +757,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_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
@ -757,6 +780,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
@ -768,6 +794,7 @@ REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CTIME = @REPLACE_CTIME@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
@ -863,6 +890,7 @@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRFTIME = @REPLACE_STRFTIME@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
@ -877,7 +905,9 @@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_TZSET = @REPLACE_TZSET@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
@ -890,6 +920,7 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
@ -917,6 +948,8 @@ VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
@ -925,7 +958,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@ -941,6 +973,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
desktopdir = @desktopdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
@ -955,6 +988,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
iconsdir = @iconsdir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@ -984,7 +1018,7 @@ EXTRA_DIST = README
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -1008,9 +1042,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-man6: $(dist_man6_MANS)

View File

@ -1,7 +1,7 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************

View File

@ -1,12 +1,12 @@
.\" *********************************************************************
.\" * *
.\" * Star Traders: A Game of Interstellar Trading *
.\" * Copyright (C) 1990-2016, John Zaitseff *
.\" * Copyright (C) 1990-2017, John Zaitseff *
.\" * *
.\" *********************************************************************
.\"
.\" Author: John Zaitseff <J.Zaitseff@zap.org.au>
.\" $Id: trader.6 663 2016-01-04 22:25:51Z john $
.\" $Id$
.\"
.\" This program is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
@ -41,7 +41,7 @@
.if \n[.g] .mso www.tmac
.\"
.\" *********************************************************************
.TH TRADER 6 "5th January, 2016" "Unix-like systems"
.TH TRADER 6 "2nd June, 2017" "Unix-like systems"
.SH NAME
trader \- a game of interstellar trading
.\" *********************************************************************
@ -136,7 +136,17 @@ experience, try (again, typed all on one line):
.sp
.nh
.na
.B "xterm \-g 80x24 \-fa Mono \-fs 18 \-bg black \-fg '#009911' \-bc +sb +bdc +fbx \-xrm 'XTerm*colorBD: #00FF00' \-e trader \-\-no\-colour &"
.B "xterm \-g 80x24 \-fa Mono \-fs 18 \-bg '#181818' \-fg '#2CAB00' \-bc +sb +bdc +fbx \-xrm 'XTerm*colorBD: #41FF00' \-e trader \-\-no\-colour &"
.ad
.hy 14
.sp
.RE
Or, if you prefer the old amber screens of yesteryear:
.RS
.sp
.nh
.na
.B "xterm \-g 80x24 \-fa Mono \-fs 18 \-bg '#101010' \-fg '#AB7A00' \-bc +sb +bdc +fbx \-xrm 'XTerm*colorBD: #FFB700' \-e trader \-\-no\-colour &"
.ad
.hy 14
.sp
@ -200,7 +210,7 @@ Australia
.PP
.\" *********************************************************************
.SH COPYRIGHT
Copyright \(co 1990\-2016, John Zaitseff.
Copyright \(co 1990\-2017, 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

51
lib/.gitignore vendored
View File

@ -1,24 +1,29 @@
arg-nonnull.h
c++defs.h
charset.alias
configmake.h
getopt.h
iconv.h
locale.h
ref-add.sed
ref-del.sed
stddef.h
stdio.h
stdlib.h
string.h
sys
time.h
unistd.h
unistr.h
unitypes.h
unused-parameter.h
warn-on-use.h
wchar.h
wctype.h
/charset.alias
/configmake.h
/getopt.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
/ref-add.sed
/ref-del.sed
/stddef.h
/stdint.h
/stdio.h
/stdlib.h
/string.h
/time.h
/unistd.h
/unistr.h
/unitypes.h
/wchar.h
/wctype.h
unistr/.dirstamp
/sys/
/unistr/
/unistr/.dirstamp

View File

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# Copyright (C) 2002-2017 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
@ -21,7 +21,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl assert btowc config-h crc getopt-gnu gettext gettext-h gettimeofday locale mbrtowc mbsrtowcs stdbool stdio striconv string strstr sys_stat sys_time unistd wchar wcrtomb wcsdup wctob wctype-h
# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --conditional-dependencies --no-libtool --macro-prefix=gl assert btowc config-h crc getopt-gnu gettext-h gettimeofday locale mbrtowc mbsrtowcs stdbool stdio striconv string strstr sys_stat sys_time unistd wchar wcrtomb wcsdup wctob wctype-h
AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects
@ -37,6 +37,7 @@ MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
# No GNU Make output.
AM_CPPFLAGS =
AM_CFLAGS =
@ -80,6 +81,7 @@ libgnu_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c
## begin gnulib module configmake
if gl_GNULIB_ENABLED_configmake
# Listed in the same order as the GNU makefile conventions, and
# provided by autoconf 2.59c+ or 2.70.
# The Automake-defined pkg* macros are appended, in the order
@ -121,6 +123,7 @@ configmake.h: Makefile
BUILT_SOURCES += configmake.h
CLEANFILES += configmake.h configmake.h-t
endif
## end gnulib module configmake
## begin gnulib module crc
@ -133,11 +136,11 @@ EXTRA_DIST += crc.h
## begin gnulib module getopt-posix
BUILT_SOURCES += $(GETOPT_H)
BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
getopt.h: getopt.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@ -150,31 +153,23 @@ getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
< $(srcdir)/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t
EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
< $(srcdir)/getopt-cdefs.in.h; \
} > $@-t && \
mv -f $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h
EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c
## end gnulib module getopt-posix
## begin gnulib module gettext
# If your project uses "gettextize --intl" to put a source-code
# copy of libintl into the package, every Makefile.am needs
# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
# Here's one way to do this:
#AM_CPPFLAGS += -I$(top_builddir)/intl
# This option has no effect when the user disables NLS (because then
# the intl directory contains no libintl.h file). This option is not
# enabled by default because the intl directory might not exist if
# your project does not use "gettext --intl", and some compilers
# complain about -I options applied to nonexistent directories.
EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
## end gnulib module gettext
## begin gnulib module gettext-h
libgnu_a_SOURCES += gettext.h
@ -199,6 +194,16 @@ V_GPERF_0 = @echo " GPERF " $@;
## end gnulib module gperf
## begin gnulib module hard-locale
if gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76
libgnu_a_SOURCES += hard-locale.c
endif
EXTRA_DIST += hard-locale.h
## end gnulib module hard-locale
## begin gnulib module havelib
@ -270,8 +275,37 @@ EXTRA_libgnu_a_SOURCES += iconv.c iconv_close.c iconv_open.c
## end gnulib module iconv_open
## begin gnulib module limits-h
BUILT_SOURCES += $(LIMITS_H)
# We need the following in order to create <limits.h> when the system
# doesn't have one that is compatible with GNU.
if GL_GENERATE_LIMITS_H
limits.h: limits.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|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_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
< $(srcdir)/limits.in.h; \
} > $@-t && \
mv $@-t $@
else
limits.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += limits.h limits.h-t
EXTRA_DIST += limits.in.h
## end gnulib module limits-h
## begin gnulib module localcharset
if gl_GNULIB_ENABLED_localcharset
libgnu_a_SOURCES += localcharset.h localcharset.c
# We need the following in order to install a simple file in $(libdir)
@ -340,6 +374,7 @@ SUFFIXES += .sed .sin
CLEANFILES += charset.alias ref-add.sed ref-del.sed
endif
EXTRA_DIST += config.charset ref-add.sin ref-del.sin
## end gnulib module localcharset
@ -379,6 +414,17 @@ EXTRA_DIST += locale.in.h
## end gnulib module locale
## begin gnulib module localtime-buffer
if gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9
endif
EXTRA_DIST += localtime-buffer.c localtime-buffer.h
EXTRA_libgnu_a_SOURCES += localtime-buffer.c
## end gnulib module localtime-buffer
## begin gnulib module mbrtowc
@ -390,7 +436,9 @@ EXTRA_libgnu_a_SOURCES += mbrtowc.c
## begin gnulib module mbsinit
if gl_GNULIB_ENABLED_mbsinit
endif
EXTRA_DIST += mbsinit.c
EXTRA_libgnu_a_SOURCES += mbsinit.c
@ -408,7 +456,9 @@ EXTRA_libgnu_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c
## begin gnulib module mbtowc
if gl_GNULIB_ENABLED_mbtowc
endif
EXTRA_DIST += mbtowc-impl.h mbtowc.c
EXTRA_libgnu_a_SOURCES += mbtowc.c
@ -417,7 +467,9 @@ EXTRA_libgnu_a_SOURCES += mbtowc.c
## begin gnulib module memchr
if gl_GNULIB_ENABLED_memchr
endif
EXTRA_DIST += memchr.c memchr.valgrind
EXTRA_libgnu_a_SOURCES += memchr.c
@ -426,107 +478,63 @@ EXTRA_libgnu_a_SOURCES += memchr.c
## begin gnulib module snippet/_Noreturn
if gl_GNULIB_ENABLED_b3ae4a413a1340415f34a52d1dafb147
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all Makefile.am that
# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
_NORETURN_H=$(srcdir)/_Noreturn.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
endif
EXTRA_DIST += _Noreturn.h
## end gnulib module snippet/_Noreturn
## begin gnulib module snippet/arg-nonnull
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
BUILT_SOURCES += arg-nonnull.h
# The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
# off.
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_ARG_NONNULL/,$$p' \
< $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
ARG_NONNULL_H=$(srcdir)/arg-nonnull.h
ARG_NONNULL_H=arg-nonnull.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
EXTRA_DIST += arg-nonnull.h
## end gnulib module snippet/arg-nonnull
## begin gnulib module snippet/c++defs
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
BUILT_SOURCES += c++defs.h
# The c++defs.h that gets inserted into generated .h files is the same as
# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/_GL_CXXDEFS/,$$p' \
< $(top_srcdir)/build-aux/snippet/c++defs.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += c++defs.h c++defs.h-t
CXXDEFS_H=$(srcdir)/c++defs.h
CXXDEFS_H=c++defs.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
EXTRA_DIST += c++defs.h
## end gnulib module snippet/c++defs
## begin gnulib module snippet/unused-parameter
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
BUILT_SOURCES += unused-parameter.h
# The unused-parameter.h that gets inserted into generated .h files is the same
# as build-aux/snippet/unused-parameter.h, except that it has the copyright
# header cut off.
unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
< $(top_srcdir)/build-aux/snippet/unused-parameter.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h
UNUSED_PARAMETER_H=unused-parameter.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
EXTRA_DIST += unused-parameter.h
## end gnulib module snippet/unused-parameter
## begin gnulib module snippet/warn-on-use
BUILT_SOURCES += warn-on-use.h
# The warn-on-use.h that gets inserted into generated .h files is the same as
# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
# off.
warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
< $(top_srcdir)/build-aux/snippet/warn-on-use.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
WARN_ON_USE_H=warn-on-use.h
WARN_ON_USE_H=$(srcdir)/warn-on-use.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
EXTRA_DIST += warn-on-use.h
## end gnulib module snippet/warn-on-use
@ -600,6 +608,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@ -621,6 +630,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
< $(srcdir)/stdint.in.h; \
} > $@-t && \
mv $@-t $@
@ -764,6 +774,7 @@ EXTRA_DIST += stdio.in.h
## begin gnulib module stdlib
if gl_GNULIB_ENABLED_stdlib
BUILT_SOURCES += stdlib.h
# We need the following in order to create <stdlib.h> when the system
@ -825,6 +836,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
-e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
@ -863,13 +875,16 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
mv $@-t $@
MOSTLYCLEANFILES += stdlib.h stdlib.h-t
endif
EXTRA_DIST += stdlib.in.h
## end gnulib module stdlib
## begin gnulib module streq
if gl_GNULIB_ENABLED_streq
endif
EXTRA_DIST += streq.h
## end gnulib module streq
@ -984,8 +999,10 @@ EXTRA_DIST += string.in.h
## begin gnulib module strnlen1
if gl_GNULIB_ENABLED_strnlen1
libgnu_a_SOURCES += strnlen1.h strnlen1.c
endif
## end gnulib module strnlen1
## begin gnulib module strstr-simple
@ -1013,6 +1030,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
-e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
-e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
@ -1026,6 +1044,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
-e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
@ -1109,6 +1128,7 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
-e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
< $(srcdir)/sys_types.in.h; \
} > $@-t && \
mv $@-t $@
@ -1132,24 +1152,31 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
-e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
-e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
-e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
-e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
-e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
-e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
-e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
-e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
-e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@ -1224,6 +1251,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
-e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
-e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
-e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
@ -1246,7 +1274,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
@ -1262,12 +1289,14 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
-e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
@ -1302,6 +1331,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
-e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
@ -1370,7 +1400,9 @@ EXTRA_DIST += unitypes.in.h
## begin gnulib module verify
if gl_GNULIB_ENABLED_verify
endif
EXTRA_DIST += verify.h
## end gnulib module verify
@ -1391,6 +1423,8 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
@ -1430,6 +1464,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
-e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
-e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
< $(srcdir)/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@ -1469,6 +1504,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
-e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
-e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
| \
@ -1485,6 +1521,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
-e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|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)'; \
@ -1525,7 +1562,9 @@ EXTRA_libgnu_a_SOURCES += wctob.c
## begin gnulib module wctomb
if gl_GNULIB_ENABLED_wctomb
endif
EXTRA_DIST += wctomb-impl.h wctomb.c
EXTRA_libgnu_a_SOURCES += wctomb.c
@ -1548,6 +1587,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
-e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
@ -1574,7 +1615,9 @@ EXTRA_DIST += wctype.in.h
## begin gnulib module wmemcpy
if gl_GNULIB_ENABLED_wmemcpy
endif
EXTRA_DIST += wmemcpy-impl.h wmemcpy.c
EXTRA_libgnu_a_SOURCES += wmemcpy.c

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
**************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2016, John Zaitseff *
* Copyright (C) 1990-2017, John Zaitseff *
* *
**************************************************************************

View File

@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published

View File

@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
Copyright (C) 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2010-2017 Free Software Foundation, Inc.
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,6 +17,15 @@
#ifndef _GL_CXXDEFS_H
#define _GL_CXXDEFS_H
/* Begin/end the GNULIB_NAMESPACE namespace. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
# define _GL_END_NAMESPACE }
#else
# define _GL_BEGIN_NAMESPACE
# define _GL_END_NAMESPACE
#endif
/* The three most frequent use cases of these macros are:
* For providing a substitute for a function that is missing on some
@ -111,14 +120,25 @@
that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
Example:
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
*/
Wrapping rpl_func in an object with an inline conversion operator
avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
actually used in the program. */
#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
_GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
rettype (*const func) parameters = ::rpl_func; \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return ::rpl_func; \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -135,8 +155,15 @@
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
rettype (*const func) parameters = \
reinterpret_cast<rettype(*)parameters>(::rpl_func); \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return reinterpret_cast<type>(::rpl_func); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -150,19 +177,24 @@
is defined.
Example:
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
*/
Wrapping func in an object with an inline conversion operator
avoids a reference to func unless GNULIB_NAMESPACE::func is
actually used in the program. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
/* If we were to write
rettype (*const func) parameters = ::func;
like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
better (remove an indirection through a 'static' pointer variable),
but then the _GL_CXXALIASWARN macro below would cause a warning not only
for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = ::func; \
} \
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return ::func; \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
@ -178,8 +210,15 @@
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = \
reinterpret_cast<rettype(*)parameters>(::func); \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return reinterpret_cast<type>(::func); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -202,9 +241,15 @@
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = \
reinterpret_cast<rettype(*)parameters>( \
(rettype2(*)parameters2)(::func)); \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else

View File

@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
Copyright (C) 2000-2003, 2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2006, 2008-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -115,16 +115,16 @@ extern "C" {
/* Cases for lowercase hex letters, and lowercase letters, all offset by N. */
#define _C_CTYPE_LOWER_A_THRU_F_N(n) \
case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
case 'e' + (n): case 'f' + (n)
#define _C_CTYPE_LOWER_N(n) \
_C_CTYPE_LOWER_A_THRU_F_N(n): \
case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \
case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \
case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \
case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \
case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n)
#define _C_CTYPE_LOWER_A_THRU_F_N(N) \
case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
case 'e' + (N): case 'f' + (N)
#define _C_CTYPE_LOWER_N(N) \
_C_CTYPE_LOWER_A_THRU_F_N(N): \
case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
/* Cases for hex letters, digits, lower, punct, and upper. */

View File

@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2016 Free Software
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2017 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2004, 2006-2016 Free Software Foundation, Inc.
# Copyright (C) 2000-2004, 2006-2017 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* crc.c -- cyclic redundancy checks
Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* crc.h -- cyclic redundancy checks
Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

67
lib/getopt-cdefs.in.h Normal file
View File

@ -0,0 +1,67 @@
/* getopt-on-non-glibc compatibility macros.
Copyright (C) 1989-2017 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.
gnulib 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.
gnulib 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 gnulib; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GETOPT_CDEFS_H
#define _GETOPT_CDEFS_H 1
/* This header should not be used directly; include getopt.h or
unistd.h instead. It does not have a protective #error, because
the guard macro for getopt.h in gnulib is not fixed. */
/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect
a number of the internal macros supplied to GNU libc's headers by
sys/cdefs.h. Provide fallback definitions for all of them. */
#if @HAVE_SYS_CDEFS_H@
# include <sys/cdefs.h>
#endif
#ifndef __BEGIN_DECLS
# ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# else
# define __BEGIN_DECLS /* nothing */
# endif
#endif
#ifndef __END_DECLS
# ifdef __cplusplus
# define __END_DECLS }
# else
# define __END_DECLS /* nothing */
# endif
#endif
#ifndef __GNUC_PREREQ
# if defined __GNUC__ && defined __GNUC_VERSION__
# define __GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
# else
# define __GNUC_PREREQ(maj, min) 0
# endif
#endif
#ifndef __THROW
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# else
# define __THROW
# endif
#endif
#endif /* _GETOPT_CDEFS_H */

96
lib/getopt-core.h Normal file
View File

@ -0,0 +1,96 @@
/* Declarations for getopt (basic, portable features only).
Copyright (C) 1989-2017 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.
The GNU C Library 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.
The GNU C Library 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 the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GETOPT_CORE_H
#define _GETOPT_CORE_H 1
/* This header should not be used directly; include getopt.h or
unistd.h instead. Unlike most bits headers, it does not have
a protective #error, because the guard macro for getopt.h in
gnulib is not fixed. */
__BEGIN_DECLS
/* For communication from 'getopt' to the caller.
When 'getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to 'getopt'.
On entry to 'getopt', zero means this is the first call; initialize.
When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message 'getopt' prints
for unrecognized options. */
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS.
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, 'optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in 'optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU 'getopt'.
The argument '--' causes premature termination of argument
scanning, explicitly telling 'getopt' that there are no more
options.
If OPTS begins with '-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments.
For standards compliance, the 'argv' argument has the type
char *const *, but this is inaccurate; if argument permutation is
enabled, the argv array (not the strings it points to) must be
writable. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW _GL_ARG_NONNULL ((2, 3));
__END_DECLS
#endif /* _GETOPT_CORE_H */

77
lib/getopt-ext.h Normal file
View File

@ -0,0 +1,77 @@
/* Declarations for getopt (GNU extensions).
Copyright (C) 1989-2017 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.
The GNU C Library 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.
The GNU C Library 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 the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GETOPT_EXT_H
#define _GETOPT_EXT_H 1
/* This header should not be used directly; include getopt.h instead.
Unlike most bits headers, it does not have a protective #error,
because the guard macro for getopt.h in gnulib is not fixed. */
__BEGIN_DECLS
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of 'struct option' terminated by an element containing a name which is
zero.
The field 'has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field 'flag' is not NULL, it points to a variable that is set
to the value given in the field 'val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an 'int' to
a compiled-in constant, such as set a value from 'optarg', set the
option's 'flag' field to zero and its 'val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero 'flag' field, 'getopt'
returns the contents of the 'val' field. */
struct option
{
const char *name;
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
/* Names for the values of the 'has_arg' field of 'struct option'. */
#define no_argument 0
#define required_argument 1
#define optional_argument 2
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW _GL_ARG_NONNULL ((2, 3));
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW _GL_ARG_NONNULL ((2, 3));
__END_DECLS
#endif /* _GETOPT_EXT_H */

54
lib/getopt-pfx-core.h Normal file
View File

@ -0,0 +1,54 @@
/* getopt (basic, portable features) gnulib wrapper header.
Copyright (C) 1989-2017 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.
gnulib 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.
gnulib 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 gnulib; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GETOPT_PFX_CORE_H
#define _GETOPT_PFX_CORE_H 1
/* This header should not be used directly; include getopt.h or
unistd.h instead. It does not have a protective #error, because
the guard macro for getopt.h in gnulib is not fixed. */
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in getopt-core.h and getopt-ext.h. Systematically
rename identifiers so that they do not collide with the system
functions and variables. Renaming avoids problems with some
compilers and linkers. */
#ifdef __GETOPT_PREFIX
# ifndef __GETOPT_ID
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
# endif
# undef getopt
# undef optarg
# undef opterr
# undef optind
# undef optopt
# define getopt __GETOPT_ID (getopt)
# define optarg __GETOPT_ID (optarg)
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
#endif
#include <getopt-core.h>
#endif /* _GETOPT_PFX_CORE_H */

66
lib/getopt-pfx-ext.h Normal file
View File

@ -0,0 +1,66 @@
/* getopt (GNU extensions) gnulib wrapper header.
Copyright (C) 1989-2017 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.
gnulib 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.
gnulib 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 gnulib; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GETOPT_PFX_EXT_H
#define _GETOPT_PFX_EXT_H 1
/* This header should not be used directly; include getopt.h instead.
It does not have a protective #error, because the guard macro for
getopt.h in gnulib is not fixed. */
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in getopt-core.h and getopt-ext.h. Systematically
rename identifiers so that they do not collide with the system
functions and variables. Renaming avoids problems with some
compilers and linkers. */
#ifdef __GETOPT_PREFIX
# ifndef __GETOPT_ID
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
# endif
# undef getopt_long
# undef getopt_long_only
# undef option
# undef _getopt_internal
# define getopt_long __GETOPT_ID (getopt_long)
# define getopt_long_only __GETOPT_ID (getopt_long_only)
# define option __GETOPT_ID (option)
# define _getopt_internal __GETOPT_ID (getopt_internal)
#endif
/* Standalone applications get correct prototypes for getopt_long and
getopt_long_only; they declare "char **argv". For backward
compatibility with old applications, if __GETOPT_PREFIX is not
defined, we supply GNU-libc-compatible, but incorrect, prototypes
using "char *const *argv". (GNU libc is stuck with the incorrect
prototypes, as they are baked into older versions of LSB.) */
#ifndef __getopt_argv_const
# if defined __GETOPT_PREFIX
# define __getopt_argv_const /* empty */
# else
# define __getopt_argv_const const
# endif
#endif
#include <getopt-ext.h>
#endif /* _GETOPT_PFX_EXT_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,22 @@
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1989-2017 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
this file.
This 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.
gnulib 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.
gnulib 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 <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with gnulib; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_GETOPT_H
@ -32,22 +34,15 @@
# undef _GL_SYSTEM_GETOPT
#endif
#ifndef _@GUARD_PREFIX@_GETOPT_H
#ifndef __need_getopt
# define _@GUARD_PREFIX@_GETOPT_H 1
#endif
#define _@GUARD_PREFIX@_GETOPT_H 1
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in this header. When this happens, include the
headers that might declare getopt so that they will not cause
confusion if included after this file (if the system had <getopt.h>,
we have already included it). Then systematically rename
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
defined in getopt-core.h and getopt-ext.h. When this happens,
include the headers that might declare getopt so that they will not
cause confusion if included after this file (if the system had
<getopt.h>, we have already included it). */
#if defined __GETOPT_PREFIX
# if !@HAVE_GETOPT_H@
# define __need_system_stdlib_h
# include <stdlib.h>
@ -55,201 +50,12 @@
# include <stdio.h>
# include <unistd.h>
# endif
# undef __need_getopt
# undef getopt
# undef getopt_long
# undef getopt_long_only
# undef optarg
# undef opterr
# undef optind
# undef optopt
# undef option
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
# define getopt __GETOPT_ID (getopt)
# define getopt_long __GETOPT_ID (getopt_long)
# define getopt_long_only __GETOPT_ID (getopt_long_only)
# define optarg __GETOPT_ID (optarg)
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
# define option __GETOPT_ID (option)
# define _getopt_internal __GETOPT_ID (getopt_internal)
#endif
/* Standalone applications get correct prototypes for getopt_long and
getopt_long_only; they declare "char **argv". libc uses prototypes
with "char *const *argv" that are incorrect because getopt_long and
getopt_long_only can permute argv; this is required for backward
compatibility (e.g., for LSB 2.0.1).
This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt',
but it caused redefinition warnings if both unistd.h and getopt.h were
included, since unistd.h includes getopt.h having previously defined
__need_getopt.
The only place where __getopt_argv_const is used is in definitions
of getopt_long and getopt_long_only below, but these are visible
only if __need_getopt is not defined, so it is quite safe to rewrite
the conditional as follows:
*/
#if !defined __need_getopt
# if defined __GETOPT_PREFIX
# define __getopt_argv_const /* empty */
# else
# define __getopt_argv_const const
# endif
#endif
/* If __GNU_LIBRARY__ is not already defined, either we are being used
standalone, or this is the first header included in the source file.
If we are being used with glibc, we need to include <features.h>, but
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
not defined, include <ctype.h>, which will pull in <features.h> for us
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
doesn't flood the namespace with stuff the way some other headers do.) */
#if !defined __GNU_LIBRARY__
# include <ctype.h>
#endif
#ifndef __THROW
# ifndef __GNUC_PREREQ
# define __GNUC_PREREQ(maj, min) (0)
# endif
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# else
# define __THROW
# endif
#endif
/* The definition of _GL_ARG_NONNULL is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
/* For communication from 'getopt' to the caller.
When 'getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to 'getopt'.
On entry to 'getopt', zero means this is the first call; initialize.
When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message 'getopt' prints
for unrecognized options. */
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of 'struct option' terminated by an element containing a name which is
zero.
The field 'has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field 'flag' is not NULL, it points to a variable that is set
to the value given in the field 'val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an 'int' to
a compiled-in constant, such as set a value from 'optarg', set the
option's 'flag' field to zero and its 'val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero 'flag' field, 'getopt'
returns the contents of the 'val' field. */
# if !GNULIB_defined_struct_option
struct option
{
const char *name;
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
# define GNULIB_defined_struct_option 1
# endif
/* Names for the values of the 'has_arg' field of 'struct option'. */
# define no_argument 0
# define required_argument 1
# define optional_argument 2
#endif /* need getopt */
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS.
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, 'optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in 'optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU 'getopt'.
The argument '--' causes premature termination of argument
scanning, explicitly telling 'getopt' that there are no more
options.
If OPTS begins with '-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW _GL_ARG_NONNULL ((2, 3));
#ifndef __need_getopt
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW _GL_ARG_NONNULL ((2, 3));
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW _GL_ARG_NONNULL ((2, 3));
#endif
#ifdef __cplusplus
}
#endif
/* Make sure we later can get all the definitions and declarations. */
#undef __need_getopt
#include <getopt-cdefs.h>
#include <getopt-pfx-core.h>
#include <getopt-pfx-ext.h>
#endif /* _@GUARD_PREFIX@_GETOPT_H */
#endif /* _@GUARD_PREFIX@_GETOPT_H */

View File

@ -1,56 +1,44 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1987-2017 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.
This 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.
The GNU C Library 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,
The GNU C Library 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.
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 <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifdef _LIBC
# include <getopt.h>
#else
#ifndef _LIBC
# include <config.h>
# include "getopt.h"
#endif
#include "getopt.h"
#include "getopt_int.h"
#include <stdio.h>
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#include <stdlib.h>
#endif
#ifndef NULL
#define NULL 0
#endif
int
getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
const struct option *long_options, int *opt_index)
const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, (char **) argv, options, long_options,
opt_index, 0, 0);
opt_index, 0, 0);
}
int
_getopt_long_r (int argc, char **argv, const char *options,
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
0, d, 0);
0, d, 0);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
@ -60,26 +48,27 @@ _getopt_long_r (int argc, char **argv, const char *options,
int
getopt_long_only (int argc, char *__getopt_argv_const *argv,
const char *options,
const struct option *long_options, int *opt_index)
const char *options,
const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, (char **) argv, options, long_options,
opt_index, 1, 0);
opt_index, 1, 0);
}
int
_getopt_long_only_r (int argc, char **argv, const char *options,
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
1, d, 0);
1, d, 0);
}
#ifdef TEST
#include <stdio.h>
#include <stdlib.h>
int
main (int argc, char **argv)
@ -93,74 +82,74 @@ main (int argc, char **argv)
int option_index = 0;
static const struct option long_options[] =
{
{"add", 1, 0, 0},
{"append", 0, 0, 0},
{"delete", 1, 0, 0},
{"verbose", 0, 0, 0},
{"create", 0, 0, 0},
{"file", 1, 0, 0},
{0, 0, 0, 0}
{"add", 1, 0, 0},
{"append", 0, 0, 0},
{"delete", 1, 0, 0},
{"verbose", 0, 0, 0},
{"create", 0, 0, 0},
{"file", 1, 0, 0},
{0, 0, 0, 0}
};
c = getopt_long (argc, argv, "abc:d:0123456789",
long_options, &option_index);
long_options, &option_index);
if (c == -1)
break;
break;
switch (c)
{
case 0:
printf ("option %s", long_options[option_index].name);
if (optarg)
printf (" with arg %s", optarg);
printf ("\n");
break;
{
case 0:
printf ("option %s", long_options[option_index].name);
if (optarg)
printf (" with arg %s", optarg);
printf ("\n");
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
if (digit_optind != 0 && digit_optind != this_option_optind)
printf ("digits occur in two different argv-elements.\n");
digit_optind = this_option_optind;
printf ("option %c\n", c);
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
if (digit_optind != 0 && digit_optind != this_option_optind)
printf ("digits occur in two different argv-elements.\n");
digit_optind = this_option_optind;
printf ("option %c\n", c);
break;
case 'a':
printf ("option a\n");
break;
case 'a':
printf ("option a\n");
break;
case 'b':
printf ("option b\n");
break;
case 'b':
printf ("option b\n");
break;
case 'c':
printf ("option c with value '%s'\n", optarg);
break;
case 'c':
printf ("option c with value '%s'\n", optarg);
break;
case 'd':
printf ("option d with value '%s'\n", optarg);
break;
case 'd':
printf ("option d with value '%s'\n", optarg);
break;
case '?':
break;
case '?':
break;
default:
printf ("?? getopt returned character code 0%o ??\n", c);
}
default:
printf ("?? getopt returned character code 0%o ??\n", c);
}
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
printf ("%s ", argv[optind++]);
printf ("%s ", argv[optind++]);
printf ("\n");
}

View File

@ -1,30 +1,31 @@
/* Internal declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1989-2017 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.
This 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.
The GNU C Library 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,
The GNU C Library 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.
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 <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
#define _GETOPT_INT_H 1
#include <getopt.h>
extern int _getopt_internal (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, int __posixly_correct);
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, int __posixly_correct);
/* Reentrant versions which can handle parsing multiple argument
@ -32,28 +33,20 @@ extern int _getopt_internal (int ___argc, char **___argv,
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
POSIXLY_CORRECT is defined, PERMUTE otherwise.
REQUIRE_ORDER means don't recognize them as options; stop option
processing when the first non-option is seen. This is what POSIX
specifies should happen.
REQUIRE_ORDER means don't recognize them as options;
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using '+' as the first character
of the list of option characters, or by calling getopt.
PERMUTE is the default. We permute the contents of ARGV as we
scan, so that eventually all the non-options are at the end.
This allows options to be given in any order, even with programs
that were not written to expect this.
PERMUTE means permute the contents of ARGV as we scan, so that
eventually all the non-options are at the end. This allows options
to be given in any order, even with programs that were not written
to expect this.
RETURN_IN_ORDER is an option available to programs that were
written to expect options and other ARGV-elements in any order
and that care about the ordering of the two. We describe each
non-option ARGV-element as if it were the argument of an option
with character code 1. Using '-' as the first character of the
list of option characters selects this mode of operation.
with character code 1.
The special argument '--' forces an end of option-scanning regardless
of the value of 'ordering'. In the case of RETURN_IN_ORDER, only
@ -91,11 +84,6 @@ struct _getopt_data
/* See __ord above. */
enum __ord __ordering;
/* If the POSIXLY_CORRECT environment variable is set
or getopt was called. */
int __posixly_correct;
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
@ -104,32 +92,27 @@ struct _getopt_data
int __first_nonopt;
int __last_nonopt;
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
#endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their
default values and to clear the initialization flag. */
#define _GETOPT_DATA_INITIALIZER { 1, 1 }
#define _GETOPT_DATA_INITIALIZER { 1, 1 }
extern int _getopt_internal_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, struct _getopt_data *__data,
int __posixly_correct);
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, struct _getopt_data *__data,
int __posixly_correct);
extern int _getopt_long_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
struct _getopt_data *__data);
const char *__shortopts,
const struct option *__longopts, int *__longind,
struct _getopt_data *__data);
extern int _getopt_long_only_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
struct _getopt_data *__data);
const char *__shortopts,
const struct option *__longopts,
int *__longind,
struct _getopt_data *__data);
#endif /* getopt_int.h */

View File

@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@ -18,8 +18,9 @@
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* NLS can be disabled through the configure --disable-nls option
or through "#define ENABLE NLS 0" before including this file. */
#if defined ENABLE_NLS && ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
@ -225,15 +226,17 @@ dcpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
if (translation != msg_ctxt_id)
if (found_translation)
return translation;
}
return msgid;
@ -271,15 +274,17 @@ dcnpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
if (!(translation == msg_ctxt_id || translation == msgid_plural))
if (found_translation)
return translation;
}
return (n == 1 ? msgid : msgid_plural);

View File

@ -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-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -24,93 +24,95 @@
#include <time.h>
#if HAVE_SYS_TIMEB_H
# include <sys/timeb.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# define WINDOWS_NATIVE
# include <windows.h>
#endif
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
#include "localtime-buffer.h"
/* Work around the bug in some systems whereby gettimeofday clobbers
the static buffer that localtime uses for its return value. The
gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
this problem. The tzset replacement is necessary for at least
Solaris 2.5, 2.5.1, and 2.6. */
#ifdef WINDOWS_NATIVE
static struct tm tm_zero_buffer;
static struct tm *localtime_buffer_addr = &tm_zero_buffer;
/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */
typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime);
static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL;
static BOOL initialized = FALSE;
# undef localtime
extern struct tm *localtime (time_t const *);
# undef gmtime
extern struct tm *gmtime (time_t const *);
/* This is a wrapper for localtime. It is used only on systems for which
gettimeofday clobbers the static buffer used for localtime's result.
On the first call, record the address of the static buffer that
localtime uses for its result. */
struct tm *
rpl_localtime (time_t const *timep)
static void
initialize (void)
{
struct tm *tm = localtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
HMODULE kernel32 = LoadLibrary ("kernel32.dll");
if (kernel32 != NULL)
{
GetSystemTimePreciseAsFileTimeFunc =
(GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
}
initialized = TRUE;
}
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (time_t const *timep)
{
struct tm *tm = gmtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
}
#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
#if TZSET_CLOBBERS_LOCALTIME
# undef tzset
extern void tzset (void);
/* This is a wrapper for tzset, for systems on which tzset may clobber
the static buffer used for localtime's result. */
void
rpl_tzset (void)
{
/* Save and restore the contents of the buffer used for localtime's
result around the call to tzset. */
struct tm save = *localtime_buffer_addr;
tzset ();
*localtime_buffer_addr = save;
}
#endif
/* This is a wrapper for gettimeofday. It is used only on systems
that lack this function, or whose implementation of this function
causes problems. */
causes problems.
Work around the bug in some systems whereby gettimeofday clobbers
the static buffer that localtime uses for its return value. The
gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
this problem. */
int
gettimeofday (struct timeval *restrict tv, void *restrict tz)
{
#undef gettimeofday
#if HAVE_GETTIMEOFDAY
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
#ifdef WINDOWS_NATIVE
/* On native Windows, there are two ways to get the current time:
GetSystemTimeAsFileTime
<https://msdn.microsoft.com/en-us/library/ms724397.aspx>
or
GetSystemTimePreciseAsFileTime
<https://msdn.microsoft.com/en-us/library/hh706895.aspx>.
GetSystemTimeAsFileTime produces values that jump by increments of
15.627 milliseconds (!) on average.
Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2
microseconds.
More discussion on this topic:
<http://www.windowstimestamp.com/description>. */
FILETIME current_time;
if (!initialized)
initialize ();
if (GetSystemTimePreciseAsFileTimeFunc != NULL)
GetSystemTimePreciseAsFileTimeFunc (&current_time);
else
GetSystemTimeAsFileTime (&current_time);
/* Convert from FILETIME to 'struct timeval'. */
/* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
ULONGLONG since_1601 =
((ULONGLONG) current_time.dwHighDateTime << 32)
| (ULONGLONG) current_time.dwLowDateTime;
/* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap
years, in total 134774 days. */
ULONGLONG since_1970 =
since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000;
ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10;
tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000;
tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000;
return 0;
#else
# if HAVE_GETTIMEOFDAY
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
/* Save and restore the contents of the buffer used for localtime's
result around the call to gettimeofday. */
struct tm save = *localtime_buffer_addr;
# endif
# endif
# if defined timeval /* 'struct timeval' overridden by gnulib? */
# undef timeval
# if defined timeval /* 'struct timeval' overridden by gnulib? */
# undef timeval
struct timeval otv;
int result = gettimeofday (&otv, (struct timezone *) tz);
if (result == 0)
@ -118,25 +120,16 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
tv->tv_sec = otv.tv_sec;
tv->tv_usec = otv.tv_usec;
}
# else
# else
int result = gettimeofday (tv, (struct timezone *) tz);
# endif
# endif
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
*localtime_buffer_addr = save;
# endif
# endif
return result;
#else
# if HAVE__FTIME
struct _timeb timebuf;
_ftime (&timebuf);
tv->tv_sec = timebuf.time;
tv->tv_usec = timebuf.millitm * 1000;
# else
# if !defined OK_TO_USE_1S_CLOCK
@ -146,9 +139,8 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
tv->tv_sec = time (NULL);
tv->tv_usec = 0;
# endif
return 0;
# endif
#endif
}

72
lib/hard-locale.c Normal file
View File

@ -0,0 +1,72 @@
/* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2017 Free Software
Foundation, Inc.
This 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 <http://www.gnu.org/licenses/>. */
#include <config.h>
#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);
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;
/* Restore the caller's locale. */
setlocale (category, locale);
free (locale);
}
}
}
return hard;
}

25
lib/hard-locale.h Normal file
View File

@ -0,0 +1,25 @@
/* Determine whether a locale is hard.
Copyright (C) 1999, 2003-2004, 2009-2017 Free Software Foundation, Inc.
This 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 <http://www.gnu.org/licenses/>. */
#ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1
# include <stdbool.h>
bool hard_locale (int);
#endif /* HARD_LOCALE_H_ */

View File

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 1999-2001, 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1999-2001, 2007, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/* A GNU-like <iconv.h>.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

74
lib/limits.in.h Normal file
View File

@ -0,0 +1,74 @@
/* A GNU-like <limits.h>.
Copyright 2016-2017 Free Software Foundation, Inc.
This 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 <http://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_LIMITS_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
#ifndef _@GUARD_PREFIX@_LIMITS_H
#define _@GUARD_PREFIX@_LIMITS_H
/* For HP-UX 11.31. */
#if defined LONG_LONG_MIN && !defined LLONG_MIN
# define LLONG_MIN LONG_LONG_MIN
#endif
#if defined LONG_LONG_MAX && !defined LLONG_MAX
# define LLONG_MAX LONG_LONG_MAX
#endif
#if defined ULONG_LONG_MAX && !defined ULLONG_MAX
# define ULLONG_MAX ULONG_LONG_MAX
#endif
/* The number of usable bits in an unsigned or signed integer type
with minimum value MIN and maximum value MAX, as an int expression
suitable in #if. Cover all known practical hosts. This
implementation exploits the fact that MAX is 1 less than a power of
2, and merely counts the number of 1 bits in MAX; "COBn" means
"count the number of 1 bits in the low-order n bits"). */
#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
/* Macros specified by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
&& (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
#endif /* _@GUARD_PREFIX@_LIMITS_H */
#endif /* _@GUARD_PREFIX@_LIMITS_H */

View File

@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2006, 2008-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -32,7 +32,7 @@
# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
#if defined _WIN32 || defined __WIN32__
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
@ -75,6 +75,7 @@
# include "relocatable.h"
#else
# define relocate(pathname) (pathname)
# define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname))
#endif
/* Get LIBDIR. */
@ -129,6 +130,7 @@ get_charset_aliases (void)
if (cp == NULL)
{
#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
char *malloc_dir = NULL;
const char *dir;
const char *base = "charset.alias";
char *file_name;
@ -137,7 +139,7 @@ get_charset_aliases (void)
necessary for running the testsuite before "make install". */
dir = getenv ("CHARSETALIASDIR");
if (dir == NULL || dir[0] == '\0')
dir = relocate (LIBDIR);
dir = relocate2 (LIBDIR, &malloc_dir);
/* Concatenate dir and base into freshly allocated file_name. */
{
@ -154,6 +156,8 @@ get_charset_aliases (void)
}
}
free (malloc_dir);
if (file_name == NULL)
/* Out of memory. Treat the file as empty. */
cp = "";
@ -507,7 +511,7 @@ locale_charset (void)
current_locale = setlocale (LC_CTYPE, NULL);
pdot = strrchr (current_locale, '.');
if (pdot)
if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
sprintf (buf, "CP%s", pdot + 1);
else
{

View File

@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2009-2017 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

View File

@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This 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
lib/localtime-buffer.c Normal file
View File

@ -0,0 +1,58 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
This 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 <http://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <config.h>
/* Specification. */
#include "localtime-buffer.h"
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
static struct tm tm_zero_buffer;
struct tm *localtime_buffer_addr = &tm_zero_buffer;
/* This is a wrapper for localtime.
On the first call, record the address of the static buffer that
localtime uses for its result. */
struct tm *
rpl_localtime (time_t const *timep)
{
struct tm *tm = localtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
}
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (time_t const *timep)
{
struct tm *tm = gmtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
}
#endif

27
lib/localtime-buffer.h Normal file
View File

@ -0,0 +1,27 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
This 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 <http://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <time.h>
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
/* The address of the last buffer returned by localtime() or gmtime(). */
extern struct tm *localtime_buffer_addr;
#endif

View File

@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc.
Copyright (C) 1999-2002, 2005-2017 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,6 +20,11 @@
/* 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(). */
@ -30,6 +35,13 @@
# include "streq.h"
# include "verify.h"
#ifndef FALLTHROUGH
# if __GNUC__ < 7
# define FALLTHROUGH ((void) 0)
# else
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# endif
#endif
verify (sizeof (mbstate_t) >= 4);
@ -69,10 +81,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
break;
case 3:
buf[2] = pstate[3];
/*FALLTHROUGH*/
FALLTHROUGH;
case 2:
buf[1] = pstate[2];
/*FALLTHROUGH*/
FALLTHROUGH;
case 1:
buf[0] = pstate[1];
p = buf;
@ -328,6 +340,9 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
size_t
rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
{
size_t ret;
wchar_t wc;
# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG
if (s == NULL)
{
@ -342,6 +357,9 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
return (size_t) -2;
# endif
if (! pwc)
pwc = &wc;
# if MBRTOWC_RETVAL_BUG
{
static mbstate_t internal_state;
@ -357,8 +375,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
size_t count = 0;
for (; n > 0; s++, n--)
{
wchar_t wc;
size_t ret = mbrtowc (&wc, s, 1, ps);
ret = mbrtowc (&wc, s, 1, ps);
if (ret == (size_t)(-1))
return (size_t)(-1);
@ -366,8 +383,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
if (ret != (size_t)(-2))
{
/* The multibyte character has been completed. */
if (pwc != NULL)
*pwc = wc;
*pwc = wc;
return (wc == 0 ? 0 : count);
}
}
@ -376,32 +392,23 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
# endif
ret = mbrtowc (pwc, s, n, ps);
# if MBRTOWC_NUL_RETVAL_BUG
{
wchar_t wc;
size_t ret = mbrtowc (&wc, s, n, ps);
if (ret != (size_t)(-1) && ret != (size_t)(-2))
{
if (pwc != NULL)
*pwc = wc;
if (wc == 0)
ret = 0;
}
return ret;
}
# else
{
# if MBRTOWC_NULL_ARG1_BUG
wchar_t dummy;
if (pwc == NULL)
pwc = &dummy;
# endif
return mbrtowc (pwc, s, n, ps);
}
if (ret < (size_t) -2 && !*pwc)
return 0;
# endif
# if C_LOCALE_MAYBE_EILSEQ
if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
{
unsigned char uc = *s;
*pwc = uc;
return 1;
}
# endif
return ret;
}
#endif

View File

@ -1,5 +1,5 @@
/* Test for initial conversion state.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@ -22,17 +22,7 @@
#include "verify.h"
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, 'mbstate_t' is defined as 'int'. */
int
mbsinit (const mbstate_t *ps)
{
return ps == NULL || *ps == 0;
}
#else
#if GNULIB_defined_mbstate_t
/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
and wcrtomb(), wcsrtombs().
@ -45,6 +35,7 @@ mbsinit (const mbstate_t *ps)
We define the meaning of mbstate_t as follows:
- In mb -> wc direction, mbstate_t's first byte contains the number of
buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
See mbrtowc.c.
- In wc -> mb direction, mbstate_t contains no information. In other
words, it is always in the initial state. */
@ -58,4 +49,25 @@ mbsinit (const mbstate_t *ps)
return pstate == NULL || pstate[0] == 0;
}
#else
int
mbsinit (const mbstate_t *ps)
{
# if (defined _WIN32 || 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. */
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... */
return ps == NULL || *(const char *)ps == 0;
# endif
}
#endif

View File

@ -1,5 +1,5 @@
/* Convert string to wide string.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Convert string to wide string.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Convert string to wide string.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016
/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),

View File

@ -1,6 +1,6 @@
# Add this package to a list of references stored in a text file.
#
# Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
# Copyright (C) 2000, 2009-2017 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
# Remove this package from a list of references stored in a text file.
#
# Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
# Copyright (C) 2000, 2009-2017 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2003, 2006-2016 Free Software Foundation, Inc.
/* Copyright (C) 2001-2003, 2006-2017 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

View File

@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -81,8 +81,10 @@
# define wchar_t int
#endif
/* Some platforms lack max_align_t. */
#if !@HAVE_MAX_ALIGN_T@
/* 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)
/* 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

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@ -79,54 +79,65 @@
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
#define _@GUARD_PREFIX@_STDINT_H
/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
#include <limits.h>
/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
wint_t. */
#if @GNULIB_OVERRIDES_WINT_T@
# undef WINT_MIN
# undef WINT_MAX
# define WINT_MIN 0x0U
# define WINT_MAX 0xffffffffU
#endif
#if ! @HAVE_C99_STDINT_H@
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
<sys/types.h> after @NEXT_STDINT_H@. */
#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
# include <sys/types.h>
#endif
# if @HAVE_SYS_TYPES_H@ && ! defined _AIX
# include <sys/types.h>
# endif
/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
LONG_MIN, LONG_MAX, ULONG_MAX. */
#include <limits.h>
#if @HAVE_INTTYPES_H@
# if @HAVE_INTTYPES_H@
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
# include <inttypes.h>
#elif @HAVE_SYS_INTTYPES_H@
# include <inttypes.h>
# elif @HAVE_SYS_INTTYPES_H@
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
# include <sys/inttypes.h>
#endif
# include <sys/inttypes.h>
# endif
#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
/* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
included by <sys/types.h>. */
# include <sys/bitypes.h>
#endif
# include <sys/bitypes.h>
# endif
#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for an integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
#define _STDINT_MIN(signed, bits, zero) \
((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
/* These are separate macros, because if you try to merge these macros into
a single one, HP-UX cc rejects the resulting expression in constant
expressions. */
# define _STDINT_UNSIGNED_MIN(bits, zero) \
(zero)
# define _STDINT_SIGNED_MIN(bits, zero) \
(~ _STDINT_MAX (1, bits, zero))
#define _STDINT_MAX(signed, bits, zero) \
((signed) \
? ~ _STDINT_MIN (signed, bits, zero) \
: /* The expression for the unsigned case. The subtraction of (signed) \
is a nop in the unsigned case and avoids "signed integer overflow" \
warnings in the signed case. */ \
((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
# define _STDINT_MAX(signed, bits, zero) \
(((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types
@ -135,26 +146,26 @@
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
#undef int8_t
#undef uint8_t
# undef int8_t
# undef uint8_t
typedef signed char gl_int8_t;
typedef unsigned char gl_uint8_t;
#define int8_t gl_int8_t
#define uint8_t gl_uint8_t
# define int8_t gl_int8_t
# define uint8_t gl_uint8_t
#undef int16_t
#undef uint16_t
# undef int16_t
# undef uint16_t
typedef short int gl_int16_t;
typedef unsigned short int gl_uint16_t;
#define int16_t gl_int16_t
#define uint16_t gl_uint16_t
# define int16_t gl_int16_t
# define uint16_t gl_uint16_t
#undef int32_t
#undef uint32_t
# undef int32_t
# undef uint32_t
typedef int gl_int32_t;
typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t
# define int32_t gl_int32_t
# define uint32_t gl_uint32_t
/* If the system defines INT64_MAX, assume int64_t works. That way,
if the underlying platform defines int64_t to be a 64-bit long long
@ -162,54 +173,54 @@ typedef unsigned int gl_uint32_t;
int, which would mess up C++ name mangling. We must use #ifdef
rather than #if, to avoid an error with HP-UX 10.20 cc. */
#ifdef INT64_MAX
# define GL_INT64_T
#else
# ifdef INT64_MAX
# define GL_INT64_T
# else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
# if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
# if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
typedef long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
# elif defined _MSC_VER
# undef int64_t
# define int64_t gl_int64_t
# define GL_INT64_T
# elif defined _MSC_VER
# undef int64_t
typedef __int64 gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
# elif @HAVE_LONG_LONG_INT@
# undef int64_t
# define int64_t gl_int64_t
# define GL_INT64_T
# elif @HAVE_LONG_LONG_INT@
# undef int64_t
typedef long long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
# define int64_t gl_int64_t
# define GL_INT64_T
# endif
# endif
#endif
#ifdef UINT64_MAX
# define GL_UINT64_T
#else
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
# ifdef UINT64_MAX
# define GL_UINT64_T
# else
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
typedef unsigned long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif defined _MSC_VER
# undef uint64_t
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif defined _MSC_VER
# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
typedef unsigned long long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# endif
# endif
#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
#define _UINT8_T
#define _UINT32_T
#define _UINT64_T
# define _UINT8_T
# define _UINT32_T
# define _UINT64_T
/* 7.18.1.2. Minimum-width integer types */
@ -218,26 +229,26 @@ typedef unsigned long long int gl_uint64_t;
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
#undef int_least8_t
#undef uint_least8_t
#undef int_least16_t
#undef uint_least16_t
#undef int_least32_t
#undef uint_least32_t
#undef int_least64_t
#undef uint_least64_t
#define int_least8_t int8_t
#define uint_least8_t uint8_t
#define int_least16_t int16_t
#define uint_least16_t uint16_t
#define int_least32_t int32_t
#define uint_least32_t uint32_t
#ifdef GL_INT64_T
# define int_least64_t int64_t
#endif
#ifdef GL_UINT64_T
# define uint_least64_t uint64_t
#endif
# undef int_least8_t
# undef uint_least8_t
# undef int_least16_t
# undef uint_least16_t
# undef int_least32_t
# undef uint_least32_t
# undef int_least64_t
# undef uint_least64_t
# define int_least8_t int8_t
# define uint_least8_t uint8_t
# define int_least16_t int16_t
# define uint_least16_t uint16_t
# define int_least32_t int32_t
# define uint_least32_t uint32_t
# ifdef GL_INT64_T
# define int_least64_t int64_t
# endif
# ifdef GL_UINT64_T
# define uint_least64_t uint64_t
# endif
/* 7.18.1.3. Fastest minimum-width integer types */
@ -250,50 +261,55 @@ typedef unsigned long long int gl_uint64_t;
uses types consistent with glibc, as that lessens the chance of
incompatibility with older GNU hosts. */
#undef int_fast8_t
#undef uint_fast8_t
#undef int_fast16_t
#undef uint_fast16_t
#undef int_fast32_t
#undef uint_fast32_t
#undef int_fast64_t
#undef uint_fast64_t
# undef int_fast8_t
# undef uint_fast8_t
# undef int_fast16_t
# undef uint_fast16_t
# undef int_fast32_t
# undef uint_fast32_t
# undef int_fast64_t
# undef uint_fast64_t
typedef signed char gl_int_fast8_t;
typedef unsigned char gl_uint_fast8_t;
#ifdef __sun
# ifdef __sun
/* Define types compatible with SunOS 5.10, so that code compiled under
earlier SunOS versions works with code compiled under SunOS 5.10. */
typedef int gl_int_fast32_t;
typedef unsigned int gl_uint_fast32_t;
#else
# else
typedef long int gl_int_fast32_t;
typedef unsigned long int gl_uint_fast32_t;
#endif
# endif
typedef gl_int_fast32_t gl_int_fast16_t;
typedef gl_uint_fast32_t gl_uint_fast16_t;
#define int_fast8_t gl_int_fast8_t
#define uint_fast8_t gl_uint_fast8_t
#define int_fast16_t gl_int_fast16_t
#define uint_fast16_t gl_uint_fast16_t
#define int_fast32_t gl_int_fast32_t
#define uint_fast32_t gl_uint_fast32_t
#ifdef GL_INT64_T
# define int_fast64_t int64_t
#endif
#ifdef GL_UINT64_T
# define uint_fast64_t uint64_t
#endif
# define int_fast8_t gl_int_fast8_t
# define uint_fast8_t gl_uint_fast8_t
# define int_fast16_t gl_int_fast16_t
# define uint_fast16_t gl_uint_fast16_t
# define int_fast32_t gl_int_fast32_t
# define uint_fast32_t gl_uint_fast32_t
# ifdef GL_INT64_T
# define int_fast64_t int64_t
# endif
# ifdef GL_UINT64_T
# define uint_fast64_t uint64_t
# endif
/* 7.18.1.4. Integer types capable of holding object pointers */
#undef intptr_t
#undef uintptr_t
/* 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
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
# define intptr_t gl_intptr_t
# define uintptr_t gl_uintptr_t
# endif
/* 7.18.1.5. Greatest-width integer types */
@ -304,33 +320,33 @@ typedef unsigned long int gl_uintptr_t;
similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
assuming one type where another is used by the system. */
#ifndef INTMAX_MAX
# undef INTMAX_C
# undef intmax_t
# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# ifndef INTMAX_MAX
# undef INTMAX_C
# undef intmax_t
# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
# define intmax_t gl_intmax_t
# elif defined GL_INT64_T
# define intmax_t int64_t
# else
# define intmax_t gl_intmax_t
# elif defined GL_INT64_T
# define intmax_t int64_t
# else
typedef long int gl_intmax_t;
# define intmax_t gl_intmax_t
# define intmax_t gl_intmax_t
# endif
# endif
#endif
#ifndef UINTMAX_MAX
# undef UINTMAX_C
# undef uintmax_t
# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
# ifndef UINTMAX_MAX
# undef UINTMAX_C
# undef uintmax_t
# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
# define uintmax_t gl_uintmax_t
# elif defined GL_UINT64_T
# define uintmax_t uint64_t
# else
# define uintmax_t gl_uintmax_t
# elif defined GL_UINT64_T
# define uintmax_t uint64_t
# else
typedef unsigned long int gl_uintmax_t;
# define uintmax_t gl_uintmax_t
# define uintmax_t gl_uintmax_t
# endif
# endif
#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
@ -338,8 +354,8 @@ typedef unsigned long int gl_uintmax_t;
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
? 1 : -1];
#define GNULIB_defined_stdint_types 1
#endif /* !GNULIB_defined_stdint_types */
# define GNULIB_defined_stdint_types 1
# endif /* !GNULIB_defined_stdint_types */
/* 7.18.2. Limits of specified-width integer types */
@ -348,37 +364,37 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
#undef INT8_MIN
#undef INT8_MAX
#undef UINT8_MAX
#define INT8_MIN (~ INT8_MAX)
#define INT8_MAX 127
#define UINT8_MAX 255
# undef INT8_MIN
# undef INT8_MAX
# undef UINT8_MAX
# define INT8_MIN (~ INT8_MAX)
# define INT8_MAX 127
# define UINT8_MAX 255
#undef INT16_MIN
#undef INT16_MAX
#undef UINT16_MAX
#define INT16_MIN (~ INT16_MAX)
#define INT16_MAX 32767
#define UINT16_MAX 65535
# undef INT16_MIN
# undef INT16_MAX
# undef UINT16_MAX
# define INT16_MIN (~ INT16_MAX)
# define INT16_MAX 32767
# define UINT16_MAX 65535
#undef INT32_MIN
#undef INT32_MAX
#undef UINT32_MAX
#define INT32_MIN (~ INT32_MAX)
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
# undef INT32_MIN
# undef INT32_MAX
# undef UINT32_MAX
# define INT32_MIN (~ INT32_MAX)
# define INT32_MAX 2147483647
# define UINT32_MAX 4294967295U
#if defined GL_INT64_T && ! defined INT64_MAX
# if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
# define INT64_MIN (- INTMAX_C (1) << 63)
# define INT64_MAX INTMAX_C (9223372036854775807)
#endif
# define INT64_MIN (- INTMAX_C (1) << 63)
# define INT64_MAX INTMAX_C (9223372036854775807)
# endif
#if defined GL_UINT64_T && ! defined UINT64_MAX
# define UINT64_MAX UINTMAX_C (18446744073709551615)
#endif
# if defined GL_UINT64_T && ! defined UINT64_MAX
# define UINT64_MAX UINTMAX_C (18446744073709551615)
# endif
/* 7.18.2.2. Limits of minimum-width integer types */
@ -386,38 +402,38 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
#undef INT_LEAST8_MIN
#undef INT_LEAST8_MAX
#undef UINT_LEAST8_MAX
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define UINT_LEAST8_MAX UINT8_MAX
# undef INT_LEAST8_MIN
# undef INT_LEAST8_MAX
# undef UINT_LEAST8_MAX
# define INT_LEAST8_MIN INT8_MIN
# define INT_LEAST8_MAX INT8_MAX
# define UINT_LEAST8_MAX UINT8_MAX
#undef INT_LEAST16_MIN
#undef INT_LEAST16_MAX
#undef UINT_LEAST16_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define UINT_LEAST16_MAX UINT16_MAX
# undef INT_LEAST16_MIN
# undef INT_LEAST16_MAX
# undef UINT_LEAST16_MAX
# define INT_LEAST16_MIN INT16_MIN
# define INT_LEAST16_MAX INT16_MAX
# define UINT_LEAST16_MAX UINT16_MAX
#undef INT_LEAST32_MIN
#undef INT_LEAST32_MAX
#undef UINT_LEAST32_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define UINT_LEAST32_MAX UINT32_MAX
# undef INT_LEAST32_MIN
# undef INT_LEAST32_MAX
# undef UINT_LEAST32_MAX
# define INT_LEAST32_MIN INT32_MIN
# define INT_LEAST32_MAX INT32_MAX
# define UINT_LEAST32_MAX UINT32_MAX
#undef INT_LEAST64_MIN
#undef INT_LEAST64_MAX
#ifdef GL_INT64_T
# define INT_LEAST64_MIN INT64_MIN
# define INT_LEAST64_MAX INT64_MAX
#endif
# undef INT_LEAST64_MIN
# undef INT_LEAST64_MAX
# ifdef GL_INT64_T
# define INT_LEAST64_MIN INT64_MIN
# define INT_LEAST64_MAX INT64_MAX
# endif
#undef UINT_LEAST64_MAX
#ifdef GL_UINT64_T
# define UINT_LEAST64_MAX UINT64_MAX
#endif
# undef UINT_LEAST64_MAX
# ifdef GL_UINT64_T
# define UINT_LEAST64_MAX UINT64_MAX
# endif
/* 7.18.2.3. Limits of fastest minimum-width integer types */
@ -425,117 +441,121 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
are taken from the same list of types. */
#undef INT_FAST8_MIN
#undef INT_FAST8_MAX
#undef UINT_FAST8_MAX
#define INT_FAST8_MIN SCHAR_MIN
#define INT_FAST8_MAX SCHAR_MAX
#define UINT_FAST8_MAX UCHAR_MAX
# undef INT_FAST8_MIN
# undef INT_FAST8_MAX
# undef UINT_FAST8_MAX
# define INT_FAST8_MIN SCHAR_MIN
# define INT_FAST8_MAX SCHAR_MAX
# define UINT_FAST8_MAX UCHAR_MAX
#undef INT_FAST16_MIN
#undef INT_FAST16_MAX
#undef UINT_FAST16_MAX
#define INT_FAST16_MIN INT_FAST32_MIN
#define INT_FAST16_MAX INT_FAST32_MAX
#define UINT_FAST16_MAX UINT_FAST32_MAX
# undef INT_FAST16_MIN
# undef INT_FAST16_MAX
# undef UINT_FAST16_MAX
# define INT_FAST16_MIN INT_FAST32_MIN
# define INT_FAST16_MAX INT_FAST32_MAX
# define UINT_FAST16_MAX UINT_FAST32_MAX
#undef INT_FAST32_MIN
#undef INT_FAST32_MAX
#undef UINT_FAST32_MAX
#ifdef __sun
# define INT_FAST32_MIN INT_MIN
# define INT_FAST32_MAX INT_MAX
# define UINT_FAST32_MAX UINT_MAX
#else
# define INT_FAST32_MIN LONG_MIN
# define INT_FAST32_MAX LONG_MAX
# define UINT_FAST32_MAX ULONG_MAX
#endif
# undef INT_FAST32_MIN
# undef INT_FAST32_MAX
# undef UINT_FAST32_MAX
# ifdef __sun
# define INT_FAST32_MIN INT_MIN
# define INT_FAST32_MAX INT_MAX
# define UINT_FAST32_MAX UINT_MAX
# else
# define INT_FAST32_MIN LONG_MIN
# define INT_FAST32_MAX LONG_MAX
# define UINT_FAST32_MAX ULONG_MAX
# endif
#undef INT_FAST64_MIN
#undef INT_FAST64_MAX
#ifdef GL_INT64_T
# define INT_FAST64_MIN INT64_MIN
# define INT_FAST64_MAX INT64_MAX
#endif
# undef INT_FAST64_MIN
# undef INT_FAST64_MAX
# ifdef GL_INT64_T
# define INT_FAST64_MIN INT64_MIN
# define INT_FAST64_MAX INT64_MAX
# endif
#undef UINT_FAST64_MAX
#ifdef GL_UINT64_T
# define UINT_FAST64_MAX UINT64_MAX
#endif
# undef UINT_FAST64_MAX
# ifdef GL_UINT64_T
# define UINT_FAST64_MAX UINT64_MAX
# endif
/* 7.18.2.4. Limits of integer types capable of holding object pointers */
#undef INTPTR_MIN
#undef INTPTR_MAX
#undef UINTPTR_MAX
#define INTPTR_MIN LONG_MIN
#define INTPTR_MAX LONG_MAX
#define UINTPTR_MAX ULONG_MAX
# undef INTPTR_MIN
# undef INTPTR_MAX
# undef UINTPTR_MAX
# define INTPTR_MIN LONG_MIN
# define INTPTR_MAX LONG_MAX
# define UINTPTR_MAX ULONG_MAX
/* 7.18.2.5. Limits of greatest-width integer types */
#ifndef INTMAX_MAX
# undef INTMAX_MIN
# ifdef INT64_MAX
# define INTMAX_MIN INT64_MIN
# define INTMAX_MAX INT64_MAX
# else
# define INTMAX_MIN INT32_MIN
# define INTMAX_MAX INT32_MAX
# ifndef INTMAX_MAX
# undef INTMAX_MIN
# ifdef INT64_MAX
# define INTMAX_MIN INT64_MIN
# define INTMAX_MAX INT64_MAX
# else
# define INTMAX_MIN INT32_MIN
# define INTMAX_MAX INT32_MAX
# endif
# endif
#endif
#ifndef UINTMAX_MAX
# ifdef UINT64_MAX
# define UINTMAX_MAX UINT64_MAX
# else
# define UINTMAX_MAX UINT32_MAX
# ifndef UINTMAX_MAX
# ifdef UINT64_MAX
# define UINTMAX_MAX UINT64_MAX
# else
# define UINTMAX_MAX UINT32_MAX
# endif
# endif
#endif
/* 7.18.3. Limits of other integer types */
/* ptrdiff_t limits */
#undef PTRDIFF_MIN
#undef PTRDIFF_MAX
#if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
# undef PTRDIFF_MIN
# undef PTRDIFF_MAX
# if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l)
# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
# else
# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0)
# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
# endif
# else
# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
# endif
#else
# define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# define PTRDIFF_MAX \
# define PTRDIFF_MIN \
_STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#endif
# endif
/* sig_atomic_t limits */
#undef SIG_ATOMIC_MIN
#undef SIG_ATOMIC_MAX
#define SIG_ATOMIC_MIN \
_STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
#define SIG_ATOMIC_MAX \
# undef SIG_ATOMIC_MIN
# undef SIG_ATOMIC_MAX
# if @HAVE_SIGNED_SIG_ATOMIC_T@
# define SIG_ATOMIC_MIN \
_STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@)
# else
# define SIG_ATOMIC_MIN \
_STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@)
# endif
# define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
/* size_t limit */
#undef SIZE_MAX
#if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
# undef SIZE_MAX
# if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
# else
# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
# endif
# else
# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
# endif
#else
# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
#endif
/* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
@ -543,29 +563,39 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
sequence of nested includes
<wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
# include <stddef.h>
# include <stdio.h>
# include <time.h>
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# include <wchar.h>
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
#endif
#undef WCHAR_MIN
#undef WCHAR_MAX
#define WCHAR_MIN \
_STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
#define WCHAR_MAX \
# include <stddef.h>
# include <stdio.h>
# include <time.h>
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# include <wchar.h>
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# endif
# undef WCHAR_MIN
# undef WCHAR_MAX
# if @HAVE_SIGNED_WCHAR_T@
# define WCHAR_MIN \
_STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
# else
# define WCHAR_MIN \
_STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
# endif
# define WCHAR_MAX \
_STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
/* wint_t limits */
#undef WINT_MIN
#undef WINT_MAX
#define WINT_MIN \
_STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
#define WINT_MAX \
# 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@)
/* 7.18.4. Macros for integer constants */
@ -576,59 +606,120 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
#undef INT8_C
#undef UINT8_C
#define INT8_C(x) x
#define UINT8_C(x) x
# undef INT8_C
# undef UINT8_C
# define INT8_C(x) x
# define UINT8_C(x) x
#undef INT16_C
#undef UINT16_C
#define INT16_C(x) x
#define UINT16_C(x) x
# undef INT16_C
# undef UINT16_C
# define INT16_C(x) x
# define UINT16_C(x) x
#undef INT32_C
#undef UINT32_C
#define INT32_C(x) x
#define UINT32_C(x) x ## U
# undef INT32_C
# undef UINT32_C
# define INT32_C(x) x
# define UINT32_C(x) x ## U
#undef INT64_C
#undef UINT64_C
#if LONG_MAX >> 31 >> 31 == 1
# define INT64_C(x) x##L
#elif defined _MSC_VER
# define INT64_C(x) x##i64
#elif @HAVE_LONG_LONG_INT@
# 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@
# define UINT64_C(x) x##ULL
#endif
# undef INT64_C
# undef UINT64_C
# if LONG_MAX >> 31 >> 31 == 1
# define INT64_C(x) x##L
# elif defined _MSC_VER
# define INT64_C(x) x##i64
# elif @HAVE_LONG_LONG_INT@
# 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@
# 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
# define INTMAX_C(x) x##LL
# elif defined GL_INT64_T
# define INTMAX_C(x) INT64_C(x)
# else
# define INTMAX_C(x) x##L
# ifndef INTMAX_C
# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# define INTMAX_C(x) x##LL
# elif defined GL_INT64_T
# define INTMAX_C(x) INT64_C(x)
# else
# define INTMAX_C(x) x##L
# endif
# endif
#endif
#ifndef UINTMAX_C
# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
# define UINTMAX_C(x) x##ULL
# elif defined GL_UINT64_T
# define UINTMAX_C(x) UINT64_C(x)
# else
# define UINTMAX_C(x) x##UL
# ifndef UINTMAX_C
# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
# define UINTMAX_C(x) x##ULL
# elif defined GL_UINT64_T
# define UINTMAX_C(x) UINT64_C(x)
# else
# define UINTMAX_C(x) x##UL
# endif
# endif
#endif
#endif /* !@HAVE_C99_STDINT_H@ */
/* Macros specified by ISO/IEC TS 18661-1:2014. */
#if (!defined UINTMAX_WIDTH \
&& (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
# ifdef INT8_MAX
# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX)
# endif
# ifdef UINT8_MAX
# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX)
# endif
# ifdef INT16_MAX
# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX)
# endif
# ifdef UINT16_MAX
# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX)
# endif
# ifdef INT32_MAX
# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX)
# endif
# ifdef UINT32_MAX
# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX)
# endif
# ifdef INT64_MAX
# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX)
# endif
# ifdef UINT64_MAX
# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX)
# endif
# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX)
# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX)
# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX)
# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX)
# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX)
# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX)
# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX)
# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX)
# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX)
# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX)
# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX)
# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX)
# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX)
# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX)
# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX)
# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX)
# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX)
# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX)
# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX)
# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX)
# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX)
# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX)
# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX)
# ifdef WINT_MAX
# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX)
# endif
# ifdef SIG_ATOMIC_MAX
# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX)
# endif
#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
#endif /* _@GUARD_PREFIX@_STDINT_H */
#endif /* !(defined __ANDROID__ && ...) */

View File

@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -118,6 +118,26 @@
# include <unistd.h>
#endif
/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include
it before we #define perror rpl_perror. */
/* But in any case avoid namespace pollution on glibc systems. */
#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \
&& ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
&& ! defined __GLIBC__
# include <stdlib.h>
#endif
/* MSVC declares 'remove' in <io.h>, not in <stdio.h>. We must include
it before we #define remove rpl_remove. */
/* MSVC declares 'rename' in <io.h>, not in <stdio.h>. We must include
it before we #define rename rpl_rename. */
/* But in any case avoid namespace pollution on glibc systems. */
#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \
&& ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
&& ! defined __GLIBC__
# include <io.h>
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */

View File

@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc.
Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -521,6 +521,9 @@ _GL_CXXALIASWARN (putenv);
#endif
#if @GNULIB_QSORT_R@
/* Sort an array of NMEMB elements, starting at address BASE, each element
occupying SIZE bytes, in ascending order according to the comparison
function COMPARE. */
# if @REPLACE_QSORT_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef qsort_r
@ -535,12 +538,24 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
void *),
void *arg));
# else
# if !@HAVE_QSORT_R@
_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
int (*compare) (void const *, void const *,
void *),
void *arg) _GL_ARG_NONNULL ((1, 4)));
# endif
_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
int (*compare) (void const *, void const *,
void *),
void *arg));
# endif
_GL_CXXALIASWARN (qsort_r);
#elif defined GNULIB_POSIXCHECK
# undef qsort_r
# if HAVE_RAW_DECL_QSORT_R
_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
"use gnulib module qsort_r for portability");
# endif
#endif

View File

@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.

View File

@ -1,5 +1,5 @@
/* Optimized string comparison.
Copyright (C) 2001-2002, 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2002, 2007, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published

View File

@ -1,5 +1,5 @@
/* Charset conversion.
Copyright (C) 2001-2007, 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2007, 2010-2017 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* Charset conversion.
Copyright (C) 2001-2004, 2006-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2006-2007, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
Copyright (C) 1995-1996, 2001-2016 Free Software Foundation, Inc.
Copyright (C) 1995-1996, 2001-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -416,15 +416,15 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - "
# undef strndup
# define strndup rpl_strndup
# endif
_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
# else
# if ! @HAVE_DECL_STRNDUP@
_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
# endif
_GL_CXXALIASWARN (strndup);
#elif defined GNULIB_POSIXCHECK
@ -444,17 +444,17 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
# undef strnlen
# define strnlen rpl_strnlen
# endif
_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
# else
# if ! @HAVE_DECL_STRNLEN@
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
# endif
_GL_CXXALIASWARN (strnlen);
#elif defined GNULIB_POSIXCHECK

View File

@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc.
This 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