diff options
Diffstat (limited to 'lib')
218 files changed, 12 insertions, 45852 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 26451a5c44..f8dac6716a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -21,9 +21,9 @@ # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA -ACLOCAL_AMFLAGS = -I m4 -I gl/m4 +ACLOCAL_AMFLAGS = -I ../m4 -I ../gl/m4 -SUBDIRS = gl po includes x509 +SUBDIRS = includes x509 if ENABLE_MINITASN1 SUBDIRS += minitasn1 endif @@ -33,10 +33,8 @@ localedir = $(datadir)/locale AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) AM_CPPFLAGS = \ -DLOCALEDIR=\"$(localedir)\" \ - -I$(srcdir)/gl \ - -I$(builddir)/gl \ + -I$(srcdir)/../gl \ -I$(srcdir)/includes \ - -I$(builddir)/includes \ -I$(srcdir)/x509 if ENABLE_OPENPGP @@ -122,7 +120,7 @@ libgnutls_la_SOURCES = $(HFILES) $(COBJECTS) $(SRP_COBJECTS) \ libgnutls_la_LDFLAGS = -no-undefined \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -libgnutls_la_LIBADD = gl/liblgnu.la x509/libgnutls_x509.la \ +libgnutls_la_LIBADD = ../gl/libgnu.la x509/libgnutls_x509.la \ $(LTLIBZ) $(LTLIBINTL) $(LIBSOCKET) if ENABLE_OPENPGP @@ -164,7 +162,7 @@ endif if ENABLE_CXX libgnutlsxx_la_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_builddir)/includes -AM_CXXFLAGS = -I$(top_srcdir)/includes/ +AM_CXXFLAGS = -I$(srcdir)/includes lib_LTLIBRARIES += libgnutlsxx.la diff --git a/lib/configure.ac b/lib/configure.ac deleted file mode 100644 index 1f667734e8..0000000000 --- a/lib/configure.ac +++ /dev/null @@ -1,126 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2009, 2010 Free Software Foundation, Inc. -# -# Author: Nikos Mavrogiannopoulos, Simon Josefsson -# -# This file is part of GnuTLS. -# -# The GnuTLS is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation; either version 2.1 of -# the License, or (at your option) any later version. -# -# The GnuTLS is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with GnuTLS; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA - -AC_PREREQ(2.61) -AC_INIT([libgnutls], [2.11.7], [bug-gnutls@gnu.org]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) - -AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AM_CONFIG_HEADER(config.h) - -AC_PROG_CC -lgl_EARLY - -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL - -LIBGNUTLS_HOOKS - -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.17]) - -AC_C_BIGENDIAN - -# For includes/gnutls/gnutls.h.in. -AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`) -AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`) -AC_SUBST(PATCH_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\..*\.\(.*\)/\1/g'`) -AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`) -AC_CHECK_TYPE(ssize_t, - [ - DEFINE_SSIZE_T="#include <sys/types.h>" - AC_SUBST(DEFINE_SSIZE_T) - ], [ - AC_DEFINE(NO_SSIZE_T, 1, [no ssize_t type was found]) - DEFINE_SSIZE_T="typedef int ssize_t;" - AC_SUBST(DEFINE_SSIZE_T) - ], [ - #include <sys/types.h> - ]) - -# For minitasn1. -AC_CHECK_SIZEOF(unsigned long int, 4) -AC_CHECK_SIZEOF(unsigned int, 4) - -AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib], - [disable zlib compression support]), - ac_zlib=$withval, ac_zlib=yes) -AC_MSG_CHECKING([whether to include zlib compression support]) -if test x$ac_zlib != xno; then - AC_MSG_RESULT(yes) - AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);]) - if test "$ac_cv_libz" != yes; then - AC_MSG_WARN( -*** -*** ZLIB was not found. You will not be able to use ZLIB compression.) - fi -else - AC_MSG_RESULT(no) -fi - -if test x$ac_zlib != xno; then - if test x$GNUTLS_REQUIRES_PRIVATE = x; then - GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib" - else - GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE , zlib" - fi -fi -AC_SUBST(GNUTLS_REQUIRES_PRIVATE) - -lgl_INIT - -AC_CHECK_FUNCS(getrusage,,) -AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);]) - -LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS" -LIBGNUTLS_CFLAGS="-I${includedir}" -AC_SUBST(LIBGNUTLS_LIBS) -AC_SUBST(LIBGNUTLS_CFLAGS) - -# Finish things from ../configure.ac. -AC_SUBST([WERROR_CFLAGS]) -AC_SUBST([WSTACK_CFLAGS]) -AC_SUBST([WARN_CFLAGS]) -AC_PROG_CXX -AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no") - -AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.]) - -AC_CONFIG_FILES([ - Makefile - gnutls.pc - gl/Makefile - gl/tests/Makefile - includes/Makefile - includes/gnutls/gnutls.h - minitasn1/Makefile - opencdk/Makefile - openpgp/Makefile - po/Makefile.in - x509/Makefile - gcrypt/Makefile - nettle/Makefile -]) -AC_OUTPUT diff --git a/lib/gcrypt/Makefile.am b/lib/gcrypt/Makefile.am index 5a78b92f25..d01559b9f5 100644 --- a/lib/gcrypt/Makefile.am +++ b/lib/gcrypt/Makefile.am @@ -23,8 +23,7 @@ AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) AM_CPPFLAGS = \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ + -I$(srcdir)/../../gl \ -I$(srcdir)/../includes \ -I$(builddir)/../includes \ -I$(srcdir)/.. diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am deleted file mode 100644 index 210ceccd67..0000000000 --- a/lib/gl/Makefile.am +++ /dev/null @@ -1,1193 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2010 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf - -AUTOMAKE_OPTIONS = 1.5 gnits - -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = -noinst_LTLIBRARIES = -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = -SUBDIRS += tests -EXTRA_DIST += m4/gnulib-cache.m4 - -AM_CPPFLAGS = -AM_CFLAGS = - -noinst_LTLIBRARIES += liblgnu.la - -liblgnu_la_SOURCES = -liblgnu_la_LIBADD = $(lgl_LTLIBOBJS) -liblgnu_la_DEPENDENCIES = $(lgl_LTLIBOBJS) -EXTRA_liblgnu_la_SOURCES = -liblgnu_la_LDFLAGS = $(AM_LDFLAGS) -liblgnu_la_LDFLAGS += -no-undefined -liblgnu_la_LDFLAGS += $(LIBSOCKET) -liblgnu_la_LDFLAGS += $(LTLIBINTL) - -## begin gnulib module alignof - - -EXTRA_DIST += alignof.h - -## end gnulib module alignof - -## begin gnulib module alloca-opt - -BUILT_SOURCES += $(ALLOCA_H) - -# We need the following in order to create <alloca.h> when the system -# doesn't have one that works with the given compiler. -alloca.h: alloca.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += alloca.h alloca.h-t - -EXTRA_DIST += alloca.in.h - -## end gnulib module alloca-opt - -## begin gnulib module 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. - -BUILT_SOURCES += arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t - -ARG_NONNULL_H=arg-nonnull.h - -EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h - -## end gnulib module arg-nonnull - -## begin gnulib module byteswap - -BUILT_SOURCES += $(BYTESWAP_H) - -# We need the following in order to create <byteswap.h> when the system -# doesn't have one. -byteswap.h: byteswap.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/byteswap.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += byteswap.h byteswap.h-t - -EXTRA_DIST += byteswap.in.h - -## end gnulib module byteswap - -## begin gnulib module 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. - -BUILT_SOURCES += c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += c++defs.h c++defs.h-t - -CXXDEFS_H=c++defs.h - -EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h - -## end gnulib module c++defs - -## begin gnulib module c-ctype - -liblgnu_la_SOURCES += c-ctype.h c-ctype.c - -## end gnulib module c-ctype - -## begin gnulib module close-hook - -liblgnu_la_SOURCES += close-hook.c - -EXTRA_DIST += close-hook.h - -## end gnulib module close-hook - -## begin gnulib module errno - -BUILT_SOURCES += $(ERRNO_H) - -# We need the following in order to create <errno.h> when the system -# doesn't have one that is POSIX compliant. -errno.h: errno.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ - -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ - -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ - -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ - -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ - -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ - -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += errno.h errno.h-t - -EXTRA_DIST += errno.in.h - -## end gnulib module errno - -## begin gnulib module float - -BUILT_SOURCES += $(FLOAT_H) - -# We need the following in order to create <float.h> when the system -# doesn't have one that works with the given compiler. -float.h: float.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ - < $(srcdir)/float.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += float.h float.h-t - -EXTRA_DIST += float.in.h - -## end gnulib module float - -## begin gnulib module fseeko - - -EXTRA_DIST += fseeko.c stdio-impl.h - -EXTRA_liblgnu_la_SOURCES += fseeko.c - -## end gnulib module fseeko - -## begin gnulib module ftello - - -EXTRA_DIST += ftello.c stdio-impl.h - -EXTRA_liblgnu_la_SOURCES += ftello.c - -## end gnulib module ftello - -## begin gnulib module gettext - -# This is for those projects which use "gettextize --intl" to put a source-code -# copy of libintl into their package. In such projects, every Makefile.am needs -# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory. -# For the Makefile.ams in other directories it is the maintainer's -# responsibility; for the one from gnulib we do it here. -# This option has no effect when the user disables NLS (because then the intl -# directory contains no libintl.h file) or when the project does not use -# "gettextize --intl". -AM_CPPFLAGS += -I$(top_builddir)/intl - -EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath - -## end gnulib module gettext - -## begin gnulib module gettext-h - -liblgnu_la_SOURCES += gettext.h - -## end gnulib module gettext-h - -## begin gnulib module havelib - - -EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath - -## end gnulib module havelib - -## begin gnulib module lseek - - -EXTRA_DIST += lseek.c - -EXTRA_liblgnu_la_SOURCES += lseek.c - -## end gnulib module lseek - -## begin gnulib module malloc-posix - - -EXTRA_DIST += malloc.c - -EXTRA_liblgnu_la_SOURCES += malloc.c - -## end gnulib module malloc-posix - -## begin gnulib module memchr - - -EXTRA_DIST += memchr.c memchr.valgrind - -EXTRA_liblgnu_la_SOURCES += memchr.c - -## end gnulib module memchr - -## begin gnulib module memmem-simple - - -EXTRA_DIST += memmem.c str-two-way.h - -EXTRA_liblgnu_la_SOURCES += memmem.c - -## end gnulib module memmem-simple - -## begin gnulib module minmax - -liblgnu_la_SOURCES += minmax.h - -## end gnulib module minmax - -## begin gnulib module netdb - -BUILT_SOURCES += netdb.h - -# We need the following in order to create <netdb.h> when the system -# doesn't have one that works with the given compiler. -netdb.h: netdb.in.h $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -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_NETDB_H''@|$(NEXT_NETDB_H)|g' \ - -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ - -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \ - -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \ - -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \ - -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \ - -e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \ - -e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/netdb.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += netdb.h netdb.h-t - -EXTRA_DIST += netdb.in.h - -## end gnulib module netdb - -## begin gnulib module read-file - - -EXTRA_DIST += read-file.c read-file.h - -EXTRA_liblgnu_la_SOURCES += read-file.c - -## end gnulib module read-file - -## begin gnulib module realloc-posix - - -EXTRA_DIST += realloc.c - -EXTRA_liblgnu_la_SOURCES += realloc.c - -## end gnulib module realloc-posix - -## begin gnulib module size_max - -liblgnu_la_SOURCES += size_max.h - -## end gnulib module size_max - -## begin gnulib module snprintf - - -EXTRA_DIST += snprintf.c - -EXTRA_liblgnu_la_SOURCES += snprintf.c - -## end gnulib module snprintf - -## begin gnulib module sockets - -liblgnu_la_SOURCES += sockets.h sockets.c - -EXTRA_DIST += w32sock.h - -## end gnulib module sockets - -## begin gnulib module stdbool - -BUILT_SOURCES += $(STDBOOL_H) - -# We need the following in order to create <stdbool.h> when the system -# doesn't have one that works. -stdbool.h: stdbool.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdbool.h stdbool.h-t - -EXTRA_DIST += stdbool.in.h - -## end gnulib module stdbool - -## begin gnulib module stddef - -BUILT_SOURCES += $(STDDEF_H) - -# We need the following in order to create <stddef.h> when the system -# doesn't have one that works with the given compiler. -stddef.h: stddef.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stddef.h stddef.h-t - -EXTRA_DIST += stddef.in.h - -## end gnulib module stddef - -## begin gnulib module stdint - -BUILT_SOURCES += $(STDINT_H) - -# We need the following in order to create <stdint.h> when the system -# doesn't have one that works with the given compiler. -stdint.h: stdint.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_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' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -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' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdint.h stdint.h-t - -EXTRA_DIST += stdint.in.h - -## end gnulib module stdint - -## begin gnulib module stdio - -BUILT_SOURCES += stdio.h - -# We need the following in order to create <stdio.h> when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ - -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ - -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ - -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ - -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ - -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ - -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ - -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ - -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ - -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ - -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ - -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ - -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ - -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ - -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ - -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ - -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ - -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ - -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ - -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ - -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ - -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ - -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ - -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ - -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ - -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ - -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ - -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ - -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ - -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|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)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdio.h stdio.h-t - -EXTRA_DIST += stdio-write.c stdio.in.h - -EXTRA_liblgnu_la_SOURCES += stdio-write.c - -## end gnulib module stdio - -## begin gnulib module stdlib - -BUILT_SOURCES += stdlib.h - -# We need the following in order to create <stdlib.h> when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ - -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ - -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ - -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ - -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ - -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ - -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ - -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ - -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ - -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ - -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ - -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ - -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ - -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ - -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ - -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ - -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ - -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ - -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ - -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ - -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ - -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ - -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ - -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ - -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ - -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/stdlib.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdlib.h stdlib.h-t - -EXTRA_DIST += stdlib.in.h - -## end gnulib module stdlib - -## begin gnulib module strcase - - -EXTRA_DIST += strcasecmp.c strncasecmp.c - -EXTRA_liblgnu_la_SOURCES += strcasecmp.c strncasecmp.c - -## end gnulib module strcase - -## begin gnulib module string - -BUILT_SOURCES += string.h - -# We need the following in order to create <string.h> when the system -# doesn't have one that works with the given compiler. -string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ - -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ - -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ - -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ - -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ - -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ - -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ - -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ - -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ - -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ - -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ - -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ - -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ - -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ - -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ - -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ - -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ - -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ - -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ - -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ - -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ - -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ - -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ - -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \ - -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ - -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ - -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ - -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ - -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ - -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ - -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ - -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ - -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \ - -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ - -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ - < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ - -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ - -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ - -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ - -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ - -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ - -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ - -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ - -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ - -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ - -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ - -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ - -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ - -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ - -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ - -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ - -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ - -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ - -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ - -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ - -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += string.h string.h-t - -EXTRA_DIST += string.in.h - -## end gnulib module string - -## begin gnulib module strings - -BUILT_SOURCES += strings.h - -# We need the following in order to create <strings.h> when the system -# doesn't have one that works with the given compiler. -strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ - -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ - -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/strings.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += strings.h strings.h-t - -EXTRA_DIST += strings.in.h - -## end gnulib module strings - -## begin gnulib module strverscmp - - -EXTRA_DIST += strverscmp.c - -EXTRA_liblgnu_la_SOURCES += strverscmp.c - -## end gnulib module strverscmp - -## begin gnulib module sys_socket - -BUILT_SOURCES += sys/socket.h - -# We need the following in order to create <sys/socket.h> when the system -# doesn't have one that works with the given compiler. -sys/socket.h: sys_socket.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -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_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ - -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ - -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ - -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ - -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ - -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ - -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ - -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ - -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ - -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ - -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ - -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ - -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ - -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ - -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ - -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ - -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ - -e 's|@''GNULIB_ACCEPT4''@|$(GNULIB_ACCEPT4)|g' \ - -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ - -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ - -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ - -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ - -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ - -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_socket.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_socket.in.h - -## end gnulib module sys_socket - -## begin gnulib module sys_stat - -BUILT_SOURCES += sys/stat.h - -# We need the following in order to create <sys/stat.h> when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -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_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ - -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ - -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ - -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ - -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ - -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ - -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ - -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ - -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ - -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ - -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ - -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_stat.in.h - -## end gnulib module sys_stat - -## begin gnulib module time - -BUILT_SOURCES += time.h - -# We need the following in order to create <time.h> when the system -# doesn't have one that works with the given compiler. -time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -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_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ - -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|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|@''HAVE_LOCALTIME_R''@|$(HAVE_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|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|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' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += time.h time.h-t - -EXTRA_DIST += time.in.h - -## end gnulib module time - -## begin gnulib module time_r - - -EXTRA_DIST += time_r.c - -EXTRA_liblgnu_la_SOURCES += time_r.c - -## end gnulib module time_r - -## begin gnulib module unistd - -BUILT_SOURCES += unistd.h - -# We need the following in order to create an empty placeholder for -# <unistd.h> when the system doesn't have one. -unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ - -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ - -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ - -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ - -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ - -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ - -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ - -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ - -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ - -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ - -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ - -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ - -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ - -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ - -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ - -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ - -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ - -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ - -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ - -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ - -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ - -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ - -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ - -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ - -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ - -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ - -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ - -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ - -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ - -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ - -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ - -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ - -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ - -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ - -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ - -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ - -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ - -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ - -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -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_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_TTYNAME_R''@|$(HAVE_TTYNAME_R)|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_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|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' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|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)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unistd.h unistd.h-t - -EXTRA_DIST += unistd.in.h - -## end gnulib module unistd - -## begin gnulib module vasnprintf - - -EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h - -EXTRA_liblgnu_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c - -## end gnulib module vasnprintf - -## begin gnulib module vasprintf - - -EXTRA_DIST += asprintf.c vasprintf.c - -EXTRA_liblgnu_la_SOURCES += asprintf.c vasprintf.c - -## end gnulib module vasprintf - -## begin gnulib module verify - -liblgnu_la_SOURCES += verify.h - -## end gnulib module verify - -## begin gnulib module vsnprintf - - -EXTRA_DIST += vsnprintf.c - -EXTRA_liblgnu_la_SOURCES += vsnprintf.c - -## end gnulib module vsnprintf - -## begin gnulib module 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/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h - -## end gnulib module warn-on-use - -## begin gnulib module wchar - -BUILT_SOURCES += wchar.h - -# We need the following in order to create <wchar.h> when the system -# version does not work standalone. -wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -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|@''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|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ - -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ - -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ - -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ - -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ - -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ - -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ - -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ - -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ - -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ - -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ - -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ - -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ - -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ - -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ - -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ - -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ - -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ - -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ - -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ - -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ - -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ - -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ - -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ - -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ - -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ - -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ - -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ - -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wchar.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += wchar.h wchar.h-t - -EXTRA_DIST += wchar.in.h - -## end gnulib module wchar - -## begin gnulib module xsize - -liblgnu_la_SOURCES += xsize.h - -## end gnulib module xsize - - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/lib/gl/alignof.h b/lib/gl/alignof.h deleted file mode 100644 index d65dd648b2..0000000000 --- a/lib/gl/alignof.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Determine alignment of types. - Copyright (C) 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _ALIGNOF_H -#define _ALIGNOF_H - -#include <stddef.h> - -/* Determine the alignment of a structure slot (field) of a given type, - at compile time. Note that the result depends on the ABI. - Note: The result cannot be used as a value for an 'enum' constant, - due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ -#if defined __cplusplus - template <class type> struct alignof_helper { char __slot1; type __slot2; }; -# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2) -#else -# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) -#endif - -/* Determine the good alignment of a object of the given type at compile time. - Note that this is not necessarily the same as alignof_slot(type). - For example, with GNU C on x86 platforms: alignof_type(double) = 8, but - - when -malign-double is not specified: alignof_slot(double) = 4, - - when -malign-double is specified: alignof_slot(double) = 8. - Note: The result cannot be used as a value for an 'enum' constant, - due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ -#if defined __GNUC__ -# define alignof_type __alignof__ -#else -# define alignof_type alignof_slot -#endif - -/* alignof is an alias for alignof_slot semantics, since that's what most - callers need. - Note: The result cannot be used as a value for an 'enum' constant, - due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ -#define alignof alignof_slot - -#endif /* _ALIGNOF_H */ diff --git a/lib/gl/alloca.in.h b/lib/gl/alloca.in.h deleted file mode 100644 index cdb7366cdf..0000000000 --- a/lib/gl/alloca.in.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Memory allocation on the stack. - - Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation, - Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2.1, 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 Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - -/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H - means there is a real alloca function. */ -#ifndef _GL_ALLOCA_H -#define _GL_ALLOCA_H - -/* alloca (N) returns a pointer to N bytes of memory - allocated on the stack, which will last until the function returns. - Use of alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns, - - for huge N (say, N >= 65536) - you never know how large (or small) - the stack is, and when the stack cannot fulfill the memory allocation - request, the program just crashes. - */ - -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _AIX -# define alloca __alloca -# elif defined _MSC_VER -# include <malloc.h> -# define alloca _alloca -# elif defined __DECC && defined __VMS -# define alloca __ALLOCA -# else -# include <stddef.h> -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -# endif -#endif - -#endif /* _GL_ALLOCA_H */ diff --git a/lib/gl/asnprintf.c b/lib/gl/asnprintf.c deleted file mode 100644 index 75f519bc34..0000000000 --- a/lib/gl/asnprintf.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999, 2002, 2006, 2009, 2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#include "vasnprintf.h" - -#include <stdarg.h> - -char * -asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) -{ - va_list args; - char *result; - - va_start (args, format); - result = vasnprintf (resultbuf, lengthp, format, args); - va_end (args); - return result; -} diff --git a/lib/gl/asprintf.c b/lib/gl/asprintf.c deleted file mode 100644 index 5e74dd0daa..0000000000 --- a/lib/gl/asprintf.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation, - Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#ifdef IN_LIBASPRINTF -# include "vasprintf.h" -#else -# include <stdio.h> -#endif - -#include <stdarg.h> - -int -asprintf (char **resultp, const char *format, ...) -{ - va_list args; - int result; - - va_start (args, format); - result = vasprintf (resultp, format, args); - va_end (args); - return result; -} diff --git a/lib/gl/byteswap.in.h b/lib/gl/byteswap.in.h deleted file mode 100644 index f245fbdc49..0000000000 --- a/lib/gl/byteswap.in.h +++ /dev/null @@ -1,44 +0,0 @@ -/* byteswap.h - Byte swapping - Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. - Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#ifndef _GL_BYTESWAP_H -#define _GL_BYTESWAP_H - -/* Given an unsigned 16-bit argument X, return the value corresponding to - X with reversed byte order. */ -#define bswap_16(x) ((((x) & 0x00FF) << 8) | \ - (((x) & 0xFF00) >> 8)) - -/* Given an unsigned 32-bit argument X, return the value corresponding to - X with reversed byte order. */ -#define bswap_32(x) ((((x) & 0x000000FF) << 24) | \ - (((x) & 0x0000FF00) << 8) | \ - (((x) & 0x00FF0000) >> 8) | \ - (((x) & 0xFF000000) >> 24)) - -/* Given an unsigned 64-bit argument X, return the value corresponding to - X with reversed byte order. */ -#define bswap_64(x) ((((x) & 0x00000000000000FFULL) << 56) | \ - (((x) & 0x000000000000FF00ULL) << 40) | \ - (((x) & 0x0000000000FF0000ULL) << 24) | \ - (((x) & 0x00000000FF000000ULL) << 8) | \ - (((x) & 0x000000FF00000000ULL) >> 8) | \ - (((x) & 0x0000FF0000000000ULL) >> 24) | \ - (((x) & 0x00FF000000000000ULL) >> 40) | \ - (((x) & 0xFF00000000000000ULL) >> 56)) - -#endif /* _GL_BYTESWAP_H */ diff --git a/lib/gl/c-ctype.c b/lib/gl/c-ctype.c deleted file mode 100644 index 9da8e58131..0000000000 --- a/lib/gl/c-ctype.c +++ /dev/null @@ -1,396 +0,0 @@ -/* Character handling in C locale. - - Copyright 2000-2003, 2006, 2009-2010 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#define NO_C_CTYPE_MACROS -#include "c-ctype.h" - -/* The function isascii is not locale dependent. Its use in EBCDIC is - questionable. */ -bool -c_isascii (int c) -{ - return (c >= 0x00 && c <= 0x7f); -} - -bool -c_isalnum (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); -#else - return ((c >= '0' && c <= '9') - || (c >= 'A' && c <= 'Z') - || (c >= 'a' && c <= 'z')); -#endif -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isalpha (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); -#else - return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); -#endif -#else - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isblank (int c) -{ - return (c == ' ' || c == '\t'); -} - -bool -c_iscntrl (int c) -{ -#if C_CTYPE_ASCII - return ((c & ~0x1f) == 0 || c == 0x7f); -#else - switch (c) - { - case ' ': case '!': case '"': case '#': case '$': case '%': - case '&': case '\'': case '(': case ')': case '*': case '+': - case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 0; - default: - return 1; - } -#endif -} - -bool -c_isdigit (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS - return (c >= '0' && c <= '9'); -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - return 1; - default: - return 0; - } -#endif -} - -bool -c_islower (int c) -{ -#if C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'a' && c <= 'z'); -#else - switch (c) - { - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isgraph (int c) -{ -#if C_CTYPE_ASCII - return (c >= '!' && c <= '~'); -#else - switch (c) - { - case '!': case '"': case '#': case '$': case '%': case '&': - case '\'': case '(': case ')': case '*': case '+': case ',': - case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isprint (int c) -{ -#if C_CTYPE_ASCII - return (c >= ' ' && c <= '~'); -#else - switch (c) - { - case ' ': case '!': case '"': case '#': case '$': case '%': - case '&': case '\'': case '(': case ')': case '*': case '+': - case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_ispunct (int c) -{ -#if C_CTYPE_ASCII - return ((c >= '!' && c <= '~') - && !((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); -#else - switch (c) - { - case '!': case '"': case '#': case '$': case '%': case '&': - case '\'': case '(': case ')': case '*': case '+': case ',': - case '-': case '.': case '/': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case '[': case '\\': case ']': case '^': case '_': case '`': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isspace (int c) -{ - return (c == ' ' || c == '\t' - || c == '\n' || c == '\v' || c == '\f' || c == '\r'); -} - -bool -c_isupper (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE - return (c >= 'A' && c <= 'Z'); -#else - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isxdigit (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); -#else - return ((c >= '0' && c <= '9') - || (c >= 'A' && c <= 'F') - || (c >= 'a' && c <= 'f')); -#endif -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - return 1; - default: - return 0; - } -#endif -} - -int -c_tolower (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); -#else - switch (c) - { - case 'A': return 'a'; - case 'B': return 'b'; - case 'C': return 'c'; - case 'D': return 'd'; - case 'E': return 'e'; - case 'F': return 'f'; - case 'G': return 'g'; - case 'H': return 'h'; - case 'I': return 'i'; - case 'J': return 'j'; - case 'K': return 'k'; - case 'L': return 'l'; - case 'M': return 'm'; - case 'N': return 'n'; - case 'O': return 'o'; - case 'P': return 'p'; - case 'Q': return 'q'; - case 'R': return 'r'; - case 'S': return 's'; - case 'T': return 't'; - case 'U': return 'u'; - case 'V': return 'v'; - case 'W': return 'w'; - case 'X': return 'x'; - case 'Y': return 'y'; - case 'Z': return 'z'; - default: return c; - } -#endif -} - -int -c_toupper (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); -#else - switch (c) - { - case 'a': return 'A'; - case 'b': return 'B'; - case 'c': return 'C'; - case 'd': return 'D'; - case 'e': return 'E'; - case 'f': return 'F'; - case 'g': return 'G'; - case 'h': return 'H'; - case 'i': return 'I'; - case 'j': return 'J'; - case 'k': return 'K'; - case 'l': return 'L'; - case 'm': return 'M'; - case 'n': return 'N'; - case 'o': return 'O'; - case 'p': return 'P'; - case 'q': return 'Q'; - case 'r': return 'R'; - case 's': return 'S'; - case 't': return 'T'; - case 'u': return 'U'; - case 'v': return 'V'; - case 'w': return 'W'; - case 'x': return 'X'; - case 'y': return 'Y'; - case 'z': return 'Z'; - default: return c; - } -#endif -} diff --git a/lib/gl/c-ctype.h b/lib/gl/c-ctype.h deleted file mode 100644 index 5ac5dd25e7..0000000000 --- a/lib/gl/c-ctype.h +++ /dev/null @@ -1,295 +0,0 @@ -/* Character handling in C locale. - - These functions work like the corresponding functions in <ctype.h>, - except that they have the C (POSIX) locale hardwired, whereas the - <ctype.h> functions' behaviour depends on the current locale set via - setlocale. - - Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef C_CTYPE_H -#define C_CTYPE_H - -#include <stdbool.h> - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* The functions defined in this file assume the "C" locale and a character - set without diacritics (ASCII-US or EBCDIC-US or something like that). - Even if the "C" locale on a particular system is an extension of the ASCII - character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it - is ISO-8859-1), the functions in this file recognize only the ASCII - characters. */ - - -/* Check whether the ASCII optimizations apply. */ - -/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that - '0', '1', ..., '9' have consecutive integer values. */ -#define C_CTYPE_CONSECUTIVE_DIGITS 1 - -#if ('A' <= 'Z') \ - && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ - && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ - && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ - && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ - && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ - && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ - && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ - && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ - && ('Y' + 1 == 'Z') -#define C_CTYPE_CONSECUTIVE_UPPERCASE 1 -#endif - -#if ('a' <= 'z') \ - && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ - && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ - && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ - && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ - && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ - && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ - && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ - && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ - && ('y' + 1 == 'z') -#define C_CTYPE_CONSECUTIVE_LOWERCASE 1 -#endif - -#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) -/* The character set is ASCII or one of its variants or extensions, not EBCDIC. - Testing the value of '\n' and '\r' is not relevant. */ -#define C_CTYPE_ASCII 1 -#endif - - -/* Function declarations. */ - -/* Unlike the functions in <ctype.h>, which require an argument in the range - of the 'unsigned char' type, the functions here operate on values that are - in the 'unsigned char' range or in the 'char' range. In other words, - when you have a 'char' value, you need to cast it before using it as - argument to a <ctype.h> function: - - const char *s = ...; - if (isalpha ((unsigned char) *s)) ... - - but you don't need to cast it for the functions defined in this file: - - const char *s = ...; - if (c_isalpha (*s)) ... - */ - -extern bool c_isascii (int c); /* not locale dependent */ - -extern bool c_isalnum (int c); -extern bool c_isalpha (int c); -extern bool c_isblank (int c); -extern bool c_iscntrl (int c); -extern bool c_isdigit (int c); -extern bool c_islower (int c); -extern bool c_isgraph (int c); -extern bool c_isprint (int c); -extern bool c_ispunct (int c); -extern bool c_isspace (int c); -extern bool c_isupper (int c); -extern bool c_isxdigit (int c); - -extern int c_tolower (int c); -extern int c_toupper (int c); - - -#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS - -/* ASCII optimizations. */ - -#undef c_isascii -#define c_isascii(c) \ - ({ int __c = (c); \ - (__c >= 0x00 && __c <= 0x7f); \ - }) - -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isalnum -#define c_isalnum(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ - }) -#else -#undef c_isalnum -#define c_isalnum(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || (__c >= 'A' && __c <= 'Z') \ - || (__c >= 'a' && __c <= 'z')); \ - }) -#endif -#endif - -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isalpha -#define c_isalpha(c) \ - ({ int __c = (c); \ - ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ - }) -#else -#undef c_isalpha -#define c_isalpha(c) \ - ({ int __c = (c); \ - ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ - }) -#endif -#endif - -#undef c_isblank -#define c_isblank(c) \ - ({ int __c = (c); \ - (__c == ' ' || __c == '\t'); \ - }) - -#if C_CTYPE_ASCII -#undef c_iscntrl -#define c_iscntrl(c) \ - ({ int __c = (c); \ - ((__c & ~0x1f) == 0 || __c == 0x7f); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_DIGITS -#undef c_isdigit -#define c_isdigit(c) \ - ({ int __c = (c); \ - (__c >= '0' && __c <= '9'); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_LOWERCASE -#undef c_islower -#define c_islower(c) \ - ({ int __c = (c); \ - (__c >= 'a' && __c <= 'z'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_isgraph -#define c_isgraph(c) \ - ({ int __c = (c); \ - (__c >= '!' && __c <= '~'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_isprint -#define c_isprint(c) \ - ({ int __c = (c); \ - (__c >= ' ' && __c <= '~'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_ispunct -#define c_ispunct(c) \ - ({ int _c = (c); \ - (c_isgraph (_c) && ! c_isalnum (_c)); \ - }) -#endif - -#undef c_isspace -#define c_isspace(c) \ - ({ int __c = (c); \ - (__c == ' ' || __c == '\t' \ - || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ - }) - -#if C_CTYPE_CONSECUTIVE_UPPERCASE -#undef c_isupper -#define c_isupper(c) \ - ({ int __c = (c); \ - (__c >= 'A' && __c <= 'Z'); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isxdigit -#define c_isxdigit(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ - }) -#else -#undef c_isxdigit -#define c_isxdigit(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || (__c >= 'A' && __c <= 'F') \ - || (__c >= 'a' && __c <= 'f')); \ - }) -#endif -#endif - -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#undef c_tolower -#define c_tolower(c) \ - ({ int __c = (c); \ - (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ - }) -#undef c_toupper -#define c_toupper(c) \ - ({ int __c = (c); \ - (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ - }) -#endif - -#endif /* optimizing for speed */ - - -#ifdef __cplusplus -} -#endif - -#endif /* C_CTYPE_H */ diff --git a/lib/gl/close-hook.c b/lib/gl/close-hook.c deleted file mode 100644 index 34ef8763db..0000000000 --- a/lib/gl/close-hook.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Hook for making the close() function extensible. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. - Written by Bruno Haible <bruno@clisp.org>, 2009. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#include <config.h> - -/* Specification. */ -#include "close-hook.h" - -#include <stdlib.h> -#include <unistd.h> - -#undef close - - -/* Currently, this entire code is only needed for the handling of sockets - on native Windows platforms. */ -#if WINDOWS_SOCKETS - -/* The first and last link in the doubly linked list. - Initially the list is empty. */ -static struct close_hook anchor = { &anchor, &anchor, NULL }; - -int -execute_close_hooks (int fd, const struct close_hook *remaining_list) -{ - if (remaining_list == &anchor) - /* End of list reached. */ - return close (fd); - else - return remaining_list->private_fn (fd, remaining_list->private_next); -} - -int -execute_all_close_hooks (int fd) -{ - return execute_close_hooks (fd, anchor.private_next); -} - -void -register_close_hook (close_hook_fn hook, struct close_hook *link) -{ - if (link->private_next == NULL && link->private_prev == NULL) - { - /* Add the link to the doubly linked list. */ - link->private_next = anchor.private_next; - link->private_prev = &anchor; - link->private_fn = hook; - anchor.private_next->private_prev = link; - anchor.private_next = link; - } - else - { - /* The link is already in use. */ - if (link->private_fn != hook) - abort (); - } -} - -void -unregister_close_hook (struct close_hook *link) -{ - struct close_hook *next = link->private_next; - struct close_hook *prev = link->private_prev; - - if (next != NULL && prev != NULL) - { - /* The link is in use. Remove it from the doubly linked list. */ - prev->private_next = next; - next->private_prev = prev; - /* Clear the link, to mark it unused. */ - link->private_next = NULL; - link->private_prev = NULL; - link->private_fn = NULL; - } -} - -#endif diff --git a/lib/gl/close-hook.h b/lib/gl/close-hook.h deleted file mode 100644 index cda7742ee0..0000000000 --- a/lib/gl/close-hook.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Hook for making the close() function extensible. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - - -#ifndef CLOSE_HOOK_H -#define CLOSE_HOOK_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Currently, this entire code is only needed for the handling of sockets - on native Windows platforms. */ -#if WINDOWS_SOCKETS - - -/* An element of the list of close hooks. - The fields of this structure are considered private. */ -struct close_hook -{ - /* Doubly linked list. */ - struct close_hook *private_next; - struct close_hook *private_prev; - /* Function that treats the types of FD that it knows about and calls - execute_close_hooks (FD, REMAINING_LIST) as a fallback. */ - int (*private_fn) (int fd, const struct close_hook *remaining_list); -}; - -/* This type of function closes FD, applying special knowledge for the FD - types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST) - for the other FD types. */ -typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list); - -/* Execute the close hooks in REMAINING_LIST. - Return 0 or -1, like close() would do. */ -extern int execute_close_hooks (int fd, const struct close_hook *remaining_list); - -/* Execute all close hooks. - Return 0 or -1, like close() would do. */ -extern int execute_all_close_hooks (int fd); - -/* Add a function to the list of close hooks. - The LINK variable points to a piece of memory which is guaranteed to be - accessible until the corresponding call to unregister_close_hook. */ -extern void register_close_hook (close_hook_fn hook, struct close_hook *link); - -/* Removes a function from the list of close hooks. */ -extern void unregister_close_hook (struct close_hook *link); - - -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* CLOSE_HOOK_H */ diff --git a/lib/gl/errno.in.h b/lib/gl/errno.in.h deleted file mode 100644 index 4994ebfa48..0000000000 --- a/lib/gl/errno.in.h +++ /dev/null @@ -1,167 +0,0 @@ -/* A POSIX-like <errno.h>. - - Copyright (C) 2008-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_ERRNO_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_ERRNO_H@ - -#ifndef _GL_ERRNO_H -#define _GL_ERRNO_H - - -/* On native Windows platforms, many macros are not defined. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ -# define EWOULDBLOCK EAGAIN - -/* Values >= 100 seem safe to use. */ -# define ETXTBSY 100 -# define GNULIB_defined_ETXTBSY 1 - -/* These are intentionally the same values as the WSA* error numbers, defined - in <winsock2.h>. */ -# define EINPROGRESS 10036 -# define EALREADY 10037 -# define ENOTSOCK 10038 -# define EDESTADDRREQ 10039 -# define EMSGSIZE 10040 -# define EPROTOTYPE 10041 -# define ENOPROTOOPT 10042 -# define EPROTONOSUPPORT 10043 -# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ -# define EOPNOTSUPP 10045 -# define EPFNOSUPPORT 10046 /* not required by POSIX */ -# define EAFNOSUPPORT 10047 -# define EADDRINUSE 10048 -# define EADDRNOTAVAIL 10049 -# define ENETDOWN 10050 -# define ENETUNREACH 10051 -# define ENETRESET 10052 -# define ECONNABORTED 10053 -# define ECONNRESET 10054 -# define ENOBUFS 10055 -# define EISCONN 10056 -# define ENOTCONN 10057 -# define ESHUTDOWN 10058 /* not required by POSIX */ -# define ETOOMANYREFS 10059 /* not required by POSIX */ -# define ETIMEDOUT 10060 -# define ECONNREFUSED 10061 -# define ELOOP 10062 -# define EHOSTDOWN 10064 /* not required by POSIX */ -# define EHOSTUNREACH 10065 -# define EPROCLIM 10067 /* not required by POSIX */ -# define EUSERS 10068 /* not required by POSIX */ -# define EDQUOT 10069 -# define ESTALE 10070 -# define EREMOTE 10071 /* not required by POSIX */ -# define GNULIB_defined_ESOCK 1 - -# endif - - -/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros - EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ -# if @EMULTIHOP_HIDDEN@ -# define EMULTIHOP @EMULTIHOP_VALUE@ -# define GNULIB_defined_EMULTIHOP 1 -# endif -# if @ENOLINK_HIDDEN@ -# define ENOLINK @ENOLINK_VALUE@ -# define GNULIB_defined_ENOLINK 1 -# endif -# if @EOVERFLOW_HIDDEN@ -# define EOVERFLOW @EOVERFLOW_VALUE@ -# define GNULIB_defined_EOVERFLOW 1 -# endif - - -/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, - EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. - Likewise, on NonStop Kernel, EDQUOT is not defined. - Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, - HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. - - Note: When one of these systems defines some of these macros some day, - binaries will have to be recompiled so that they recognizes the new - errno values from the system. */ - -# ifndef ENOMSG -# define ENOMSG 2000 -# define GNULIB_defined_ENOMSG 1 -# endif - -# ifndef EIDRM -# define EIDRM 2001 -# define GNULIB_defined_EIDRM 1 -# endif - -# ifndef ENOLINK -# define ENOLINK 2002 -# define GNULIB_defined_ENOLINK 1 -# endif - -# ifndef EPROTO -# define EPROTO 2003 -# define GNULIB_defined_EPROTO 1 -# endif - -# ifndef EMULTIHOP -# define EMULTIHOP 2004 -# define GNULIB_defined_EMULTIHOP 1 -# endif - -# ifndef EBADMSG -# define EBADMSG 2005 -# define GNULIB_defined_EBADMSG 1 -# endif - -# ifndef EOVERFLOW -# define EOVERFLOW 2006 -# define GNULIB_defined_EOVERFLOW 1 -# endif - -# ifndef ENOTSUP -# define ENOTSUP 2007 -# define GNULIB_defined_ENOTSUP 1 -# endif - -# ifndef ESTALE -# define ESTALE 2009 -# define GNULIB_defined_ESTALE 1 -# endif - -# ifndef EDQUOT -# define EDQUOT 2010 -# define GNULIB_defined_EDQUOT 1 -# endif - -# ifndef ECANCELED -# define ECANCELED 2008 -# define GNULIB_defined_ECANCELED 1 -# endif - - -#endif /* _GL_ERRNO_H */ -#endif /* _GL_ERRNO_H */ diff --git a/lib/gl/float+.h b/lib/gl/float+.h deleted file mode 100644 index bc35df8957..0000000000 --- a/lib/gl/float+.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - Written by Bruno Haible <bruno@clisp.org>, 2007. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _FLOATPLUS_H -#define _FLOATPLUS_H - -#include <float.h> -#include <limits.h> - -/* Number of bits in the mantissa of a floating-point number, including the - "hidden bit". */ -#if FLT_RADIX == 2 -# define FLT_MANT_BIT FLT_MANT_DIG -# define DBL_MANT_BIT DBL_MANT_DIG -# define LDBL_MANT_BIT LDBL_MANT_DIG -#elif FLT_RADIX == 4 -# define FLT_MANT_BIT (FLT_MANT_DIG * 2) -# define DBL_MANT_BIT (DBL_MANT_DIG * 2) -# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) -#elif FLT_RADIX == 16 -# define FLT_MANT_BIT (FLT_MANT_DIG * 4) -# define DBL_MANT_BIT (DBL_MANT_DIG * 4) -# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) -#endif - -/* Bit mask that can be used to mask the exponent, as an unsigned number. */ -#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) -#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) -#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) - -/* Number of bits used for the exponent of a floating-point number, including - the exponent's sign. */ -#define FLT_EXP_BIT \ - (FLT_EXP_MASK < 0x100 ? 8 : \ - FLT_EXP_MASK < 0x200 ? 9 : \ - FLT_EXP_MASK < 0x400 ? 10 : \ - FLT_EXP_MASK < 0x800 ? 11 : \ - FLT_EXP_MASK < 0x1000 ? 12 : \ - FLT_EXP_MASK < 0x2000 ? 13 : \ - FLT_EXP_MASK < 0x4000 ? 14 : \ - FLT_EXP_MASK < 0x8000 ? 15 : \ - FLT_EXP_MASK < 0x10000 ? 16 : \ - FLT_EXP_MASK < 0x20000 ? 17 : \ - FLT_EXP_MASK < 0x40000 ? 18 : \ - FLT_EXP_MASK < 0x80000 ? 19 : \ - FLT_EXP_MASK < 0x100000 ? 20 : \ - FLT_EXP_MASK < 0x200000 ? 21 : \ - FLT_EXP_MASK < 0x400000 ? 22 : \ - FLT_EXP_MASK < 0x800000 ? 23 : \ - FLT_EXP_MASK < 0x1000000 ? 24 : \ - FLT_EXP_MASK < 0x2000000 ? 25 : \ - FLT_EXP_MASK < 0x4000000 ? 26 : \ - FLT_EXP_MASK < 0x8000000 ? 27 : \ - FLT_EXP_MASK < 0x10000000 ? 28 : \ - FLT_EXP_MASK < 0x20000000 ? 29 : \ - FLT_EXP_MASK < 0x40000000 ? 30 : \ - FLT_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) -#define DBL_EXP_BIT \ - (DBL_EXP_MASK < 0x100 ? 8 : \ - DBL_EXP_MASK < 0x200 ? 9 : \ - DBL_EXP_MASK < 0x400 ? 10 : \ - DBL_EXP_MASK < 0x800 ? 11 : \ - DBL_EXP_MASK < 0x1000 ? 12 : \ - DBL_EXP_MASK < 0x2000 ? 13 : \ - DBL_EXP_MASK < 0x4000 ? 14 : \ - DBL_EXP_MASK < 0x8000 ? 15 : \ - DBL_EXP_MASK < 0x10000 ? 16 : \ - DBL_EXP_MASK < 0x20000 ? 17 : \ - DBL_EXP_MASK < 0x40000 ? 18 : \ - DBL_EXP_MASK < 0x80000 ? 19 : \ - DBL_EXP_MASK < 0x100000 ? 20 : \ - DBL_EXP_MASK < 0x200000 ? 21 : \ - DBL_EXP_MASK < 0x400000 ? 22 : \ - DBL_EXP_MASK < 0x800000 ? 23 : \ - DBL_EXP_MASK < 0x1000000 ? 24 : \ - DBL_EXP_MASK < 0x2000000 ? 25 : \ - DBL_EXP_MASK < 0x4000000 ? 26 : \ - DBL_EXP_MASK < 0x8000000 ? 27 : \ - DBL_EXP_MASK < 0x10000000 ? 28 : \ - DBL_EXP_MASK < 0x20000000 ? 29 : \ - DBL_EXP_MASK < 0x40000000 ? 30 : \ - DBL_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) -#define LDBL_EXP_BIT \ - (LDBL_EXP_MASK < 0x100 ? 8 : \ - LDBL_EXP_MASK < 0x200 ? 9 : \ - LDBL_EXP_MASK < 0x400 ? 10 : \ - LDBL_EXP_MASK < 0x800 ? 11 : \ - LDBL_EXP_MASK < 0x1000 ? 12 : \ - LDBL_EXP_MASK < 0x2000 ? 13 : \ - LDBL_EXP_MASK < 0x4000 ? 14 : \ - LDBL_EXP_MASK < 0x8000 ? 15 : \ - LDBL_EXP_MASK < 0x10000 ? 16 : \ - LDBL_EXP_MASK < 0x20000 ? 17 : \ - LDBL_EXP_MASK < 0x40000 ? 18 : \ - LDBL_EXP_MASK < 0x80000 ? 19 : \ - LDBL_EXP_MASK < 0x100000 ? 20 : \ - LDBL_EXP_MASK < 0x200000 ? 21 : \ - LDBL_EXP_MASK < 0x400000 ? 22 : \ - LDBL_EXP_MASK < 0x800000 ? 23 : \ - LDBL_EXP_MASK < 0x1000000 ? 24 : \ - LDBL_EXP_MASK < 0x2000000 ? 25 : \ - LDBL_EXP_MASK < 0x4000000 ? 26 : \ - LDBL_EXP_MASK < 0x8000000 ? 27 : \ - LDBL_EXP_MASK < 0x10000000 ? 28 : \ - LDBL_EXP_MASK < 0x20000000 ? 29 : \ - LDBL_EXP_MASK < 0x40000000 ? 30 : \ - LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) - -/* Number of bits used for a floating-point number: the mantissa (not - counting the "hidden bit", since it may or may not be explicit), the - exponent, and the sign. */ -#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) -#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) -#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) - -/* Number of bytes used for a floating-point number. - This can be smaller than the 'sizeof'. For example, on i386 systems, - 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence - LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but - sizeof (long double) = 12 or = 16. */ -#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) -#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) -#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) - -/* Verify that SIZEOF_FLT <= sizeof (float) etc. */ -typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; -typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; -typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; - -#endif /* _FLOATPLUS_H */ diff --git a/lib/gl/float.in.h b/lib/gl/float.in.h deleted file mode 100644 index c0ddaa518a..0000000000 --- a/lib/gl/float.in.h +++ /dev/null @@ -1,63 +0,0 @@ -/* A correct <float.h>. - - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#ifndef _GL_FLOAT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_FLOAT_H@ - -#ifndef _GL_FLOAT_H -#define _GL_FLOAT_H - -/* 'long double' properties. */ -#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) -/* Number of mantissa units, in base FLT_RADIX. */ -# undef LDBL_MANT_DIG -# define LDBL_MANT_DIG 64 -/* Number of decimal digits that is sufficient for representing a number. */ -# undef LDBL_DIG -# define LDBL_DIG 18 -/* x-1 where x is the smallest representable number > 1. */ -# undef LDBL_EPSILON -# define LDBL_EPSILON 1.0842021724855044340E-19L -/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP (-16381) -/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ -# undef LDBL_MAX_EXP -# define LDBL_MAX_EXP 16384 -/* Minimum positive normalized number. */ -# undef LDBL_MIN -# define LDBL_MIN 3.3621031431120935063E-4932L -/* Maximum representable finite number. */ -# undef LDBL_MAX -# define LDBL_MAX 1.1897314953572317650E+4932L -/* Minimum e such that 10^e is in the range of normalized numbers. */ -# undef LDBL_MIN_10_EXP -# define LDBL_MIN_10_EXP (-4931) -/* Maximum e such that 10^e is in the range of representable finite numbers. */ -# undef LDBL_MAX_10_EXP -# define LDBL_MAX_10_EXP 4932 -#endif - -#endif /* _GL_FLOAT_H */ -#endif /* _GL_FLOAT_H */ diff --git a/lib/gl/fseeko.c b/lib/gl/fseeko.c deleted file mode 100644 index 8e492c54be..0000000000 --- a/lib/gl/fseeko.c +++ /dev/null @@ -1,146 +0,0 @@ -/* An fseeko() function that, together with fflush(), is POSIX compliant. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#include <stdio.h> - -/* Get off_t and lseek. */ -#include <unistd.h> - -#include "stdio-impl.h" - -int -fseeko (FILE *fp, off_t offset, int whence) -#undef fseeko -#if !HAVE_FSEEKO -# undef fseek -# define fseeko fseek -#endif -{ -#if LSEEK_PIPE_BROKEN - /* mingw gives bogus answers rather than failure on non-seekable files. */ - if (lseek (fileno (fp), 0, SEEK_CUR) == -1) - return EOF; -#endif - - /* These tests are based on fpurge.c. */ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ -# if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { - /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit - mode; but has an fseeko that requires 64-bit mode. */ - FILE *tmp = fopen ("/dev/null", "r"); - if (!tmp) - return -1; - fp->_flags |= __SL64; - fp->_seek64 = tmp->_seek64; - fclose (tmp); - } -# endif - if (fp_->_p == fp_->_bf._base - && fp_->_r == 0 - && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ - ? fp_->_bf._size - : 0) - && fp_ub._base == NULL) -#elif defined __EMX__ /* emx+gcc */ - if (fp->_ptr == fp->_buffer - && fp->_rcount == 0 - && fp->_wcount == 0 - && fp->_ungetc_count == 0) -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ - if (fp_->_ptr == fp_->_base - && (fp_->_ptr == NULL || fp_->_cnt == 0)) -#elif defined __UCLIBC__ /* uClibc */ - if (((fp->__modeflags & __FLAG_WRITING) == 0 - || fp->__bufpos == fp->__bufstart) - && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 - || fp->__bufpos == fp->__bufread)) -#elif defined __QNX__ /* QNX */ - if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) - && fp->_Rback == fp->_Back + sizeof (fp->_Back) - && fp->_Rsave == NULL) -#elif defined __MINT__ /* Atari FreeMiNT */ - if (fp->__bufp == fp->__buffer - && fp->__get_limit == fp->__bufp - && fp->__put_limit == fp->__bufp - && !fp->__pushed_back) -#else - #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." -#endif - { - /* We get here when an fflush() call immediately preceded this one. We - know there are no buffers. - POSIX requires us to modify the file descriptor's position. - But we cannot position beyond end of file here. */ - off_t pos = - lseek (fileno (fp), - whence == SEEK_END && offset > 0 ? 0 : offset, - whence); - if (pos == -1) - { -#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - fp_->_flags &= ~__SOFF; -#endif - return -1; - } - -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; -#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ -# if defined __CYGWIN__ - /* fp_->_offset is typed as an integer. */ - fp_->_offset = pos; -# else - /* fp_->_offset is an fpos_t. */ - { - /* Use a union, since on NetBSD, the compilation flags - determine whether fpos_t is typedef'd to off_t or a struct - containing a single off_t member. */ - union - { - fpos_t f; - off_t o; - } u; - u.o = pos; - fp_->_offset = u.f; - } -# endif - fp_->_flags |= __SOFF; - fp_->_flags &= ~__SEOF; -#elif defined __EMX__ /* emx+gcc */ - fp->_flags &= ~_IOEOF; -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ - fp->_flag &= ~_IOEOF; -#elif defined __MINT__ /* Atari FreeMiNT */ - fp->__offset = pos; - fp->__eof = 0; -#endif - /* If we were not requested to position beyond end of file, we're - done. */ - if (!(whence == SEEK_END && offset > 0)) - return 0; - } - return fseeko (fp, offset, whence); -} diff --git a/lib/gl/ftello.c b/lib/gl/ftello.c deleted file mode 100644 index f4beeea881..0000000000 --- a/lib/gl/ftello.c +++ /dev/null @@ -1,77 +0,0 @@ -/* An ftello() function that works around platform bugs. - Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#include <config.h> - -/* Specification. */ -#include <stdio.h> - -/* Get lseek. */ -#include <unistd.h> - -#include "stdio-impl.h" - -off_t -ftello (FILE *fp) -#undef ftello -#if !HAVE_FTELLO -# undef ftell -# define ftello ftell -#endif -{ -#if LSEEK_PIPE_BROKEN - /* mingw gives bogus answers rather than failure on non-seekable files. */ - if (lseek (fileno (fp), 0, SEEK_CUR) == -1) - return -1; -#endif - -#if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */ - /* The Solaris stdio leaves the _IOREAD flag set after reading from a file - reaches EOF and the program then starts writing to the file. ftello - gets confused by this. */ - if (fp_->_flag & _IOWRT) - { - off_t pos; - - /* Call ftello nevertheless, for the side effects that it does on fp. */ - ftello (fp); - - /* Compute the file position ourselves. */ - pos = llseek (fileno (fp), (off_t) 0, SEEK_CUR); - if (pos >= 0) - { - if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) - pos += fp_->_ptr - fp_->_base; - } - return pos; - } -#endif - -#if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { - /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit - mode; but has an ftello that requires 64-bit mode. */ - FILE *tmp = fopen ("/dev/null", "r"); - if (!tmp) - return -1; - fp->_flags |= __SL64; - fp->_seek64 = tmp->_seek64; - fclose (tmp); - } -#endif - return ftello (fp); -} diff --git a/lib/gl/gettext.h b/lib/gl/gettext.h deleted file mode 100644 index d743a2ba98..0000000000 --- a/lib/gl/gettext.h +++ /dev/null @@ -1,175 +0,0 @@ -/* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include <libintl.h> - -/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by - the gettext() and ngettext() macros. This is an alternative to calling - textdomain(), and is useful for libraries. */ -# ifdef DEFAULT_TEXT_DOMAIN -# undef gettext -# define gettext(Msgid) \ - dgettext (DEFAULT_TEXT_DOMAIN, Msgid) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) -# endif - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of <locale.h> a NOP. We don't include <libintl.h> - as well because people using "gettext.h" will not include <libintl.h>, - and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> - is OK. */ -#if defined(__sun) -# include <locale.h> -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - <libintl.h>, which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of <libintl.h> a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include <cstdlib> -# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H -# include <libintl.h> -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# undef gettext -# define gettext(Msgid) ((const char *) (Msgid)) -# undef dgettext -# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) -# undef dcgettext -# define dcgettext(Domainname, Msgid, Category) \ - ((void) (Category), dgettext (Domainname, Msgid)) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 \ - ? ((void) (Msgid2), (const char *) (Msgid1)) \ - : ((void) (Msgid1), (const char *) (Msgid2))) -# undef dngettext -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) -# undef dcngettext -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) -# undef textdomain -# define textdomain(Domainname) ((const char *) (Domainname)) -# undef bindtextdomain -# define bindtextdomain(Domainname, Dirname) \ - ((void) (Domainname), (const char *) (Dirname)) -# undef bind_textdomain_codeset -# define bind_textdomain_codeset(Domainname, Codeset) \ - ((void) (Domainname), (const char *) (Codeset)) - -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -/* The separator between msgctxt and msgid in a .mo file. */ -#define GETTEXT_CONTEXT_GLUE "\004" - -/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a - MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be - short and rarely need to change. - The letter 'p' stands for 'particular' or 'special'. */ -#ifdef DEFAULT_TEXT_DOMAIN -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#else -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#endif -#define dpgettext(Domainname, Msgctxt, Msgid) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) -#ifdef DEFAULT_TEXT_DOMAIN -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#else -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#endif -#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) -{ - const char *translation = dcgettext (domain, msg_ctxt_id, category); - if (translation == msg_ctxt_id) - return msgid; - else - return translation; -} - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - const char *translation = - dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - if (translation == msg_ctxt_id || translation == msgid_plural) - return (n == 1 ? msgid : msgid_plural); - else - return translation; -} - -#endif /* _LIBGETTEXT_H */ diff --git a/lib/gl/lseek.c b/lib/gl/lseek.c deleted file mode 100644 index 601efa357f..0000000000 --- a/lib/gl/lseek.c +++ /dev/null @@ -1,62 +0,0 @@ -/* An lseek() function that detects pipes. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#include <unistd.h> - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Windows platforms. */ -/* Get GetFileType. */ -# include <windows.h> -#else -# include <sys/stat.h> -#endif -#include <errno.h> - -#undef lseek - -off_t -rpl_lseek (int fd, off_t offset, int whence) -{ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ - HANDLE h = (HANDLE) _get_osfhandle (fd); - if (h == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - if (GetFileType (h) != FILE_TYPE_DISK) - { - errno = ESPIPE; - return -1; - } -#else - /* BeOS lseek mistakenly succeeds on pipes... */ - struct stat statbuf; - if (fstat (fd, &statbuf) < 0) - return -1; - if (!S_ISREG (statbuf.st_mode)) - { - errno = ESPIPE; - return -1; - } -#endif - return lseek (fd, offset, whence); -} diff --git a/lib/gl/m4/00gnulib.m4 b/lib/gl/m4/00gnulib.m4 deleted file mode 100644 index 301469b31c..0000000000 --- a/lib/gl/m4/00gnulib.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This file must be named something that sorts before all other -dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. - -# AC_DEFUN_ONCE([NAME], VALUE) -# ---------------------------- -# Define NAME to expand to VALUE on the first use (whether by direct -# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. -# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This -# definition is slower than the version in Autoconf 2.64, because it -# can only use interfaces that existed since 2.59; but it achieves the -# same effect. Quoting is necessary to avoid confusing Automake. -m4_version_prereq([2.63.263], [], -[m4_define([AC][_DEFUN_ONCE], - [AC][_DEFUN([$1], - [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], - [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl -[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) - -# gl_00GNULIB -# ----------- -# Witness macro that this file has been included. Needed to force -# Automake to include this file prior to all other gnulib .m4 files. -AC_DEFUN([gl_00GNULIB]) diff --git a/lib/gl/m4/alloca.m4 b/lib/gl/m4/alloca.m4 deleted file mode 100644 index 80d67aad77..0000000000 --- a/lib/gl/m4/alloca.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# alloca.m4 serial 10 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ALLOCA], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - if test $ac_cv_func_alloca_works = no; then - gl_PREREQ_ALLOCA - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ - AC_EGREP_CPP([Need own alloca], [ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca -#endif - ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) - ]) - if test $gl_cv_rpl_alloca = yes; then - dnl OK, alloca can be implemented through a compiler built-in. - AC_DEFINE([HAVE_ALLOCA], [1], - [Define to 1 if you have 'alloca' after including <alloca.h>, - a header that may be supplied by this distribution.]) - ALLOCA_H=alloca.h - else - dnl alloca exists as a library function, i.e. it is slow and probably - dnl a memory leak. Don't define HAVE_ALLOCA in this case. - ALLOCA_H= - fi - else - ALLOCA_H=alloca.h - fi - AC_SUBST([ALLOCA_H]) -]) - -# Prerequisites of lib/alloca.c. -# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. -AC_DEFUN([gl_PREREQ_ALLOCA], [:]) diff --git a/lib/gl/m4/asm-underscore.m4 b/lib/gl/m4/asm-underscore.m4 deleted file mode 100644 index 1736cc432a..0000000000 --- a/lib/gl/m4/asm-underscore.m4 +++ /dev/null @@ -1,48 +0,0 @@ -# asm-underscore.m4 serial 1 -dnl Copyright (C) 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp. - -# gl_ASM_SYMBOL_PREFIX -# Tests for the prefix of C symbols at the assembly language level and the -# linker level. This prefix is either an underscore or empty. Defines the -# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to -# a stringified variant of this prefix. - -AC_DEFUN([gl_ASM_SYMBOL_PREFIX], -[ - dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because - dnl 1. It works only for GCC. - dnl 2. It is incorrectly defined on some platforms, in some GCC versions. - AC_CACHE_CHECK( - [whether C symbols are prefixed with underscore at the linker level], - [gl_cv_prog_as_underscore], - [cat > conftest.c <<EOF -#ifdef __cplusplus -extern "C" int foo (void); -#endif -int foo(void) { return 0; } -EOF - # Look for the assembly language name in the .s file. - AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c) >/dev/null 2>&1 - if grep _foo conftest.s >/dev/null ; then - gl_cv_prog_as_underscore=yes - else - gl_cv_prog_as_underscore=no - fi - rm -f conftest* - ]) - if test $gl_cv_prog_as_underscore = yes; then - USER_LABEL_PREFIX=_ - else - USER_LABEL_PREFIX= - fi - AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX], - [Define to the prefix of C symbols at the assembler and linker level, - either an underscore or empty.]) - ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' - AC_SUBST([ASM_SYMBOL_PREFIX]) -]) diff --git a/lib/gl/m4/byteswap.m4 b/lib/gl/m4/byteswap.m4 deleted file mode 100644 index 2afd6a2a4e..0000000000 --- a/lib/gl/m4/byteswap.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# byteswap.m4 serial 3 -dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Oskar Liljeblad. - -AC_DEFUN([gl_BYTESWAP], -[ - dnl Prerequisites of lib/byteswap.in.h. - AC_CHECK_HEADERS([byteswap.h], [ - BYTESWAP_H='' - ], [ - BYTESWAP_H='byteswap.h' - ]) - AC_SUBST([BYTESWAP_H]) -]) diff --git a/lib/gl/m4/codeset.m4 b/lib/gl/m4/codeset.m4 deleted file mode 100644 index f722b2e86a..0000000000 --- a/lib/gl/m4/codeset.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_LANGINFO_CODESET], -[ - AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <langinfo.h>]], - [[char* cs = nl_langinfo(CODESET); return !cs;]])], - [am_cv_langinfo_codeset=yes], - [am_cv_langinfo_codeset=no]) - ]) - if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE([HAVE_LANGINFO_CODESET], [1], - [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) - fi -]) diff --git a/lib/gl/m4/errno_h.m4 b/lib/gl/m4/errno_h.m4 deleted file mode 100644 index e4325ac660..0000000000 --- a/lib/gl/m4/errno_h.m4 +++ /dev/null @@ -1,118 +0,0 @@ -# errno_h.m4 serial 7 -dnl Copyright (C) 2004, 2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ - AC_EGREP_CPP([booboo],[ -#include <errno.h> -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif - ], - [gl_cv_header_errno_h_complete=no], - [gl_cv_header_errno_h_complete=yes]) - ]) - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else - gl_CHECK_NEXT_HEADERS([errno.h]) - ERRNO_H='errno.h' - fi - AC_SUBST([ERRNO_H]) - gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) - gl_REPLACE_ERRNO_VALUE([ENOLINK]) - gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) -]) - -# Assuming $1 = EOVERFLOW. -# The EOVERFLOW errno value ought to be defined in <errno.h>, according to -# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and -# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. -# Check for the value of EOVERFLOW. -# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. -AC_DEFUN([gl_REPLACE_ERRNO_VALUE], -[ - if test -n "$ERRNO_H"; then - AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ - AC_EGREP_CPP([yes],[ -#include <errno.h> -#ifdef ]$1[ -yes -#endif - ], - [gl_cv_header_errno_h_]$1[=yes], - [gl_cv_header_errno_h_]$1[=no]) - if test $gl_cv_header_errno_h_]$1[ = no; then - AC_EGREP_CPP([yes],[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include <errno.h> -#ifdef ]$1[ -yes -#endif - ], [gl_cv_header_errno_h_]$1[=hidden]) - if test $gl_cv_header_errno_h_]$1[ = hidden; then - dnl The macro exists but is hidden. - dnl Define it to the same value. - AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include <errno.h> -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include <stdio.h> -#include <stdlib.h> -]) - fi - fi - ]) - case $gl_cv_header_errno_h_]$1[ in - yes | no) - ]$1[_HIDDEN=0; ]$1[_VALUE= - ;; - *) - ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" - ;; - esac - AC_SUBST($1[_HIDDEN]) - AC_SUBST($1[_VALUE]) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/lib/gl/m4/extensions.m4 b/lib/gl/m4/extensions.m4 deleted file mode 100644 index 7d9458a8d6..0000000000 --- a/lib/gl/m4/extensions.m4 +++ /dev/null @@ -1,118 +0,0 @@ -# serial 9 -*- Autoconf -*- -# Enable extensions on systems that normally disable them. - -# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS -# Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly -# enough in this area it's likely we'll need to redefine -# AC_USE_SYSTEM_EXTENSIONS for quite some time. - -# If autoconf reports a warning -# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# the fix is -# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked -# but always AC_REQUIREd, -# 2) to ensure that for each occurrence of -# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -# or -# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -# the corresponding gnulib module description has 'extensions' among -# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS -# invocation occurs in gl_EARLY, not in gl_INIT. - -# AC_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -# Remember that #undef in AH_VERBATIM gets replaced with #define by -# AC_DEFINE. The goal here is to define all known feature-enabling -# macros, then, if reports of conflicts are made, disable macros that -# cause problems on some platforms (such as __EXTENSIONS__). -AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], -[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl -AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) - if test "$MINIX" = yes; then - AC_DEFINE([_POSIX_SOURCE], [1], - [Define to 1 if you need to in order for `stat' and other - things to work.]) - AC_DEFINE([_POSIX_1_SOURCE], [2], - [Define to 2 if the system does not provide POSIX.1 features - except with this defined.]) - AC_DEFINE([_MINIX], [1], - [Define to 1 if on MINIX.]) - fi - - dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, - dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already - dnl provided. - case "$host_os" in - hpux*) - AC_DEFINE([_XOPEN_SOURCE], [500], - [Define to 500 only on HP-UX.]) - ;; - esac - - AH_VERBATIM([__EXTENSIONS__], -[/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -# define __EXTENSIONS__ 1 - ]AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_ALL_SOURCE]) - AC_DEFINE([_GNU_SOURCE]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([_TANDEM_SOURCE]) -])# AC_USE_SYSTEM_EXTENSIONS - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], -[ - dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. - dnl gnulib does not need it. But if it gets required by third-party macros - dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a - dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". - dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, - dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) diff --git a/lib/gl/m4/fcntl-o.m4 b/lib/gl/m4/fcntl-o.m4 deleted file mode 100644 index 46fad47021..0000000000 --- a/lib/gl/m4/fcntl-o.m4 +++ /dev/null @@ -1,112 +0,0 @@ -# fcntl-o.m4 serial 3 -dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. -# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. -# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. -AC_DEFUN([gl_FCNTL_O_FLAGS], -[ - dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include <sys/types.h> - #include <sys/stat.h> - #include <unistd.h> - #include <fcntl.h> - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - ]], - [[ - int result = !constants; - { - static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_RDONLY | O_NOFOLLOW); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - unlink (sym); - } - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - if (fd < 0) - result |= 8; - else - { - struct stat st0; - if (fstat (fd, &st0) != 0) - result |= 16; - else - { - char c; - sleep (1); - if (read (fd, &c, 1) != 1) - result |= 24; - else - { - if (close (fd) != 0) - result |= 32; - else - { - struct stat st1; - if (stat (file, &st1) != 0) - result |= 40; - else - if (st0.st_atime != st1.st_atime) - result |= 64; - } - } - } - } - } - return result;]])], - [gl_cv_header_working_fcntl_h=yes], - [case $? in #( - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac], - [gl_cv_header_working_fcntl_h=cross-compiling])]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], - [Define to 1 if O_NOATIME works.]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], - [Define to 1 if O_NOFOLLOW works.]) -]) diff --git a/lib/gl/m4/float_h.m4 b/lib/gl/m4/float_h.m4 deleted file mode 100644 index f6099db405..0000000000 --- a/lib/gl/m4/float_h.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# float_h.m4 serial 4 -dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FLOAT_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - FLOAT_H= - case "$host_os" in - beos* | openbsd* | mirbsd*) - FLOAT_H=float.h - gl_CHECK_NEXT_HEADERS([float.h]) - ;; - esac - AC_SUBST([FLOAT_H]) -]) diff --git a/lib/gl/m4/fseeko.m4 b/lib/gl/m4/fseeko.m4 deleted file mode 100644 index b97df53377..0000000000 --- a/lib/gl/m4/fseeko.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# fseeko.m4 serial 9 -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FSEEKO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_HAVE_FSEEKO]) - AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) - - if test $gl_cv_func_fseeko = no; then - HAVE_FSEEKO=0 - gl_REPLACE_FSEEKO - else - if test $gl_cv_var_stdin_large_offset = no; then - gl_REPLACE_FSEEKO - fi - fi -]) - -dnl Tests whether fseeko is available. -dnl Result is gl_cv_func_fseeko. -AC_DEFUN([gl_HAVE_FSEEKO], -[ - AC_REQUIRE([AC_PROG_CC]) - - dnl Persuade glibc <stdio.h> to declare fseeko(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], - [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> -]], [fseeko (stdin, 0, 0);])], - [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) - ]) -]) - -AC_DEFUN([gl_REPLACE_FSEEKO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_HAVE_FSEEKO]) - if test $gl_cv_func_fseeko = yes; then - REPLACE_FSEEKO=1 - fi - AC_LIBOBJ([fseeko]) - dnl If we are also using the fseek module, then fseek needs replacing, too. - m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK]) -]) diff --git a/lib/gl/m4/ftello.m4 b/lib/gl/m4/ftello.m4 deleted file mode 100644 index 33201a0107..0000000000 --- a/lib/gl/m4/ftello.m4 +++ /dev/null @@ -1,130 +0,0 @@ -# ftello.m4 serial 8 -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTELLO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) - - dnl Persuade glibc <stdio.h> to declare ftello(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], - [ - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <stdio.h>]], - [[ftello (stdin);]])], - [gl_cv_func_ftello=yes], - [gl_cv_func_ftello=no]) - ]) - if test $gl_cv_func_ftello = no; then - HAVE_FTELLO=0 - else - if test $gl_cv_var_stdin_large_offset = no; then - REPLACE_FTELLO=1 - else - dnl Detect bug on Solaris. - dnl ftell and ftello produce incorrect results after putc that followed a - dnl getc call that reached EOF on Solaris. This is because the _IOREAD - dnl flag does not get cleared in this case, even though _IOWRT gets set, - dnl and ftell and ftello look whether the _IOREAD flag is set. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether ftello works], - [gl_cv_func_ftello_works], - [ - dnl Initial guess, used when cross-compiling or when /dev/tty cannot - dnl be opened. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_ftello_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_ftello_works="guessing yes" ;; - esac -changequote([,])dnl - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#define TESTFILE "conftest.tmp" -int -main (void) -{ - FILE *fp; - - /* Create a file with some contents. */ - fp = fopen (TESTFILE, "w"); - if (fp == NULL) - return 70; - if (fwrite ("foogarsh", 1, 8, fp) < 8) - return 71; - if (fclose (fp)) - return 72; - - /* The file's contents is now "foogarsh". */ - - /* Try writing after reading to EOF. */ - fp = fopen (TESTFILE, "r+"); - if (fp == NULL) - return 73; - if (fseek (fp, -1, SEEK_END)) - return 74; - if (!(getc (fp) == 'h')) - return 1; - if (!(getc (fp) == EOF)) - return 2; - if (!(ftell (fp) == 8)) - return 3; - if (!(ftell (fp) == 8)) - return 4; - if (!(putc ('!', fp) == '!')) - return 5; - if (!(ftell (fp) == 9)) - return 6; - if (!(fclose (fp) == 0)) - return 7; - fp = fopen (TESTFILE, "r"); - if (fp == NULL) - return 75; - { - char buf[10]; - if (!(fread (buf, 1, 10, fp) == 9)) - return 10; - if (!(memcmp (buf, "foogarsh!", 9) == 0)) - return 11; - } - if (!(fclose (fp) == 0)) - return 12; - - /* The file's contents is now "foogarsh!". */ - - return 0; -}]])], - [gl_cv_func_ftello_works=yes], - [gl_cv_func_ftello_works=no], [:]) - ]) - case "$gl_cv_func_ftello_works" in - *yes) ;; - *) - REPLACE_FTELLO=1 - AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1], - [Define to 1 if the system's ftello function has the Solaris bug.]) - ;; - esac - fi - fi - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - gl_REPLACE_FTELLO - fi -]) - -AC_DEFUN([gl_REPLACE_FTELLO], -[ - AC_LIBOBJ([ftello]) -]) diff --git a/lib/gl/m4/func.m4 b/lib/gl/m4/func.m4 deleted file mode 100644 index 698c5281da..0000000000 --- a/lib/gl/m4/func.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# func.m4 serial 2 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Simon Josefsson - -AC_DEFUN([gl_FUNC], -[ - AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var_func], - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[const char *str = __func__;]])], - [gl_cv_var_func=yes], - [gl_cv_var_func=no])) - if test "$gl_cv_var_func" != yes; then - AC_DEFINE([__func__], ["<unknown function>"], - [Define as a replacement for the ISO C99 __func__ variable.]) - fi -]) diff --git a/lib/gl/m4/getpagesize.m4 b/lib/gl/m4/getpagesize.m4 deleted file mode 100644 index 313ad7fa26..0000000000 --- a/lib/gl/m4/getpagesize.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# getpagesize.m4 serial 8 -dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETPAGESIZE], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS([getpagesize]) - if test $ac_cv_func_getpagesize = no; then - HAVE_GETPAGESIZE=0 - AC_CHECK_HEADERS([OS.h]) - if test $ac_cv_header_OS_h = yes; then - HAVE_OS_H=1 - fi - AC_CHECK_HEADERS([sys/param.h]) - if test $ac_cv_header_sys_param_h = yes; then - HAVE_SYS_PARAM_H=1 - fi - fi - case "$host_os" in - mingw*) - REPLACE_GETPAGESIZE=1 - AC_LIBOBJ([getpagesize]) - ;; - esac - dnl Also check whether it's declared. - dnl mingw has getpagesize() in libgcc.a but doesn't declare it. - AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) -]) diff --git a/lib/gl/m4/gettext.m4 b/lib/gl/m4/gettext.m4 deleted file mode 100644 index 979c52c196..0000000000 --- a/lib/gl/m4/gettext.m4 +++ /dev/null @@ -1,401 +0,0 @@ -# gettext.m4 serial 64 (gettext-0.18.2) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. - -dnl Macro to add for using GNU gettext. - -dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. -dnl If INTLSYMBOL is 'use-libtool', then a libtool library -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, -dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. -dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext -dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. If NEEDSYMBOL is specified and is -dnl 'need-formatstring-macros', then GNU gettext implementations that don't -dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. -dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. -dnl -dnl The result of the configuration is one of three cases: -dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled -dnl and used. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 2) GNU gettext has been found in the system's C library. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 3) No internationalization, always use English msgid. -dnl Catalog format: none -dnl Catalog extension: none -dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. -dnl The use of .gmo is historical (it was needed to avoid overwriting the -dnl GNU format catalogs when building on a platform with an X/Open gettext), -dnl but we keep it in order not to force irrelevant filename changes on the -dnl maintainers. -dnl -AC_DEFUN([AM_GNU_GETTEXT], -[ - dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , - [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) - ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], - [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , - [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -])])])]) - define([gt_included_intl], - ifelse([$1], [external], - ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), - [yes])) - define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) - gt_NEEDS_INIT - AM_GNU_GETTEXT_NEED([$2]) - - AC_REQUIRE([AM_PO_SUBDIRS])dnl - ifelse(gt_included_intl, yes, [ - AC_REQUIRE([AM_INTL_SUBDIR])dnl - ]) - - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Sometimes libintl requires libiconv, so first search for libiconv. - dnl Ideally we would do this search only after the - dnl if test "$USE_NLS" = "yes"; then - dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT - dnl the configure script would need to contain the same shell code - dnl again, outside any 'if'. There are two solutions: - dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. - dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. - ifelse(gt_included_intl, yes, , [ - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - ]) - - dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. - gt_INTL_MACOSX - - dnl Set USE_NLS. - AC_REQUIRE([AM_NLS]) - - ifelse(gt_included_intl, yes, [ - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - ]) - LIBINTL= - LTLIBINTL= - POSUB= - - dnl Add a version number to the cache macros. - case " $gt_needs " in - *" need-formatstring-macros "*) gt_api_version=3 ;; - *" need-ngettext "*) gt_api_version=2 ;; - *) gt_api_version=1 ;; - esac - gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" - gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - ifelse(gt_included_intl, yes, [ - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH([included-gettext], - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - ]) - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If GNU gettext is available we use this. Else we have - dnl to fall back to GNU NLS library. - - if test $gt_api_version -ge 3; then - gt_revision_test_code=' -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -' - else - gt_revision_test_code= - fi - if test $gt_api_version -ge 2; then - gt_expression_test_code=' + * ngettext ("", "", 0)' - else - gt_expression_test_code= - fi - - AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <libintl.h> -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings; - ]], - [[ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings - ]])], - [eval "$gt_func_gnugettext_libc=yes"], - [eval "$gt_func_gnugettext_libc=no"])]) - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl Sometimes libintl requires libiconv, so first search for libiconv. - ifelse(gt_included_intl, yes, , [ - AM_ICONV_LINK - ]) - dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL - dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) - dnl because that would add "-liconv" to LIBINTL and LTLIBINTL - dnl even if libiconv doesn't exist. - AC_LIB_LINKFLAGS_BODY([intl]) - AC_CACHE_CHECK([for GNU gettext in libintl], - [$gt_func_gnugettext_libintl], - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - dnl Now see whether libintl exists and does not depend on libiconv. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <libintl.h> -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *); - ]], - [[ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") - ]])], - [eval "$gt_func_gnugettext_libintl=yes"], - [eval "$gt_func_gnugettext_libintl=no"]) - dnl Now see whether libintl exists and depends on libiconv. - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <libintl.h> -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *); - ]], - [[ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") - ]])], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - ]) - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS"]) - fi - - dnl If an already present or preinstalled GNU gettext() is found, - dnl use it. But if this macro is used in GNU gettext, and GNU - dnl gettext is already preinstalled in libintl, we update this - dnl libintl. (Cf. the install rule in intl/Makefile.in.) - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ - || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - dnl Reset the values set by searching for libintl. - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - ifelse(gt_included_intl, yes, [ - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - dnl GNU gettext is not found in the C library. - dnl Fall back on included GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions to use GNU gettext tools. - CATOBJEXT=.gmo - fi - ]) - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Some extra flags are needed during linking. - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE([ENABLE_NLS], [1], - [Define to 1 if translation of program messages to the user's native language - is requested.]) - else - USE_NLS=no - fi - fi - - AC_MSG_CHECKING([whether to use NLS]) - AC_MSG_RESULT([$USE_NLS]) - if test "$USE_NLS" = "yes"; then - AC_MSG_CHECKING([where the gettext function comes from]) - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - AC_MSG_RESULT([$gt_source]) - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - AC_MSG_CHECKING([how to link with libintl]) - AC_MSG_RESULT([$LIBINTL]) - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) - fi - - dnl For backward compatibility. Some packages may be using this. - AC_DEFINE([HAVE_GETTEXT], [1], - [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE([HAVE_DCGETTEXT], [1], - [Define if the GNU dcgettext() function is already present or preinstalled.]) - fi - - dnl We need to process the po/ directory. - POSUB=po - fi - - ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - - dnl Make all variables we use known to autoconf. - AC_SUBST([BUILD_INCLUDED_LIBINTL]) - AC_SUBST([USE_INCLUDED_LIBINTL]) - AC_SUBST([CATOBJEXT]) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST([DATADIRNAME]) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST([INSTOBJEXT]) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST([GENCAT]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST([INTLOBJS]) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) - ]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST([INTLLIBS]) - - dnl Make all documented variables known to autoconf. - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - AC_SUBST([POSUB]) -]) - - -dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. -m4_define([gt_NEEDS_INIT], -[ - m4_divert_text([DEFAULTS], [gt_needs=]) - m4_define([gt_NEEDS_INIT], []) -]) - - -dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) -AC_DEFUN([AM_GNU_GETTEXT_NEED], -[ - m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) -]) - - -dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/lib/gl/m4/glibc2.m4 b/lib/gl/m4/glibc2.m4 deleted file mode 100644 index b92208a1c6..0000000000 --- a/lib/gl/m4/glibc2.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc2.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.0 or newer. -# From Bruno Haible. - -AC_DEFUN([gt_GLIBC2], - [ - AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], - [ac_cv_gnu_library_2], - [AC_EGREP_CPP([Lucky GNU user], - [ -#include <features.h> -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - ], - [ac_cv_gnu_library_2=yes], - [ac_cv_gnu_library_2=no]) - ] - ) - AC_SUBST([GLIBC2]) - GLIBC2="$ac_cv_gnu_library_2" - ] -) diff --git a/lib/gl/m4/glibc21.m4 b/lib/gl/m4/glibc21.m4 deleted file mode 100644 index bd08b381e8..0000000000 --- a/lib/gl/m4/glibc21.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer, or uClibc. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], - [ac_cv_gnu_library_2_1], - [AC_EGREP_CPP([Lucky], - [ -#include <features.h> -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif - ], - [ac_cv_gnu_library_2_1=yes], - [ac_cv_gnu_library_2_1=no]) - ] - ) - AC_SUBST([GLIBC21]) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4 deleted file mode 100644 index 24590151e2..0000000000 --- a/lib/gl/m4/gnulib-cache.m4 +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (C) 2002-2010 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the specification of how gnulib-tool is used. -# It acts as a cache: It is written and read by gnulib-tool. -# In projects that use version control, this file is meant to be put under -# version control, like the configure.ac and various Makefile.am files. - - -# Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf - -# Specification in the form of a few gnulib-tool.m4 macro invocations: -gl_LOCAL_DIR([gl/override]) -gl_MODULES([ - byteswap - c-ctype - fseeko - func - gettext - lib-msvc-compat - lib-symbol-versions - memmem-simple - minmax - netdb - read-file - snprintf - sockets - socklen - stdint - strcase - strverscmp - sys_socket - sys_stat - time_r - unistd - vasprintf - vsnprintf -]) -gl_AVOID([alignof-tests lseek-tests]) -gl_SOURCE_BASE([gl]) -gl_M4_BASE([gl/m4]) -gl_PO_BASE([]) -gl_DOC_BASE([doc]) -gl_TESTS_BASE([gl/tests]) -gl_WITH_TESTS -gl_LIB([liblgnu]) -gl_LGPL([2]) -gl_MAKEFILE_NAME([]) -gl_LIBTOOL -gl_MACRO_PREFIX([lgl]) -gl_PO_DOMAIN([]) -gl_VC_FILES([false]) diff --git a/lib/gl/m4/gnulib-common.m4 b/lib/gl/m4/gnulib-common.m4 deleted file mode 100644 index d0c8b66287..0000000000 --- a/lib/gl/m4/gnulib-common.m4 +++ /dev/null @@ -1,214 +0,0 @@ -# gnulib-common.m4 serial 21 -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_COMMON -# is expanded unconditionally through gnulib-tool magic. -AC_DEFUN([gl_COMMON], [ - dnl Use AC_REQUIRE here, so that the code is expanded once only. - AC_REQUIRE([gl_00GNULIB]) - AC_REQUIRE([gl_COMMON_BODY]) -]) -AC_DEFUN([gl_COMMON_BODY], [ - AH_VERBATIM([isoc99_inline], -[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for MacOS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif]) - AH_VERBATIM([unused_parameter], -[/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED -]) - dnl Preparation for running test programs: - dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not - dnl to /dev/tty, so they can be redirected to log files. Such diagnostics - dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ -]) - -# gl_MODULE_INDICATOR_CONDITION -# expands to a C preprocessor expression that evaluates to 1 or 0, depending -# whether a gnulib module that has been requested shall be considered present -# or not. -AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1]) - -# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) -# sets the shell variable that indicates the presence of the given module to -# a C preprocessor expression that will evaluate to 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], -[ - GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION -]) - -# gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module -# in a location where it can be used. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 0 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR], -[ - AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), - [gl_MODULE_INDICATOR_CONDITION], - [Define to a C preprocessor expression that evaluates to 1 or 0, - depending whether the gnulib module $1 shall be considered present.]) -]) - -# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) -# defines a C macro indicating the presence of the given module -# in lib or tests. This is useful to determine whether the module -# should be tested. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], -[ - AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when the gnulib module $1 should be tested.]) -]) - -# Test whether <features.h> exists. -# Set HAVE_FEATURES_H. -AC_DEFUN([gl_FEATURES_H], -[ - AC_CHECK_HEADERS_ONCE([features.h]) - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else - HAVE_FEATURES_H=0 - fi - AC_SUBST([HAVE_FEATURES_H]) -]) - -# m4_foreach_w -# is a backport of autoconf-2.59c's m4_foreach_w. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - -# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) -# ---------------------------------------------------- -# Backport of autoconf-2.63b's macro. -# Remove this macro when we can assume autoconf >= 2.64. -m4_ifndef([AS_VAR_IF], -[m4_define([AS_VAR_IF], -[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) - -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix -# for interoperability with automake-1.9.6 from autoconf-2.62. -# Remove this macro when we can assume autoconf >= 2.62 or -# autoconf >= 2.60 && automake >= 1.10. -m4_ifdef([AC_PROG_MKDIR_P], [ - dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. - m4_define([AC_PROG_MKDIR_P], - m4_defn([AC_PROG_MKDIR_P])[ - AC_SUBST([MKDIR_P])])], [ - dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. - AC_DEFUN_ONCE([AC_PROG_MKDIR_P], - [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - MKDIR_P='$(mkdir_p)' - AC_SUBST([MKDIR_P])])]) - -# AC_C_RESTRICT -# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, -# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ -# works. -# This definition can be removed once autoconf >= 2.62 can be assumed. -m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ -AC_DEFUN([AC_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], - [ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - }]], - [[int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t)]])], - [ac_cv_c_restrict=$ac_kw]) - test "$ac_cv_c_restrict" != no && break - done - ]) - AH_VERBATIM([restrict], -[/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -#endif]) - case $ac_cv_c_restrict in - restrict) ;; - no) AC_DEFINE([restrict], []) ;; - *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; - esac -]) -]) - -# gl_BIGENDIAN -# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. -# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some -# macros invoke AC_C_BIGENDIAN with arguments. -AC_DEFUN([gl_BIGENDIAN], -[ - AC_C_BIGENDIAN -]) - -# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) -# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not -# output a spurious "(cached)" mark in the midst of other configure output. -# This macro should be used instead of AC_CACHE_VAL when it is not surrounded -# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. -AC_DEFUN([gl_CACHE_VAL_SILENT], -[ - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - AC_CACHE_VAL([$1], [$2]) - as_echo_n="$saved_as_echo_n" -]) diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4 deleted file mode 100644 index 58358c567a..0000000000 --- a/lib/gl/m4/gnulib-comp.m4 +++ /dev/null @@ -1,593 +0,0 @@ -# DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2010 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the compiled summary of the specification in -# gnulib-cache.m4. It lists the computed macro invocations that need -# to be invoked from configure.ac. -# In projects that use version control, this file can be treated like -# other built files. - - -# This macro should be invoked from ./configure.ac, in the section -# "Checks for programs", right after AC_PROG_CC, and certainly before -# any checks for libraries, header files, types and library functions. -AC_DEFUN([lgl_EARLY], -[ - m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace - m4_pattern_allow([^gl_ES$])dnl a valid locale name - m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - AC_REQUIRE([AC_PROG_RANLIB]) - # Code from module alignof: - # Code from module alloca-opt: - # Code from module alloca-opt-tests: - # Code from module arg-nonnull: - # Code from module binary-io: - # Code from module binary-io-tests: - # Code from module byteswap: - # Code from module byteswap-tests: - # Code from module c++defs: - # Code from module c-ctype: - # Code from module c-ctype-tests: - # Code from module close-hook: - # Code from module errno: - # Code from module errno-tests: - # Code from module extensions: - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - # Code from module float: - # Code from module fseeko: - AC_REQUIRE([AC_FUNC_FSEEKO]) - # Code from module fseeko-tests: - # Code from module ftello: - AC_REQUIRE([AC_FUNC_FSEEKO]) - # Code from module ftello-tests: - # Code from module func: - # Code from module func-tests: - # Code from module getpagesize: - # Code from module gettext: - # Code from module gettext-h: - # Code from module havelib: - # Code from module include_next: - # Code from module intprops: - # Code from module lib-msvc-compat: - # Code from module lib-symbol-versions: - # Code from module lseek: - # Code from module malloc-posix: - # Code from module memchr: - # Code from module memchr-tests: - # Code from module memmem-simple: - # Code from module minmax: - # Code from module multiarch: - # Code from module netdb: - # Code from module netdb-tests: - # Code from module read-file: - # Code from module read-file-tests: - # Code from module realloc-posix: - # Code from module size_max: - # Code from module snprintf: - # Code from module snprintf-tests: - # Code from module socketlib: - # Code from module sockets: - # Code from module sockets-tests: - # Code from module socklen: - # Code from module stdbool: - # Code from module stdbool-tests: - # Code from module stddef: - # Code from module stddef-tests: - # Code from module stdint: - # Code from module stdint-tests: - # Code from module stdio: - # Code from module stdio-tests: - # Code from module stdlib: - # Code from module stdlib-tests: - # Code from module strcase: - # Code from module string: - # Code from module string-tests: - # Code from module strings: - # Code from module strings-tests: - # Code from module strverscmp: - # Code from module strverscmp-tests: - # Code from module sys_socket: - # Code from module sys_socket-tests: - # Code from module sys_stat: - # Code from module sys_stat-tests: - # Code from module time: - # Code from module time-tests: - # Code from module time_r: - # Code from module unistd: - # Code from module unistd-tests: - # Code from module vasnprintf: - # Code from module vasnprintf-tests: - # Code from module vasprintf: - # Code from module vasprintf-tests: - # Code from module verify: - # Code from module verify-tests: - # Code from module vsnprintf: - # Code from module vsnprintf-tests: - # Code from module warn-on-use: - # Code from module wchar: - # Code from module wchar-tests: - # Code from module xsize: -]) - -# This macro should be invoked from ./configure.ac, in the section -# "Check for header files, types and library functions". -AC_DEFUN([lgl_INIT], -[ - AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) - gl_cond_libtool=true - gl_m4_base='gl/m4' - m4_pushdef([AC_LIBOBJ], m4_defn([lgl_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgl_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([lgl_LIBSOURCES])) - m4_pushdef([lgl_LIBSOURCES_LIST], []) - m4_pushdef([lgl_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='gl' - # Code from module alignof: - # Code from module alloca-opt: - gl_FUNC_ALLOCA - # Code from module arg-nonnull: - # Code from module byteswap: - gl_BYTESWAP - # Code from module c++defs: - # Code from module c-ctype: - # Code from module close-hook: - # Code from module errno: - gl_HEADER_ERRNO_H - # Code from module extensions: - # Code from module float: - gl_FLOAT_H - # Code from module fseeko: - gl_FUNC_FSEEKO - gl_STDIO_MODULE_INDICATOR([fseeko]) - # Code from module ftello: - gl_FUNC_FTELLO - gl_STDIO_MODULE_INDICATOR([ftello]) - # Code from module func: - gl_FUNC - # Code from module gettext: - dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. - AM_GNU_GETTEXT_VERSION([0.18.1]) - # Code from module gettext-h: - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - # Code from module havelib: - # Code from module include_next: - # Code from module lib-msvc-compat: - gl_LD_OUTPUT_DEF - # Code from module lib-symbol-versions: - gl_LD_VERSION_SCRIPT - # Code from module lseek: - gl_FUNC_LSEEK - gl_UNISTD_MODULE_INDICATOR([lseek]) - # Code from module malloc-posix: - gl_FUNC_MALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([malloc-posix]) - # Code from module memchr: - gl_FUNC_MEMCHR - gl_STRING_MODULE_INDICATOR([memchr]) - # Code from module memmem-simple: - gl_FUNC_MEMMEM_SIMPLE - gl_STRING_MODULE_INDICATOR([memmem]) - # Code from module minmax: - gl_MINMAX - # Code from module multiarch: - gl_MULTIARCH - # Code from module netdb: - gl_HEADER_NETDB - # Code from module read-file: - gl_FUNC_READ_FILE - # Code from module realloc-posix: - gl_FUNC_REALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([realloc-posix]) - # Code from module size_max: - gl_SIZE_MAX - # Code from module snprintf: - gl_FUNC_SNPRINTF - gl_STDIO_MODULE_INDICATOR([snprintf]) - # Code from module socketlib: - gl_SOCKETLIB - # Code from module sockets: - gl_SOCKETS - # Code from module socklen: - gl_TYPE_SOCKLEN_T - # Code from module stdbool: - AM_STDBOOL_H - # Code from module stddef: - gl_STDDEF_H - # Code from module stdint: - gl_STDINT_H - # Code from module stdio: - gl_STDIO_H - # Code from module stdlib: - gl_STDLIB_H - # Code from module strcase: - gl_STRCASE - # Code from module string: - gl_HEADER_STRING_H - # Code from module strings: - gl_HEADER_STRINGS_H - # Code from module strverscmp: - gl_FUNC_STRVERSCMP - gl_STRING_MODULE_INDICATOR([strverscmp]) - # Code from module sys_socket: - gl_HEADER_SYS_SOCKET - AC_PROG_MKDIR_P - # Code from module sys_stat: - gl_HEADER_SYS_STAT_H - AC_PROG_MKDIR_P - # Code from module time: - gl_HEADER_TIME_H - # Code from module time_r: - gl_TIME_R - gl_TIME_MODULE_INDICATOR([time_r]) - # Code from module unistd: - gl_UNISTD_H - # Code from module vasnprintf: - gl_FUNC_VASNPRINTF - # Code from module vasprintf: - gl_FUNC_VASPRINTF - gl_STDIO_MODULE_INDICATOR([vasprintf]) - m4_ifdef([AM_XGETTEXT_OPTION], - [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format]) - AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])]) - # Code from module verify: - # Code from module vsnprintf: - gl_FUNC_VSNPRINTF - gl_STDIO_MODULE_INDICATOR([vsnprintf]) - # Code from module warn-on-use: - # Code from module wchar: - gl_WCHAR_H - # Code from module xsize: - gl_XSIZE - # End of code from modules - m4_ifval(lgl_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([lgl_LIBSOURCES_DIR])[ || - for gl_file in ]lgl_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([lgl_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([lgl_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([lgl_LIBSOURCES_DIR]) - m4_popdef([lgl_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - lgl_libobjs= - lgl_ltlibobjs= - if test -n "$lgl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $lgl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - lgl_libobjs="$lgl_libobjs $i.$ac_objext" - lgl_ltlibobjs="$lgl_ltlibobjs $i.lo" - done - fi - AC_SUBST([lgl_LIBOBJS], [$lgl_libobjs]) - AC_SUBST([lgl_LTLIBOBJS], [$lgl_ltlibobjs]) - ]) - gltests_libdeps= - gltests_ltlibdeps= - m4_pushdef([AC_LIBOBJ], m4_defn([lgltests_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgltests_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([lgltests_LIBSOURCES])) - m4_pushdef([lgltests_LIBSOURCES_LIST], []) - m4_pushdef([lgltests_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='gl/tests' -changequote(,)dnl - lgltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS -changequote([, ])dnl - AC_SUBST([lgltests_WITNESS]) - gl_module_indicator_condition=$lgltests_WITNESS - m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) - gl_FUNC_UNGETC_WORKS - gl_FUNC_UNGETC_WORKS - gl_FUNC_GETPAGESIZE - gl_UNISTD_MODULE_INDICATOR([getpagesize]) - dnl Check for prerequisites for memory fence checks. - gl_FUNC_MMAP_ANON - AC_CHECK_HEADERS_ONCE([sys/mman.h]) - AC_CHECK_FUNCS_ONCE([mprotect]) - gt_TYPE_WCHAR_T - gt_TYPE_WINT_T - AC_CHECK_FUNCS_ONCE([shutdown]) - m4_popdef([gl_MODULE_INDICATOR_CONDITION]) - m4_ifval(lgltests_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([lgltests_LIBSOURCES_DIR])[ || - for gl_file in ]lgltests_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([lgltests_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([lgltests_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([lgltests_LIBSOURCES_DIR]) - m4_popdef([lgltests_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - lgltests_libobjs= - lgltests_ltlibobjs= - if test -n "$lgltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $lgltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - lgltests_libobjs="$lgltests_libobjs $i.$ac_objext" - lgltests_ltlibobjs="$lgltests_ltlibobjs $i.lo" - done - fi - AC_SUBST([lgltests_LIBOBJS], [$lgltests_libobjs]) - AC_SUBST([lgltests_LTLIBOBJS], [$lgltests_ltlibobjs]) - ]) - LIBTESTS_LIBDEPS="$gltests_libdeps" - AC_SUBST([LIBTESTS_LIBDEPS]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into lgl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgl_LIBOBJ], [ - AS_LITERAL_IF([$1], [lgl_LIBSOURCES([$1.c])])dnl - lgl_LIBOBJS="$lgl_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into lgl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgl_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [lgl_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([lgl_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([lgl_LIBSOURCES_DIR], [gl]) - m4_append([lgl_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into lgltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgltests_LIBOBJ], [ - AS_LITERAL_IF([$1], [lgltests_LIBSOURCES([$1.c])])dnl - lgltests_LIBOBJS="$lgltests_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into lgltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgltests_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [lgltests_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([lgltests_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([lgltests_LIBSOURCES_DIR], [gl/tests]) - m4_append([lgltests_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# This macro records the list of files which have been installed by -# gnulib-tool and may be removed by future gnulib-tool invocations. -AC_DEFUN([lgl_FILE_LIST], [ - build-aux/arg-nonnull.h - build-aux/c++defs.h - build-aux/config.rpath - build-aux/warn-on-use.h - lib/alignof.h - lib/alloca.in.h - lib/asnprintf.c - lib/asprintf.c - lib/byteswap.in.h - lib/c-ctype.c - lib/c-ctype.h - lib/close-hook.c - lib/close-hook.h - lib/errno.in.h - lib/float+.h - lib/float.in.h - lib/fseeko.c - lib/ftello.c - lib/gettext.h - lib/lseek.c - lib/malloc.c - lib/memchr.c - lib/memchr.valgrind - lib/memmem.c - lib/minmax.h - lib/netdb.in.h - lib/printf-args.c - lib/printf-args.h - lib/printf-parse.c - lib/printf-parse.h - lib/read-file.c - lib/read-file.h - lib/realloc.c - lib/size_max.h - lib/snprintf.c - lib/sockets.c - lib/sockets.h - lib/stdbool.in.h - lib/stddef.in.h - lib/stdint.in.h - lib/stdio-impl.h - lib/stdio-write.c - lib/stdio.in.h - lib/stdlib.in.h - lib/str-two-way.h - lib/strcasecmp.c - lib/string.in.h - lib/strings.in.h - lib/strncasecmp.c - lib/strverscmp.c - lib/sys_socket.in.h - lib/sys_stat.in.h - lib/time.in.h - lib/time_r.c - lib/unistd.in.h - lib/vasnprintf.c - lib/vasnprintf.h - lib/vasprintf.c - lib/verify.h - lib/vsnprintf.c - lib/w32sock.h - lib/wchar.in.h - lib/xsize.h - m4/00gnulib.m4 - m4/alloca.m4 - m4/asm-underscore.m4 - m4/byteswap.m4 - m4/codeset.m4 - m4/errno_h.m4 - m4/extensions.m4 - m4/fcntl-o.m4 - m4/float_h.m4 - m4/fseeko.m4 - m4/ftello.m4 - m4/func.m4 - m4/getpagesize.m4 - m4/gettext.m4 - m4/glibc2.m4 - m4/glibc21.m4 - m4/gnulib-common.m4 - m4/iconv.m4 - m4/include_next.m4 - m4/intdiv0.m4 - m4/intl.m4 - m4/intldir.m4 - m4/intlmacosx.m4 - m4/intmax.m4 - m4/intmax_t.m4 - m4/inttypes-pri.m4 - m4/inttypes_h.m4 - m4/lcmessage.m4 - m4/ld-output-def.m4 - m4/ld-version-script.m4 - m4/lib-ld.m4 - m4/lib-link.m4 - m4/lib-prefix.m4 - m4/lock.m4 - m4/longlong.m4 - m4/lseek.m4 - m4/malloc.m4 - m4/memchr.m4 - m4/memmem.m4 - m4/minmax.m4 - m4/mmap-anon.m4 - m4/multiarch.m4 - m4/netdb_h.m4 - m4/nls.m4 - m4/po.m4 - m4/printf-posix.m4 - m4/printf.m4 - m4/progtest.m4 - m4/read-file.m4 - m4/realloc.m4 - m4/size_max.m4 - m4/snprintf.m4 - m4/socketlib.m4 - m4/sockets.m4 - m4/socklen.m4 - m4/sockpfaf.m4 - m4/stdbool.m4 - m4/stddef_h.m4 - m4/stdint.m4 - m4/stdint_h.m4 - m4/stdio_h.m4 - m4/stdlib_h.m4 - m4/strcase.m4 - m4/string_h.m4 - m4/strings_h.m4 - m4/strverscmp.m4 - m4/sys_socket_h.m4 - m4/sys_stat_h.m4 - m4/threadlib.m4 - m4/time_h.m4 - m4/time_r.m4 - m4/uintmax_t.m4 - m4/ungetc.m4 - m4/unistd_h.m4 - m4/vasnprintf.m4 - m4/vasprintf.m4 - m4/visibility.m4 - m4/vsnprintf.m4 - m4/warn-on-use.m4 - m4/wchar_h.m4 - m4/wchar_t.m4 - m4/wint_t.m4 - m4/xsize.m4 - tests/init.sh - tests/macros.h - tests/signature.h - tests/test-alloca-opt.c - tests/test-binary-io.c - tests/test-binary-io.sh - tests/test-byteswap.c - tests/test-c-ctype.c - tests/test-errno.c - tests/test-fseeko.c - tests/test-fseeko.sh - tests/test-fseeko2.sh - tests/test-ftello.c - tests/test-ftello.sh - tests/test-ftello2.sh - tests/test-ftello3.c - tests/test-func.c - tests/test-memchr.c - tests/test-netdb.c - tests/test-read-file.c - tests/test-snprintf.c - tests/test-sockets.c - tests/test-stdbool.c - tests/test-stddef.c - tests/test-stdint.c - tests/test-stdio.c - tests/test-stdlib.c - tests/test-string.c - tests/test-strings.c - tests/test-strverscmp.c - tests/test-sys_socket.c - tests/test-sys_stat.c - tests/test-sys_wait.h - tests/test-time.c - tests/test-unistd.c - tests/test-vasnprintf.c - tests/test-vasprintf.c - tests/test-verify.c - tests/test-verify.sh - tests/test-vsnprintf.c - tests/test-wchar.c - tests/zerosize-ptr.h - tests=lib/binary-io.h - tests=lib/dummy.c - tests=lib/getpagesize.c - tests=lib/intprops.h -]) diff --git a/lib/gl/m4/gnulib-tool.m4 b/lib/gl/m4/gnulib-tool.m4 deleted file mode 100644 index 69e7733b99..0000000000 --- a/lib/gl/m4/gnulib-tool.m4 +++ /dev/null @@ -1,57 +0,0 @@ -# gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl The following macros need not be invoked explicitly. -dnl Invoking them does nothing except to declare default arguments -dnl for "gnulib-tool --import". - -dnl Usage: gl_LOCAL_DIR([DIR]) -AC_DEFUN([gl_LOCAL_DIR], []) - -dnl Usage: gl_MODULES([module1 module2 ...]) -AC_DEFUN([gl_MODULES], []) - -dnl Usage: gl_AVOID([module1 module2 ...]) -AC_DEFUN([gl_AVOID], []) - -dnl Usage: gl_SOURCE_BASE([DIR]) -AC_DEFUN([gl_SOURCE_BASE], []) - -dnl Usage: gl_M4_BASE([DIR]) -AC_DEFUN([gl_M4_BASE], []) - -dnl Usage: gl_PO_BASE([DIR]) -AC_DEFUN([gl_PO_BASE], []) - -dnl Usage: gl_DOC_BASE([DIR]) -AC_DEFUN([gl_DOC_BASE], []) - -dnl Usage: gl_TESTS_BASE([DIR]) -AC_DEFUN([gl_TESTS_BASE], []) - -dnl Usage: gl_WITH_TESTS -AC_DEFUN([gl_WITH_TESTS], []) - -dnl Usage: gl_LIB([LIBNAME]) -AC_DEFUN([gl_LIB], []) - -dnl Usage: gl_LGPL or gl_LGPL([VERSION]) -AC_DEFUN([gl_LGPL], []) - -dnl Usage: gl_MAKEFILE_NAME([FILENAME]) -AC_DEFUN([gl_MAKEFILE_NAME], []) - -dnl Usage: gl_LIBTOOL -AC_DEFUN([gl_LIBTOOL], []) - -dnl Usage: gl_MACRO_PREFIX([PREFIX]) -AC_DEFUN([gl_MACRO_PREFIX], []) - -dnl Usage: gl_PO_DOMAIN([DOMAIN]) -AC_DEFUN([gl_PO_DOMAIN], []) - -dnl Usage: gl_VC_FILES([BOOLEAN]) -AC_DEFUN([gl_VC_FILES], []) diff --git a/lib/gl/m4/iconv.m4 b/lib/gl/m4/iconv.m4 deleted file mode 100644 index 006c90780a..0000000000 --- a/lib/gl/m4/iconv.m4 +++ /dev/null @@ -1,268 +0,0 @@ -# iconv.m4 serial 17 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -[ - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([iconv]) -]) - -AC_DEFUN([AM_ICONV_LINK], -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - - dnl Add $INCICONV to CPPFLAGS before performing the following checks, - dnl because if the user has installed libiconv and not disabled its use - dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. - am_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - - AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stdlib.h> -#include <iconv.h> - ]], - [[iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);]])], - [am_cv_func_iconv=yes]) - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stdlib.h> -#include <iconv.h> - ]], - [[iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);]])], - [am_cv_lib_iconv=yes] - [am_cv_func_iconv=yes]) - LIBS="$am_save_LIBS" - fi - ]) - if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ - dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, - dnl Solaris 10. - am_save_LIBS="$LIBS" - if test $am_cv_lib_iconv = yes; then - LIBS="$LIBS $LIBICONV" - fi - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <iconv.h> -#include <string.h> -int main () -{ - int result = 0; - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ - { - iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); - if (cd_utf8_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\342\202\254"; /* EURO SIGN */ - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - result |= 1; - iconv_close (cd_utf8_to_88591); - } - } - /* Test against Solaris 10 bug: Failures are not distinguishable from - successful returns. */ - { - iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); - if (cd_ascii_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\263"; - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - result |= 2; - iconv_close (cd_ascii_to_88591); - } - } - /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304"; - static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; - size_t inbytesleft = 1; - char *outptr = buf; - size_t outbytesleft = 1; - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) - result |= 4; - iconv_close (cd_88591_to_utf8); - } - } -#if 0 /* This bug could be worked around by the caller. */ - /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; - char buf[50]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if ((int)res > 0) - result |= 8; - iconv_close (cd_88591_to_utf8); - } - } -#endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; - return result; -}]])], - [am_cv_func_iconv_works=yes], - [am_cv_func_iconv_works=no], - [ -changequote(,)dnl - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac -changequote([,])dnl - ]) - LIBS="$am_save_LIBS" - ]) - case "$am_cv_func_iconv_works" in - *no) am_func_iconv=no am_cv_lib_iconv=no ;; - *) am_func_iconv=yes ;; - esac - else - am_func_iconv=no am_cv_lib_iconv=no - fi - if test "$am_func_iconv" = yes; then - AC_DEFINE([HAVE_ICONV], [1], - [Define if you have the iconv() function and it works.]) - fi - if test "$am_cv_lib_iconv" = yes; then - AC_MSG_CHECKING([how to link with libiconv]) - AC_MSG_RESULT([$LIBICONV]) - else - dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV - dnl either. - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - AC_SUBST([LIBICONV]) - AC_SUBST([LTLIBICONV]) -]) - -dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to -dnl avoid warnings like -dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. -m4_define([gl_iconv_AC_DEFUN], - m4_version_prereq([2.64], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [m4_ifdef([gl_00GNULIB], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [[AC_DEFUN( - [$1], [$2])]])])) -gl_iconv_AC_DEFUN([AM_ICONV], -[ - AM_ICONV_LINK - if test "$am_cv_func_iconv" = yes; then - AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL([am_cv_proto_iconv], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stdlib.h> -#include <iconv.h> -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif - ]], - [[]])], - [am_cv_proto_iconv_arg1=""], - [am_cv_proto_iconv_arg1="const"]) - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([ - $am_cv_proto_iconv]) - AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], - [Define as const if the declaration of iconv() needs const.]) - dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. - m4_ifdef([gl_ICONV_H_DEFAULTS], - [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) - if test -n "$am_cv_proto_iconv_arg1"; then - ICONV_CONST="const" - fi - ]) - fi -]) diff --git a/lib/gl/m4/include_next.m4 b/lib/gl/m4/include_next.m4 deleted file mode 100644 index e37eb0567d..0000000000 --- a/lib/gl/m4/include_next.m4 +++ /dev/null @@ -1,217 +0,0 @@ -# include_next.m4 serial 16 -dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Derek Price. - -dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. -dnl -dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to -dnl 'include' otherwise. -dnl -dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler -dnl supports it in the special case that it is the first include directive in -dnl the given file, or to 'include' otherwise. -dnl -dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, -dnl so as to avoid GCC warnings when the gcc option -pedantic is used. -dnl '#pragma GCC system_header' has the same effect as if the file was found -dnl through the include search path specified with '-isystem' options (as -dnl opposed to the search path specified with '-I' options). Namely, gcc -dnl does not warn about some things, and on some systems (Solaris and Interix) -dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side -dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead -dnl of plain '__STDC__'. -dnl -dnl PRAGMA_COLUMNS can be used in files that override system header files, so -dnl as to avoid compilation errors on HP NonStop systems when the gnulib file -dnl is included by a system header file that does a "#pragma COLUMNS 80" (which -dnl has the effect of truncating the lines of that file and all files that it -dnl includes to 80 columns) and the gnulib file has lines longer than 80 -dnl columns. - -AC_DEFUN([gl_INCLUDE_NEXT], -[ - AC_LANG_PREPROC_REQUIRE() - AC_CACHE_CHECK([whether the preprocessor supports include_next], - [gl_cv_have_include_next], - [rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on - dnl AIX 6.1 support include_next when used as first preprocessor directive - dnl in a file, but not when preceded by another include directive. Check - dnl for this bug by including <stdio.h>. - dnl Additionally, with this same compiler, include_next is a no-op when - dnl used in a header file that was included by specifying its absolute - dnl file name. Despite these two bugs, include_next is used in the - dnl compiler's <math.h>. By virtue of the second bug, we need to use - dnl include_next as well in this case. - cat <<EOF > conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next <conftest.h> -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat <<EOF > conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include <stdio.h> -#include_next <conftest.h> -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat <<EOF > conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" -dnl We intentionally avoid using AC_LANG_SOURCE here. - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], - [gl_cv_have_include_next=yes], - [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], - [gl_cv_have_include_next=buggy], - [gl_cv_have_include_next=no]) - ]) - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - ]) - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - AC_SUBST([INCLUDE_NEXT]) - AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) - AC_SUBST([PRAGMA_SYSTEM_HEADER]) - AC_CACHE_CHECK([whether system header files limit the line length], - [gl_cv_pragma_columns], - [dnl HP NonStop systems, which define __TANDEM, have this misfeature. - AC_EGREP_CPP([choke me], - [ -#ifdef __TANDEM -choke me -#endif - ], - [gl_cv_pragma_columns=yes], - [gl_cv_pragma_columns=no]) - ]) - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - AC_SUBST([PRAGMA_COLUMNS]) -]) - -# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------------ -# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be -# '<foo.h>'; otherwise define it to be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# Also, if #include_next works as first preprocessing directive in a file, -# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to -# be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# That way, a header file with the following line: -# #@INCLUDE_NEXT@ @NEXT_FOO_H@ -# or -# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ -# behaves (after sed substitution) as if it contained -# #include_next <foo.h> -# even if the compiler does not support include_next. -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -AC_DEFUN([gl_CHECK_NEXT_HEADERS], -[ - AC_REQUIRE([gl_INCLUDE_NEXT]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_HEADERS_ONCE([$1]) - - m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_defn([gl_HEADER_NAME])) - if test $gl_cv_have_include_next = yes; then - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) - else - AC_CACHE_CHECK( - [absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_next_header]), - [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME])) - if test AS_VAR_GET(gl_header_exists) = yes; then - AC_LANG_CONFTEST( - [AC_LANG_SOURCE( - [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] - )]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header files - dnl that contain only a #include of other header files and no - dnl non-comment tokens of their own. This leads to a failure to - dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h> - dnl and others. The workaround is to force preservation of comments - dnl through option -C. This ensures all necessary #line directives - dnl are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - dnl eval is necessary to expand gl_absname_cpp. - dnl Ultrix and Pyramid sh refuse to redirect output of eval, - dnl so use subshell. - AS_VAR_SET([gl_next_header], - ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ - s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"']) - else - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) - fi - AS_VAR_POPDEF([gl_header_exists])]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET([gl_next_header])]) - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'gl_HEADER_NAME'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), - [$gl_next_as_first_directive]) - AS_VAR_POPDEF([gl_next_header])]) -]) - -# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; -# this fallback is safe for all earlier autoconf versions. -m4_define_default([AC_LANG_DEFINES_PROVIDED]) diff --git a/lib/gl/m4/intdiv0.m4 b/lib/gl/m4/intdiv0.m4 deleted file mode 100644 index 562882defe..0000000000 --- a/lib/gl/m4/intdiv0.m4 +++ /dev/null @@ -1,87 +0,0 @@ -# intdiv0.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2002, 2007-2008, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([gt_INTDIV0], -[ - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - - AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], - gt_cv_int_divbyzero_sigfpe, - [ - gt_cv_int_divbyzero_sigfpe= -changequote(,)dnl - case "$host_os" in - macos* | darwin[6-9]* | darwin[1-9][0-9]*) - # On MacOS X 10.2 or newer, just assume the same as when cross- - # compiling. If we were to perform the real test, 1 Crash Report - # dialog window would pop up. - case "$host_cpu" in - i[34567]86 | x86_64) - gt_cv_int_divbyzero_sigfpe="guessing yes" ;; - esac - ;; - esac -changequote([,])dnl - if test -z "$gt_cv_int_divbyzero_sigfpe"; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdlib.h> -#include <signal.h> - -static void -sigfpe_handler (int sig) -{ - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} - -int x = 1; -int y = 0; -int z; -int nan; - -int main () -{ - signal (SIGFPE, sigfpe_handler); -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) - signal (SIGTRAP, sigfpe_handler); -#endif -/* Linux/SPARC yields signal SIGILL. */ -#if defined (__sparc__) && defined (__linux__) - signal (SIGILL, sigfpe_handler); -#endif - - z = x / y; - nan = y / y; - exit (2); -} -]])], - [gt_cv_int_divbyzero_sigfpe=yes], - [gt_cv_int_divbyzero_sigfpe=no], - [ - # Guess based on the CPU. -changequote(,)dnl - case "$host_cpu" in - alpha* | i[34567]86 | x86_64 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac -changequote([,])dnl - ]) - fi - ]) - case "$gt_cv_int_divbyzero_sigfpe" in - *yes) value=1;; - *) value=0;; - esac - AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], - [Define if integer division by zero raises signal SIGFPE.]) -]) diff --git a/lib/gl/m4/intl.m4 b/lib/gl/m4/intl.m4 deleted file mode 100644 index d84bc4a9b4..0000000000 --- a/lib/gl/m4/intl.m4 +++ /dev/null @@ -1,300 +0,0 @@ -# intl.m4 serial 17b -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. - -AC_PREREQ([2.53]) - -dnl Checks for all prerequisites of the intl subdirectory, -dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -AC_DEFUN([AM_INTL_SUBDIR], -[ - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([gt_GLIBC2])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([gl_VISIBILITY])dnl - AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl - AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl - AC_REQUIRE([gt_TYPE_WCHAR_T])dnl - AC_REQUIRE([gt_TYPE_WINT_T])dnl - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gt_TYPE_INTMAX_T]) - AC_REQUIRE([gt_PRINTF_POSIX]) - AC_REQUIRE([gl_GLIBC21])dnl - AC_REQUIRE([gl_XSIZE])dnl - AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl - AC_REQUIRE([gt_INTL_MACOSX])dnl - - dnl Support for automake's --enable-silent-rules. - case "$enable_silent_rules" in - yes) INTL_DEFAULT_VERBOSITY=0;; - no) INTL_DEFAULT_VERBOSITY=1;; - *) INTL_DEFAULT_VERBOSITY=1;; - esac - AC_SUBST([INTL_DEFAULT_VERBOSITY]) - - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) - AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ - snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) - - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) - gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - AC_SUBST([HAVE_POSIX_PRINTF]) - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - AC_SUBST([HAVE_ASPRINTF]) - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - AC_SUBST([HAVE_SNPRINTF]) - if test "$ac_cv_func_newlocale" = yes; then - HAVE_NEWLOCALE=1 - else - HAVE_NEWLOCALE=0 - fi - AC_SUBST([HAVE_NEWLOCALE]) - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - AC_SUBST([HAVE_WPRINTF]) - - AM_LANGINFO_CODESET - gt_LC_MESSAGES - - dnl Compilation on mingw and Cygwin needs special Makefile rules, because - dnl 1. when we install a shared library, we must arrange to export - dnl auxiliary pointer variables for every exported variable, - dnl 2. when we install a shared library and a static library simultaneously, - dnl the include file specifies __declspec(dllimport) and therefore we - dnl must arrange to define the auxiliary pointer variables for the - dnl exported variables _also_ in the static library. - if test "$enable_shared" = yes; then - case "$host_os" in - mingw* | cygwin*) is_woe32dll=yes ;; - *) is_woe32dll=no ;; - esac - else - is_woe32dll=no - fi - WOE32DLL=$is_woe32dll - AC_SUBST([WOE32DLL]) - - dnl On mingw and Cygwin, we can activate special Makefile rules which add - dnl version information to the shared libraries and executables. - case "$host_os" in - mingw* | cygwin*) is_woe32=yes ;; - *) is_woe32=no ;; - esac - WOE32=$is_woe32 - AC_SUBST([WOE32]) - if test $WOE32 = yes; then - dnl Check for a program that compiles Windows resource files. - AC_CHECK_TOOL([WINDRES], [windres]) - fi - - dnl Determine whether when creating a library, "-lc" should be passed to - dnl libtool or not. On many platforms, it is required for the libtool option - dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool - dnl in the *.la files - makes it impossible to create multithreaded programs, - dnl because libtool also reorders the -lc to come before the -pthread, and - dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>. - case "$host_os" in - hpux*) LTLIBC="" ;; - *) LTLIBC="-lc" ;; - esac - AC_SUBST([LTLIBC]) - - dnl Rename some macros and functions used for locking. - AH_BOTTOM([ -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded -]) -]) - - -dnl Checks for the core files of the intl subdirectory: -dnl dcigettext.c -dnl eval-plural.h -dnl explodename.c -dnl finddomain.c -dnl gettextP.h -dnl gmo.h -dnl hash-string.h hash-string.c -dnl l10nflist.c -dnl libgnuintl.h.in (except the *printf stuff) -dnl loadinfo.h -dnl loadmsgcat.c -dnl localealias.c -dnl log.c -dnl plural-exp.h plural-exp.c -dnl plural.y -dnl Used by libglocale. -AC_DEFUN([gt_INTL_SUBDIR_CORE], -[ - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([gt_INTDIV0])dnl - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gt_INTTYPES_PRI])dnl - AC_REQUIRE([gl_LOCK])dnl - - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], - [[]])], - [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], - [Define to 1 if the compiler understands __builtin_expect.])]) - - AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ - stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ - argz_stringify argz_next __fsetlocking]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>]) - gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>]) - - AM_ICONV - - dnl intl/plural.c is generated from intl/plural.y. It requires bison, - dnl because plural.y uses bison specific features. It requires at least - dnl bison-1.26 because earlier versions generate a plural.c that doesn't - dnl compile. - dnl bison is only needed for the maintainer (who touches plural.y). But in - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put - dnl the rule in general Makefile. Now, some people carelessly touch the - dnl files or have a broken "make" program, hence the plural.c rule will - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not - dnl present or too old. - AC_CHECK_PROGS([INTLBISON], [bison]) - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - dnl Found it, now check the version. - AC_MSG_CHECKING([version of bison]) -changequote(<<,>>)dnl - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -changequote([,])dnl - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - AC_MSG_RESULT([$ac_prog_version]) - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi -]) - - -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], -[ - AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[$2]], - [[ -#ifndef $1 - char *p = (char *) $1; -#endif - ]])], - [ac_cv_have_decl_$1=yes], - [ac_cv_have_decl_$1=no])]) - if test $ac_cv_have_decl_$1 = yes; then - gt_value=1 - else - gt_value=0 - fi - AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) -]) diff --git a/lib/gl/m4/intldir.m4 b/lib/gl/m4/intldir.m4 deleted file mode 100644 index ebae76d361..0000000000 --- a/lib/gl/m4/intldir.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# intldir.m4 serial 2 (gettext-0.18) -dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -AC_PREREQ([2.52]) - -dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. -AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) diff --git a/lib/gl/m4/intlmacosx.m4 b/lib/gl/m4/intlmacosx.m4 deleted file mode 100644 index f0f7c98726..0000000000 --- a/lib/gl/m4/intlmacosx.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# intlmacosx.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Checks for special options needed on MacOS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in MacOS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <CoreFoundation/CFPreferences.h>]], - [[CFPreferencesCopyAppValue(NULL, NULL)]])], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <CoreFoundation/CFLocale.h>]], - [[CFLocaleCopyCurrent();]])], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) diff --git a/lib/gl/m4/intmax.m4 b/lib/gl/m4/intmax.m4 deleted file mode 100644 index 2c0f2afe59..0000000000 --- a/lib/gl/m4/intmax.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# intmax.m4 serial 6 (gettext-0.18.2) -dnl Copyright (C) 2002-2005, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether the system has the 'intmax_t' type, but don't attempt to -dnl find a replacement if it is lacking. - -AC_DEFUN([gt_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stddef.h> -#include <stdlib.h> -#if HAVE_STDINT_H_WITH_UINTMAX -#include <stdint.h> -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include <inttypes.h> -#endif - ]], - [[intmax_t x = -1; - return !x;]])], - [gt_cv_c_intmax_t=yes], - [gt_cv_c_intmax_t=no])]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) - fi -]) diff --git a/lib/gl/m4/intmax_t.m4 b/lib/gl/m4/intmax_t.m4 deleted file mode 100644 index 493e4a9328..0000000000 --- a/lib/gl/m4/intmax_t.m4 +++ /dev/null @@ -1,67 +0,0 @@ -# intmax_t.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ([2.53]) - -# Define intmax_t to 'long' or 'long long' -# if it is not already defined in <stdint.h> or <inttypes.h>. - -AC_DEFUN([gl_AC_TYPE_INTMAX_T], -[ - dnl For simplicity, we assume that a header file defines 'intmax_t' if and - dnl only if it defines 'uintmax_t'. - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], - [Define to long or long long if <inttypes.h> and <stdint.h> don't define.]) - else - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) - fi -]) - -dnl An alternative would be to explicitly test for 'intmax_t'. - -AC_DEFUN([gt_AC_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <stddef.h> -#include <stdlib.h> -#if HAVE_STDINT_H_WITH_UINTMAX -#include <stdint.h> -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include <inttypes.h> -#endif - ]], - [[intmax_t x = -1; return !x;]])], - [gt_cv_c_intmax_t=yes], - [gt_cv_c_intmax_t=no])]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) - else - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], - [Define to long or long long if <stdint.h> and <inttypes.h> don't define.]) - fi -]) diff --git a/lib/gl/m4/inttypes-pri.m4 b/lib/gl/m4/inttypes-pri.m4 deleted file mode 100644 index ee96bcd978..0000000000 --- a/lib/gl/m4/inttypes-pri.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ([2.53]) - -# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* -# macros to non-string values. This is the case on AIX 4.3.3. - -AC_DEFUN([gt_INTTYPES_PRI], -[ - AC_CHECK_HEADERS([inttypes.h]) - if test $ac_cv_header_inttypes_h = yes; then - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - [gt_cv_inttypes_pri_broken], - [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <inttypes.h> -#ifdef PRId32 -char *p = PRId32; -#endif - ]], - [[]])], - [gt_cv_inttypes_pri_broken=no], - [gt_cv_inttypes_pri_broken=yes]) - ]) - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], - [Define if <inttypes.h> exists and defines unusable PRI* macros.]) - PRI_MACROS_BROKEN=1 - else - PRI_MACROS_BROKEN=0 - fi - AC_SUBST([PRI_MACROS_BROKEN]) -]) diff --git a/lib/gl/m4/inttypes_h.m4 b/lib/gl/m4/inttypes_h.m4 deleted file mode 100644 index 9d8f926926..0000000000 --- a/lib/gl/m4/inttypes_h.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, -# doesn't clash with <sys/types.h>, and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <sys/types.h> -#include <inttypes.h> - ]], - [[uintmax_t i = (uintmax_t) -1; return !i;]])], - [gl_cv_header_inttypes_h=yes], - [gl_cv_header_inttypes_h=no])]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], - [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, - and declares uintmax_t. ]) - fi -]) diff --git a/lib/gl/m4/lcmessage.m4 b/lib/gl/m4/lcmessage.m4 deleted file mode 100644 index 232da73b69..0000000000 --- a/lib/gl/m4/lcmessage.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# lcmessage.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995. - -# Check whether LC_MESSAGES is available in <locale.h>. - -AC_DEFUN([gt_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <locale.h>]], - [[return LC_MESSAGES]])], - [gt_cv_val_LC_MESSAGES=yes], - [gt_cv_val_LC_MESSAGES=no])]) - if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE([HAVE_LC_MESSAGES], [1], - [Define if your <locale.h> file defines LC_MESSAGES.]) - fi -]) diff --git a/lib/gl/m4/ld-output-def.m4 b/lib/gl/m4/ld-output-def.m4 deleted file mode 100644 index 2dc6bf5205..0000000000 --- a/lib/gl/m4/ld-output-def.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# ld-output-def.m4 serial 2 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# gl_LD_OUTPUT_DEF() -# ------------- -# Check if linker supports -Wl,--output-def and define automake -# conditional HAVE_LD_OUTPUT_DEF if it is. -AC_DEFUN([gl_LD_OUTPUT_DEF], -[ - AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def], - [gl_cv_ld_output_def], - [if test "$enable_shared" = no; then - gl_cv_ld_output_def="not needed, shared libraries are disabled" - else - gl_ldflags_save=$LDFLAGS - LDFLAGS="-Wl,--output-def,conftest.def" - AC_LINK_IFELSE([AC_LANG_PROGRAM([])], - [gl_cv_ld_output_def=yes], - [gl_cv_ld_output_def=no]) - rm -f conftest.def - LDFLAGS="$gl_ldflags_save" - fi]) - AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes") -]) diff --git a/lib/gl/m4/ld-version-script.m4 b/lib/gl/m4/ld-version-script.m4 deleted file mode 100644 index 8fd8c8995c..0000000000 --- a/lib/gl/m4/ld-version-script.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# ld-version-script.m4 serial 2 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# FIXME: The test below returns a false positive for mingw -# cross-compiles, 'local:' statements does not reduce number of -# exported symbols in a DLL. Use --disable-ld-version-script to work -# around the problem. - -# gl_LD_VERSION_SCRIPT -# -------------------- -# Check if LD supports linker scripts, and define automake conditional -# HAVE_LD_VERSION_SCRIPT if so. -AC_DEFUN([gl_LD_VERSION_SCRIPT], -[ - AC_ARG_ENABLE([ld-version-script], - AS_HELP_STRING([--enable-ld-version-script], - [enable linker version script (default is enabled when possible)]), - [have_ld_version_script=$enableval], []) - if test -z "$have_ld_version_script"; then - AC_MSG_CHECKING([if LD -Wl,--version-script works]) - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - cat > conftest.map <<EOF -VERS_1 { - global: sym; -}; - -VERS_2 { - global: sym; -} VERS_1; -EOF - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [have_ld_version_script=yes], [have_ld_version_script=no]) - rm -f conftest.map - LDFLAGS="$save_LDFLAGS" - AC_MSG_RESULT($have_ld_version_script) - fi - AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") -]) diff --git a/lib/gl/m4/lib-ld.m4 b/lib/gl/m4/lib-ld.m4 deleted file mode 100644 index 294db72e13..0000000000 --- a/lib/gl/m4/lib-ld.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# lib-ld.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. - -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. -AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - acl_cv_prog_gnu_ld=yes ;; -*) - acl_cv_prog_gnu_ld=no ;; -esac]) -with_gnu_ld=$acl_cv_prog_gnu_ld -]) - -dnl From libtool-1.4. Sets the variable LD. -AC_DEFUN([AC_LIB_PROG_LD], -[AC_ARG_WITH([gnu-ld], -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || PATH_SEPARATOR=';' - } -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT([$LD]) -else - AC_MSG_RESULT([no]) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_LIB_PROG_LD_GNU -]) diff --git a/lib/gl/m4/lib-link.m4 b/lib/gl/m4/lib-link.m4 deleted file mode 100644 index 2ea9d6d073..0000000000 --- a/lib/gl/m4/lib-link.m4 +++ /dev/null @@ -1,775 +0,0 @@ -# lib-link.m4 serial 25 (gettext-0.18.2) -dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ([2.54]) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[m4_translit([$1],[./+-], [____])]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - popdef([NAME]) - popdef([Name]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. The missing-message -dnl defaults to 'no' and may contain additional hints for the user. -dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} -dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[m4_translit([$1],[./+-], [____])]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, - dnl because these -l options might require -L options that are present in - dnl LIBS. -l options benefit only from the -L options listed before it. - dnl Otherwise, add it to the front of LIBS, because it may be a static - dnl library that depends on another static library that is present in LIBS. - dnl Static libraries benefit only from the static libraries listed after - dnl it. - case " $LIB[]NAME" in - *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; - *) LIBS="$LIB[]NAME $LIBS" ;; - esac - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[$3]], [[$4]])], - [ac_cv_lib[]Name=yes], - [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - LIB[]NAME[]_PREFIX= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - popdef([NAME]) - popdef([Name]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl acl_libext, -dnl acl_shlibext, -dnl acl_hardcode_libdir_flag_spec, -dnl acl_hardcode_libdir_separator, -dnl acl_hardcode_direct, -dnl acl_hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE([rpath], - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_FROMPACKAGE(name, package) -dnl declares that libname comes from the given package. The configure file -dnl will then not have a --with-libname-prefix option but a -dnl --with-package-prefix option. Several libraries can come from the same -dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar -dnl macro call that searches for libname. -AC_DEFUN([AC_LIB_FROMPACKAGE], -[ - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - define([acl_frompackage_]NAME, [$2]) - popdef([NAME]) - pushdef([PACK],[$2]) - pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - define([acl_libsinpackage_]PACKUP, - m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) - popdef([PACKUP]) - popdef([PACK]) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found -dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -[ - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - LIB[]NAME[]_PREFIX= - dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been - dnl computed. So it has to be reset here. - HAVE_LIB[]NAME= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - dnl Linking with a shared library. We attempt to hardcode its - dnl directory into the executable's runpath, unless it's the - dnl standard /usr/lib. - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$acl_hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - dnl Assume the include files are nearby. - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - dnl 3. if it's already present in $LDFLAGS or the already - dnl constructed $LIBNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi - popdef([P_A_C_K]) - popdef([PACKLIBS]) - popdef([PACKUP]) - popdef([PACK]) - popdef([NAME]) -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) - -dnl For those cases where a variable contains several -L and -l options -dnl referring to unknown libraries and directories, this macro determines the -dnl necessary additional linker options for the runtime path. -dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -dnl otherwise linking without libtool is assumed. -AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -[ - AC_REQUIRE([AC_LIB_RPATH]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - $1= - if test "$enable_rpath" != no; then - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode directories into the resulting - dnl binary. - rpathdirs= - next= - for opt in $2; do - if test -n "$next"; then - dir="$next" - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= - else - case $opt in - -L) next=yes ;; - -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= ;; - *) next= ;; - esac - fi - done - if test "X$rpathdirs" != "X"; then - if test -n ""$3""; then - dnl libtool is used for linking. Use -R options. - for dir in $rpathdirs; do - $1="${$1}${$1:+ }-R$dir" - done - else - dnl The linker is used for linking directly. - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user - dnl must pass all path elements in one option. - alldirs= - for dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="$flag" - else - dnl The -rpath options are cumulative. - for dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="${$1}${$1:+ }$flag" - done - fi - fi - fi - fi - fi - AC_SUBST([$1]) -]) diff --git a/lib/gl/m4/lib-prefix.m4 b/lib/gl/m4/lib-prefix.m4 deleted file mode 100644 index 1601ceaefd..0000000000 --- a/lib/gl/m4/lib-prefix.m4 +++ /dev/null @@ -1,224 +0,0 @@ -# lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -AC_DEFUN([AC_LIB_PREFIX], -[ - AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's already present in $LDFLAGS, - dnl 3. if it's /usr/local/lib and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". -AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -[ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". - dnl On Solaris systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or - dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. - AC_REQUIRE([AC_CANONICAL_HOST]) - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ -#ifdef _LP64 -sixtyfour bits -#endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -]) diff --git a/lib/gl/m4/lock.m4 b/lib/gl/m4/lock.m4 deleted file mode 100644 index f71c66459e..0000000000 --- a/lib/gl/m4/lock.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# lock.m4 serial 11 (gettext-0.18.2) -dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([gl_LOCK], -[ - AC_REQUIRE([gl_THREADLIB]) - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - AC_CHECK_TYPE([pthread_rwlock_t], - [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], - [Define if the POSIX multithreading library has read/write locks.])], - [], - [#include <pthread.h>]) - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[#include <pthread.h>]], - [[ -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - ]])], - [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], - [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) - fi - gl_PREREQ_LOCK -]) - -# Prerequisites of lib/lock.c. -AC_DEFUN([gl_PREREQ_LOCK], [ - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/lib/gl/m4/longlong.m4 b/lib/gl/m4/longlong.m4 deleted file mode 100644 index cca3c1a90f..0000000000 --- a/lib/gl/m4/longlong.m4 +++ /dev/null @@ -1,106 +0,0 @@ -# longlong.m4 serial 14 -dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug isn't important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include <limits.h> - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no], - [ac_cv_type_long_long_int=yes])], - [ac_cv_type_long_long_int=no])]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [ac_cv_type_unsigned_long_long_int=yes], - [ac_cv_type_unsigned_long_long_int=no])]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/lib/gl/m4/lseek.m4 b/lib/gl/m4/lseek.m4 deleted file mode 100644 index b0612c7e17..0000000000 --- a/lib/gl/m4/lseek.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# lseek.m4 serial 6 -dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_LSEEK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], - [if test $cross_compiling = no; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include <sys/types.h> /* for off_t */ -#include <stdio.h> /* for SEEK_CUR */ -#include <unistd.h>]], [[ - /* Exit with success only if stdin is seekable. */ - return lseek (0, (off_t)0, SEEK_CUR) < 0; -]])], - [if test -s conftest$ac_exeext \ - && ./conftest$ac_exeext < conftest.$ac_ext \ - && test 1 = "`echo hi \ - | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then - gl_cv_func_lseek_pipe=yes - else - gl_cv_func_lseek_pipe=no - fi], - [gl_cv_func_lseek_pipe=no]) - else - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ -/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ - Choke me. -#endif]])], - [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) - fi]) - if test $gl_cv_func_lseek_pipe = no; then - gl_REPLACE_LSEEK - fi -]) - -AC_DEFUN([gl_REPLACE_LSEEK], -[ - AC_LIBOBJ([lseek]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - REPLACE_LSEEK=1 - AC_DEFINE([LSEEK_PIPE_BROKEN], [1], - [Define to 1 if lseek does not detect pipes.]) -]) diff --git a/lib/gl/m4/malloc.m4 b/lib/gl/m4/malloc.m4 deleted file mode 100644 index 7a749254a1..0000000000 --- a/lib/gl/m4/malloc.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# malloc.m4 serial 12 -dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_FUNC_MALLOC_GNU -# ------------------ -# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if -# it is not. -AC_DEFUN([gl_FUNC_MALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. - _AC_FUNC_MALLOC_IF( - [AC_DEFINE([HAVE_MALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'malloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_MALLOC_GNU], [0]) - gl_REPLACE_MALLOC - ]) -]) - -# gl_FUNC_MALLOC_POSIX -# -------------------- -# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace malloc if it is not. -AC_DEFUN([gl_FUNC_MALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_MALLOC_POSIX], [1], - [Define if the 'malloc' function is POSIX compliant.]) - else - gl_REPLACE_MALLOC - fi -]) - -# Test whether malloc, realloc, calloc are POSIX compliant, -# Set gl_cv_func_malloc_posix to yes or no accordingly. -AC_DEFUN([gl_CHECK_MALLOC_POSIX], -[ - AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], - [gl_cv_func_malloc_posix], - [ - dnl It is too dangerous to try to allocate a large amount of memory: - dnl some systems go to their knees when you do that. So assume that - dnl all Unix implementations of the function are POSIX compliant. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif - ]])], - [gl_cv_func_malloc_posix=yes], - [gl_cv_func_malloc_posix=no]) - ]) -]) - -AC_DEFUN([gl_REPLACE_MALLOC], -[ - AC_LIBOBJ([malloc]) - REPLACE_MALLOC=1 -]) diff --git a/lib/gl/m4/memchr.m4 b/lib/gl/m4/memchr.m4 deleted file mode 100644 index 46db9fb654..0000000000 --- a/lib/gl/m4/memchr.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# memchr.m4 serial 10 -dnl Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_FUNC_MEMCHR], -[ - dnl Check for prerequisites for memory fence checks. - gl_FUNC_MMAP_ANON - AC_CHECK_HEADERS_ONCE([sys/mman.h]) - AC_CHECK_FUNCS_ONCE([mprotect]) - - dnl These days, we assume memchr is present. But just in case... - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([memchr]) - if test $ac_cv_func_memchr = yes; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <string.h> -#if HAVE_SYS_MMAN_H -# include <fcntl.h> -# include <unistd.h> -# include <sys/types.h> -# include <sys/mman.h> -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif -]], [[ - int result = 0; - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - result |= 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - result |= 2; - if (memchr (fence - 1, 0, 3) != fence - 1) - result |= 4; - } - return result; -]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], - [dnl Be pessimistic for now. - gl_cv_func_memchr_works="guessing no"])]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - else - HAVE_MEMCHR=0 - fi - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - AC_LIBOBJ([memchr]) - gl_PREREQ_MEMCHR - fi -]) - -# Prerequisites of lib/memchr.c. -AC_DEFUN([gl_PREREQ_MEMCHR], [ - AC_CHECK_HEADERS([bp-sym.h]) -]) diff --git a/lib/gl/m4/memmem.m4 b/lib/gl/m4/memmem.m4 deleted file mode 100644 index 7df132e102..0000000000 --- a/lib/gl/m4/memmem.m4 +++ /dev/null @@ -1,131 +0,0 @@ -# memmem.m4 serial 20 -dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software -dnl Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Check that memmem is present. -AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], -[ - dnl Persuade glibc <string.h> to declare memmem(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([memmem]) - AC_CHECK_DECLS_ONCE([memmem]) - if test $ac_cv_have_decl_memmem = no; then - HAVE_DECL_MEMMEM=0 - else - dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. - AC_CACHE_CHECK([whether memmem works], - [gl_cv_func_memmem_works_always], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <string.h> /* for memmem */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P -]], [[return !!memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)); - ]])], - [gl_cv_func_memmem_works_always=yes], - [gl_cv_func_memmem_works_always=no], - [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. Assume that it - dnl works on all other platforms, even if it is not linear. - AC_EGREP_CPP([Lucky user], - [ -#ifdef __GNU_LIBRARY__ - #include <features.h> - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include <cygwin/version.h> - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif - ], - [gl_cv_func_memmem_works_always=yes], - [gl_cv_func_memmem_works_always="guessing no"]) - ]) - ]) - if test "$gl_cv_func_memmem_works_always" != yes; then - REPLACE_MEMMEM=1 - AC_LIBOBJ([memmem]) - fi - fi - gl_PREREQ_MEMMEM -]) # gl_FUNC_MEMMEM_SIMPLE - -dnl Additionally, check that memmem is efficient and handles empty needles. -AC_DEFUN([gl_FUNC_MEMMEM], -[ - AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE]) - if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then - AC_CACHE_CHECK([whether memmem works in linear time], - [gl_cv_func_memmem_works_fast], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <signal.h> /* for signal */ -#include <string.h> /* for memmem */ -#include <stdlib.h> /* for malloc */ -#include <unistd.h> /* for alarm */ -static void quit (int sig) { exit (sig + 128); } -]], [[ - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 1); - char *needle = (char *) malloc (m + 1); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also lack memmem. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - memset (needle, 'A', m); - needle[m] = 'B'; - if (!memmem (haystack, 2 * m + 1, needle, m + 1)) - result |= 1; - } - /* Check for empty needle behavior. */ - if (!memmem ("a", 1, 0, 0)) - result |= 2; - return result; - ]])], - [gl_cv_func_memmem_works_fast=yes], [gl_cv_func_memmem_works_fast=no], - [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a - dnl bug-free memmem that works in linear time. - AC_EGREP_CPP([Lucky user], - [ -#include <features.h> -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include <cygwin/version.h> - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#endif - ], - [gl_cv_func_memmem_works_fast=yes], - [gl_cv_func_memmem_works_fast="guessing no"]) - ]) - ]) - if test "$gl_cv_func_memmem_works_fast" != yes; then - REPLACE_MEMMEM=1 - AC_LIBOBJ([memmem]) - fi - fi -]) # gl_FUNC_MEMMEM - -# Prerequisites of lib/memmem.c. -AC_DEFUN([gl_PREREQ_MEMMEM], [:]) diff --git a/lib/gl/m4/minmax.m4 b/lib/gl/m4/minmax.m4 deleted file mode 100644 index a5c42dea0f..0000000000 --- a/lib/gl/m4/minmax.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# minmax.m4 serial 4 -dnl Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ([2.53]) - -AC_DEFUN([gl_MINMAX], -[ - AC_REQUIRE([gl_PREREQ_MINMAX]) -]) - -# Prerequisites of lib/minmax.h. -AC_DEFUN([gl_PREREQ_MINMAX], -[ - gl_MINMAX_IN_HEADER([limits.h]) - gl_MINMAX_IN_HEADER([sys/param.h]) -]) - -dnl gl_MINMAX_IN_HEADER(HEADER) -dnl The parameter has to be a literal header name; it cannot be macro, -dnl nor a shell variable. (Because autoheader collects only AC_DEFINE -dnl invocations with a literal macro name.) -AC_DEFUN([gl_MINMAX_IN_HEADER], -[ - m4_pushdef([header], AS_TR_SH([$1])) - m4_pushdef([HEADER], AS_TR_CPP([$1])) - AC_CACHE_CHECK([whether <$1> defines MIN and MAX], - [gl_cv_minmax_in_]header, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <$1> - int x = MIN (42, 17);]], - [[]])], - [gl_cv_minmax_in_]header[=yes], - [gl_cv_minmax_in_]header[=no])]) - if test $gl_cv_minmax_in_[]header = yes; then - AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, - [Define to 1 if <$1> defines the MIN and MAX macros.]) - fi - m4_popdef([HEADER]) - m4_popdef([header]) -]) diff --git a/lib/gl/m4/mmap-anon.m4 b/lib/gl/m4/mmap-anon.m4 deleted file mode 100644 index e20fc3c670..0000000000 --- a/lib/gl/m4/mmap-anon.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# mmap-anon.m4 serial 9 -dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Detect how mmap can be used to create anonymous (not file-backed) memory -# mappings. -# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS -# and MAP_ANON exist and have the same value. -# - On HP-UX, only MAP_ANONYMOUS exists. -# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. -# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be -# used. - -AC_DEFUN([gl_FUNC_MMAP_ANON], -[ - dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) - - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - AC_MSG_CHECKING([for MAP_ANONYMOUS]) - AC_EGREP_CPP([I cant identify this map.], [ -#include <sys/mman.h> -#ifdef MAP_ANONYMOUS - I cant identify this map. -#endif -], - [gl_have_mmap_anonymous=yes]) - if test $gl_have_mmap_anonymous != yes; then - AC_EGREP_CPP([I cant identify this map.], [ -#include <sys/mman.h> -#ifdef MAP_ANON - I cant identify this map. -#endif -], - [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], - [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) - gl_have_mmap_anonymous=yes]) - fi - AC_MSG_RESULT([$gl_have_mmap_anonymous]) - if test $gl_have_mmap_anonymous = yes; then - AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], - [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and <sys/mman.h>.]) - fi - fi -]) diff --git a/lib/gl/m4/multiarch.m4 b/lib/gl/m4/multiarch.m4 deleted file mode 100644 index 389bd2bbaa..0000000000 --- a/lib/gl/m4/multiarch.m4 +++ /dev/null @@ -1,65 +0,0 @@ -# multiarch.m4 serial 5 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Determine whether the compiler is or may be producing universal binaries. -# -# On MacOS X 10.5 and later systems, the user can create libraries and -# executables that work on multiple system types--known as "fat" or -# "universal" binaries--by specifying multiple '-arch' options to the -# compiler but only a single '-arch' option to the preprocessor. Like -# this: -# -# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CPP="gcc -E" CXXCPP="g++ -E" -# -# Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the -# beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly. - -AC_DEFUN_ONCE([gl_MULTIARCH], -[ - dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. - gl_cv_c_multiarch=no - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - ]])], - [ - dnl Check for potential -arch flags. It is not universal unless - dnl there are at least two -arch flags with different values. - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - ]) - if test $gl_cv_c_multiarch = yes; then - AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1], - [Define if the compiler is building for multiple architectures of Apple platforms at once.]) - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - AC_SUBST([APPLE_UNIVERSAL_BUILD]) -]) diff --git a/lib/gl/m4/netdb_h.m4 b/lib/gl/m4/netdb_h.m4 deleted file mode 100644 index c870fb61b9..0000000000 --- a/lib/gl/m4/netdb_h.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# netdb_h.m4 serial 9 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HEADER_NETDB], -[ - AC_REQUIRE([gl_NETDB_H_DEFAULTS]) - AC_CHECK_HEADERS_ONCE([netdb.h]) - gl_CHECK_NEXT_HEADERS([netdb.h]) - if test $ac_cv_header_netdb_h = yes; then - HAVE_NETDB_H=1 - else - HAVE_NETDB_H=0 - fi - AC_SUBST([HAVE_NETDB_H]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include <netdb.h>]], - [getaddrinfo freeaddrinfo gai_strerror getnameinfo]) -]) - -AC_DEFUN([gl_NETDB_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_NETDB_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_NETDB_H_DEFAULTS], -[ - GNULIB_GETADDRINFO=0; AC_SUBST([GNULIB_GETADDRINFO]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_STRUCT_ADDRINFO=1; AC_SUBST([HAVE_STRUCT_ADDRINFO]) - HAVE_DECL_FREEADDRINFO=1; AC_SUBST([HAVE_DECL_FREEADDRINFO]) - HAVE_DECL_GAI_STRERROR=1; AC_SUBST([HAVE_DECL_GAI_STRERROR]) - HAVE_DECL_GETADDRINFO=1; AC_SUBST([HAVE_DECL_GETADDRINFO]) - HAVE_DECL_GETNAMEINFO=1; AC_SUBST([HAVE_DECL_GETNAMEINFO]) -]) diff --git a/lib/gl/m4/nls.m4 b/lib/gl/m4/nls.m4 deleted file mode 100644 index 003704c4b9..0000000000 --- a/lib/gl/m4/nls.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. - -AC_PREREQ([2.50]) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE([nls], - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT([$USE_NLS]) - AC_SUBST([USE_NLS]) -]) diff --git a/lib/gl/m4/po.m4 b/lib/gl/m4/po.m4 deleted file mode 100644 index 47f36a41a0..0000000000 --- a/lib/gl/m4/po.m4 +++ /dev/null @@ -1,449 +0,0 @@ -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. - -AC_PREREQ([2.50]) - -dnl Checks for all prerequisites of the po subdirectory. -AC_DEFUN([AM_PO_SUBDIRS], -[ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AM_NLS])dnl - - dnl Release version of the gettext macros. This is used to ensure that - dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) - - dnl Test whether it is GNU msgfmt >= 0.15. -changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([GMSGFMT_015]) - - dnl Search for GNU xgettext 0.12 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Test whether it is GNU xgettext >= 0.15. -changequote(,)dnl - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac -changequote([,])dnl - AC_SUBST([XGETTEXT_015]) - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) - - dnl Support for AM_XGETTEXT_OPTION. - test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) - - AC_CONFIG_COMMANDS([po-directories], [[ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done]], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat <<EOT -$* -EOT - } - gt_echo='echo_func' - fi - fi - - # A sed script that extracts the value of VARIABLE from a Makefile. - sed_x_variable=' -# Test if the hold space is empty. -x -s/P/P/ -x -ta -# Yes it was empty. Look if we have the expected variable definition. -/^[ ]*VARIABLE[ ]*=/{ - # Seen the first line of the variable definition. - s/^[ ]*VARIABLE[ ]*=// - ba -} -bd -:a -# Here we are processing a line from the variable definition. -# Remove comment, more precisely replace it with a space. -s/#.*$/ / -# See if the line ends in a backslash. -tb -:b -s/\\$// -# Print the line, without the trailing backslash. -p -tc -# There was no trailing backslash. The end of the variable definition is -# reached. Clear the hold space. -s/^.*$// -x -bd -:c -# A trailing backslash means that the variable definition continues in the -# next line. Put a nonempty string into the hold space to indicate this. -s/^.*$/P/ -x -:d -' -changequote([,])dnl - - # Set POTFILES to the value of the Makefile variable POTFILES. - sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` - POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` - # Compute POTFILES_DEPS as - # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) - POTFILES_DEPS= - for file in $POTFILES; do - POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" - done - POMAKEFILEDEPS="" - - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. - sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` - ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` - fi - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - # Compute PROPERTIESFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) - # Compute CLASSFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) - # Compute QMFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) - # Compute MSGFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) - # Compute RESOURCESDLLFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - PROPERTIESFILES= - CLASSFILES= - QMFILES= - MSGFILES= - RESOURCESDLLFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" - CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" - QMFILES="$QMFILES $srcdirpre$lang.qm" - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - JAVACATALOGS= - QTCATALOGS= - TCLCATALOGS= - CSHARPCATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" - QTCATALOGS="$QTCATALOGS $lang.qm" - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" - done - fi - - sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" <<EOF -$frobbedlang.msg: $lang.po - @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ - \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } -EOF - done - fi - if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <<EOF -$frobbedlang/\$(DOMAIN).resources.dll: $lang.po - @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ - \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } -EOF - done - fi - if test -n "$POMAKEFILEDEPS"; then - cat >> "$ac_file.tmp" <<EOF -Makefile: $POMAKEFILEDEPS -EOF - fi - mv "$ac_file.tmp" "$ac_file" -]) - -dnl Initializes the accumulator used by AM_XGETTEXT_OPTION. -AC_DEFUN([AM_XGETTEXT_OPTION_INIT], -[ - XGETTEXT_EXTRA_OPTIONS= -]) - -dnl Registers an option to be passed to xgettext in the po subdirectory. -AC_DEFUN([AM_XGETTEXT_OPTION], -[ - AC_REQUIRE([AM_XGETTEXT_OPTION_INIT]) - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1" -]) diff --git a/lib/gl/m4/printf-posix.m4 b/lib/gl/m4/printf-posix.m4 deleted file mode 100644 index 2dc52a4862..0000000000 --- a/lib/gl/m4/printf-posix.m4 +++ /dev/null @@ -1,48 +0,0 @@ -# printf-posix.m4 serial 6 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether the printf() function supports POSIX/XSI format strings with -dnl positions. - -AC_DEFUN([gt_PRINTF_POSIX], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], - gt_cv_func_printf_posix, - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -}]])], - [gt_cv_func_printf_posix=yes], - [gt_cv_func_printf_posix=no], - [ - AC_EGREP_CPP([notposix], [ -#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ - notposix -#endif - ], - [gt_cv_func_printf_posix="guessing no"], - [gt_cv_func_printf_posix="guessing yes"]) - ]) - ]) - case $gt_cv_func_printf_posix in - *yes) - AC_DEFINE([HAVE_POSIX_PRINTF], [1], - [Define if your printf() function supports format strings with positions.]) - ;; - esac -]) diff --git a/lib/gl/m4/printf.m4 b/lib/gl/m4/printf.m4 deleted file mode 100644 index 6d1cbfe209..0000000000 --- a/lib/gl/m4/printf.m4 +++ /dev/null @@ -1,1470 +0,0 @@ -# printf.m4 serial 40 -dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Test whether the *printf family of functions supports the 'j', 'z', 't', -dnl 'L' size specifiers. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_sizes_c99. - -AC_DEFUN([gl_PRINTF_SIZES_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports size specifiers as in C99], - [gl_cv_func_printf_sizes_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <sys/types.h> -#if HAVE_STDINT_H_WITH_UINTMAX -# include <stdint.h> -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -# include <inttypes.h> -#endif -static char buf[100]; -int main () -{ - int result = 0; -#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX - buf[0] = '\0'; - if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 - || strcmp (buf, "12345671 33") != 0) - result |= 1; -#endif - buf[0] = '\0'; - if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 - || strcmp (buf, "12345672 33") != 0) - result |= 2; - buf[0] = '\0'; - if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 - || strcmp (buf, "12345673 33") != 0) - result |= 4; - buf[0] = '\0'; - if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 - || strcmp (buf, "1.5 33") != 0) - result |= 8; - return result; -}]])], - [gl_cv_func_printf_sizes_c99=yes], - [gl_cv_func_printf_sizes_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; - darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_printf_sizes_c99="guessing no";; - openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";; - solaris*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_sizes_c99="guessing no";; - netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_sizes_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports 'long double' -dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_long_double. - -AC_DEFUN([gl_PRINTF_LONG_DOUBLE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports 'long double' arguments], - [gl_cv_func_printf_long_double], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[10000]; -int main () -{ - int result = 0; - buf[0] = '\0'; - if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.750000 33") != 0) - result |= 1; - buf[0] = '\0'; - if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.750000e+00 33") != 0) - result |= 2; - buf[0] = '\0'; - if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.75 33") != 0) - result |= 4; - return result; -}]])], - [gl_cv_func_printf_long_double=yes], - [gl_cv_func_printf_long_double=no], - [ -changequote(,)dnl - case "$host_os" in - beos*) gl_cv_func_printf_long_double="guessing no";; - mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; - *) gl_cv_func_printf_long_double="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports infinite and NaN -dnl 'double' arguments and negative zero arguments in the %f, %e, %g -dnl directives. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_infinite. - -AC_DEFUN([gl_PRINTF_INFINITE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], - [gl_cv_func_printf_infinite], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static int -strisnan (const char *string, size_t start_index, size_t end_index) -{ - if (start_index < end_index) - { - if (string[start_index] == '-') - start_index++; - if (start_index + 3 <= end_index - && memcmp (string + start_index, "nan", 3) == 0) - { - start_index += 3; - if (start_index == end_index - || (string[start_index] == '(' && string[end_index - 1] == ')')) - return 1; - } - } - return 0; -} -static int -have_minus_zero () -{ - static double plus_zero = 0.0; - double minus_zero = - plus_zero; - return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; -} -static char buf[10000]; -static double zero = 0.0; -int main () -{ - int result = 0; - if (sprintf (buf, "%f", 1.0 / 0.0) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%f", -1.0 / 0.0) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%f", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%e", 1.0 / 0.0) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 4; - if (sprintf (buf, "%e", -1.0 / 0.0) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 4; - if (sprintf (buf, "%e", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%g", 1.0 / 0.0) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 16; - if (sprintf (buf, "%g", -1.0 / 0.0) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 16; - if (sprintf (buf, "%g", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - /* This test fails on HP-UX 10.20. */ - if (have_minus_zero ()) - if (sprintf (buf, "%g", - zero) < 0 - || strcmp (buf, "-0") != 0) - result |= 64; - return result; -}]])], - [gl_cv_func_printf_infinite=yes], - [gl_cv_func_printf_infinite=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; - darwin*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; - hpux*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_infinite="guessing no";; - netbsd*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_infinite="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports infinite and NaN -dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_infinite_long_double. - -AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_BIGENDIAN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - dnl The user can set or unset the variable gl_printf_safe to indicate - dnl that he wishes a safe handling of non-IEEE-754 'long double' values. - if test -n "$gl_printf_safe"; then - AC_DEFINE([CHECK_PRINTF_SAFE], [1], - [Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values.]) - fi - case "$gl_cv_func_printf_long_double" in - *yes) - AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], - [gl_cv_func_printf_infinite_long_double], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -]GL_NOCRASH[ -#include <float.h> -#include <stdio.h> -#include <string.h> -static int -strisnan (const char *string, size_t start_index, size_t end_index) -{ - if (start_index < end_index) - { - if (string[start_index] == '-') - start_index++; - if (start_index + 3 <= end_index - && memcmp (string + start_index, "nan", 3) == 0) - { - start_index += 3; - if (start_index == end_index - || (string[start_index] == '(' && string[end_index - 1] == ')')) - return 1; - } - } - return 0; -} -static char buf[10000]; -static long double zeroL = 0.0L; -int main () -{ - int result = 0; - nocrash_init(); - if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; - if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Le", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; - if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; -#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) -/* Representation of an 80-bit 'long double' as an initializer for a sequence - of 'unsigned int' words. */ -# ifdef WORDS_BIGENDIAN -# define LDBL80_WORDS(exponent,manthi,mantlo) \ - { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ - (unsigned int) (mantlo) << 16 \ - } -# else -# define LDBL80_WORDS(exponent,manthi,mantlo) \ - { mantlo, manthi, exponent } -# endif - { /* Quiet NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - } - { - /* Signalling NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - } - { /* Pseudo-NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - } - { /* Pseudo-Infinity. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - } - { /* Pseudo-Zero. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - } - { /* Unnormalized number. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - } - { /* Pseudo-Denormal. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - } -#endif - return result; -}]])], - [gl_cv_func_printf_infinite_long_double=yes], - [gl_cv_func_printf_infinite_long_double=no], - [ -changequote(,)dnl - case "$host_cpu" in - # Guess no on ia64, x86_64, i386. - ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; - *) - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; - hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite_long_double="guessing no";; - esac - ;; - esac -changequote([,])dnl - ]) - ]) - ;; - *) - gl_cv_func_printf_infinite_long_double="irrelevant" - ;; - esac -]) - -dnl Test whether the *printf family of functions supports the 'a' and 'A' -dnl conversion specifier for hexadecimal output of floating-point numbers. -dnl (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_a. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_A], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], - [gl_cv_func_printf_directive_a], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - int result = 0; - if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 - || (strcmp (buf, "0x1.922p+1 33") != 0 - && strcmp (buf, "0x3.244p+0 33") != 0 - && strcmp (buf, "0x6.488p-1 33") != 0 - && strcmp (buf, "0xc.91p-2 33") != 0)) - result |= 1; - if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 - || (strcmp (buf, "-0X1.922P+1 33") != 0 - && strcmp (buf, "-0X3.244P+0 33") != 0 - && strcmp (buf, "-0X6.488P-1 33") != 0 - && strcmp (buf, "-0XC.91P-2 33") != 0)) - result |= 2; - /* This catches a FreeBSD 6.1 bug: it doesn't round. */ - if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 - || (strcmp (buf, "0x1.83p+0 33") != 0 - && strcmp (buf, "0x3.05p-1 33") != 0 - && strcmp (buf, "0x6.0ap-2 33") != 0 - && strcmp (buf, "0xc.14p-3 33") != 0)) - result |= 4; - /* This catches a FreeBSD 6.1 bug. See - <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ - if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 - || buf[0] == '0') - result |= 8; - /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ - if (sprintf (buf, "%.1a", 1.999) < 0 - || (strcmp (buf, "0x1.0p+1") != 0 - && strcmp (buf, "0x2.0p+0") != 0 - && strcmp (buf, "0x4.0p-1") != 0 - && strcmp (buf, "0x8.0p-2") != 0)) - result |= 16; - /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a - glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */ - if (sprintf (buf, "%.1La", 1.999L) < 0 - || (strcmp (buf, "0x1.0p+1") != 0 - && strcmp (buf, "0x2.0p+0") != 0 - && strcmp (buf, "0x4.0p-1") != 0 - && strcmp (buf, "0x8.0p-2") != 0)) - result |= 32; - return result; -}]])], - [gl_cv_func_printf_directive_a=yes], - [gl_cv_func_printf_directive_a=no], - [ - case "$host_os" in - # Guess yes on glibc >= 2.5 systems. - *-gnu*) - AC_EGREP_CPP([BZ2908], [ - #include <features.h> - #ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ - BZ2908 - #endif - #endif - ], - [gl_cv_func_printf_directive_a="guessing yes"], - [gl_cv_func_printf_directive_a="guessing no"]) - ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_a="guessing no";; - esac - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %F format -dnl directive. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_f. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_F], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'F' directive], - [gl_cv_func_printf_directive_f], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - int result = 0; - if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 - || strcmp (buf, "1234567.000000 33") != 0) - result |= 1; - if (sprintf (buf, "%F", 1.0 / 0.0) < 0 - || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) - result |= 2; - /* This catches a Cygwin 1.5.x bug. */ - if (sprintf (buf, "%.F", 1234.0) < 0 - || strcmp (buf, "1234") != 0) - result |= 4; - return result; -}]])], - [gl_cv_func_printf_directive_f=yes], - [gl_cv_func_printf_directive_f=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; - darwin*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";; - solaris*) gl_cv_func_printf_directive_f="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_f="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %n format -dnl directive. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_n. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_N], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'n' directive], - [gl_cv_func_printf_directive_n], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char fmtstring[10]; -static char buf[100]; -int main () -{ - int count = -1; - /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) - support %n in format strings in read-only memory but not in writable - memory. */ - strcpy (fmtstring, "%d %n"); - if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 - || strcmp (buf, "123 ") != 0 - || count != 4) - return 1; - return 0; -}]])], - [gl_cv_func_printf_directive_n=yes], - [gl_cv_func_printf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in - *) gl_cv_func_printf_directive_n="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %ls format -dnl directive and in particular, when a precision is specified, whether -dnl the functions stop converting the wide string argument when the number -dnl of bytes that have been produced by this conversion equals or exceeds -dnl the precision. -dnl Result is gl_cv_func_printf_directive_ls. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'ls' directive], - [gl_cv_func_printf_directive_ls], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - 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> -#include <wchar.h> -#include <string.h> -int main () -{ - int result = 0; - char buf[100]; - /* Test whether %ls works at all. - This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on - Cygwin 1.5. */ - { - static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%ls", wstring) < 0 - || strcmp (buf, "abc") != 0) - result |= 1; - } - /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an - assertion failure inside libc), but not on OpenBSD 4.0. */ - { - static const wchar_t wstring[] = { 'a', 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%ls", wstring) < 0 - || strcmp (buf, "a") != 0) - result |= 2; - } - /* Test whether precisions in %ls are supported as specified in ISO C 99 - section 7.19.6.1: - "If a precision is specified, no more than that many bytes are written - (including shift sequences, if any), and the array shall contain a - null wide character if, to equal the multibyte character sequence - length given by the precision, the function would need to access a - wide character one past the end of the array." - This test fails on Solaris 10. */ - { - static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%.2ls", wstring) < 0 - || strcmp (buf, "ab") != 0) - result |= 8; - } - return result; -}]])], - [gl_cv_func_printf_directive_ls=yes], - [gl_cv_func_printf_directive_ls=no], - [ -changequote(,)dnl - case "$host_os" in - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - irix*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; - cygwin*) gl_cv_func_printf_directive_ls="guessing no";; - beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; - *) gl_cv_func_printf_directive_ls="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports POSIX/XSI format -dnl strings with positions. (POSIX:2001) -dnl Result is gl_cv_func_printf_positions. - -AC_DEFUN([gl_PRINTF_POSITIONS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], - [gl_cv_func_printf_positions], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -}]])], - [gl_cv_func_printf_positions=yes], - [gl_cv_func_printf_positions=no], - [ -changequote(,)dnl - case "$host_os" in - netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) - gl_cv_func_printf_positions="guessing no";; - beos*) gl_cv_func_printf_positions="guessing no";; - mingw* | pw*) gl_cv_func_printf_positions="guessing no";; - *) gl_cv_func_printf_positions="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports POSIX/XSI format -dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) -dnl Result is gl_cv_func_printf_flag_grouping. - -AC_DEFUN([gl_PRINTF_FLAG_GROUPING], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the grouping flag], - [gl_cv_func_printf_flag_grouping], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - if (sprintf (buf, "%'d %d", 1234567, 99) < 0 - || buf[strlen (buf) - 1] != '9') - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_grouping=yes], - [gl_cv_func_printf_flag_grouping=no], - [ -changequote(,)dnl - case "$host_os" in - cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; - netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; - mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; - *) gl_cv_func_printf_flag_grouping="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the - flag correctly. -dnl (ISO C99.) See -dnl <http://lists.gnu.org/archive/html/bug-coreutils/2008-02/msg00035.html> -dnl Result is gl_cv_func_printf_flag_leftadjust. - -AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], - [gl_cv_func_printf_flag_leftadjust], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - /* Check that a '-' flag is not annihilated by a negative width. */ - if (sprintf (buf, "a%-*sc", -3, "b") < 0 - || strcmp (buf, "ab c") != 0) - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_leftadjust=yes], - [gl_cv_func_printf_flag_leftadjust=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on HP-UX 11. - hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; - # Guess no on HP-UX 10 and older. - hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; - # Guess yes otherwise. - *) gl_cv_func_printf_flag_leftadjust="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports padding of non-finite -dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See -dnl <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> -dnl Result is gl_cv_func_printf_flag_zero. - -AC_DEFUN([gl_PRINTF_FLAG_ZERO], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the zero flag correctly], - [gl_cv_func_printf_flag_zero], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 - || (strcmp (buf, " inf") != 0 - && strcmp (buf, " infinity") != 0)) - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_zero=yes], - [gl_cv_func_printf_flag_zero=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_flag_zero="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_flag_zero="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports large precisions. -dnl On mingw, precisions larger than 512 are treated like 512, in integer, -dnl floating-point or pointer output. On Solaris 10/x86, precisions larger -dnl than 510 in floating-point output crash the program. On BeOS, precisions -dnl larger than 1044 crash the program. -dnl Result is gl_cv_func_printf_precision. - -AC_DEFUN([gl_PRINTF_PRECISION], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports large precisions], - [gl_cv_func_printf_precision], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[5000]; -int main () -{ - int result = 0; -#ifdef __BEOS__ - /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ - return 1; -#endif - if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) - result |= 1; - if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) - result |= 2; - return result; -}]])], - [gl_cv_func_printf_precision=yes], - [gl_cv_func_printf_precision=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess no only on Solaris, native Win32, and BeOS systems. - solaris*) gl_cv_func_printf_precision="guessing no" ;; - mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; - beos*) gl_cv_func_printf_precision="guessing no" ;; - *) gl_cv_func_printf_precision="guessing yes" ;; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions recovers gracefully in case -dnl of an out-of-memory condition, or whether it crashes the entire program. -dnl Result is gl_cv_func_printf_enomem. - -AC_DEFUN([gl_PRINTF_ENOMEM], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_MULTIARCH]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf survives out-of-memory conditions], - [gl_cv_func_printf_enomem], - [ - gl_cv_func_printf_enomem="guessing no" - if test "$cross_compiling" = no; then - if test $APPLE_UNIVERSAL_BUILD = 0; then - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -]GL_NOCRASH[ -changequote(,)dnl -#include <stdio.h> -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -#include <errno.h> -int main() -{ - struct rlimit limit; - int ret; - nocrash_init (); - /* Some printf implementations allocate temporary space with malloc. */ - /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ -#ifdef RLIMIT_DATA - if (getrlimit (RLIMIT_DATA, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_DATA, &limit) < 0) - return 77; -#endif - /* On Linux systems, malloc() is limited by RLIMIT_AS. */ -#ifdef RLIMIT_AS - if (getrlimit (RLIMIT_AS, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_AS, &limit) < 0) - return 77; -#endif - /* Some printf implementations allocate temporary space on the stack. */ -#ifdef RLIMIT_STACK - if (getrlimit (RLIMIT_STACK, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_STACK, &limit) < 0) - return 77; -#endif - ret = printf ("%.5000000f", 1.0); - return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - (./conftest - result=$? - if test $result != 0 && test $result != 77; then result=1; fi - exit $result - ) >/dev/null 2>/dev/null - case $? in - 0) gl_cv_func_printf_enomem="yes" ;; - 77) gl_cv_func_printf_enomem="guessing no" ;; - *) gl_cv_func_printf_enomem="no" ;; - esac - else - gl_cv_func_printf_enomem="guessing no" - fi - rm -fr conftest* - else - dnl A universal build on Apple MacOS X platforms. - dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. - dnl But we need a configuration result that is valid in both modes. - gl_cv_func_printf_enomem="guessing no" - fi - fi - if test "$gl_cv_func_printf_enomem" = "guessing no"; then -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Solaris. - solaris*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on AIX. - aix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on HP-UX/hppa. - hpux*) case "$host_cpu" in - hppa*) gl_cv_func_printf_enomem="guessing yes";; - *) gl_cv_func_printf_enomem="guessing no";; - esac - ;; - # Guess yes on IRIX. - irix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on OSF/1. - osf*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Haiku. - haiku*) gl_cv_func_printf_enomem="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_enomem="guessing no";; - esac -changequote([,])dnl - fi - ]) -]) - -dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) -dnl Result is ac_cv_func_snprintf. - -AC_DEFUN([gl_SNPRINTF_PRESENCE], -[ - AC_CHECK_FUNCS_ONCE([snprintf]) -]) - -dnl Test whether the string produced by the snprintf function is always NUL -dnl terminated. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_snprintf_truncation_c99. - -AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether snprintf truncates the result as in C99], - [gl_cv_func_snprintf_truncation_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - strcpy (buf, "ABCDEF"); - snprintf (buf, 3, "%d %d", 4567, 89); - if (memcmp (buf, "45\0DEF", 6) != 0) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_truncation_c99=yes], - [gl_cv_func_snprintf_truncation_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; - darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; - hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on OSF/1 >= 5. - osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_truncation_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the return value of the snprintf function is the number -dnl of bytes (excluding the terminating NUL) that would have been produced -dnl if the buffer had been large enough. (ISO C99, POSIX:2001) -dnl For example, this test program fails on IRIX 6.5: -dnl --------------------------------------------------------------------- -dnl #include <stdio.h> -dnl int main() -dnl { -dnl static char buf[8]; -dnl int retval = snprintf (buf, 3, "%d", 12345); -dnl return retval >= 0 && retval < 3; -dnl } -dnl --------------------------------------------------------------------- -dnl Result is gl_cv_func_snprintf_retval_c99. - -AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], - [gl_cv_func_snprintf_retval_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char buf[100]; -int main () -{ - strcpy (buf, "ABCDEF"); - if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_retval_c99=yes], - [gl_cv_func_snprintf_retval_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; - darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_retval_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; - solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; - aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_retval_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_retval_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the snprintf function supports the %n format directive -dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_snprintf_directive_n. - -AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], - [gl_cv_func_snprintf_directive_n], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#include <string.h> -static char fmtstring[10]; -static char buf[100]; -int main () -{ - int count = -1; - /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) - support %n in format strings in read-only memory but not in writable - memory. */ - strcpy (fmtstring, "%d %n"); - snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); - if (count != 6) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_directive_n=yes], - [gl_cv_func_snprintf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; - darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";; - solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; - aix*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on OSF/1 >= 5. - osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; - osf*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_directive_n="guessing no";; - netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_directive_n="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_directive_n="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the snprintf function, when passed a size = 1, writes any -dnl output without bounds in this case, behaving like sprintf. This is the -dnl case on Linux libc5. -dnl Result is gl_cv_func_snprintf_size1. - -AC_DEFUN([gl_SNPRINTF_SIZE1], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([whether snprintf respects a size of 1], - [gl_cv_func_snprintf_size1], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -int main() -{ - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - snprintf (buf, 1, "%d", 12345); - return buf[1] != 'E'; -}]])], - [gl_cv_func_snprintf_size1=yes], - [gl_cv_func_snprintf_size1=no], - [gl_cv_func_snprintf_size1="guessing yes"]) - ]) -]) - -dnl Test whether the vsnprintf function, when passed a zero size, produces no -dnl output. (ISO C99, POSIX:2001) -dnl For example, snprintf nevertheless writes a NUL byte in this case -dnl on OSF/1 5.1: -dnl --------------------------------------------------------------------- -dnl #include <stdio.h> -dnl int main() -dnl { -dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; -dnl snprintf (buf, 0, "%d", 12345); -dnl return buf[0] != 'D'; -dnl } -dnl --------------------------------------------------------------------- -dnl And vsnprintf writes any output without bounds in this case, behaving like -dnl vsprintf, on HP-UX 11 and OSF/1 5.1: -dnl --------------------------------------------------------------------- -dnl #include <stdarg.h> -dnl #include <stdio.h> -dnl static int my_snprintf (char *buf, int size, const char *format, ...) -dnl { -dnl va_list args; -dnl int ret; -dnl va_start (args, format); -dnl ret = vsnprintf (buf, size, format, args); -dnl va_end (args); -dnl return ret; -dnl } -dnl int main() -dnl { -dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; -dnl my_snprintf (buf, 0, "%d", 12345); -dnl return buf[0] != 'D'; -dnl } -dnl --------------------------------------------------------------------- -dnl Result is gl_cv_func_vsnprintf_zerosize_c99. - -AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], - [gl_cv_func_vsnprintf_zerosize_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdarg.h> -#include <stdio.h> -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -int main() -{ - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - my_snprintf (buf, 0, "%d", 12345); - return buf[0] != 'D'; -}]])], - [gl_cv_func_vsnprintf_zerosize_c99=yes], - [gl_cv_func_vsnprintf_zerosize_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on mingw. - mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl The results of these tests on various platforms are: -dnl -dnl 1 = gl_PRINTF_SIZES_C99 -dnl 2 = gl_PRINTF_LONG_DOUBLE -dnl 3 = gl_PRINTF_INFINITE -dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE -dnl 5 = gl_PRINTF_DIRECTIVE_A -dnl 6 = gl_PRINTF_DIRECTIVE_F -dnl 7 = gl_PRINTF_DIRECTIVE_N -dnl 8 = gl_PRINTF_DIRECTIVE_LS -dnl 9 = gl_PRINTF_POSITIONS -dnl 10 = gl_PRINTF_FLAG_GROUPING -dnl 11 = gl_PRINTF_FLAG_LEFTADJUST -dnl 12 = gl_PRINTF_FLAG_ZERO -dnl 13 = gl_PRINTF_PRECISION -dnl 14 = gl_PRINTF_ENOMEM -dnl 15 = gl_SNPRINTF_PRESENCE -dnl 16 = gl_SNPRINTF_TRUNCATION_C99 -dnl 17 = gl_SNPRINTF_RETVAL_C99 -dnl 18 = gl_SNPRINTF_DIRECTIVE_N -dnl 19 = gl_SNPRINTF_SIZE1 -dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 -dnl -dnl 1 = checking whether printf supports size specifiers as in C99... -dnl 2 = checking whether printf supports 'long double' arguments... -dnl 3 = checking whether printf supports infinite 'double' arguments... -dnl 4 = checking whether printf supports infinite 'long double' arguments... -dnl 5 = checking whether printf supports the 'a' and 'A' directives... -dnl 6 = checking whether printf supports the 'F' directive... -dnl 7 = checking whether printf supports the 'n' directive... -dnl 8 = checking whether printf supports the 'ls' directive... -dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... -dnl 10 = checking whether printf supports the grouping flag... -dnl 11 = checking whether printf supports the left-adjust flag correctly... -dnl 12 = checking whether printf supports the zero flag correctly... -dnl 13 = checking whether printf supports large precisions... -dnl 14 = checking whether printf survives out-of-memory conditions... -dnl 15 = checking for snprintf... -dnl 16 = checking whether snprintf truncates the result as in C99... -dnl 17 = checking whether snprintf returns a byte count as in C99... -dnl 18 = checking whether snprintf fully supports the 'n' directive... -dnl 19 = checking whether snprintf respects a size of 1... -dnl 20 = checking whether vsnprintf respects a zero size as in C99... -dnl -dnl . = yes, # = no. -dnl -dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . -dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . -dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . -dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . . -dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . -dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . -dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . -dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . -dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . -dnl Solaris 11 2010-11 . . # # # . . # . . . # . . . . . . . . -dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . -dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . . -dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # -dnl AIX 5.2, 7.1 . . # # # . . . . . . # . . . . . . . . -dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . . . . . -dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . -dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # -dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # -dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . -dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # -dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # -dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . -dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? -dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . -dnl Haiku . . . # # # . # . . . . . ? . . . . . . -dnl BeOS # # . # # # . ? # . ? . # ? . . . . . . -dnl mingw # # # # # # . . # # . # # ? . # # # . . diff --git a/lib/gl/m4/progtest.m4 b/lib/gl/m4/progtest.m4 deleted file mode 100644 index 9ffa5c0202..0000000000 --- a/lib/gl/m4/progtest.m4 +++ /dev/null @@ -1,91 +0,0 @@ -# progtest.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1996. - -AC_PREREQ([2.50]) - -# Search path for a program which passes the given test. - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN([AM_PATH_PROG_WITH_TEST], -[ -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || PATH_SEPARATOR=';' - } -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL([ac_cv_path_$1], -[case "[$]$1" in - [[\\/]]* | ?:[[\\/]]*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in ifelse([$5], , $PATH, [$5]); do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$][$1]) -else - AC_MSG_RESULT([no]) -fi -AC_SUBST([$1])dnl -]) diff --git a/lib/gl/m4/read-file.m4 b/lib/gl/m4/read-file.m4 deleted file mode 100644 index 35a3a4817f..0000000000 --- a/lib/gl/m4/read-file.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# read-file.m4 serial 2 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software -dnl Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_READ_FILE], -[ - AC_LIBOBJ([read-file]) - gl_PREREQ_READ_FILE -]) - -# Prerequisites of lib/read-file.c. -AC_DEFUN([gl_PREREQ_READ_FILE], [:]) diff --git a/lib/gl/m4/realloc.m4 b/lib/gl/m4/realloc.m4 deleted file mode 100644 index 01c1234f7e..0000000000 --- a/lib/gl/m4/realloc.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# realloc.m4 serial 11 -dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_FUNC_REALLOC_GNU -# ------------------- -# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace -# realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. - _AC_FUNC_REALLOC_IF( - [AC_DEFINE([HAVE_REALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'realloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_REALLOC_GNU], [0]) - gl_REPLACE_REALLOC - ]) -])# gl_FUNC_REALLOC_GNU - -# gl_FUNC_REALLOC_POSIX -# --------------------- -# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_REALLOC_POSIX], [1], - [Define if the 'realloc' function is POSIX compliant.]) - else - gl_REPLACE_REALLOC - fi -]) - -AC_DEFUN([gl_REPLACE_REALLOC], -[ - AC_LIBOBJ([realloc]) - REPLACE_REALLOC=1 -]) diff --git a/lib/gl/m4/size_max.m4 b/lib/gl/m4/size_max.m4 deleted file mode 100644 index f3b1a9dfb2..0000000000 --- a/lib/gl/m4/size_max.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# size_max.m4 serial 10 -dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SIZE_MAX], -[ - AC_CHECK_HEADERS([stdint.h]) - dnl First test whether the system already has SIZE_MAX. - AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ - gl_cv_size_max= - AC_EGREP_CPP([Found it], [ -#include <limits.h> -#if HAVE_STDINT_H -#include <stdint.h> -#endif -#ifdef SIZE_MAX -Found it -#endif -], [gl_cv_size_max=yes]) - if test -z "$gl_cv_size_max"; then - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider - dnl than the type 'unsigned long'. Try hard to find a definition that can - dnl be used in a preprocessor #if, i.e. doesn't contain a cast. - AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], - [#include <stddef.h> -#include <limits.h>], [size_t_bits_minus_1=]) - AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], - [#include <stddef.h>], [fits_in_uint=]) - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <stddef.h> - extern size_t foo; - extern unsigned long foo; - ]], - [[]])], - [fits_in_uint=0]) - fi - dnl We cannot use 'expr' to simplify this expression, because 'expr' - dnl works only with 'long' integers in the host environment, while we - dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - dnl Shouldn't happen, but who knows... - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi - ]) - if test "$gl_cv_size_max" != yes; then - AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], - [Define as the maximum value of type 'size_t', if the system doesn't define it.]) - fi - dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after - dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with - dnl #define by AC_DEFINE_UNQUOTED. - AH_VERBATIM([SIZE_MAX], -[/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -# undef SIZE_MAX -#endif]) -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/lib/gl/m4/snprintf.m4 b/lib/gl/m4/snprintf.m4 deleted file mode 100644 index 522b107b12..0000000000 --- a/lib/gl/m4/snprintf.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# snprintf.m4 serial 5 -dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SNPRINTF], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_cv_func_snprintf_usable=no - AC_CHECK_FUNCS([snprintf]) - if test $ac_cv_func_snprintf = yes; then - gl_SNPRINTF_SIZE1 - case "$gl_cv_func_snprintf_size1" in - *yes) - gl_cv_func_snprintf_usable=yes - ;; - esac - fi - if test $gl_cv_func_snprintf_usable = no; then - gl_REPLACE_SNPRINTF - fi - AC_CHECK_DECLS_ONCE([snprintf]) - if test $ac_cv_have_decl_snprintf = no; then - HAVE_DECL_SNPRINTF=0 - fi -]) - -AC_DEFUN([gl_REPLACE_SNPRINTF], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_LIBOBJ([snprintf]) - if test $ac_cv_func_snprintf = yes; then - REPLACE_SNPRINTF=1 - fi - gl_PREREQ_SNPRINTF -]) - -# Prerequisites of lib/snprintf.c. -AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) diff --git a/lib/gl/m4/socketlib.m4 b/lib/gl/m4/socketlib.m4 deleted file mode 100644 index 7bf02b5aee..0000000000 --- a/lib/gl/m4/socketlib.m4 +++ /dev/null @@ -1,86 +0,0 @@ -# socketlib.m4 serial 1 -dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl gl_SOCKETLIB -dnl Determines the library to use for socket functions. -dnl Sets and AC_SUBSTs LIBSOCKET. - -AC_DEFUN([gl_SOCKETLIB], -[ - gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H - LIBSOCKET= - if test $HAVE_WINSOCK2_H = 1; then - dnl Native Windows API (not Cygwin). - AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32], - [gl_cv_func_wsastartup], [ - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_WINSOCK2_H -# include <winsock2.h> -#endif]], [[ - WORD wVersionRequested = MAKEWORD(1, 1); - WSADATA wsaData; - int err = WSAStartup(wVersionRequested, &wsaData); - WSACleanup ();]])], - gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no) - LIBS="$gl_save_LIBS" - ]) - if test "$gl_cv_func_wsastartup" = "yes"; then - AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) - LIBSOCKET='-lws2_32' - fi - else - dnl Unix API. - dnl Solaris has most socket functions in libsocket. - dnl Haiku has most socket functions in libnetwork. - dnl BeOS has most socket functions in libnet. - AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [ - gl_cv_lib_socket= - AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern -#ifdef __cplusplus -"C" -#endif -char setsockopt();]], [[setsockopt();]])], - [], - [gl_save_LIBS="$LIBS" - LIBS="$gl_save_LIBS -lsocket" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern -#ifdef __cplusplus -"C" -#endif -char setsockopt();]], [[setsockopt();]])], - [gl_cv_lib_socket="-lsocket"]) - if test -z "$gl_cv_lib_socket"; then - LIBS="$gl_save_LIBS -lnetwork" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern -#ifdef __cplusplus -"C" -#endif -char setsockopt();]], [[setsockopt();]])], - [gl_cv_lib_socket="-lnetwork"]) - if test -z "$gl_cv_lib_socket"; then - LIBS="$gl_save_LIBS -lnet" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern -#ifdef __cplusplus -"C" -#endif -char setsockopt();]], [[setsockopt();]])], - [gl_cv_lib_socket="-lnet"]) - fi - fi - LIBS="$gl_save_LIBS" - ]) - if test -z "$gl_cv_lib_socket"; then - gl_cv_lib_socket="none needed" - fi - ]) - if test "$gl_cv_lib_socket" != "none needed"; then - LIBSOCKET="$gl_cv_lib_socket" - fi - fi - AC_SUBST([LIBSOCKET]) -]) diff --git a/lib/gl/m4/sockets.m4 b/lib/gl/m4/sockets.m4 deleted file mode 100644 index ba9a563d8e..0000000000 --- a/lib/gl/m4/sockets.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# sockets.m4 serial 7 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SOCKETS], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_SOCKETLIB]) - gl_PREREQ_SOCKETS -]) - -# Prerequisites of lib/sockets.c. -AC_DEFUN([gl_PREREQ_SOCKETS], [ - : -]) diff --git a/lib/gl/m4/socklen.m4 b/lib/gl/m4/socklen.m4 deleted file mode 100644 index d0d6baab55..0000000000 --- a/lib/gl/m4/socklen.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# socklen.m4 serial 8 -dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Albert Chin, Windows fixes from Simon Josefsson. - -dnl Check for socklen_t: historically on BSD it is an int, and in -dnl POSIX 1g it is a type of its own, but some platforms use different -dnl types for the argument to getsockopt, getpeername, etc.: -dnl HP-UX 10.20, IRIX 6.5, Interix 3.5, BeOS. -dnl So we have to test to find something that will work. - -dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find -dnl it there first. That file is included by gnulib's sys_socket.in.h, which -dnl all users of this module should include. Cygwin must not include -dnl ws2tcpip.h. -AC_DEFUN([gl_TYPE_SOCKLEN_T], - [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl - AC_CHECK_TYPE([socklen_t], , - [AC_MSG_CHECKING([for socklen_t equivalent]) - AC_CACHE_VAL([gl_cv_socklen_t_equiv], - [# Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - gl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t "unsigned int" "long int" "unsigned long int"; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include <sys/types.h> - #include <sys/socket.h> - - int getpeername (int, $arg2 *, $t *);]], - [[$t len; - getpeername (0, 0, &len);]])], - [gl_cv_socklen_t_equiv="$t"]) - test "$gl_cv_socklen_t_equiv" != "" && break - done - test "$gl_cv_socklen_t_equiv" != "" && break - done - ]) - if test "$gl_cv_socklen_t_equiv" = ""; then - AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) - fi - AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) - AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], - [type to use in place of socklen_t if not defined])], - [#include <sys/types.h> - #if HAVE_SYS_SOCKET_H - # include <sys/socket.h> - #elif HAVE_WS2TCPIP_H - # include <ws2tcpip.h> - #endif])]) diff --git a/lib/gl/m4/sockpfaf.m4 b/lib/gl/m4/sockpfaf.m4 deleted file mode 100644 index 8806705ae2..0000000000 --- a/lib/gl/m4/sockpfaf.m4 +++ /dev/null @@ -1,61 +0,0 @@ -# sockpfaf.m4 serial 7 -dnl Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...) -dnl and some common address families (AF_INET, AF_INET6, ...). -dnl This test assumes that a system supports an address family if and only if -dnl it supports the corresponding protocol family. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SOCKET_FAMILIES], -[ - AC_REQUIRE([gl_HEADER_SYS_SOCKET]) - AC_CHECK_HEADERS_ONCE([netinet/in.h]) - - AC_MSG_CHECKING([for IPv4 sockets]) - AC_CACHE_VAL([gl_cv_socket_ipv4], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif]], -[[int x = AF_INET; struct in_addr y; struct sockaddr_in z; - if (&x && &y && &z) return 0;]])], - gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) - AC_MSG_RESULT([$gl_cv_socket_ipv4]) - if test $gl_cv_socket_ipv4 = yes; then - AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.]) - fi - - AC_MSG_CHECKING([for IPv6 sockets]) - AC_CACHE_VAL([gl_cv_socket_ipv6], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif]], -[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; - if (&x && &y && &z) return 0;]])], - gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) - AC_MSG_RESULT([$gl_cv_socket_ipv6]) - if test $gl_cv_socket_ipv6 = yes; then - AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.]) - fi -]) diff --git a/lib/gl/m4/stdbool.m4 b/lib/gl/m4/stdbool.m4 deleted file mode 100644 index 1efe59ea1c..0000000000 --- a/lib/gl/m4/stdbool.m4 +++ /dev/null @@ -1,103 +0,0 @@ -# Check for stdbool.h that conforms to C99. - -dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -#serial 3 - -# Prepare for substituting <stdbool.h> if it is not supported. - -AC_DEFUN([AM_STDBOOL_H], -[ - AC_REQUIRE([AC_HEADER_STDBOOL]) - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - AC_SUBST([STDBOOL_H]) - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - AC_SUBST([HAVE__BOOL]) -]) - -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - -# This version of the macro is needed in autoconf <= 2.67. Autoconf has -# it built in since 2.60, but we want the tweaks from the 2.68 version -# to avoid rejecting xlc and clang due to relying on extensions. - -AC_DEFUN([AC_HEADER_STDBOOL], - [AC_CACHE_CHECK([for stdbool.h that conforms to C99], - [ac_cv_header_stdbool_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include <stdbool.h> - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - ]], - [[ - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - ]])], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) - AC_CHECK_TYPES([_Bool]) - if test $ac_cv_header_stdbool_h = yes; then - AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.]) - fi]) diff --git a/lib/gl/m4/stddef_h.m4 b/lib/gl/m4/stddef_h.m4 deleted file mode 100644 index c3ae569431..0000000000 --- a/lib/gl/m4/stddef_h.m4 +++ /dev/null @@ -1,45 +0,0 @@ -dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. -# stddef_h.m4 serial 2 -dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDDEF_H], -[ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], - [gl_cv_decl_null_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h> - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -]])], - [gl_cv_decl_null_works=yes], - [gl_cv_decl_null_works=no])]) - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - if test -n "$STDDEF_H"; then - gl_CHECK_NEXT_HEADERS([stddef.h]) - fi -]) - -AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_STDDEF_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) - HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) - STDDEF_H=''; AC_SUBST([STDDEF_H]) -]) diff --git a/lib/gl/m4/stdint.m4 b/lib/gl/m4/stdint.m4 deleted file mode 100644 index 7fe28362fc..0000000000 --- a/lib/gl/m4/stdint.m4 +++ /dev/null @@ -1,472 +0,0 @@ -# stdint.m4 serial 36 -dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Bruno Haible. -dnl Test whether <stdint.h> is supported or must be substituted. - -AC_DEFUN([gl_STDINT_H], -[ - AC_PREREQ([2.59])dnl - - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) - - dnl Check for <inttypes.h>. - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - AC_SUBST([HAVE_INTTYPES_H]) - - dnl Check for <sys/types.h>. - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - AC_SUBST([HAVE_SYS_TYPES_H]) - - gl_CHECK_NEXT_HEADERS([stdint.h]) - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - AC_SUBST([HAVE_STDINT_H]) - - dnl Now see whether we need a substitute <stdint.h>. - if test $ac_cv_header_stdint_h = yes; then - AC_CACHE_CHECK([whether stdint.h conforms to C99], - [gl_cv_header_working_stdint_h], - [gl_cv_header_working_stdint_h=no - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include <stdint.h> -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" -#endif -] -gl_STDINT_INCLUDES -[ -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include <limits.h> /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - ]])], - [dnl Determine whether the various *_MIN, *_MAX macros are usable - dnl in preprocessor expression. We could do it by compiling a test - dnl program for each of these macros. It is faster to run a program - dnl that inspects the macro expansion. - dnl This detects a bug on HP-UX 11.23/ia64. - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include <stdint.h> -] -gl_STDINT_INCLUDES -[ -#include <stdio.h> -#include <string.h> -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; -]], [[ - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; -]])], - [gl_cv_header_working_stdint_h=yes], - [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes - ]) - ]) - ]) - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - dnl Check for <sys/inttypes.h>, and for - dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - AC_SUBST([HAVE_SYS_INTTYPES_H]) - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - AC_SUBST([HAVE_SYS_BITYPES_H]) - - dnl Check for <wchar.h> (missing in Linux uClibc when built without wide - dnl character support). - AC_CHECK_HEADERS_ONCE([wchar.h]) - - gl_STDINT_TYPE_PROPERTIES - STDINT_H=stdint.h - fi - AC_SUBST([STDINT_H]) -]) - -dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) -dnl Determine the size of each of the given types in bits. -AC_DEFUN([gl_STDINT_BITSIZEOF], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to the number of bits in type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], - [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], - [$2 -#include <limits.h>], [result=unknown]) - eval gl_cv_bitsizeof_${gltype}=\$result - ]) - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, - dnl do a syntax check even on unused #if conditions and give an error - dnl on valid C code like this: - dnl #if 0 - dnl # if > 32 - dnl # endif - dnl #endif - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) - eval BITSIZEOF_${GLTYPE}=\$result - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) -dnl Determine the signedness of each of the given types. -dnl Define HAVE_SIGNED_TYPE if type is signed. -AC_DEFUN([gl_CHECK_TYPES_SIGNED], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to 1 if ']gltype[' is a signed integer type.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], - result=yes, result=no) - eval gl_cv_type_${gltype}_signed=\$result - ]) - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) -dnl Determine the suffix to use for integer constants of the given types. -dnl Define t_SUFFIX for each such type. -AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], - [Define to l, ll, u, ul, ull, etc., as suitable for - constants of type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for $gltype integer literal suffix], - [gl_cv_type_${gltype}_suffix], - [eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - extern $gltype foo; - extern $gltype1 foo;]])], - [eval gl_cv_type_${gltype}_suffix=\$glsuf]) - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done]) - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) - done - m4_foreach_w([gltype], [$1], - [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) -]) - -dnl gl_STDINT_INCLUDES -AC_DEFUN([gl_STDINT_INCLUDES], -[[ - /* 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 <signal.h> - #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> - # include <wchar.h> - #endif -]]) - -dnl gl_STDINT_TYPE_PROPERTIES -dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint.in.h. -AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], -[ - AC_REQUIRE([gl_MULTIARCH]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_STDINT_BITSIZEOF([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) - -# Hey Emacs! -# Local Variables: -# indent-tabs-mode: nil -# End: diff --git a/lib/gl/m4/stdint_h.m4 b/lib/gl/m4/stdint_h.m4 deleted file mode 100644 index 670c0cc2bf..0000000000 --- a/lib/gl/m4/stdint_h.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, -# doesn't clash with <sys/types.h>, and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_STDINT_H], -[ - AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <sys/types.h> - #include <stdint.h>]], - [[uintmax_t i = (uintmax_t) -1; return !i;]])], - [gl_cv_header_stdint_h=yes], - [gl_cv_header_stdint_h=no])]) - if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], - [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, - and declares uintmax_t. ]) - fi -]) diff --git a/lib/gl/m4/stdio_h.m4 b/lib/gl/m4/stdio_h.m4 deleted file mode 100644 index f5650cdeab..0000000000 --- a/lib/gl/m4/stdio_h.m4 +++ /dev/null @@ -1,159 +0,0 @@ -# stdio_h.m4 serial 31 -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDIO_H], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) - gl_CHECK_NEXT_HEADERS([stdio.h]) - dnl No need to create extra modules for these functions. Everyone who uses - dnl <stdio.h> likely needs them. - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 - dnl This ifdef is just an optimization, to avoid performing a configure - dnl check whose result is not used. It does not make the test of - dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. - m4_ifdef([gl_SIGNAL_SIGPIPE], [ - gl_SIGNAL_SIGPIPE - if test $gl_cv_header_signal_h_SIGPIPE != yes; then - REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) - fi - ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include <stdio.h> - ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat - snprintf tmpfile vdprintf vsnprintf]) -]) - -AC_DEFUN([gl_STDIO_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDIO_H_DEFAULTS], -[ - GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) - GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) - GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) - GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) - GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) - GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) - GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) - GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) - GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) - GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) - GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) - GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) - GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) - GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) - GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) - GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) - GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) - GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) - GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) - GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) - GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) - GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) - GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) - GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) - GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) - GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) - GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) - GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) - GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) - GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) - GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) - GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) - GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) - GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) - GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) - GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) - GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) - GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) - GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) - GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) - GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) - HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) - HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) - HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) - HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) - HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) - HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) - HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) - HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) - HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) - HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) - HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) - REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) - REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) - REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) - REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) - REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) - REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) - REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) - REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) - REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) - REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) - REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) - REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) - REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) - REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) - REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) - REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) - REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) - REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) - REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) - REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) - REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) - REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) - REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) - REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) - REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) - REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) - REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) - REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) - REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) - REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) -]) - -dnl Code shared by fseeko and ftello. Determine if large files are supported, -dnl but stdin does not start as a large file by default. -AC_DEFUN([gl_STDIN_LARGE_OFFSET], - [ - AC_CACHE_CHECK([whether stdin defaults to large file offsets], - [gl_cv_var_stdin_large_offset], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], -[[#if defined __SL64 && defined __SCLE /* cygwin */ - /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making - fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and - it is easier to do a version check than building a runtime test. */ -# include <cygwin/version.h> -# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) - choke me -# endif -#endif]])], - [gl_cv_var_stdin_large_offset=yes], - [gl_cv_var_stdin_large_offset=no])]) -]) diff --git a/lib/gl/m4/stdlib_h.m4 b/lib/gl/m4/stdlib_h.m4 deleted file mode 100644 index e4697ce213..0000000000 --- a/lib/gl/m4/stdlib_h.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# stdlib_h.m4 serial 31 -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDLIB_H], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([stdlib.h]) - AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT]) - if test $ac_cv_header_random_h = yes; then - HAVE_RANDOM_H=1 - else - HAVE_RANDOM_H=0 - fi - AC_SUBST([HAVE_RANDOM_H]) - AC_CHECK_TYPES([struct random_data], - [], [HAVE_STRUCT_RANDOM_DATA=0], - [[#include <stdlib.h> - #if HAVE_RANDOM_H - # include <random.h> - #endif - ]]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include <stdlib.h> -#if HAVE_SYS_LOADAVG_H -# include <sys/loadavg.h> -#endif -#if HAVE_RANDOM_H -# include <random.h> -#endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp - mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r - setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt - unsetenv]) -]) - -AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDLIB_H_DEFAULTS], -[ - GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) - GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) - GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) - GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) - GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) - GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) - GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) - GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) - GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) - GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) - GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) - GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) - GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) - GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) - GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) - GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) - GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) - GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) - GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) - GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) - GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) - GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) - GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) - GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) - HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) - HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) - HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) - HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) - HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) - HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) - HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) - HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) - HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) - HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) - HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) - HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) - HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) - HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) - HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) - HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) - HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) - HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) - HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) - HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) - HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) - REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) - REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) - REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) - REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) - REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) - REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) - REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) - REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) - REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) - REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) -]) diff --git a/lib/gl/m4/strcase.m4 b/lib/gl/m4/strcase.m4 deleted file mode 100644 index 33de423a02..0000000000 --- a/lib/gl/m4/strcase.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# strcase.m4 serial 10 -dnl Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STRCASE], -[ - gl_FUNC_STRCASECMP - gl_FUNC_STRNCASECMP -]) - -AC_DEFUN([gl_FUNC_STRCASECMP], -[ - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - AC_REPLACE_FUNCS([strcasecmp]) - if test $ac_cv_func_strcasecmp = no; then - HAVE_STRCASECMP=0 - gl_PREREQ_STRCASECMP - fi -]) - -AC_DEFUN([gl_FUNC_STRNCASECMP], -[ - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - AC_REPLACE_FUNCS([strncasecmp]) - if test $ac_cv_func_strncasecmp = no; then - gl_PREREQ_STRNCASECMP - fi - AC_CHECK_DECLS([strncasecmp]) - if test $ac_cv_have_decl_strncasecmp = no; then - HAVE_DECL_STRNCASECMP=0 - fi -]) - -# Prerequisites of lib/strcasecmp.c. -AC_DEFUN([gl_PREREQ_STRCASECMP], [ - : -]) - -# Prerequisites of lib/strncasecmp.c. -AC_DEFUN([gl_PREREQ_STRNCASECMP], [ - : -]) diff --git a/lib/gl/m4/string_h.m4 b/lib/gl/m4/string_h.m4 deleted file mode 100644 index 5844b2d660..0000000000 --- a/lib/gl/m4/string_h.m4 +++ /dev/null @@ -1,115 +0,0 @@ -# Configure a GNU-like replacement for <string.h>. - -# Copyright (C) 2007-2010 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 18 - -# Written by Paul Eggert. - -AC_DEFUN([gl_HEADER_STRING_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_STRING_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([string.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include <string.h> - ]], - [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup - strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r - strsignal strverscmp]) -]) - -AC_DEFUN([gl_STRING_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], -[ - GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) - GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) - GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) - GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) - GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) - GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) - GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) - GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) - GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) - GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) - GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) - GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) - GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) - GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) - GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) - GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) - GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) - GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) - GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) - GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) - GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) - GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) - GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) - GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) - GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) - GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) - GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) - GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) - GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) - GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) - GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) - GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) - GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) - GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) - HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) - HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) - HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) - HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) - HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) - HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) - HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) - HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) - HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) - HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) - HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) - HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) - HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) - HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) - HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) - HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) - HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) - HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) - REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) - REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) - REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) - REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) - REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) - REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) - REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) - REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) - REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) - REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) - REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) - REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) - UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) -]) diff --git a/lib/gl/m4/strings_h.m4 b/lib/gl/m4/strings_h.m4 deleted file mode 100644 index 4374c7cbe3..0000000000 --- a/lib/gl/m4/strings_h.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# Configure a replacement for <string.h>. -# serial 3 - -# Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HEADER_STRINGS_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_STRINGS_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRINGS_H_BODY], -[ - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([strings.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include <strings.h> - ]], [strcasecmp strncasecmp]) -]) - -AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) - HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) -]) diff --git a/lib/gl/m4/strverscmp.m4 b/lib/gl/m4/strverscmp.m4 deleted file mode 100644 index 59e0950f18..0000000000 --- a/lib/gl/m4/strverscmp.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# strverscmp.m4 serial 7 -dnl Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRVERSCMP], -[ - dnl Persuade glibc <string.h> to declare strverscmp(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([strverscmp]) - if test $ac_cv_func_strverscmp = no; then - gl_PREREQ_STRVERSCMP - HAVE_STRVERSCMP=0 - fi -]) - -# Prerequisites of lib/strverscmp.c. -AC_DEFUN([gl_PREREQ_STRVERSCMP], [ - : -]) diff --git a/lib/gl/m4/sys_socket_h.m4 b/lib/gl/m4/sys_socket_h.m4 deleted file mode 100644 index c7627cb94e..0000000000 --- a/lib/gl/m4/sys_socket_h.m4 +++ /dev/null @@ -1,169 +0,0 @@ -# sys_socket_h.m4 serial 20 -dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson. - -AC_DEFUN([gl_HEADER_SYS_SOCKET], -[ - AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) - AC_REQUIRE([AC_C_INLINE]) - - AC_CACHE_CHECK([whether <sys/socket.h> is self-contained], - [gl_cv_header_sys_socket_h_selfcontained], - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])], - [gl_cv_header_sys_socket_h_selfcontained=yes], - [gl_cv_header_sys_socket_h_selfcontained=no]) - ]) - if test $gl_cv_header_sys_socket_h_selfcontained = yes; then - dnl If the shutdown function exists, <sys/socket.h> should define - dnl SHUT_RD, SHUT_WR, SHUT_RDWR. - AC_CHECK_FUNCS([shutdown]) - if test $ac_cv_func_shutdown = yes; then - AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros], - [gl_cv_header_sys_socket_h_shut], - [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include <sys/socket.h>]], - [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], - [gl_cv_header_sys_socket_h_shut=yes], - [gl_cv_header_sys_socket_h_shut=no]) - ]) - if test $gl_cv_header_sys_socket_h_shut = no; then - SYS_SOCKET_H='sys/socket.h' - fi - fi - fi - # We need to check for ws2tcpip.h now. - gl_PREREQ_SYS_H_SOCKET - AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[ - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif -]) - if test $ac_cv_type_struct_sockaddr_storage = no; then - HAVE_STRUCT_SOCKADDR_STORAGE=0 - fi - if test $ac_cv_type_sa_family_t = no; then - HAVE_SA_FAMILY_T=0 - fi - if test $ac_cv_type_struct_sockaddr_storage != no; then - AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], - [], - [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0], - [#include <sys/types.h> - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> - #endif - #ifdef HAVE_WS2TCPIP_H - #include <ws2tcpip.h> - #endif - ]) - fi - if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ - || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then - SYS_SOCKET_H='sys/socket.h' - fi - gl_PREREQ_SYS_H_WINSOCK2 - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Some systems require prerequisite headers. */ -#include <sys/types.h> -#include <sys/socket.h> - ]], [socket connect accept bind getpeername getsockname getsockopt - listen recv send recvfrom sendto setsockopt shutdown accept4]) -]) - -AC_DEFUN([gl_PREREQ_SYS_H_SOCKET], -[ - dnl Check prerequisites of the <sys/socket.h> replacement. - gl_CHECK_NEXT_HEADERS([sys/socket.h]) - if test $ac_cv_header_sys_socket_h = yes; then - HAVE_SYS_SOCKET_H=1 - HAVE_WS2TCPIP_H=0 - else - HAVE_SYS_SOCKET_H=0 - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([ws2tcpip.h]) - if test $ac_cv_header_ws2tcpip_h = yes; then - HAVE_WS2TCPIP_H=1 - else - HAVE_WS2TCPIP_H=0 - fi - fi - AC_SUBST([HAVE_SYS_SOCKET_H]) - AC_SUBST([HAVE_WS2TCPIP_H]) -]) - -# Common prerequisites of the <sys/socket.h> replacement and of the -# <sys/select.h> replacement. -# Sets and substitutes HAVE_WINSOCK2_H. -AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], -[ - m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) - m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) - AC_CHECK_HEADERS_ONCE([sys/socket.h]) - if test $ac_cv_header_sys_socket_h != yes; then - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([winsock2.h]) - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - AC_SUBST([HAVE_WINSOCK2_H]) -]) - -AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], -[ - GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) - GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) - GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) - GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) - GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) - GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) - GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) - GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) - GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) - GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) - GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) - GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) - GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) - GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) - GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) - HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) - HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; - AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) - HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) - HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) -]) diff --git a/lib/gl/m4/sys_stat_h.m4 b/lib/gl/m4/sys_stat_h.m4 deleted file mode 100644 index 7181c253b9..0000000000 --- a/lib/gl/m4/sys_stat_h.m4 +++ /dev/null @@ -1,82 +0,0 @@ -# sys_stat_h.m4 serial 24 -*- Autoconf -*- -dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Eric Blake. -dnl Provide a GNU-like <sys/stat.h>. - -AC_DEFUN([gl_HEADER_SYS_STAT_H], -[ - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - - dnl For the mkdir substitute. - AC_REQUIRE([AC_C_INLINE]) - - dnl Check for broken stat macros. - AC_REQUIRE([AC_HEADER_STAT]) - - gl_CHECK_NEXT_HEADERS([sys/stat.h]) - - dnl Define types that are supposed to be defined in <sys/types.h> or - dnl <sys/stat.h>. - AC_CHECK_TYPE([nlink_t], [], - [AC_DEFINE([nlink_t], [int], - [Define to the type of st_nlink in struct stat, or a supertype.])], - [#include <sys/types.h> - #include <sys/stat.h>]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h> - ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat - mknod mknodat stat utimensat]) -]) # gl_HEADER_SYS_STAT_H - -AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) - GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) - GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) - GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) - GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) - GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) - GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) - GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) - GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) - GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) - HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) - HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) - HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) - HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) - HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) - HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) - HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) - HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) - HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) - HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) - REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) - REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) - REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) - REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) - REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) - REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) - REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) - REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) - REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) -]) diff --git a/lib/gl/m4/threadlib.m4 b/lib/gl/m4/threadlib.m4 deleted file mode 100644 index 423c17c768..0000000000 --- a/lib/gl/m4/threadlib.m4 +++ /dev/null @@ -1,369 +0,0 @@ -# threadlib.m4 serial 8 (gettext-0.18.2) -dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl gl_THREADLIB -dnl ------------ -dnl Tests for a multithreading library to be used. -dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO -dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the -dnl default is 'no', otherwise it is system dependent. In both cases, the user -dnl can change the choice through the options --enable-threads=choice or -dnl --disable-threads. -dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, -dnl USE_PTH_THREADS, USE_WIN32_THREADS -dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use -dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with -dnl libtool). -dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for -dnl programs that really need multithread functionality. The difference -dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak -dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". -dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for -dnl multithread-safe programs. - -AC_DEFUN([gl_THREADLIB_EARLY], -[ - AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) -]) - -dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. - -AC_DEFUN([gl_THREADLIB_EARLY_BODY], -[ - dnl Ordering constraints: This macro modifies CPPFLAGS in a way that - dnl influences the result of the autoconf tests that test for *_unlocked - dnl declarations, on AIX 5 at least. Therefore it must come early. - AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl - AC_BEFORE([$0], [gl_ARGP])dnl - - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - dnl Check for multithreading. - m4_ifdef([gl_THREADLIB_DEFAULT_NO], - [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], - [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) - AC_ARG_ENABLE([threads], -AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ -AC_HELP_STRING([--disable-threads], [build without multithread safety])]), - [gl_use_threads=$enableval], - [if test -n "$gl_use_threads_default"; then - gl_use_threads="$gl_use_threads_default" - else -changequote(,)dnl - case "$host_os" in - dnl Disable multithreading by default on OSF/1, because it interferes - dnl with fork()/exec(): When msgexec is linked with -lpthread, its - dnl child process gets an endless segmentation fault inside execvp(). - dnl Disable multithreading by default on Cygwin 1.5.x, because it has - dnl bugs that lead to endless loops or crashes. See - dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>. - osf*) gl_use_threads=no ;; - cygwin*) - case `uname -r` in - 1.[0-5].*) gl_use_threads=no ;; - *) gl_use_threads=yes ;; - esac - ;; - *) gl_use_threads=yes ;; - esac -changequote([,])dnl - fi - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using <pthread.h>: - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks <pthread.h>. cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_LINK_IFELSE test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in <errno.h>. - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac - fi -]) - -dnl The guts of gl_THREADLIB. Needs to be expanded only once. - -AC_DEFUN([gl_THREADLIB_BODY], -[ - AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - dnl Check whether the compiler and linker support weak declarations. - AC_CACHE_CHECK([whether imported symbols can be declared weak], - [gl_cv_have_weak], - [gl_cv_have_weak=no - dnl First, test whether the compiler accepts it syntactically. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[extern void xyzzy (); -#pragma weak xyzzy]], - [[xyzzy();]])], - [gl_cv_have_weak=maybe]) - if test $gl_cv_have_weak = maybe; then - dnl Second, test whether it actually works. On Cygwin 1.7.2, with - dnl gcc 4.3, symbols declared weak always evaluate to the address 0. - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include <stdio.h> -#pragma weak fputs -int main () -{ - return (fputs == NULL); -}]])], - [gl_cv_have_weak=yes], - [gl_cv_have_weak=no], - [dnl When cross-compiling, assume that only ELF platforms support - dnl weak symbols. - AC_EGREP_CPP([Extensible Linking Format], - [#ifdef __ELF__ - Extensible Linking Format - #endif - ], - [gl_cv_have_weak="guessing yes"], - [gl_cv_have_weak="guessing no"]) - ]) - fi - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. - AC_CHECK_HEADER([pthread.h], - [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <pthread.h>]], - [[pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0);]])], - [gl_have_pthread=yes]) - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB([pthread], [pthread_kill], - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], - [Define if the pthread_in_use() detection is hard.]) - esac - ]) - else - # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB([pthread], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - AC_CHECK_LIB([c_r], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - AC_DEFINE([USE_POSIX_THREADS], [1], - [Define if the POSIX multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], - [Define if references to the POSIX multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <thread.h> -#include <synch.h> - ]], - [[thr_self();]])], - [gl_have_solaristhread=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_SOLARIS_THREADS], [1], - [Define if the old Solaris multithreading library can be used.]) - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], - [Define if references to the old Solaris multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_LINKFLAGS([pth]) - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBPTH" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])], - [gl_have_pth=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_PTH_THREADS], [1], - [Define if the GNU Pth multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_PTH_THREADS_WEAK], [1], - [Define if references to the GNU Pth multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 - AC_DEFINE([USE_WIN32_THREADS], [1], - [Define if the Win32 multithreading API can be used.]) - fi - fi - fi - fi - AC_MSG_CHECKING([for multithread API to use]) - AC_MSG_RESULT([$gl_threads_api]) - AC_SUBST([LIBTHREAD]) - AC_SUBST([LTLIBTHREAD]) - AC_SUBST([LIBMULTITHREAD]) - AC_SUBST([LTLIBMULTITHREAD]) -]) - -AC_DEFUN([gl_THREADLIB], -[ - AC_REQUIRE([gl_THREADLIB_EARLY]) - AC_REQUIRE([gl_THREADLIB_BODY]) -]) - - -dnl gl_DISABLE_THREADS -dnl ------------------ -dnl Sets the gl_THREADLIB default so that threads are not used by default. -dnl The user can still override it at installation time, by using the -dnl configure option '--enable-threads'. - -AC_DEFUN([gl_DISABLE_THREADS], [ - m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) -]) - - -dnl Survey of platforms: -dnl -dnl Platform Available Compiler Supports test-lock -dnl flavours option weak result -dnl --------------- --------- --------- -------- --------- -dnl Linux 2.4/glibc posix -lpthread Y OK -dnl -dnl GNU Hurd/glibc posix -dnl -dnl FreeBSD 5.3 posix -lc_r Y -dnl posix -lkse ? Y -dnl posix -lpthread ? Y -dnl posix -lthr Y -dnl -dnl FreeBSD 5.2 posix -lc_r Y -dnl posix -lkse Y -dnl posix -lthr Y -dnl -dnl FreeBSD 4.0,4.10 posix -lc_r Y OK -dnl -dnl NetBSD 1.6 -- -dnl -dnl OpenBSD 3.4 posix -lpthread Y OK -dnl -dnl MacOS X 10.[123] posix -lpthread Y OK -dnl -dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK -dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK -dnl -dnl HP-UX 11 posix -lpthread N (cc) OK -dnl Y (gcc) -dnl -dnl IRIX 6.5 posix -lpthread Y 0.5 -dnl -dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK -dnl -dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK -dnl -lpthread (gcc) Y -dnl -dnl Cygwin posix -lpthread Y OK -dnl -dnl Any of the above pth -lpth 0.0 -dnl -dnl Mingw win32 N OK -dnl -dnl BeOS 5 -- -dnl -dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is -dnl turned off: -dnl OK if all three tests terminate OK, -dnl 0.5 if the first test terminates OK but the second one loops endlessly, -dnl 0.0 if the first test already loops endlessly. diff --git a/lib/gl/m4/time_h.m4 b/lib/gl/m4/time_h.m4 deleted file mode 100644 index a45a10a9ee..0000000000 --- a/lib/gl/m4/time_h.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# Configure a more-standard replacement for <time.h>. - -# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc. - -# serial 2 - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert and Jim Meyering. - -AC_DEFUN([gl_HEADER_TIME_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([time.h]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) -]) - -dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared -dnl in time.h, sys/time.h, or pthread.h. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], -[ - AC_CHECK_HEADERS_ONCE([sys/time.h]) - AC_CACHE_CHECK([for struct timespec in <time.h>], - [gl_cv_sys_struct_timespec_in_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <time.h> - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_time_h=yes], - [gl_cv_sys_struct_timespec_in_time_h=no])]) - - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in <sys/time.h>], - [gl_cv_sys_struct_timespec_in_sys_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <sys/time.h> - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_sys_time_h=yes], - [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in <pthread.h>], - [gl_cv_sys_struct_timespec_in_pthread_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <pthread.h> - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_pthread_h=yes], - [gl_cv_sys_struct_timespec_in_pthread_h=no])]) - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) -]) - -AC_DEFUN([gl_TIME_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], -[ - GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_LOCALTIME_R=1; AC_SUBST([HAVE_LOCALTIME_R]) - HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) - HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) - HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) - dnl If another module says to replace or to not replace, do that. - dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; - dnl this lets maintainers check for portability. - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) - REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) - REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) -]) diff --git a/lib/gl/m4/time_r.m4 b/lib/gl/m4/time_r.m4 deleted file mode 100644 index 9e82d39ffb..0000000000 --- a/lib/gl/m4/time_r.m4 +++ /dev/null @@ -1,54 +0,0 @@ -dnl Reentrant time functions: localtime_r, gmtime_r. - -dnl Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_TIME_R], -[ - dnl Persuade glibc and Solaris <time.h> to declare localtime_r. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - AC_REQUIRE([AC_C_RESTRICT]) - - AC_CHECK_FUNCS_ONCE([localtime_r]) - if test $ac_cv_func_localtime_r = yes; then - AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], - [gl_cv_time_r_posix], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <time.h>]], - [[/* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; - if (ptr) return 0; - /* Check the return type is a pointer. - On HP-UX 10 it is 'int'. */ - *localtime_r (0, 0);]]) - ], - [gl_cv_time_r_posix=yes], - [gl_cv_time_r_posix=no]) - ]) - if test $gl_cv_time_r_posix = yes; then - REPLACE_LOCALTIME_R=0 - else - REPLACE_LOCALTIME_R=1 - fi - else - HAVE_LOCALTIME_R=0 - fi - if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then - AC_LIBOBJ([time_r]) - gl_PREREQ_TIME_R - fi -]) - -# Prerequisites of lib/time_r.c. -AC_DEFUN([gl_PREREQ_TIME_R], [ - : -]) diff --git a/lib/gl/m4/uintmax_t.m4 b/lib/gl/m4/uintmax_t.m4 deleted file mode 100644 index 03b51bcfe3..0000000000 --- a/lib/gl/m4/uintmax_t.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# uintmax_t.m4 serial 12 -dnl Copyright (C) 1997-2004, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ([2.13]) - -# Define uintmax_t to 'unsigned long' or 'unsigned long long' -# if it is not already defined in <stdint.h> or <inttypes.h>. - -AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - test $ac_cv_type_unsigned_long_long_int = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], - [Define to unsigned long or unsigned long long - if <stdint.h> and <inttypes.h> don't define.]) - else - AC_DEFINE([HAVE_UINTMAX_T], [1], - [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) - fi -]) diff --git a/lib/gl/m4/ungetc.m4 b/lib/gl/m4/ungetc.m4 deleted file mode 100644 index 68ccf88349..0000000000 --- a/lib/gl/m4/ungetc.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# ungetc.m4 serial 2 -dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], -[ - AC_REQUIRE([AC_PROG_CC]) - - AC_CACHE_CHECK([whether ungetc works on arbitrary bytes], - [gl_cv_func_ungetc_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <stdio.h> - ]], [FILE *f; - if (!(f = fopen ("conftest.tmp", "w+"))) return 1; - if (fputs ("abc", f) < 0) return 2; - rewind (f); - if (fgetc (f) != 'a') return 3; - if (fgetc (f) != 'b') return 4; - if (ungetc ('d', f) != 'd') return 5; - if (ftell (f) != 1) return 6; - if (fgetc (f) != 'd') return 7; - if (ftell (f) != 2) return 8; - if (fseek (f, 0, SEEK_CUR) != 0) return 9; - if (ftell (f) != 2) return 10; - if (fgetc (f) != 'c') return 11; - fclose (f); remove ("conftest.tmp");])], - [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], - [gl_cv_func_ungetc_works='guessing no']) - ]) - if test "$gl_cv_func_ungetc_works" != yes; then - AC_DEFINE([FUNC_UNGETC_BROKEN], [1], - [Define to 1 if ungetc is broken when used on arbitrary bytes.]) - fi -]) diff --git a/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4 deleted file mode 100644 index e2f7f2bf45..0000000000 --- a/lib/gl/m4/unistd_h.m4 +++ /dev/null @@ -1,160 +0,0 @@ -# unistd_h.m4 serial 48 -dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Simon Josefsson, Bruno Haible. - -AC_DEFUN([gl_UNISTD_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_C_INLINE]) - - gl_CHECK_NEXT_HEADERS([unistd.h]) - - AC_CHECK_HEADERS_ONCE([unistd.h]) - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - AC_SUBST([HAVE_UNISTD_H]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include <unistd.h> -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include <fcntl.h> -# include <stdio.h> -# include <stdlib.h> -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include <io.h> -# endif -#endif - ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat - fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize getusershell setusershell - endusershell lchown link linkat lseek pipe2 pread pwrite readlink - readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat - usleep]) -]) - -AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_UNISTD_H_DEFAULTS], -[ - GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) - GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) - GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) - GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) - GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) - GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) - GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) - GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) - GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) - GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) - GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) - GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) - GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) - GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) - GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) - GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) - GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) - GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) - GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) - GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) - GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) - GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) - GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) - GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) - GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) - GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) - GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) - GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) - GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) - GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) - GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) - GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) - GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) - GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) - GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) - HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) - HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) - HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) - HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) - HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) - HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) - HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) - HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) - HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) - HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) - HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) - HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) - HAVE_LINK=1; AC_SUBST([HAVE_LINK]) - HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) - HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) - HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) - HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) - HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) - HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) - HAVE_TTYNAME_R=1; AC_SUBST([HAVE_TTYNAME_R]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) - HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) - HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) - REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) - REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) - REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) - REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) - REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) - REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) - REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) - REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) - REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) - REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) - REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) - REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) - REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) - REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) - REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) - REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) - REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) - UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) -]) diff --git a/lib/gl/m4/vasnprintf.m4 b/lib/gl/m4/vasnprintf.m4 deleted file mode 100644 index 9c04520242..0000000000 --- a/lib/gl/m4/vasnprintf.m4 +++ /dev/null @@ -1,289 +0,0 @@ -# vasnprintf.m4 serial 32 -dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VASNPRINTF], -[ - AC_CHECK_FUNCS_ONCE([vasnprintf]) - if test $ac_cv_func_vasnprintf = no; then - gl_REPLACE_VASNPRINTF - fi -]) - -AC_DEFUN([gl_REPLACE_VASNPRINTF], -[ - AC_CHECK_FUNCS_ONCE([vasnprintf]) - AC_LIBOBJ([vasnprintf]) - AC_LIBOBJ([printf-args]) - AC_LIBOBJ([printf-parse]) - AC_LIBOBJ([asnprintf]) - if test $ac_cv_func_vasnprintf = yes; then - AC_DEFINE([REPLACE_VASNPRINTF], [1], - [Define if vasnprintf exists but is overridden by gnulib.]) - fi - gl_PREREQ_PRINTF_ARGS - gl_PREREQ_PRINTF_PARSE - gl_PREREQ_VASNPRINTF - gl_PREREQ_ASNPRINTF -]) - -# Prequisites of lib/printf-args.h, lib/printf-args.c. -AC_DEFUN([gl_PREREQ_PRINTF_ARGS], -[ - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) -]) - -# Prequisites of lib/printf-parse.h, lib/printf-parse.c. -AC_DEFUN([gl_PREREQ_PRINTF_PARSE], -[ - AC_REQUIRE([gl_FEATURES_H]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_REQUIRE([AC_TYPE_SIZE_T]) - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) -]) - -# Prerequisites of lib/vasnprintf.c. -AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>]) - dnl We can avoid a lot of code by assuming that snprintf's return value - dnl conforms to ISO C99. So check that. - AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) - case "$gl_cv_func_snprintf_retval_c99" in - *yes) - AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], - [Define if the return value of the snprintf function is the number of - of bytes (excluding the terminating NUL) that would have been produced - if the buffer had been large enough.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting 'long double' -# arguments. -AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) - case "$gl_cv_func_printf_long_double" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' -# arguments. -AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_INFINITE]) - case "$gl_cv_func_printf_infinite" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - infinite 'double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' -# arguments. -AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) - dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if - dnl NEED_PRINTF_LONG_DOUBLE is already set. - AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) - case "$gl_cv_func_printf_long_double" in - *yes) - case "$gl_cv_func_printf_infinite_long_double" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - infinite 'long double' arguments.]) - ;; - esac - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) - case "$gl_cv_func_printf_directive_a" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], - [Define if the vasnprintf implementation needs special code for - the 'a' and 'A' directives.]) - AC_CHECK_FUNCS([nl_langinfo]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) - case "$gl_cv_func_printf_directive_f" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], - [Define if the vasnprintf implementation needs special code for - the 'F' directive.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) - case "$gl_cv_func_printf_directive_ls" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], - [Define if the vasnprintf implementation needs special code for - the 'ls' directive.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], -[ - AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) - case "$gl_cv_func_printf_flag_grouping" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], - [Define if the vasnprintf implementation needs special code for the - ' flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], -[ - AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) - case "$gl_cv_func_printf_flag_leftadjust" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], - [Define if the vasnprintf implementation needs special code for the - '-' flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], -[ - AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) - case "$gl_cv_func_printf_flag_zero" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], - [Define if the vasnprintf implementation needs special code for the - 0 flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting large precisions. -AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], -[ - AC_REQUIRE([gl_PRINTF_PRECISION]) - case "$gl_cv_func_printf_precision" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], - [Define if the vasnprintf implementation needs special code for - supporting large precisions without arbitrary bounds.]) - AC_DEFINE([NEED_PRINTF_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'double' arguments.]) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory -# conditions. -AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], -[ - AC_REQUIRE([gl_PRINTF_ENOMEM]) - case "$gl_cv_func_printf_enomem" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_ENOMEM], [1], - [Define if the vasnprintf implementation needs special code for - surviving out-of-memory conditions.]) - AC_DEFINE([NEED_PRINTF_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'double' arguments.]) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. -AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], -[ - AC_REQUIRE([gl_PREREQ_VASNPRINTF]) - gl_PREREQ_VASNPRINTF_LONG_DOUBLE - gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE - gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE - gl_PREREQ_VASNPRINTF_DIRECTIVE_A - gl_PREREQ_VASNPRINTF_DIRECTIVE_F - gl_PREREQ_VASNPRINTF_DIRECTIVE_LS - gl_PREREQ_VASNPRINTF_FLAG_GROUPING - gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST - gl_PREREQ_VASNPRINTF_FLAG_ZERO - gl_PREREQ_VASNPRINTF_PRECISION - gl_PREREQ_VASNPRINTF_ENOMEM -]) - -# Prerequisites of lib/asnprintf.c. -AC_DEFUN([gl_PREREQ_ASNPRINTF], -[ -]) diff --git a/lib/gl/m4/vasprintf.m4 b/lib/gl/m4/vasprintf.m4 deleted file mode 100644 index b142bc0ff1..0000000000 --- a/lib/gl/m4/vasprintf.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# vasprintf.m4 serial 6 -dnl Copyright (C) 2002-2003, 2006-2007, 2009-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VASPRINTF], -[ - AC_CHECK_FUNCS([vasprintf]) - if test $ac_cv_func_vasprintf = no; then - gl_REPLACE_VASPRINTF - fi -]) - -AC_DEFUN([gl_REPLACE_VASPRINTF], -[ - AC_LIBOBJ([vasprintf]) - AC_LIBOBJ([asprintf]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - if test $ac_cv_func_vasprintf = yes; then - REPLACE_VASPRINTF=1 - else - HAVE_VASPRINTF=0 - fi - gl_PREREQ_VASPRINTF_H - gl_PREREQ_VASPRINTF - gl_PREREQ_ASPRINTF -]) - -# Prerequisites of the vasprintf portion of lib/stdio.h. -AC_DEFUN([gl_PREREQ_VASPRINTF_H], -[ - dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) - -# Prerequisites of lib/vasprintf.c. -AC_DEFUN([gl_PREREQ_VASPRINTF], -[ -]) - -# Prerequisites of lib/asprintf.c. -AC_DEFUN([gl_PREREQ_ASPRINTF], -[ -]) diff --git a/lib/gl/m4/visibility.m4 b/lib/gl/m4/visibility.m4 deleted file mode 100644 index 19cd8f3d3e..0000000000 --- a/lib/gl/m4/visibility.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# visibility.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Tests whether the compiler supports the command-line option -dnl -fvisibility=hidden and the function and variable attributes -dnl __attribute__((__visibility__("hidden"))) and -dnl __attribute__((__visibility__("default"))). -dnl Does *not* test for __visibility__("protected") - which has tricky -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -dnl MacOS X. -dnl Does *not* test for __visibility__("internal") - which has processor -dnl dependent semantics. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -dnl "really only recommended for legacy code". -dnl Set the variable CFLAG_VISIBILITY. -dnl Defines and sets the variable HAVE_VISIBILITY. - -AC_DEFUN([gl_VISIBILITY], -[ - AC_REQUIRE([AC_PROG_CC]) - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - dnl First, check whether -Werror can be added to the command line, or - dnl whether it leads to an error because of some other option that the - dnl user has put into $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether the -Werror option is usable]) - AC_CACHE_VAL([gl_cv_cc_vis_werror], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_vis_werror=yes], - [gl_cv_cc_vis_werror=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_vis_werror]) - dnl Now check whether visibility declarations are supported. - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - dnl We use the option -Werror and a function dummyfunc, because on some - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning - dnl "visibility attribute not supported in this configuration; ignored" - dnl at the first function definition in every compilation unit, and we - dnl don't want to use the option in this case. - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - ]], - [[]])], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - AC_SUBST([CFLAG_VISIBILITY]) - AC_SUBST([HAVE_VISIBILITY]) - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -]) diff --git a/lib/gl/m4/vsnprintf.m4 b/lib/gl/m4/vsnprintf.m4 deleted file mode 100644 index ed189c2388..0000000000 --- a/lib/gl/m4/vsnprintf.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# vsnprintf.m4 serial 5 -dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VSNPRINTF], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_cv_func_vsnprintf_usable=no - AC_CHECK_FUNCS([vsnprintf]) - if test $ac_cv_func_vsnprintf = yes; then - gl_SNPRINTF_SIZE1 - case "$gl_cv_func_snprintf_size1" in - *yes) - gl_cv_func_vsnprintf_usable=yes - ;; - esac - fi - if test $gl_cv_func_vsnprintf_usable = no; then - gl_REPLACE_VSNPRINTF - fi - AC_CHECK_DECLS_ONCE([vsnprintf]) - if test $ac_cv_have_decl_vsnprintf = no; then - HAVE_DECL_VSNPRINTF=0 - fi -]) - -AC_DEFUN([gl_REPLACE_VSNPRINTF], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_LIBOBJ([vsnprintf]) - if test $ac_cv_func_vsnprintf = yes; then - REPLACE_VSNPRINTF=1 - fi - gl_PREREQ_VSNPRINTF -]) - -# Prerequisites of lib/vsnprintf.c. -AC_DEFUN([gl_PREREQ_VSNPRINTF], [:]) diff --git a/lib/gl/m4/warn-on-use.m4 b/lib/gl/m4/warn-on-use.m4 deleted file mode 100644 index 42daae87b8..0000000000 --- a/lib/gl/m4/warn-on-use.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# warn-on-use.m4 serial 2 -dnl Copyright (C) 2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) -# --------------------------------------- -# For each whitespace-separated element in the list of NAMES, define -# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES -# even after being undefined as a macro. -# -# See warn-on-use.h for some hints on how to poison function names, as -# well as ideas on poisoning global variables and macros. NAMES may -# include global variables, but remember that only functions work with -# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single -# header, but if the replacement header pulls in other headers because -# some systems declare functions in the wrong header, then INCLUDES -# should do likewise. -# -# If you assume C89, then it is generally safe to assume declarations -# for functions declared in that standard (such as gets) without -# needing gl_WARN_ON_USE_PREPARE. -AC_DEFUN([gl_WARN_ON_USE_PREPARE], -[ - m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], -[@%:@undef $gl_func - (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done -]) diff --git a/lib/gl/m4/wchar_h.m4 b/lib/gl/m4/wchar_h.m4 deleted file mode 100644 index 8c8fad96df..0000000000 --- a/lib/gl/m4/wchar_h.m4 +++ /dev/null @@ -1,154 +0,0 @@ -dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues. - -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Eric Blake. - -# wchar_h.m4 serial 35 - -AC_DEFUN([gl_WCHAR_H], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) - dnl Prepare for creating substitute <wchar.h>. - dnl Check for <wchar.h> (missing in Linux uClibc when built without wide - dnl character support). - dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK. - AC_CHECK_HEADERS_ONCE([wchar.h]) - gl_CHECK_NEXT_HEADERS([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - AC_REQUIRE([gl_FEATURES_H]) - - AC_REQUIRE([gt_TYPE_WINT_T]) - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - AC_SUBST([HAVE_WINT_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Some systems require additional headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include <stddef.h> -# include <stdio.h> -# include <time.h> -#endif -#include <wchar.h> - ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb - wcsrtombs wcsnrtombs wcwidth]) -]) - -dnl Check whether <wchar.h> is usable at all. -AC_DEFUN([gl_WCHAR_H_INLINE_OK], -[ - dnl Test whether <wchar.h> suffers due to the transition from '__inline' to - dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022> - dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary, - dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and - dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>. - AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly], - [gl_cv_header_wchar_h_correct_inline], - [gl_cv_header_wchar_h_correct_inline=yes - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod -#include <wchar.h> -extern int zero (void); -int main () { return zero(); } -]])]) - if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest1.$ac_objext - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod -#include <wchar.h> -int zero (void) { return 0; } -]])]) - if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then - : - else - gl_cv_header_wchar_h_correct_inline=no - fi - fi - fi - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - ]) - if test $gl_cv_header_wchar_h_correct_inline = no; then - AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). -This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in -C99 mode. You have four options: - - Add the flag -fgnu89-inline to CC and reconfigure, or - - Fix your include files, using parts of - <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or - - Use a gcc version older than 4.3, or - - Don't use the flags -std=c99 or -std=gnu99. -Configuration aborted.]) - fi -]) - -dnl Unconditionally enables the replacement of <wchar.h>. -AC_DEFUN([gl_REPLACE_WCHAR_H], -[ - dnl This is a no-op, because <wchar.h> is always overridden. - : -]) - -AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_WCHAR_H_DEFAULTS], -[ - GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) - GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) - GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) - GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) - GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) - GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) - GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) - GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) - GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) - GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) - GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) - HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) - HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) - HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) - HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) - HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) - HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) - HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) - HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) - HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) - HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) - REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) - REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) - REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) - REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) - REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) - REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) - REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) - REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) - REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) - REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) - REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) - REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) -]) diff --git a/lib/gl/m4/wchar_t.m4 b/lib/gl/m4/wchar_t.m4 deleted file mode 100644 index a133e6ad58..0000000000 --- a/lib/gl/m4/wchar_t.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether <stddef.h> has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <stddef.h> - wchar_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wchar_t=yes], - [gt_cv_c_wchar_t=no])]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/lib/gl/m4/wint_t.m4 b/lib/gl/m4/wint_t.m4 deleted file mode 100644 index 58ef865565..0000000000 --- a/lib/gl/m4/wint_t.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether <wchar.h> has the 'wint_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - 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> -#include <wchar.h> - wint_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wint_t=yes], - [gt_cv_c_wint_t=no])]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) - fi -]) diff --git a/lib/gl/m4/xsize.m4 b/lib/gl/m4/xsize.m4 deleted file mode 100644 index b653693a30..0000000000 --- a/lib/gl/m4/xsize.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# xsize.m4 serial 4 -dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSIZE], -[ - dnl Prerequisites of lib/xsize.h. - AC_REQUIRE([gl_SIZE_MAX]) - AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS([stdint.h]) -]) diff --git a/lib/gl/malloc.c b/lib/gl/malloc.c deleted file mode 100644 index 02ca9f7c84..0000000000 --- a/lib/gl/malloc.c +++ /dev/null @@ -1,60 +0,0 @@ -/* malloc() function that is glibc compatible. - - Copyright (C) 1997-1998, 2006-2007, 2009-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* written by Jim Meyering and Bruno Haible */ - -#include <config.h> -/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ -#ifdef malloc -# define NEED_MALLOC_GNU 1 -# undef malloc -/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU -# define NEED_MALLOC_GNU 1 -#endif - -/* Specification. */ -#include <stdlib.h> - -#include <errno.h> - -/* Call the system's malloc below. */ -#undef malloc - -/* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - -void * -rpl_malloc (size_t n) -{ - void *result; - -#if NEED_MALLOC_GNU - if (n == 0) - n = 1; -#endif - - result = malloc (n); - -#if !HAVE_MALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/lib/gl/memchr.c b/lib/gl/memchr.c deleted file mode 100644 index b0af681bae..0000000000 --- a/lib/gl/memchr.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010 - Free Software Foundation, Inc. - - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), - with help from Dan Sahlin (dan@sics.se) and - commentary by Jim Blandy (jimb@ai.mit.edu); - adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), - and implemented by Roland McGrath (roland@ai.mit.edu). - -NOTE: The canonical source of this file is maintained with the GNU C Library. -Bugs can be reported to bug-glibc@prep.ai.mit.edu. - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 2.1 of the License, or 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#ifndef _LIBC -# include <config.h> -#endif - -#include <string.h> - -#include <stddef.h> - -#if defined _LIBC -# include <memcopy.h> -#else -# define reg_char char -#endif - -#include <limits.h> - -#if HAVE_BP_SYM_H || defined _LIBC -# include <bp-sym.h> -#else -# define BP_SYM(sym) sym -#endif - -#undef __memchr -#ifdef _LIBC -# undef memchr -#endif - -#ifndef weak_alias -# define __memchr memchr -#endif - -/* Search no more than N bytes of S for C. */ -void * -__memchr (void const *s, int c_in, size_t n) -{ - /* On 32-bit hardware, choosing longword to be a 32-bit unsigned - long instead of a 64-bit uintmax_t tends to give better - performance. On 64-bit hardware, unsigned long is generally 64 - bits already. Change this typedef to experiment with - performance. */ - typedef unsigned long int longword; - - const unsigned char *char_ptr; - const longword *longword_ptr; - longword repeated_one; - longword repeated_c; - unsigned reg_char c; - - c = (unsigned char) c_in; - - /* Handle the first few bytes by reading one byte at a time. - Do this until CHAR_PTR is aligned on a longword boundary. */ - for (char_ptr = (const unsigned char *) s; - n > 0 && (size_t) char_ptr % sizeof (longword) != 0; - --n, ++char_ptr) - if (*char_ptr == c) - return (void *) char_ptr; - - longword_ptr = (const longword *) char_ptr; - - /* All these elucidatory comments refer to 4-byte longwords, - but the theory applies equally well to any size longwords. */ - - /* Compute auxiliary longword values: - repeated_one is a value which has a 1 in every byte. - repeated_c has c in every byte. */ - repeated_one = 0x01010101; - repeated_c = c | (c << 8); - repeated_c |= repeated_c << 16; - if (0xffffffffU < (longword) -1) - { - repeated_one |= repeated_one << 31 << 1; - repeated_c |= repeated_c << 31 << 1; - if (8 < sizeof (longword)) - { - size_t i; - - for (i = 64; i < sizeof (longword) * 8; i *= 2) - { - repeated_one |= repeated_one << i; - repeated_c |= repeated_c << i; - } - } - } - - /* Instead of the traditional loop which tests each byte, we will test a - longword at a time. The tricky part is testing if *any of the four* - bytes in the longword in question are equal to c. We first use an xor - with repeated_c. This reduces the task to testing whether *any of the - four* bytes in longword1 is zero. - - We compute tmp = - ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). - That is, we perform the following operations: - 1. Subtract repeated_one. - 2. & ~longword1. - 3. & a mask consisting of 0x80 in every byte. - Consider what happens in each byte: - - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, - and step 3 transforms it into 0x80. A carry can also be propagated - to more significant bytes. - - If a byte of longword1 is nonzero, let its lowest 1 bit be at - position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, - the byte ends in a single bit of value 0 and k bits of value 1. - After step 2, the result is just k bits of value 1: 2^k - 1. After - step 3, the result is 0. And no carry is produced. - So, if longword1 has only non-zero bytes, tmp is zero. - Whereas if longword1 has a zero byte, call j the position of the least - significant zero byte. Then the result has a zero at positions 0, ..., - j-1 and a 0x80 at position j. We cannot predict the result at the more - significant bytes (positions j+1..3), but it does not matter since we - already have a non-zero bit at position 8*j+7. - - So, the test whether any byte in longword1 is zero is equivalent to - testing whether tmp is nonzero. */ - - while (n >= sizeof (longword)) - { - longword longword1 = *longword_ptr ^ repeated_c; - - if ((((longword1 - repeated_one) & ~longword1) - & (repeated_one << 7)) != 0) - break; - longword_ptr++; - n -= sizeof (longword); - } - - char_ptr = (const unsigned char *) longword_ptr; - - /* At this point, we know that either n < sizeof (longword), or one of the - sizeof (longword) bytes starting at char_ptr is == c. On little-endian - machines, we could determine the first such byte without any further - memory accesses, just by looking at the tmp result from the last loop - iteration. But this does not work on big-endian machines. Choose code - that works in both cases. */ - - for (; n > 0; --n, ++char_ptr) - { - if (*char_ptr == c) - return (void *) char_ptr; - } - - return NULL; -} -#ifdef weak_alias -weak_alias (__memchr, BP_SYM (memchr)) -#endif diff --git a/lib/gl/memchr.valgrind b/lib/gl/memchr.valgrind deleted file mode 100644 index 60f247e10d..0000000000 --- a/lib/gl/memchr.valgrind +++ /dev/null @@ -1,14 +0,0 @@ -# Suppress a valgrind message about use of uninitialized memory in memchr(). -# POSIX states that when the character is found, memchr must not read extra -# bytes in an overestimated length (for example, where memchr is used to -# implement strnlen). However, we use a safe word read to provide a speedup. -{ - memchr-value4 - Memcheck:Value4 - fun:rpl_memchr -} -{ - memchr-value8 - Memcheck:Value8 - fun:rpl_memchr -} diff --git a/lib/gl/memmem.c b/lib/gl/memmem.c deleted file mode 100644 index 544ed45551..0000000000 --- a/lib/gl/memmem.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2004, 2007, - 2008, 2009, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This particular implementation was written by Eric Blake, 2008. */ - -#ifndef _LIBC -# include <config.h> -#endif - -/* Specification of memmem. */ -#include <string.h> - -#ifndef _LIBC -# define __builtin_expect(expr, val) (expr) -#endif - -#define RETURN_TYPE void * -#define AVAILABLE(h, h_l, j, n_l) ((j) <= (h_l) - (n_l)) -#include "str-two-way.h" - -/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK - if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in - HAYSTACK. */ -void * -memmem (const void *haystack_start, size_t haystack_len, - const void *needle_start, size_t needle_len) -{ - /* Abstract memory is considered to be an array of 'unsigned char' values, - not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ - const unsigned char *haystack = (const unsigned char *) haystack_start; - const unsigned char *needle = (const unsigned char *) needle_start; - - if (needle_len == 0) - /* The first occurrence of the empty string is deemed to occur at - the beginning of the string. */ - return (void *) haystack; - - /* Sanity check, otherwise the loop might search through the whole - memory. */ - if (__builtin_expect (haystack_len < needle_len, 0)) - return NULL; - - /* Use optimizations in memchr when possible, to reduce the search - size of haystack using a linear algorithm with a smaller - coefficient. However, avoid memchr for long needles, since we - can often achieve sublinear performance. */ - if (needle_len < LONG_NEEDLE_THRESHOLD) - { - haystack = memchr (haystack, *needle, haystack_len); - if (!haystack || __builtin_expect (needle_len == 1, 0)) - return (void *) haystack; - haystack_len -= haystack - (const unsigned char *) haystack_start; - if (haystack_len < needle_len) - return NULL; - return two_way_short_needle (haystack, haystack_len, needle, needle_len); - } - else - return two_way_long_needle (haystack, haystack_len, needle, needle_len); -} - -#undef LONG_NEEDLE_THRESHOLD diff --git a/lib/gl/minmax.h b/lib/gl/minmax.h deleted file mode 100644 index 76a683daa5..0000000000 --- a/lib/gl/minmax.h +++ /dev/null @@ -1,61 +0,0 @@ -/* MIN, MAX macros. - Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009, 2010 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _MINMAX_H -#define _MINMAX_H - -/* Note: MIN, MAX are also defined in <sys/param.h> on some systems - (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about - MIN, MAX macro redefinitions on some systems; the workaround is to - #include this file as the last one among the #include list. */ - -/* Before we define the following symbols we get the <limits.h> file - since otherwise we get redefinitions on some systems if <limits.h> is - included after this file. Likewise for <sys/param.h>. - If more than one of these system headers define MIN and MAX, pick just - one of the headers (because the definitions most likely are the same). */ -#if HAVE_MINMAX_IN_LIMITS_H -# include <limits.h> -#elif HAVE_MINMAX_IN_SYS_PARAM_H -# include <sys/param.h> -#endif - -/* Note: MIN and MAX should be used with two arguments of the - same type. They might not return the minimum and maximum of their two - arguments, if the arguments have different types or have unusual - floating-point values. For example, on a typical host with 32-bit 'int', - 64-bit 'long long', and 64-bit IEEE 754 'double' types: - - MAX (-1, 2147483648) returns 4294967295. - MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0. - MAX (NaN, 0.0) returns 0.0. - MAX (+0.0, -0.0) returns -0.0. - - and in each case the answer is in some sense bogus. */ - -/* MAX(a,b) returns the maximum of A and B. */ -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -/* MIN(a,b) returns the minimum of A and B. */ -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#endif /* _MINMAX_H */ diff --git a/lib/gl/netdb.in.h b/lib/gl/netdb.in.h deleted file mode 100644 index 4f6fef31f1..0000000000 --- a/lib/gl/netdb.in.h +++ /dev/null @@ -1,221 +0,0 @@ -/* Provide a netdb.h header file for systems lacking it (read: MinGW). - Copyright (C) 2008-2010 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file is supposed to be used on platforms that lack <netdb.h>. - It is intended to provide definitions and prototypes needed by an - application. */ - -#ifndef _GL_NETDB_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if @HAVE_NETDB_H@ - -/* The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_NETDB_H@ - -#endif - -#ifndef _GL_NETDB_H -#define _GL_NETDB_H - -/* Get netdb.h definitions such as struct hostent for MinGW. */ -#include <sys/socket.h> - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Declarations for a platform that lacks <netdb.h>, or where it is - incomplete. */ - -#if @GNULIB_GETADDRINFO@ - -# if !@HAVE_STRUCT_ADDRINFO@ - -/* Structure to contain information about address of a service provider. */ -struct addrinfo -{ - int ai_flags; /* Input flags. */ - int ai_family; /* Protocol family for socket. */ - int ai_socktype; /* Socket type. */ - int ai_protocol; /* Protocol for socket. */ - socklen_t ai_addrlen; /* Length of socket address. */ - struct sockaddr *ai_addr; /* Socket address for socket. */ - char *ai_canonname; /* Canonical name for service location. */ - struct addrinfo *ai_next; /* Pointer to next in list. */ -}; -# endif - -/* Possible values for `ai_flags' field in `addrinfo' structure. */ -# ifndef AI_PASSIVE -# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ -# endif -# ifndef AI_CANONNAME -# define AI_CANONNAME 0x0002 /* Request for canonical name. */ -# endif -# ifndef AI_NUMERICSERV -# define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ -# endif - -# if 0 -# define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ -# endif - -/* These symbolic constants are required to be present by POSIX, but - our getaddrinfo replacement doesn't use them (yet). Setting them - to 0 on systems that doesn't have them avoids causing problems for - system getaddrinfo implementations that would be confused by - unknown values. */ -# ifndef AI_V4MAPPED -# define AI_V4MAPPED 0 /* 0x0008: IPv4 mapped addresses are acceptable. */ -# endif -# ifndef AI_ALL -# define AI_ALL 0 /* 0x0010: Return IPv4 mapped and IPv6 addresses. */ -# endif -# ifndef AI_ADDRCONFIG -# define AI_ADDRCONFIG 0 /* 0x0020: Use configuration of this host to choose - returned address type. */ -# endif - -/* Error values for `getaddrinfo' function. */ -# ifndef EAI_BADFLAGS -# define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ -# define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ -# define EAI_AGAIN -3 /* Temporary failure in name resolution. */ -# define EAI_FAIL -4 /* Non-recoverable failure in name res. */ -# define EAI_NODATA -5 /* No address associated with NAME. */ -# define EAI_FAMILY -6 /* `ai_family' not supported. */ -# define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ -# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ -# define EAI_MEMORY -10 /* Memory allocation failure. */ -# endif - -/* Since EAI_NODATA is deprecated by RFC3493, some systems (at least - FreeBSD, which does define EAI_BADFLAGS) have removed the definition - in favor of EAI_NONAME. */ -# if !defined EAI_NODATA && defined EAI_NONAME -# define EAI_NODATA EAI_NONAME -# endif - -# ifndef EAI_OVERFLOW -/* Not defined on mingw32 and Haiku. */ -# define EAI_OVERFLOW -12 /* Argument buffer overflow. */ -# endif -# ifndef EAI_ADDRFAMILY -/* Not defined on mingw32. */ -# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ -# endif -# ifndef EAI_SYSTEM -/* Not defined on mingw32. */ -# define EAI_SYSTEM -11 /* System error returned in `errno'. */ -# endif - -# if 0 -/* The commented out definitions below are not yet implemented in the - GNULIB getaddrinfo() replacement, so are not yet needed. - - If they are restored, be sure to protect the definitions with #ifndef. */ -# ifndef EAI_INPROGRESS -# define EAI_INPROGRESS -100 /* Processing request in progress. */ -# define EAI_CANCELED -101 /* Request canceled. */ -# define EAI_NOTCANCELED -102 /* Request not canceled. */ -# define EAI_ALLDONE -103 /* All requests done. */ -# define EAI_INTR -104 /* Interrupted by a signal. */ -# define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ -# endif -# endif - -# if !@HAVE_DECL_GETADDRINFO@ -/* Translate name of a service location and/or a service name to set of - socket addresses. - For more details, see the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */ -extern int getaddrinfo (const char *restrict nodename, - const char *restrict servname, - const struct addrinfo *restrict hints, - struct addrinfo **restrict res) - _GL_ARG_NONNULL ((4)); -# endif - -# if !@HAVE_DECL_FREEADDRINFO@ -/* Free `addrinfo' structure AI including associated storage. - For more details, see the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */ -extern void freeaddrinfo (struct addrinfo *ai) _GL_ARG_NONNULL ((1)); -# endif - -# if !@HAVE_DECL_GAI_STRERROR@ -/* Convert error return from getaddrinfo() to a string. - For more details, see the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/gai_strerror.html>. */ -extern const char *gai_strerror (int ecode); -# endif - -# if !@HAVE_DECL_GETNAMEINFO@ -/* Convert socket address to printable node and service names. - For more details, see the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/getnameinfo.html>. */ -extern int getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, - char *restrict node, socklen_t nodelen, - char *restrict service, socklen_t servicelen, - int flags) - _GL_ARG_NONNULL ((1)); -# endif - -/* Possible flags for getnameinfo. */ -# ifndef NI_NUMERICHOST -# define NI_NUMERICHOST 1 -# endif -# ifndef NI_NUMERICSERV -# define NI_NUMERICSERV 2 -# endif - -#elif defined GNULIB_POSIXCHECK - -# undef getaddrinfo -# if HAVE_RAW_DECL_GETADDRINFO -_GL_WARN_ON_USE (getaddrinfo, "getaddrinfo is unportable - " - "use gnulib module getaddrinfo for portability"); -# endif - -# undef freeaddrinfo -# if HAVE_RAW_DECL_FREEADDRINFO -_GL_WARN_ON_USE (freeaddrinfo, "freeaddrinfo is unportable - " - "use gnulib module getaddrinfo for portability"); -# endif - -# undef gai_strerror -# if HAVE_RAW_DECL_GAI_STRERROR -_GL_WARN_ON_USE (gai_strerror, "gai_strerror is unportable - " - "use gnulib module getaddrinfo for portability"); -# endif - -# undef getnameinfo -# if HAVE_RAW_DECL_GETNAMEINFO -_GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - " - "use gnulib module getaddrinfo for portability"); -# endif - -#endif - -#endif /* _GL_NETDB_H */ -#endif /* _GL_NETDB_H */ diff --git a/lib/gl/override/lib/gc-libgcrypt.c.diff b/lib/gl/override/lib/gc-libgcrypt.c.diff deleted file mode 100644 index a92198c8cc..0000000000 --- a/lib/gl/override/lib/gc-libgcrypt.c.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- lgl/gc-libgcrypt.c.orig 2008-05-05 13:26:28.000000000 +0200 -+++ lgl/gc-libgcrypt.c 2008-05-05 13:26:43.000000000 +0200 -@@ -145,7 +145,7 @@ - gcryalg = GCRY_CIPHER_RFC2268_40; - break; - --#ifdef HAVE_CAMELLIA -+#ifdef ENABLE_CAMELLIA - case GC_CAMELLIA128: - gcryalg = GCRY_CIPHER_CAMELLIA128; - break; -@@ -294,9 +294,11 @@ - gcryalg = GCRY_MD_SHA512; - break; - -+#ifdef ENABLE_CAMELLIA - case GC_SHA224: - gcryalg = GCRY_MD_SHA224; - break; -+#endif - - case GC_RMD160: - gcryalg = GCRY_MD_RMD160; -@@ -397,9 +399,11 @@ - len = GC_SHA512_DIGEST_SIZE; - break; - -+#ifdef ENABLE_CAMELLIA - case GC_SHA224: - len = GC_SHA224_DIGEST_SIZE; - break; -+#endif - - default: - return 0; diff --git a/lib/gl/override/lib/gettext.h.diff b/lib/gl/override/lib/gettext.h.diff deleted file mode 100644 index ae7f6a8107..0000000000 --- a/lib/gl/override/lib/gettext.h.diff +++ /dev/null @@ -1,112 +0,0 @@ ---- lib/gl/gettext.h.orig 2010-01-26 15:38:07.000000000 +0100 -+++ lib/gl/gettext.h 2010-01-26 15:38:14.000000000 +0100 -@@ -172,109 +172,4 @@ - return translation; - } - --/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID -- can be arbitrary expressions. But for string literals these macros are -- less efficient than those above. */ -- --#include <string.h> -- --#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ -- (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ -- /* || __STDC_VERSION__ >= 199901L */ ) -- --#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS --#include <stdlib.h> --#endif -- --#define pgettext_expr(Msgctxt, Msgid) \ -- dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) --#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ -- dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) -- --#ifdef __GNUC__ --__inline --#else --#ifdef __cplusplus --inline --#endif --#endif --static const char * --dcpgettext_expr (const char *domain, -- const char *msgctxt, const char *msgid, -- int category) --{ -- size_t msgctxt_len = strlen (msgctxt) + 1; -- size_t msgid_len = strlen (msgid) + 1; -- const char *translation; --#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -- char msg_ctxt_id[msgctxt_len + msgid_len]; --#else -- char buf[1024]; -- char *msg_ctxt_id = -- (msgctxt_len + msgid_len <= sizeof (buf) -- ? buf -- : (char *) malloc (msgctxt_len + msgid_len)); -- if (msg_ctxt_id != NULL) --#endif -- { -- 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); --#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -- if (msg_ctxt_id != buf) -- free (msg_ctxt_id); --#endif -- if (translation != msg_ctxt_id) -- return translation; -- } -- return msgid; --} -- --#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ -- dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) --#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ -- dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -- --#ifdef __GNUC__ --__inline --#else --#ifdef __cplusplus --inline --#endif --#endif --static const char * --dcnpgettext_expr (const char *domain, -- const char *msgctxt, const char *msgid, -- const char *msgid_plural, unsigned long int n, -- int category) --{ -- size_t msgctxt_len = strlen (msgctxt) + 1; -- size_t msgid_len = strlen (msgid) + 1; -- const char *translation; --#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -- char msg_ctxt_id[msgctxt_len + msgid_len]; --#else -- char buf[1024]; -- char *msg_ctxt_id = -- (msgctxt_len + msgid_len <= sizeof (buf) -- ? buf -- : (char *) malloc (msgctxt_len + msgid_len)); -- if (msg_ctxt_id != NULL) --#endif -- { -- 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); --#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -- if (msg_ctxt_id != buf) -- free (msg_ctxt_id); --#endif -- if (!(translation == msg_ctxt_id || translation == msgid_plural)) -- return translation; -- } -- return (n == 1 ? msgid : msgid_plural); --} -- - #endif /* _LIBGETTEXT_H */ diff --git a/lib/gl/printf-args.c b/lib/gl/printf-args.c deleted file mode 100644 index b37cae2004..0000000000 --- a/lib/gl/printf-args.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - PRINTF_FETCHARGS Name of the function to be defined. - STATIC Set to 'static' to declare the function static. */ - -#ifndef PRINTF_FETCHARGS -# include <config.h> -#endif - -/* Specification. */ -#ifndef PRINTF_FETCHARGS -# include "printf-args.h" -#endif - -#ifdef STATIC -STATIC -#endif -int -PRINTF_FETCHARGS (va_list args, arguments *a) -{ - size_t i; - argument *ap; - - for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) - switch (ap->type) - { - case TYPE_SCHAR: - ap->a.a_schar = va_arg (args, /*signed char*/ int); - break; - case TYPE_UCHAR: - ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); - break; - case TYPE_SHORT: - ap->a.a_short = va_arg (args, /*short*/ int); - break; - case TYPE_USHORT: - ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); - break; - case TYPE_INT: - ap->a.a_int = va_arg (args, int); - break; - case TYPE_UINT: - ap->a.a_uint = va_arg (args, unsigned int); - break; - case TYPE_LONGINT: - ap->a.a_longint = va_arg (args, long int); - break; - case TYPE_ULONGINT: - ap->a.a_ulongint = va_arg (args, unsigned long int); - break; -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - ap->a.a_longlongint = va_arg (args, long long int); - break; - case TYPE_ULONGLONGINT: - ap->a.a_ulonglongint = va_arg (args, unsigned long long int); - break; -#endif - case TYPE_DOUBLE: - ap->a.a_double = va_arg (args, double); - break; - case TYPE_LONGDOUBLE: - ap->a.a_longdouble = va_arg (args, long double); - break; - case TYPE_CHAR: - ap->a.a_char = va_arg (args, int); - break; -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: - /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by - default argument promotions", this is not the case in mingw32, - where wint_t is 'unsigned short'. */ - ap->a.a_wide_char = - (sizeof (wint_t) < sizeof (int) - ? (wint_t) va_arg (args, int) - : va_arg (args, wint_t)); - break; -#endif - case TYPE_STRING: - ap->a.a_string = va_arg (args, const char *); - /* A null pointer is an invalid argument for "%s", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_string == NULL) - ap->a.a_string = "(NULL)"; - break; -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: - ap->a.a_wide_string = va_arg (args, const wchar_t *); - /* A null pointer is an invalid argument for "%ls", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_wide_string == NULL) - { - static const wchar_t wide_null_string[] = - { - (wchar_t)'(', - (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', - (wchar_t)')', - (wchar_t)0 - }; - ap->a.a_wide_string = wide_null_string; - } - break; -#endif - case TYPE_POINTER: - ap->a.a_pointer = va_arg (args, void *); - break; - case TYPE_COUNT_SCHAR_POINTER: - ap->a.a_count_schar_pointer = va_arg (args, signed char *); - break; - case TYPE_COUNT_SHORT_POINTER: - ap->a.a_count_short_pointer = va_arg (args, short *); - break; - case TYPE_COUNT_INT_POINTER: - ap->a.a_count_int_pointer = va_arg (args, int *); - break; - case TYPE_COUNT_LONGINT_POINTER: - ap->a.a_count_longint_pointer = va_arg (args, long int *); - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); - break; -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - case TYPE_U8_STRING: - ap->a.a_u8_string = va_arg (args, const uint8_t *); - /* A null pointer is an invalid argument for "%U", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u8_string == NULL) - { - static const uint8_t u8_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u8_string = u8_null_string; - } - break; - case TYPE_U16_STRING: - ap->a.a_u16_string = va_arg (args, const uint16_t *); - /* A null pointer is an invalid argument for "%lU", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u16_string == NULL) - { - static const uint16_t u16_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u16_string = u16_null_string; - } - break; - case TYPE_U32_STRING: - ap->a.a_u32_string = va_arg (args, const uint32_t *); - /* A null pointer is an invalid argument for "%llU", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u32_string == NULL) - { - static const uint32_t u32_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u32_string = u32_null_string; - } - break; -#endif - default: - /* Unknown type. */ - return -1; - } - return 0; -} diff --git a/lib/gl/printf-args.h b/lib/gl/printf-args.h deleted file mode 100644 index fcdee85c0d..0000000000 --- a/lib/gl/printf-args.h +++ /dev/null @@ -1,155 +0,0 @@ -/* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _PRINTF_ARGS_H -#define _PRINTF_ARGS_H - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - PRINTF_FETCHARGS Name of the function to be declared. - STATIC Set to 'static' to declare the function static. */ - -/* Default parameters. */ -#ifndef PRINTF_FETCHARGS -# define PRINTF_FETCHARGS printf_fetchargs -#endif - -/* Get size_t. */ -#include <stddef.h> - -/* Get wchar_t. */ -#if HAVE_WCHAR_T -# include <stddef.h> -#endif - -/* Get wint_t. */ -#if HAVE_WINT_T -# include <wchar.h> -#endif - -/* Get va_list. */ -#include <stdarg.h> - - -/* Argument types */ -typedef enum -{ - TYPE_NONE, - TYPE_SCHAR, - TYPE_UCHAR, - TYPE_SHORT, - TYPE_USHORT, - TYPE_INT, - TYPE_UINT, - TYPE_LONGINT, - TYPE_ULONGINT, -#if HAVE_LONG_LONG_INT - TYPE_LONGLONGINT, - TYPE_ULONGLONGINT, -#endif - TYPE_DOUBLE, - TYPE_LONGDOUBLE, - TYPE_CHAR, -#if HAVE_WINT_T - TYPE_WIDE_CHAR, -#endif - TYPE_STRING, -#if HAVE_WCHAR_T - TYPE_WIDE_STRING, -#endif - TYPE_POINTER, - TYPE_COUNT_SCHAR_POINTER, - TYPE_COUNT_SHORT_POINTER, - TYPE_COUNT_INT_POINTER, - TYPE_COUNT_LONGINT_POINTER -#if HAVE_LONG_LONG_INT -, TYPE_COUNT_LONGLONGINT_POINTER -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ -, TYPE_U8_STRING -, TYPE_U16_STRING -, TYPE_U32_STRING -#endif -} arg_type; - -/* Polymorphic argument */ -typedef struct -{ - arg_type type; - union - { - signed char a_schar; - unsigned char a_uchar; - short a_short; - unsigned short a_ushort; - int a_int; - unsigned int a_uint; - long int a_longint; - unsigned long int a_ulongint; -#if HAVE_LONG_LONG_INT - long long int a_longlongint; - unsigned long long int a_ulonglongint; -#endif - float a_float; - double a_double; - long double a_longdouble; - int a_char; -#if HAVE_WINT_T - wint_t a_wide_char; -#endif - const char* a_string; -#if HAVE_WCHAR_T - const wchar_t* a_wide_string; -#endif - void* a_pointer; - signed char * a_count_schar_pointer; - short * a_count_short_pointer; - int * a_count_int_pointer; - long int * a_count_longint_pointer; -#if HAVE_LONG_LONG_INT - long long int * a_count_longlongint_pointer; -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - const uint8_t * a_u8_string; - const uint16_t * a_u16_string; - const uint32_t * a_u32_string; -#endif - } - a; -} -argument; - -typedef struct -{ - size_t count; - argument *arg; -} -arguments; - - -/* Fetch the arguments, putting them into a. */ -#ifdef STATIC -STATIC -#else -extern -#endif -int PRINTF_FETCHARGS (va_list args, arguments *a); - -#endif /* _PRINTF_ARGS_H */ diff --git a/lib/gl/printf-parse.c b/lib/gl/printf-parse.c deleted file mode 100644 index 2b8cc7b7d1..0000000000 --- a/lib/gl/printf-parse.c +++ /dev/null @@ -1,634 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file can be parametrized with the following macros: - CHAR_T The element type of the format string. - CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters - in the format string are ASCII. - DIRECTIVE Structure denoting a format directive. - Depends on CHAR_T. - DIRECTIVES Structure denoting the set of format directives of a - format string. Depends on CHAR_T. - PRINTF_PARSE Function that parses a format string. - Depends on CHAR_T. - STATIC Set to 'static' to declare the function static. - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ - -#ifndef PRINTF_PARSE -# include <config.h> -#endif - -/* Specification. */ -#ifndef PRINTF_PARSE -# include "printf-parse.h" -#endif - -/* Default parameters. */ -#ifndef PRINTF_PARSE -# define PRINTF_PARSE printf_parse -# define CHAR_T char -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -#endif - -/* Get size_t, NULL. */ -#include <stddef.h> - -/* Get intmax_t. */ -#if defined IN_LIBINTL || defined IN_LIBASPRINTF -# if HAVE_STDINT_H_WITH_UINTMAX -# include <stdint.h> -# endif -# if HAVE_INTTYPES_H_WITH_UINTMAX -# include <inttypes.h> -# endif -#else -# include <stdint.h> -#endif - -/* malloc(), realloc(), free(). */ -#include <stdlib.h> - -/* errno. */ -#include <errno.h> - -/* Checked size_t computations. */ -#include "xsize.h" - -#if CHAR_T_ONLY_ASCII -/* c_isascii(). */ -# include "c-ctype.h" -#endif - -#ifdef STATIC -STATIC -#endif -int -PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) -{ - const CHAR_T *cp = format; /* pointer into format */ - size_t arg_posn = 0; /* number of regular arguments consumed */ - size_t d_allocated; /* allocated elements of d->dir */ - size_t a_allocated; /* allocated elements of a->arg */ - size_t max_width_length = 0; - size_t max_precision_length = 0; - - d->count = 0; - d_allocated = 1; - d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE)); - if (d->dir == NULL) - /* Out of memory. */ - goto out_of_memory_1; - - a->count = 0; - a_allocated = 0; - a->arg = NULL; - -#define REGISTER_ARG(_index_,_type_) \ - { \ - size_t n = (_index_); \ - if (n >= a_allocated) \ - { \ - size_t memory_size; \ - argument *memory; \ - \ - a_allocated = xtimes (a_allocated, 2); \ - if (a_allocated <= n) \ - a_allocated = xsum (n, 1); \ - memory_size = xtimes (a_allocated, sizeof (argument)); \ - if (size_overflow_p (memory_size)) \ - /* Overflow, would lead to out of memory. */ \ - goto out_of_memory; \ - memory = (argument *) (a->arg \ - ? realloc (a->arg, memory_size) \ - : malloc (memory_size)); \ - if (memory == NULL) \ - /* Out of memory. */ \ - goto out_of_memory; \ - a->arg = memory; \ - } \ - while (a->count <= n) \ - a->arg[a->count++].type = TYPE_NONE; \ - if (a->arg[n].type == TYPE_NONE) \ - a->arg[n].type = (_type_); \ - else if (a->arg[n].type != (_type_)) \ - /* Ambiguous type for positional argument. */ \ - goto error; \ - } - - while (*cp != '\0') - { - CHAR_T c = *cp++; - if (c == '%') - { - size_t arg_index = ARG_NONE; - DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ - - /* Initialize the next directive. */ - dp->dir_start = cp - 1; - dp->flags = 0; - dp->width_start = NULL; - dp->width_end = NULL; - dp->width_arg_index = ARG_NONE; - dp->precision_start = NULL; - dp->precision_end = NULL; - dp->precision_arg_index = ARG_NONE; - dp->arg_index = ARG_NONE; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory later. */ - goto error; - arg_index = n - 1; - cp = np + 1; - } - } - - /* Read the flags. */ - for (;;) - { - if (*cp == '\'') - { - dp->flags |= FLAG_GROUP; - cp++; - } - else if (*cp == '-') - { - dp->flags |= FLAG_LEFT; - cp++; - } - else if (*cp == '+') - { - dp->flags |= FLAG_SHOWSIGN; - cp++; - } - else if (*cp == ' ') - { - dp->flags |= FLAG_SPACE; - cp++; - } - else if (*cp == '#') - { - dp->flags |= FLAG_ALT; - cp++; - } - else if (*cp == '0') - { - dp->flags |= FLAG_ZERO; - cp++; - } -#if __GLIBC__ >= 2 && !defined __UCLIBC__ - else if (*cp == 'I') - { - dp->flags |= FLAG_LOCALIZED; - cp++; - } -#endif - else - break; - } - - /* Parse the field width. */ - if (*cp == '*') - { - dp->width_start = cp; - cp++; - dp->width_end = cp; - if (max_width_length < 1) - max_width_length = 1; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory later. */ - goto error; - dp->width_arg_index = n - 1; - cp = np + 1; - } - } - if (dp->width_arg_index == ARG_NONE) - { - dp->width_arg_index = arg_posn++; - if (dp->width_arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->width_arg_index, TYPE_INT); - } - else if (*cp >= '0' && *cp <= '9') - { - size_t width_length; - - dp->width_start = cp; - for (; *cp >= '0' && *cp <= '9'; cp++) - ; - dp->width_end = cp; - width_length = dp->width_end - dp->width_start; - if (max_width_length < width_length) - max_width_length = width_length; - } - - /* Parse the precision. */ - if (*cp == '.') - { - cp++; - if (*cp == '*') - { - dp->precision_start = cp - 1; - cp++; - dp->precision_end = cp; - if (max_precision_length < 2) - max_precision_length = 2; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory - later. */ - goto error; - dp->precision_arg_index = n - 1; - cp = np + 1; - } - } - if (dp->precision_arg_index == ARG_NONE) - { - dp->precision_arg_index = arg_posn++; - if (dp->precision_arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->precision_arg_index, TYPE_INT); - } - else - { - size_t precision_length; - - dp->precision_start = cp - 1; - for (; *cp >= '0' && *cp <= '9'; cp++) - ; - dp->precision_end = cp; - precision_length = dp->precision_end - dp->precision_start; - if (max_precision_length < precision_length) - max_precision_length = precision_length; - } - } - - { - arg_type type; - - /* Parse argument type/size specifiers. */ - { - int flags = 0; - - for (;;) - { - if (*cp == 'h') - { - flags |= (1 << (flags & 1)); - cp++; - } - else if (*cp == 'L') - { - flags |= 4; - cp++; - } - else if (*cp == 'l') - { - flags += 8; - cp++; - } - else if (*cp == 'j') - { - if (sizeof (intmax_t) > sizeof (long)) - { - /* intmax_t = long long */ - flags += 16; - } - else if (sizeof (intmax_t) > sizeof (int)) - { - /* intmax_t = long */ - flags += 8; - } - cp++; - } - else if (*cp == 'z' || *cp == 'Z') - { - /* 'z' is standardized in ISO C 99, but glibc uses 'Z' - because the warning facility in gcc-2.95.2 understands - only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ - if (sizeof (size_t) > sizeof (long)) - { - /* size_t = long long */ - flags += 16; - } - else if (sizeof (size_t) > sizeof (int)) - { - /* size_t = long */ - flags += 8; - } - cp++; - } - else if (*cp == 't') - { - if (sizeof (ptrdiff_t) > sizeof (long)) - { - /* ptrdiff_t = long long */ - flags += 16; - } - else if (sizeof (ptrdiff_t) > sizeof (int)) - { - /* ptrdiff_t = long */ - flags += 8; - } - cp++; - } -#if defined __APPLE__ && defined __MACH__ - /* On MacOS X 10.3, PRIdMAX is defined as "qd". - We cannot change it to "lld" because PRIdMAX must also - be understood by the system's printf routines. */ - else if (*cp == 'q') - { - if (64 / 8 > sizeof (long)) - { - /* int64_t = long long */ - flags += 16; - } - else - { - /* int64_t = long */ - flags += 8; - } - cp++; - } -#endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Win32, PRIdMAX is defined as "I64d". - We cannot change it to "lld" because PRIdMAX must also - be understood by the system's printf routines. */ - else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') - { - if (64 / 8 > sizeof (long)) - { - /* __int64 = long long */ - flags += 16; - } - else - { - /* __int64 = long */ - flags += 8; - } - cp += 3; - } -#endif - else - break; - } - - /* Read the conversion character. */ - c = *cp++; - switch (c) - { - case 'd': case 'i': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_LONGLONGINT; - else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lld" into TYPE_LONGINT. */ - if (flags >= 8) - type = TYPE_LONGINT; - else if (flags & 2) - type = TYPE_SCHAR; - else if (flags & 1) - type = TYPE_SHORT; - else - type = TYPE_INT; - break; - case 'o': case 'u': case 'x': case 'X': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_ULONGLONGINT; - else -#endif - /* If 'unsigned long long' exists and is the same as - 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ - if (flags >= 8) - type = TYPE_ULONGINT; - else if (flags & 2) - type = TYPE_UCHAR; - else if (flags & 1) - type = TYPE_USHORT; - else - type = TYPE_UINT; - break; - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': - if (flags >= 16 || (flags & 4)) - type = TYPE_LONGDOUBLE; - else - type = TYPE_DOUBLE; - break; - case 'c': - if (flags >= 8) -#if HAVE_WINT_T - type = TYPE_WIDE_CHAR; -#else - goto error; -#endif - else - type = TYPE_CHAR; - break; -#if HAVE_WINT_T - case 'C': - type = TYPE_WIDE_CHAR; - c = 'c'; - break; -#endif - case 's': - if (flags >= 8) -#if HAVE_WCHAR_T - type = TYPE_WIDE_STRING; -#else - goto error; -#endif - else - type = TYPE_STRING; - break; -#if HAVE_WCHAR_T - case 'S': - type = TYPE_WIDE_STRING; - c = 's'; - break; -#endif - case 'p': - type = TYPE_POINTER; - break; - case 'n': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_COUNT_LONGLONGINT_POINTER; - else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lln" into TYPE_COUNT_LONGINT_POINTER. */ - if (flags >= 8) - type = TYPE_COUNT_LONGINT_POINTER; - else if (flags & 2) - type = TYPE_COUNT_SCHAR_POINTER; - else if (flags & 1) - type = TYPE_COUNT_SHORT_POINTER; - else - type = TYPE_COUNT_INT_POINTER; - break; -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - case 'U': - if (flags >= 16) - type = TYPE_U32_STRING; - else if (flags >= 8) - type = TYPE_U16_STRING; - else - type = TYPE_U8_STRING; - break; -#endif - case '%': - type = TYPE_NONE; - break; - default: - /* Unknown conversion character. */ - goto error; - } - } - - if (type != TYPE_NONE) - { - dp->arg_index = arg_index; - if (dp->arg_index == ARG_NONE) - { - dp->arg_index = arg_posn++; - if (dp->arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->arg_index, type); - } - dp->conversion = c; - dp->dir_end = cp; - } - - d->count++; - if (d->count >= d_allocated) - { - size_t memory_size; - DIRECTIVE *memory; - - d_allocated = xtimes (d_allocated, 2); - memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); - if (size_overflow_p (memory_size)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - memory = (DIRECTIVE *) realloc (d->dir, memory_size); - if (memory == NULL) - /* Out of memory. */ - goto out_of_memory; - d->dir = memory; - } - } -#if CHAR_T_ONLY_ASCII - else if (!c_isascii (c)) - { - /* Non-ASCII character. Not supported. */ - goto error; - } -#endif - } - d->dir[d->count].dir_start = cp; - - d->max_width_length = max_width_length; - d->max_precision_length = max_precision_length; - return 0; - -error: - if (a->arg) - free (a->arg); - if (d->dir) - free (d->dir); - errno = EINVAL; - return -1; - -out_of_memory: - if (a->arg) - free (a->arg); - if (d->dir) - free (d->dir); -out_of_memory_1: - errno = ENOMEM; - return -1; -} - -#undef PRINTF_PARSE -#undef DIRECTIVES -#undef DIRECTIVE -#undef CHAR_T_ONLY_ASCII -#undef CHAR_T diff --git a/lib/gl/printf-parse.h b/lib/gl/printf-parse.h deleted file mode 100644 index 853cc4770d..0000000000 --- a/lib/gl/printf-parse.h +++ /dev/null @@ -1,187 +0,0 @@ -/* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _PRINTF_PARSE_H -#define _PRINTF_PARSE_H - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - STATIC Set to 'static' to declare the function static. */ - -#if HAVE_FEATURES_H -# include <features.h> /* for __GLIBC__, __UCLIBC__ */ -#endif - -#include "printf-args.h" - - -/* Flags */ -#define FLAG_GROUP 1 /* ' flag */ -#define FLAG_LEFT 2 /* - flag */ -#define FLAG_SHOWSIGN 4 /* + flag */ -#define FLAG_SPACE 8 /* space flag */ -#define FLAG_ALT 16 /* # flag */ -#define FLAG_ZERO 32 -#if __GLIBC__ >= 2 && !defined __UCLIBC__ -# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ -#endif - -/* arg_index value indicating that no argument is consumed. */ -#define ARG_NONE (~(size_t)0) - -/* xxx_directive: A parsed directive. - xxx_directives: A parsed format string. */ - -/* A parsed directive. */ -typedef struct -{ - const char* dir_start; - const char* dir_end; - int flags; - const char* width_start; - const char* width_end; - size_t width_arg_index; - const char* precision_start; - const char* precision_end; - size_t precision_arg_index; - char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -char_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - char_directive *dir; - size_t max_width_length; - size_t max_precision_length; -} -char_directives; - -#if ENABLE_UNISTDIO - -/* A parsed directive. */ -typedef struct -{ - const uint8_t* dir_start; - const uint8_t* dir_end; - int flags; - const uint8_t* width_start; - const uint8_t* width_end; - size_t width_arg_index; - const uint8_t* precision_start; - const uint8_t* precision_end; - size_t precision_arg_index; - uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u8_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u8_directive *dir; - size_t max_width_length; - size_t max_precision_length; -} -u8_directives; - -/* A parsed directive. */ -typedef struct -{ - const uint16_t* dir_start; - const uint16_t* dir_end; - int flags; - const uint16_t* width_start; - const uint16_t* width_end; - size_t width_arg_index; - const uint16_t* precision_start; - const uint16_t* precision_end; - size_t precision_arg_index; - uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u16_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u16_directive *dir; - size_t max_width_length; - size_t max_precision_length; -} -u16_directives; - -/* A parsed directive. */ -typedef struct -{ - const uint32_t* dir_start; - const uint32_t* dir_end; - int flags; - const uint32_t* width_start; - const uint32_t* width_end; - size_t width_arg_index; - const uint32_t* precision_start; - const uint32_t* precision_end; - size_t precision_arg_index; - uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u32_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u32_directive *dir; - size_t max_width_length; - size_t max_precision_length; -} -u32_directives; - -#endif - - -/* Parses the format string. Fills in the number N of directives, and fills - in directives[0], ..., directives[N-1], and sets directives[N].dir_start - to the end of the format string. Also fills in the arg_type fields of the - arguments and the needed count of arguments. */ -#if ENABLE_UNISTDIO -extern int - ulc_printf_parse (const char *format, char_directives *d, arguments *a); -extern int - u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); -extern int - u16_printf_parse (const uint16_t *format, u16_directives *d, - arguments *a); -extern int - u32_printf_parse (const uint32_t *format, u32_directives *d, - arguments *a); -#else -# ifdef STATIC -STATIC -# else -extern -# endif -int printf_parse (const char *format, char_directives *d, arguments *a); -#endif - -#endif /* _PRINTF_PARSE_H */ diff --git a/lib/gl/read-file.c b/lib/gl/read-file.c deleted file mode 100644 index 38b26e47c8..0000000000 --- a/lib/gl/read-file.c +++ /dev/null @@ -1,194 +0,0 @@ -/* read-file.c -- read file contents into a string - Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. - Written by Simon Josefsson and Bruno Haible. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -#include "read-file.h" - -/* Get fstat. */ -#include <sys/stat.h> - -/* Get ftello. */ -#include <stdio.h> - -/* Get SIZE_MAX. */ -#include <stdint.h> - -/* Get malloc, realloc, free. */ -#include <stdlib.h> - -/* Get errno. */ -#include <errno.h> - -/* Read a STREAM and return a newly allocated string with the content, - and set *LENGTH to the length of the string. The string is - zero-terminated, but the terminating zero byte is not counted in - *LENGTH. On errors, *LENGTH is undefined, errno preserves the - values set by system functions (if any), and NULL is returned. */ -char * -fread_file (FILE * stream, size_t * length) -{ - char *buf = NULL; - size_t alloc = 0; - - /* For a regular file, allocate a buffer that has exactly the right - size. This avoids the need to do dynamic reallocations later. */ - { - struct stat st; - - if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) - { - off_t pos = ftello (stream); - - if (pos >= 0 && pos < st.st_size) - { - off_t alloc_off = st.st_size - pos; - - if (SIZE_MAX <= alloc_off) - { - errno = ENOMEM; - return NULL; - } - - alloc = alloc_off + 1; - - buf = malloc (alloc); - if (!buf) - /* errno is ENOMEM. */ - return NULL; - } - } - } - - { - size_t size = 0; /* number of bytes read so far */ - int save_errno; - - for (;;) - { - size_t count; - size_t requested; - - if (size + BUFSIZ + 1 > alloc) - { - char *new_buf; - size_t new_alloc = alloc + alloc / 2; - - /* Check against overflow. */ - if (new_alloc < alloc) - { - save_errno = ENOMEM; - break; - } - - alloc = new_alloc; - if (alloc < size + BUFSIZ + 1) - alloc = size + BUFSIZ + 1; - - new_buf = realloc (buf, alloc); - if (!new_buf) - { - save_errno = errno; - break; - } - - buf = new_buf; - } - - requested = alloc - size - 1; - count = fread (buf + size, 1, requested, stream); - size += count; - - if (count != requested) - { - save_errno = errno; - if (ferror (stream)) - break; - - /* Shrink the allocated memory if possible. */ - if (size + 1 < alloc) - { - char *smaller_buf = realloc (buf, size + 1); - if (smaller_buf != NULL) - buf = smaller_buf; - } - - buf[size] = '\0'; - *length = size; - return buf; - } - } - - free (buf); - errno = save_errno; - return NULL; - } -} - -static char * -internal_read_file (const char *filename, size_t * length, const char *mode) -{ - FILE *stream = fopen (filename, mode); - char *out; - int save_errno; - - if (!stream) - return NULL; - - out = fread_file (stream, length); - - save_errno = errno; - - if (fclose (stream) != 0) - { - if (out) - { - save_errno = errno; - free (out); - } - errno = save_errno; - return NULL; - } - - return out; -} - -/* Open and read the contents of FILENAME, and return a newly - allocated string with the content, and set *LENGTH to the length of - the string. The string is zero-terminated, but the terminating - zero byte is not counted in *LENGTH. On errors, *LENGTH is - undefined, errno preserves the values set by system functions (if - any), and NULL is returned. */ -char * -read_file (const char *filename, size_t * length) -{ - return internal_read_file (filename, length, "r"); -} - -/* Open (on non-POSIX systems, in binary mode) and read the contents - of FILENAME, and return a newly allocated string with the content, - and set LENGTH to the length of the string. The string is - zero-terminated, but the terminating zero byte is not counted in - the LENGTH variable. On errors, *LENGTH is undefined, errno - preserves the values set by system functions (if any), and NULL is - returned. */ -char * -read_binary_file (const char *filename, size_t * length) -{ - return internal_read_file (filename, length, "rb"); -} diff --git a/lib/gl/read-file.h b/lib/gl/read-file.h deleted file mode 100644 index 465c3d1f78..0000000000 --- a/lib/gl/read-file.h +++ /dev/null @@ -1,34 +0,0 @@ -/* read-file.h -- read file contents into a string - Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef READ_FILE_H -#define READ_FILE_H - -/* Get size_t. */ -#include <stddef.h> - -/* Get FILE. */ -#include <stdio.h> - -extern char *fread_file (FILE * stream, size_t * length); - -extern char *read_file (const char *filename, size_t * length); - -extern char *read_binary_file (const char *filename, size_t * length); - -#endif /* READ_FILE_H */ diff --git a/lib/gl/realloc.c b/lib/gl/realloc.c deleted file mode 100644 index 2201385a6f..0000000000 --- a/lib/gl/realloc.c +++ /dev/null @@ -1,91 +0,0 @@ -/* realloc() function that is glibc compatible. - - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2010 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* written by Jim Meyering and Bruno Haible */ - -#include <config.h> - -/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ -#ifdef realloc -# define NEED_REALLOC_GNU 1 -/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ -#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU -# define NEED_REALLOC_GNU 1 -#endif - -/* Infer the properties of the system's malloc function. - The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU -# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 -#endif - -/* Below we want to call the system's malloc and realloc. - Undefine the symbols here so that including <stdlib.h> provides a - declaration of malloc(), not of rpl_malloc(), and likewise for realloc. */ -#undef malloc -#undef realloc - -/* Specification. */ -#include <stdlib.h> - -#include <errno.h> - -/* Below we want to call the system's malloc and realloc. - Undefine the symbols, if they were defined by gnulib's <stdlib.h> - replacement. */ -#undef malloc -#undef realloc - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. If N is zero, change it to 1. If P is NULL, - use malloc. */ - -void * -rpl_realloc (void *p, size_t n) -{ - void *result; - -#if NEED_REALLOC_GNU - if (n == 0) - { - n = 1; - - /* In theory realloc might fail, so don't rely on it to free. */ - free (p); - p = NULL; - } -#endif - - if (p == NULL) - { -#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE - if (n == 0) - n = 1; -#endif - result = malloc (n); - } - else - result = realloc (p, n); - -#if !HAVE_REALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/lib/gl/size_max.h b/lib/gl/size_max.h deleted file mode 100644 index cc99ee3f3d..0000000000 --- a/lib/gl/size_max.h +++ /dev/null @@ -1,31 +0,0 @@ -/* size_max.h -- declare SIZE_MAX through system headers - Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef GNULIB_SIZE_MAX_H -#define GNULIB_SIZE_MAX_H - -/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ -# include <limits.h> -/* Get SIZE_MAX declaration on systems like glibc 2. */ -# if HAVE_STDINT_H -# include <stdint.h> -# endif -/* On systems where these include files don't define it, SIZE_MAX is defined - in config.h. */ - -#endif /* GNULIB_SIZE_MAX_H */ diff --git a/lib/gl/snprintf.c b/lib/gl/snprintf.c deleted file mode 100644 index d9207a8e6e..0000000000 --- a/lib/gl/snprintf.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc. - Written by Simon Josefsson and Paul Eggert. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#include <stdio.h> - -#include <errno.h> -#include <limits.h> -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> - -#include "vasnprintf.h" - -/* Print formatted output to string STR. Similar to sprintf, but - additional length SIZE limit how much is written into STR. Returns - string length of formatted string (which may be larger than SIZE). - STR may be NULL, in which case nothing will be written. On error, - return a negative value. */ -int -snprintf (char *str, size_t size, const char *format, ...) -{ - char *output; - size_t len; - size_t lenbuf = size; - va_list args; - - va_start (args, format); - output = vasnprintf (str, &lenbuf, format, args); - len = lenbuf; - va_end (args); - - if (!output) - return -1; - - if (output != str) - { - if (size) - { - size_t pruned_len = (len < size ? len : size - 1); - memcpy (str, output, pruned_len); - str[pruned_len] = '\0'; - } - - free (output); - } - - if (INT_MAX < len) - { - errno = EOVERFLOW; - return -1; - } - - return len; -} diff --git a/lib/gl/sockets.c b/lib/gl/sockets.c deleted file mode 100644 index 113dc17dcb..0000000000 --- a/lib/gl/sockets.c +++ /dev/null @@ -1,118 +0,0 @@ -/* sockets.c --- wrappers for Windows socket functions - - Copyright (C) 2008-2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* Written by Simon Josefsson */ - -#include <config.h> - -/* Specification. */ -#include "sockets.h" - -#if WINDOWS_SOCKETS - -/* This includes winsock2.h on MinGW. */ -# include <sys/socket.h> - -# include "close-hook.h" - -/* Get set_winsock_errno, FD_TO_SOCKET etc. */ -# include "w32sock.h" - -static int -close_fd_maybe_socket (int fd, const struct close_hook *remaining_list) -{ - SOCKET sock; - WSANETWORKEVENTS ev; - - /* Test whether fd refers to a socket. */ - sock = FD_TO_SOCKET (fd); - ev.lNetworkEvents = 0xDEADBEEF; - WSAEnumNetworkEvents (sock, NULL, &ev); - if (ev.lNetworkEvents != 0xDEADBEEF) - { - /* fd refers to a socket. */ - /* FIXME: other applications, like squid, use an undocumented - _free_osfhnd free function. But this is not enough: The 'osfile' - flags for fd also needs to be cleared, but it is hard to access it. - Instead, here we just close twice the file descriptor. */ - if (closesocket (sock)) - { - set_winsock_errno (); - return -1; - } - else - { - /* This call frees the file descriptor and does a - CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ - _close (fd); - return 0; - } - } - else - /* Some other type of file descriptor. */ - return execute_close_hooks (fd, remaining_list); -} - -static struct close_hook close_sockets_hook; - -static int initialized_sockets_version /* = 0 */; - -#endif /* WINDOWS_SOCKETS */ - -int -gl_sockets_startup (int version _GL_UNUSED) -{ -#if WINDOWS_SOCKETS - if (version > initialized_sockets_version) - { - WSADATA data; - int err; - - err = WSAStartup (version, &data); - if (err != 0) - return 1; - - if (data.wVersion < version) - return 2; - - if (initialized_sockets_version == 0) - register_close_hook (close_fd_maybe_socket, &close_sockets_hook); - - initialized_sockets_version = version; - } -#endif - - return 0; -} - -int -gl_sockets_cleanup (void) -{ -#if WINDOWS_SOCKETS - int err; - - initialized_sockets_version = 0; - - unregister_close_hook (&close_sockets_hook); - - err = WSACleanup (); - if (err != 0) - return 1; -#endif - - return 0; -} diff --git a/lib/gl/sockets.h b/lib/gl/sockets.h deleted file mode 100644 index 0bcbd9f70c..0000000000 --- a/lib/gl/sockets.h +++ /dev/null @@ -1,51 +0,0 @@ -/* sockets.h - wrappers for Windows socket functions - - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* Written by Simon Josefsson */ - -#ifndef SOCKETS_H -# define SOCKETS_H 1 - -#define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */ -#define SOCKETS_1_1 0x101 -#define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */ -#define SOCKETS_2_1 0x201 -#define SOCKETS_2_2 0x202 - -int gl_sockets_startup (int version); -int gl_sockets_cleanup (void); - -/* This function is useful it you create a socket using gnulib's - Winsock wrappers but needs to pass on the socket handle to some - other library that only accepts sockets. */ -#if WINDOWS_SOCKETS - -#include <sys/socket.h> - -static inline SOCKET -gl_fd_to_handle (int fd) -{ - return _get_osfhandle (fd); -} - -#else - -#define gl_fd_to_handle(x) (x) - -#endif /* WINDOWS_SOCKETS */ - -#endif /* SOCKETS_H */ diff --git a/lib/gl/stdbool.in.h b/lib/gl/stdbool.in.h deleted file mode 100644 index 88b3520041..0000000000 --- a/lib/gl/stdbool.in.h +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2001-2003, 2006-2010 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 - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STDBOOL_H -#define _GL_STDBOOL_H - -/* ISO C 99 <stdbool.h> for platforms that lack it. */ - -/* Usage suggestions: - - Programs that use <stdbool.h> should be aware of some limitations - and standards compliance issues. - - Standards compliance: - - - <stdbool.h> must be #included before 'bool', 'false', 'true' - can be used. - - - You cannot assume that sizeof (bool) == 1. - - - Programs should not undefine the macros bool, true, and false, - as C99 lists that as an "obsolescent feature". - - Limitations of this substitute, when used in a C89 environment: - - - <stdbool.h> must be #included before the '_Bool' type can be used. - - - You cannot assume that _Bool is a typedef; it might be a macro. - - - Bit-fields of type 'bool' are not supported. Portable code - should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - - - In C99, casts and automatic conversions to '_Bool' or 'bool' are - performed in such a way that every nonzero value gets converted - to 'true', and zero gets converted to 'false'. This doesn't work - with this substitute. With this substitute, only the values 0 and 1 - give the expected result when converted to _Bool' or 'bool'. - - - C99 allows the use of (_Bool)0.0 in constant expressions, but - this substitute cannot always provide this property. - - Also, it is suggested that programs use 'bool' rather than '_Bool'; - this isn't required, but 'bool' is more common. */ - - -/* 7.16. Boolean type and values */ - -/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same - definitions below, but temporarily we have to #undef them. */ -#if defined __BEOS__ && !defined __HAIKU__ -# include <OS.h> /* defines bool but not _Bool */ -# undef false -# undef true -#endif - -/* For the sake of symbolic names in gdb, we define true and false as - enum constants, not only as macros. - It is tempting to write - typedef enum { false = 0, true = 1 } _Bool; - so that gdb prints values of type 'bool' symbolically. But if we do - this, values of type '_Bool' may promote to 'int' or 'unsigned int' - (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' - (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the - enum; this ensures that '_Bool' promotes to 'int'. */ -#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) - /* A compiler known to have 'bool'. */ - /* If the compiler already has both 'bool' and '_Bool', we can assume they - are the same types. */ -# if !@HAVE__BOOL@ -typedef bool _Bool; -# endif -#else -# if !defined __GNUC__ - /* If @HAVE__BOOL@: - Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when - the built-in _Bool type is used. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - Similar bugs are likely with other compilers as well; this file - wouldn't be used if <stdbool.h> was working. - So we override the _Bool type. - If !@HAVE__BOOL@: - Need to define _Bool ourselves. As 'signed char' or as an enum type? - Use of a typedef, with SunPRO C, leads to a stupid - "warning: _Bool is a keyword in ISO C99". - Use of an enum type, with IRIX cc, leads to a stupid - "warning(1185): enumerated type mixed with another type". - Even the existence of an enum type, without a typedef, - "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. - The only benefit of the enum, debuggability, is not important - with these compilers. So use 'signed char' and no enum. */ -# define _Bool signed char -# else - /* With this compiler, trust the _Bool type if the compiler has it. */ -# if !@HAVE__BOOL@ -typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; -# endif -# endif -#endif -#define bool _Bool - -/* The other macros must be usable in preprocessor directives. */ -#define false 0 -#define true 1 -#define __bool_true_false_are_defined 1 - -#endif /* _GL_STDBOOL_H */ diff --git a/lib/gl/stddef.in.h b/lib/gl/stddef.in.h deleted file mode 100644 index 4f25aeeb08..0000000000 --- a/lib/gl/stddef.in.h +++ /dev/null @@ -1,87 +0,0 @@ -/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. - - Copyright (C) 2009, 2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake. */ - -/* - * POSIX 2008 <stddef.h> for platforms that have issues. - * <http://www.opengroup.org/susv3xbd/stddef.h.html> - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_wchar_t || defined __need_size_t \ - || defined __need_ptrdiff_t || defined __need_NULL \ - || defined __need_wint_t -/* Special invocation convention inside gcc header files. In - particular, gcc provides a version of <stddef.h> that blindly - redefines NULL even when __need_wint_t was defined, even though - wint_t is not normally provided by <stddef.h>. Hence, we must - remember if special invocation has ever been used to obtain wint_t, - in which case we need to clean up NULL yet again. */ - -# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) -# ifdef __need_wint_t -# undef _GL_STDDEF_H -# define _GL_STDDEF_WINT_T -# endif -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# endif - -#else -/* Normal invocation convention. */ - -# ifndef _GL_STDDEF_H - -/* The include_next requires a split double-inclusion guard. */ - -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ - -# ifndef _GL_STDDEF_H -# define _GL_STDDEF_H - -/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ -#if @REPLACE_NULL@ -# undef NULL -# ifdef __cplusplus - /* ISO C++ says that the macro NULL must expand to an integer constant - expression, hence '((void *) 0)' is not allowed in C++. */ -# if __GNUG__ >= 3 - /* GNU C++ has a __null macro that behaves like an integer ('int' or - 'long') but has the same size as a pointer. Use that, to avoid - warnings. */ -# define NULL __null -# else -# define NULL 0L -# endif -# else -# define NULL ((void *) 0) -# endif -#endif - -/* Some platforms lack wchar_t. */ -#if !@HAVE_WCHAR_T@ -# define wchar_t int -#endif - -# endif /* _GL_STDDEF_H */ -# endif /* _GL_STDDEF_H */ -#endif /* __need_XXX */ diff --git a/lib/gl/stdint.in.h b/lib/gl/stdint.in.h deleted file mode 100644 index 6fafca4ff4..0000000000 --- a/lib/gl/stdint.in.h +++ /dev/null @@ -1,581 +0,0 @@ -/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* - * ISO C 99 <stdint.h> for platforms that lack it. - * <http://www.opengroup.org/susv3xbd/stdint.h.html> - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* When including a system file that in turn includes <inttypes.h>, - use the system <inttypes.h>, not our substitute. This avoids - problems with (for example) VMS, whose <sys/bitypes.h> includes - <inttypes.h>. */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if @HAVE_STDINT_H@ -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - /* Other systems may have an incomplete or buggy <stdint.h>. - Include it before <inttypes.h>, since any "#include <stdint.h>" - in <inttypes.h> would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_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. - MacOS 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 - -/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ -#include <limits.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@ - /* 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 - -#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 - -#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for a 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)) - -#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) - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -#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 - -#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 - -#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 - -/* 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 - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. */ - -#if 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 -typedef long int gl_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 -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -#endif - -#if 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 -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 -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -#endif - -/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */ -#define _UINT8_T -#define _UINT32_T -#define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - 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 - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other <stdint.h> substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. Assume that 'long int' - is fast enough for all narrower integers. */ - -#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 long int gl_int_fast8_t; -typedef unsigned long int gl_uint_fast8_t; -typedef long int gl_int_fast16_t; -typedef unsigned long int gl_uint_fast16_t; -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_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 - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -#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 - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -#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 -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -#endif - -#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 -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -#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 - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -/* 7.18.2. Limits of specified-width integer types */ - -#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* 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 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 - -#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 - -#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 */ - -/* Here we assume a standard architecture where the hardware integer - 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_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_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 - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - 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 LONG_MIN -#define INT_FAST8_MAX LONG_MAX -#define UINT_FAST8_MAX ULONG_MAX - -#undef INT_FAST16_MIN -#undef INT_FAST16_MAX -#undef UINT_FAST16_MAX -#define INT_FAST16_MIN LONG_MIN -#define INT_FAST16_MAX LONG_MAX -#define UINT_FAST16_MAX ULONG_MAX - -#undef INT_FAST32_MIN -#undef INT_FAST32_MAX -#undef UINT_FAST32_MAX -#define INT_FAST32_MIN LONG_MIN -#define INT_FAST32_MAX LONG_MAX -#define UINT_FAST32_MAX ULONG_MAX - -#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 - -/* 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 - -/* 7.18.2.5. Limits of greatest-width integer types */ - -#undef INTMAX_MIN -#undef INTMAX_MAX -#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 - -#undef UINTMAX_MAX -#ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -#else -# define UINTMAX_MAX UINT32_MAX -#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) -# 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 \ - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -#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 \ - _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) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -#else -# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) -#endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - 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 ! (defined WCHAR_MIN && defined WCHAR_MAX) -# 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 \ - _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 \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) - -#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ - -/* 7.18.4. Macros for integer constants */ - -#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* 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 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 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 */ - -#undef 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 - -#undef 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 /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ - -#endif /* _GL_STDINT_H */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/lib/gl/stdio-impl.h b/lib/gl/stdio-impl.h deleted file mode 100644 index 7a64fa839c..0000000000 --- a/lib/gl/stdio-impl.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* Many stdio implementations have the same logic and therefore can share - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - - -/* BSD stdio derived implementations. */ - -#if defined __NetBSD__ /* NetBSD */ -/* Get __NetBSD_Version__. */ -# include <sys/param.h> -#endif - -#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - -# if defined __DragonFly__ /* DragonFly */ - /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */ -# define fp_ ((struct { struct __FILE_public pub; \ - struct { unsigned char *_base; int _size; } _bf; \ - void *cookie; \ - void *_close; \ - void *_read; \ - void *_seek; \ - void *_write; \ - struct { unsigned char *_base; int _size; } _ub; \ - int _ur; \ - unsigned char _ubuf[3]; \ - unsigned char _nbuf[1]; \ - struct { unsigned char *_base; int _size; } _lb; \ - int _blksize; \ - fpos_t _offset; \ - /* More fields, not relevant here. */ \ - } *) fp) - /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */ -# define _p pub._p -# define _flags pub._flags -# define _r pub._r -# define _w pub._w -# else -# define fp_ fp -# endif - -# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ - /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> - and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */ - struct __sfileext - { - struct __sbuf _ub; /* ungetc buffer */ - /* More fields, not relevant here. */ - }; -# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub -# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ -# define fp_ub fp_->_ub -# endif - -# define HASUB(fp) (fp_ub._base != NULL) - -#endif - - -/* SystemV derived implementations. */ - -#if defined _IOERR - -# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ -# define fp_ ((struct { unsigned char *_ptr; \ - unsigned char *_base; \ - unsigned char *_end; \ - long _cnt; \ - int _file; \ - unsigned int _flag; \ - } *) fp) -# else -# define fp_ fp -# endif - -# if defined _SCO_DS /* OpenServer */ -# define _cnt __cnt -# define _ptr __ptr -# define _base __base -# define _flag __flag -# endif - -#endif diff --git a/lib/gl/stdio-write.c b/lib/gl/stdio-write.c deleted file mode 100644 index 2db98c37fa..0000000000 --- a/lib/gl/stdio-write.c +++ /dev/null @@ -1,148 +0,0 @@ -/* POSIX compatible FILE stream write function. - Copyright (C) 2008-2010 Free Software Foundation, Inc. - Written by Bruno Haible <bruno@clisp.org>, 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#include <config.h> - -/* Specification. */ -#include <stdio.h> - -/* Replace these functions only if module 'sigpipe' is requested. */ -#if GNULIB_SIGPIPE - -/* On native Windows platforms, SIGPIPE does not exist. When write() is - called on a pipe with no readers, WriteFile() fails with error - GetLastError() = ERROR_NO_DATA, and write() in consequence fails with - error EINVAL. This write() function is at the basis of the function - which flushes the buffer of a FILE stream. */ - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -# include <errno.h> -# include <signal.h> -# include <io.h> - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include <windows.h> - -# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \ - if (ferror (stream)) \ - return (EXPRESSION); \ - else \ - { \ - RETTYPE ret; \ - SetLastError (0); \ - ret = (EXPRESSION); \ - if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \ - { \ - int fd = fileno (stream); \ - if (fd >= 0 \ - && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\ - { \ - /* Try to raise signal SIGPIPE. */ \ - raise (SIGPIPE); \ - /* If it is currently blocked or ignored, change errno from \ - EINVAL to EPIPE. */ \ - errno = EPIPE; \ - } \ - } \ - return ret; \ - } - -# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */ -int -printf (const char *format, ...) -{ - int retval; - va_list args; - - va_start (args, format); - retval = vfprintf (stdout, format, args); - va_end (args); - - return retval; -} -# endif - -# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */ -int -fprintf (FILE *stream, const char *format, ...) -{ - int retval; - va_list args; - - va_start (args, format); - retval = vfprintf (stream, format, args); - va_end (args); - - return retval; -} -# endif - -# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */ -int -vprintf (const char *format, va_list args) -{ - return vfprintf (stdout, format, args); -} -# endif - -# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */ -int -vfprintf (FILE *stream, const char *format, va_list args) -#undef vfprintf -{ - CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF) -} -# endif - -int -putchar (int c) -{ - return fputc (c, stdout); -} - -int -fputc (int c, FILE *stream) -#undef fputc -{ - CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF) -} - -int -fputs (const char *string, FILE *stream) -#undef fputs -{ - CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF) -} - -int -puts (const char *string) -#undef puts -{ - FILE *stream = stdout; - CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF) -} - -size_t -fwrite (const void *ptr, size_t s, size_t n, FILE *stream) -#undef fwrite -{ - CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n) -} - -# endif -#endif diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h deleted file mode 100644 index b219d46f24..0000000000 --- a/lib/gl/stdio.in.h +++ /dev/null @@ -1,1080 +0,0 @@ -/* A GNU-like <stdio.h>. - - Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_FILE || defined __need___FILE -/* Special invocation convention inside glibc header files. */ - -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include <stdarg.h> - -#include <stddef.h> - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */ -#include <sys/types.h> - -#ifndef __attribute__ -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable __attribute__ only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ - && ! defined __GLIBC__ -# include <unistd.h> -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - - -#if @GNULIB_DPRINTF@ -# if @REPLACE_DPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); -# else -# if !@HAVE_DPRINTF@ -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if @GNULIB_FCLOSE@ -/* Close STREAM and its underlying file descriptor. */ -# if @REPLACE_FCLOSE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (fclose); -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if @GNULIB_FFLUSH@ -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if @REPLACE_FFLUSH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fflush); -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -#undef gets -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); - -#if @GNULIB_FOPEN@ -# if @REPLACE_FOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); -# endif -_GL_CXXALIASWARN (fopen); -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " - "use gnulib module fopen for portability"); -#endif - -#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ -# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ - || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); -# endif -_GL_CXXALIASWARN (fprintf); -#endif -#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_FPURGE@ -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if @REPLACE_FPURGE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !@HAVE_DECL_FPURGE@ -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if @GNULIB_FPUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputc); -#endif - -#if @GNULIB_FPUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputs); -#endif - -#if @GNULIB_FREOPEN@ -# if @REPLACE_FREOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# endif -_GL_CXXALIASWARN (freopen); -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on Win32 platforms is not POSIX compatible - " - "use gnulib module freopen for portability"); -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if @GNULIB_FSEEK@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -_GL_CXXALIASWARN (fseek); -#endif - -#if @GNULIB_FSEEKO@ -# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEKO@ -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! @HAVE_FSEEKO@ -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@ - /* Provide an fseek function that is consistent with fseeko. */ - /* In order to avoid that fseek gets defined as a macro here, the - developer can request the 'fseek' module. */ -# undef fseek -# define fseek rpl_fseek -static inline int _GL_ARG_NONNULL ((1)) -rpl_fseek (FILE *fp, long offset, int whence) -{ -# if @REPLACE_FSEEKO@ - return rpl_fseeko (fp, offset, whence); -# else - return fseeko (fp, offset, whence); -# endif -} -# endif -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if @GNULIB_FTELL@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if @REPLACE_FTELL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftell); -#endif - -#if @GNULIB_FTELLO@ -# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if @REPLACE_FTELLO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! @HAVE_FTELLO@ -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ - /* Provide an ftell function that is consistent with ftello. */ - /* In order to avoid that ftell gets defined as a macro here, the - developer can request the 'ftell' module. */ -# undef ftell -# define ftell rpl_ftell -static inline long _GL_ARG_NONNULL ((1)) -rpl_ftell (FILE *f) -{ -# if @REPLACE_FTELLO@ - return rpl_ftello (f); -# else - return ftello (f); -# endif -} -# endif -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if @GNULIB_FWRITE@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); -# endif -_GL_CXXALIASWARN (fwrite); -#endif - -#if @GNULIB_GETDELIM@ -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETDELIM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# else -# if !@HAVE_DECL_GETDELIM@ -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if @GNULIB_GETLINE@ -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETLINE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# else -# if !@HAVE_DECL_GETLINE@ -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# endif -# if @HAVE_DECL_GETLINE@ -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if @GNULIB_PERROR@ -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if @REPLACE_PERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -_GL_CXXALIASWARN (perror); -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if @GNULIB_POPEN@ -# if @REPLACE_POPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ -# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ - || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - __attribute__ ((__format__ (__printf__, 1, 2))) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -_GL_FUNCDECL_RPL (printf, int, - (const char *format, ...) - __attribute__ ((__format__ (__printf__, 1, 2))) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); -# endif -_GL_CXXALIASWARN (printf); -#endif -#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_PUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (putc); -#endif - -#if @GNULIB_PUTCHAR@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -_GL_CXXALIASWARN (putchar); -#endif - -#if @GNULIB_PUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -_GL_CXXALIASWARN (puts); -#endif - -#if @GNULIB_REMOVE@ -# if @REPLACE_REMOVE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -_GL_CXXALIASWARN (remove); -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if @GNULIB_RENAME@ -# if @REPLACE_RENAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -_GL_CXXALIASWARN (rename); -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if @GNULIB_RENAMEAT@ -# if @REPLACE_RENAMEAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !@HAVE_RENAMEAT@ -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if @GNULIB_SNPRINTF@ -# if @REPLACE_SNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...) - __attribute__ ((__format__ (__printf__, 3, 4))) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# else -# if !@HAVE_DECL_SNPRINTF@ -_GL_FUNCDECL_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...) - __attribute__ ((__format__ (__printf__, 3, 4))) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that sprintf should be handled like gets - (for example, OpenBSD issues a link warning for both functions), - since both can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if @GNULIB_SPRINTF_POSIX@ -# if @REPLACE_SPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); -# endif -_GL_CXXALIASWARN (sprintf); -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_TMPFILE@ -# if @REPLACE_TMPFILE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -_GL_CXXALIASWARN (tmpfile); -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if @GNULIB_VASPRINTF@ -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - __attribute__ ((__format__ (__printf__, 2, 3))) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if @GNULIB_VDPRINTF@ -# if @REPLACE_VDPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); -# else -# if !@HAVE_VDPRINTF@ -_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vdprintf); -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ -# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ - || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *fp, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vfprintf); -#endif -#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ -# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ - || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 1, 0))) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vprintf); -#endif -#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VSNPRINTF@ -# if @REPLACE_VSNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 3, 0))) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# else -# if !@HAVE_DECL_VSNPRINTF@ -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 3, 0))) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if @GNULIB_VSPRINTF_POSIX@ -# if @REPLACE_VSPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *str, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 2, 0))) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *str, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *str, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/lib/gl/stdlib.in.h b/lib/gl/stdlib.in.h deleted file mode 100644 index 9c7cad93a8..0000000000 --- a/lib/gl/stdlib.in.h +++ /dev/null @@ -1,722 +0,0 @@ -/* A GNU-like <stdlib.h>. - - Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_malloc_and_calloc -/* Special invocation convention inside glibc header files. */ - -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDLIB_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#ifndef _GL_STDLIB_H -#define _GL_STDLIB_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include <stddef.h> - -/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */ -#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS -# include <sys/wait.h> -#endif - -/* Solaris declares getloadavg() in <sys/loadavg.h>. */ -#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ -# include <sys/loadavg.h> -#endif - -/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included - from <stdlib.h> if _REENTRANT is defined. Include it always. */ -#if @HAVE_RANDOM_H@ -# include <random.h> -#endif - -#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \ - || defined GNULIB_POSIXCHECK -# include <stdint.h> -#endif - -#if !@HAVE_STRUCT_RANDOM_DATA@ -/* Define 'struct random_data'. - But allow multiple gnulib generated <stdlib.h> replacements to coexist. */ -# if !GNULIB_defined_struct_random_data -struct random_data -{ - int32_t *fptr; /* Front pointer. */ - int32_t *rptr; /* Rear pointer. */ - int32_t *state; /* Array of state values. */ - int rand_type; /* Type of random number generator. */ - int rand_deg; /* Degree of random number generator. */ - int rand_sep; /* Distance between front and rear. */ - int32_t *end_ptr; /* Pointer behind state table. */ -}; -# define GNULIB_defined_struct_random_data 1 -# endif -#endif - -#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */ -/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */ -/* But avoid namespace pollution on glibc systems and native Windows. */ -# include <unistd.h> -#endif - -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere - with proper operation of xargs. */ -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#elif EXIT_FAILURE != 1 -# undef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - - -#if @GNULIB__EXIT@ -/* Terminate the current process with the given return code, without running - the 'atexit' handlers. */ -# if !@HAVE__EXIT@ -_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__))); -# endif -_GL_CXXALIAS_SYS (_Exit, void, (int status)); -_GL_CXXALIASWARN (_Exit); -#elif defined GNULIB_POSIXCHECK -# undef _Exit -# if HAVE_RAW_DECL__EXIT -_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " - "use gnulib module _Exit for portability"); -# endif -#endif - - -#if @GNULIB_ATOLL@ -/* Parse a signed decimal integer. - Returns the value of the integer. Errors are not detected. */ -# if !@HAVE_ATOLL@ -_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); -_GL_CXXALIASWARN (atoll); -#elif defined GNULIB_POSIXCHECK -# undef atoll -# if HAVE_RAW_DECL_ATOLL -_GL_WARN_ON_USE (atoll, "atoll is unportable - " - "use gnulib module atoll for portability"); -# endif -#endif - -#if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef calloc -# define calloc rpl_calloc -# endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); -_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); -# else -_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); -# endif -_GL_CXXALIASWARN (calloc); -#elif defined GNULIB_POSIXCHECK -# undef calloc -/* Assume calloc is always declared. */ -_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " - "use gnulib module calloc-posix for portability"); -#endif - -#if @GNULIB_CANONICALIZE_FILE_NAME@ -# if @REPLACE_CANONICALIZE_FILE_NAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define canonicalize_file_name rpl_canonicalize_file_name -# endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); -# else -# if !@HAVE_CANONICALIZE_FILE_NAME@ -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); -# endif -_GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME -_GL_WARN_ON_USE (canonicalize_file_name, - "canonicalize_file_name is unportable - " - "use gnulib module canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_GETLOADAVG@ -/* Store max(NELEM,3) load average numbers in LOADAVG[]. - The three numbers are the load average of the last 1 minute, the last 5 - minutes, and the last 15 minutes, respectively. - LOADAVG is an array of NELEM numbers. */ -# if !@HAVE_DECL_GETLOADAVG@ -_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); -_GL_CXXALIASWARN (getloadavg); -#elif defined GNULIB_POSIXCHECK -# undef getloadavg -# if HAVE_RAW_DECL_GETLOADAVG -_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " - "use gnulib module getloadavg for portability"); -# endif -#endif - -#if @GNULIB_GETSUBOPT@ -/* Assuming *OPTIONP is a comma separated list of elements of the form - "token" or "token=value", getsubopt parses the first of these elements. - If the first element refers to a "token" that is member of the given - NULL-terminated array of tokens: - - It replaces the comma with a NUL byte, updates *OPTIONP to point past - the first option and the comma, sets *VALUEP to the value of the - element (or NULL if it doesn't contain an "=" sign), - - It returns the index of the "token" in the given array of tokens. - Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. - For more details see the POSIX:2001 specification. - http://www.opengroup.org/susv3xsh/getsubopt.html */ -# if !@HAVE_GETSUBOPT@ -_GL_FUNCDECL_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep)); -_GL_CXXALIASWARN (getsubopt); -#elif defined GNULIB_POSIXCHECK -# undef getsubopt -# if HAVE_RAW_DECL_GETSUBOPT -_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " - "use gnulib module getsubopt for portability"); -# endif -#endif - -#if @GNULIB_GRANTPT@ -/* Change the ownership and access permission of the slave side of the - pseudo-terminal whose master side is specified by FD. */ -# if !@HAVE_GRANTPT@ -_GL_FUNCDECL_SYS (grantpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (grantpt, int, (int fd)); -_GL_CXXALIASWARN (grantpt); -#elif defined GNULIB_POSIXCHECK -# undef grantpt -# if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " - "use gnulib module grantpt for portability"); -# endif -#endif - -#if @GNULIB_MALLOC_POSIX@ -# if @REPLACE_MALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef malloc -# define malloc rpl_malloc -# endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); -_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); -# else -_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); -# endif -_GL_CXXALIASWARN (malloc); -#elif defined GNULIB_POSIXCHECK -# undef malloc -/* Assume malloc is always declared. */ -_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " - "use gnulib module malloc-posix for portability"); -#endif - -#if @GNULIB_MKDTEMP@ -/* Create a unique temporary directory from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the directory name unique. - Returns TEMPLATE, or a null pointer if it cannot get a unique name. - The directory is created mode 700. */ -# if !@HAVE_MKDTEMP@ -_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); -_GL_CXXALIASWARN (mkdtemp); -#elif defined GNULIB_POSIXCHECK -# undef mkdtemp -# if HAVE_RAW_DECL_MKDTEMP -_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " - "use gnulib module mkdtemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMP@ -_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemp); -#elif defined GNULIB_POSIXCHECK -# undef mkostemp -# if HAVE_RAW_DECL_MKOSTEMP -_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " - "use gnulib module mkostemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE before a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMPS@ -_GL_FUNCDECL_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemps); -#elif defined GNULIB_POSIXCHECK -# undef mkostemps -# if HAVE_RAW_DECL_MKOSTEMPS -_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " - "use gnulib module mkostemps for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if @REPLACE_MKSTEMP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkstemp rpl_mkstemp -# endif -_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); -# else -# if ! @HAVE_MKSTEMP@ -_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); -# endif -_GL_CXXALIASWARN (mkstemp); -#elif defined GNULIB_POSIXCHECK -# undef mkstemp -# if HAVE_RAW_DECL_MKSTEMP -_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " - "use gnulib module mkstemp for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE prior to a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKSTEMPS@ -_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); -_GL_CXXALIASWARN (mkstemps); -#elif defined GNULIB_POSIXCHECK -# undef mkstemps -# if HAVE_RAW_DECL_MKSTEMPS -_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " - "use gnulib module mkstemps for portability"); -# endif -#endif - -#if @GNULIB_PTSNAME@ -/* Return the pathname of the pseudo-terminal slave associated with - the master FD is open on, or NULL on errors. */ -# if !@HAVE_PTSNAME@ -_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); -# endif -_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); -_GL_CXXALIASWARN (ptsname); -#elif defined GNULIB_POSIXCHECK -# undef ptsname -# if HAVE_RAW_DECL_PTSNAME -_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " - "use gnulib module ptsname for portability"); -# endif -#endif - -#if @GNULIB_PUTENV@ -# if @REPLACE_PUTENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putenv -# define putenv rpl_putenv -# endif -_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (putenv, int, (char *string)); -# else -_GL_CXXALIAS_SYS (putenv, int, (char *string)); -# endif -_GL_CXXALIASWARN (putenv); -#endif - - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -# ifndef RAND_MAX -# define RAND_MAX 2147483647 -# endif -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); -_GL_CXXALIASWARN (random_r); -#elif defined GNULIB_POSIXCHECK -# undef random_r -# if HAVE_RAW_DECL_RANDOM_R -_GL_WARN_ON_USE (random_r, "random_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state)); -_GL_CXXALIASWARN (srandom_r); -#elif defined GNULIB_POSIXCHECK -# undef srandom_r -# if HAVE_RAW_DECL_SRANDOM_R -_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); -_GL_CXXALIASWARN (initstate_r); -#elif defined GNULIB_POSIXCHECK -# undef initstate_r -# if HAVE_RAW_DECL_INITSTATE_R -_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); -_GL_CXXALIASWARN (setstate_r); -#elif defined GNULIB_POSIXCHECK -# undef setstate_r -# if HAVE_RAW_DECL_SETSTATE_R -_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - - -#if @GNULIB_REALLOC_POSIX@ -# if @REPLACE_REALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef realloc -# define realloc rpl_realloc -# endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); -_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); -# else -_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); -# endif -_GL_CXXALIASWARN (realloc); -#elif defined GNULIB_POSIXCHECK -# undef realloc -/* Assume realloc is always declared. */ -_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " - "use gnulib module realloc-posix for portability"); -#endif - -#if @GNULIB_REALPATH@ -# if @REPLACE_REALPATH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define realpath rpl_realpath -# endif -_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); -# else -# if !@HAVE_REALPATH@ -_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); -# endif -_GL_CXXALIASWARN (realpath); -#elif defined GNULIB_POSIXCHECK -# undef realpath -# if HAVE_RAW_DECL_REALPATH -_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " - "canonicalize or canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_RPMATCH@ -/* Test a user response to a question. - Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ -# if !@HAVE_RPMATCH@ -_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); -_GL_CXXALIASWARN (rpmatch); -#elif defined GNULIB_POSIXCHECK -# undef rpmatch -# if HAVE_RAW_DECL_RPMATCH -_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " - "use gnulib module rpmatch for portability"); -# endif -#endif - -#if @GNULIB_SETENV@ -/* Set NAME to VALUE in the environment. - If REPLACE is nonzero, overwrite an existing value. */ -# if @REPLACE_SETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setenv -# define setenv rpl_setenv -# endif -_GL_FUNCDECL_RPL (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (setenv, int, - (const char *name, const char *value, int replace)); -# else -# if !@HAVE_SETENV@ -_GL_FUNCDECL_SYS (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (setenv, int, - (const char *name, const char *value, int replace)); -# endif -_GL_CXXALIASWARN (setenv); -#elif defined GNULIB_POSIXCHECK -# undef setenv -# if HAVE_RAW_DECL_SETENV -_GL_WARN_ON_USE (setenv, "setenv is unportable - " - "use gnulib module setenv for portability"); -# endif -#endif - -#if @GNULIB_STRTOD@ - /* Parse a double from STRING, updating ENDP if appropriate. */ -# if @REPLACE_STRTOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strtod rpl_strtod -# endif -_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); -# else -# if !@HAVE_STRTOD@ -_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); -# endif -_GL_CXXALIASWARN (strtod); -#elif defined GNULIB_POSIXCHECK -# undef strtod -# if HAVE_RAW_DECL_STRTOD -_GL_WARN_ON_USE (strtod, "strtod is unportable - " - "use gnulib module strtod for portability"); -# endif -#endif - -#if @GNULIB_STRTOLL@ -/* Parse a signed integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set - to ERANGE. */ -# if !@HAVE_STRTOLL@ -_GL_FUNCDECL_SYS (strtoll, long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoll, long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoll); -#elif defined GNULIB_POSIXCHECK -# undef strtoll -# if HAVE_RAW_DECL_STRTOLL -_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " - "use gnulib module strtoll for portability"); -# endif -#endif - -#if @GNULIB_STRTOULL@ -/* Parse an unsigned integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is ULLONG_MAX, and errno is set to - ERANGE. */ -# if !@HAVE_STRTOULL@ -_GL_FUNCDECL_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoull); -#elif defined GNULIB_POSIXCHECK -# undef strtoull -# if HAVE_RAW_DECL_STRTOULL -_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " - "use gnulib module strtoull for portability"); -# endif -#endif - -#if @GNULIB_UNLOCKPT@ -/* Unlock the slave side of the pseudo-terminal whose master side is specified - by FD, so that it can be opened. */ -# if !@HAVE_UNLOCKPT@ -_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); -_GL_CXXALIASWARN (unlockpt); -#elif defined GNULIB_POSIXCHECK -# undef unlockpt -# if HAVE_RAW_DECL_UNLOCKPT -_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " - "use gnulib module unlockpt for portability"); -# endif -#endif - -#if @GNULIB_UNSETENV@ -/* Remove the variable NAME from the environment. */ -# if @REPLACE_UNSETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unsetenv -# define unsetenv rpl_unsetenv -# endif -_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); -# else -# if !@HAVE_UNSETENV@ -_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); -# endif -_GL_CXXALIASWARN (unsetenv); -#elif defined GNULIB_POSIXCHECK -# undef unsetenv -# if HAVE_RAW_DECL_UNSETENV -_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " - "use gnulib module unsetenv for portability"); -# endif -#endif - - -#endif /* _GL_STDLIB_H */ -#endif /* _GL_STDLIB_H */ -#endif diff --git a/lib/gl/str-two-way.h b/lib/gl/str-two-way.h deleted file mode 100644 index 830edc6734..0000000000 --- a/lib/gl/str-two-way.h +++ /dev/null @@ -1,450 +0,0 @@ -/* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Eric Blake <ebb9@byu.net>, 2008. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Before including this file, you need to include <config.h> and - <string.h>, and define: - RESULT_TYPE A macro that expands to the return type. - AVAILABLE(h, h_l, j, n_l) - A macro that returns nonzero if there are - at least N_L bytes left starting at H[J]. - H is 'unsigned char *', H_L, J, and N_L - are 'size_t'; H_L is an lvalue. For - NUL-terminated searches, H_L can be - modified each iteration to avoid having - to compute the end of H up front. - - For case-insensitivity, you may optionally define: - CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L - characters of P1 and P2 are equal. - CANON_ELEMENT(c) A macro that canonicalizes an element right after - it has been fetched from one of the two strings. - The argument is an 'unsigned char'; the result - must be an 'unsigned char' as well. - - This file undefines the macros documented above, and defines - LONG_NEEDLE_THRESHOLD. -*/ - -#include <limits.h> -#include <stdint.h> - -/* We use the Two-Way string matching algorithm, which guarantees - linear complexity with constant space. Additionally, for long - needles, we also use a bad character shift table similar to the - Boyer-Moore algorithm to achieve improved (potentially sub-linear) - performance. - - See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260 - and http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm -*/ - -/* Point at which computing a bad-byte shift table is likely to be - worthwhile. Small needles should not compute a table, since it - adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a - speedup no greater than a factor of NEEDLE_LEN. The larger the - needle, the better the potential performance gain. On the other - hand, on non-POSIX systems with CHAR_BIT larger than eight, the - memory required for the table is prohibitive. */ -#if CHAR_BIT < 10 -# define LONG_NEEDLE_THRESHOLD 32U -#else -# define LONG_NEEDLE_THRESHOLD SIZE_MAX -#endif - -#ifndef MAX -# define MAX(a, b) ((a < b) ? (b) : (a)) -#endif - -#ifndef CANON_ELEMENT -# define CANON_ELEMENT(c) c -#endif -#ifndef CMP_FUNC -# define CMP_FUNC memcmp -#endif - -/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. - Return the index of the first byte in the right half, and set - *PERIOD to the global period of the right half. - - The global period of a string is the smallest index (possibly its - length) at which all remaining bytes in the string are repetitions - of the prefix (the last repetition may be a subset of the prefix). - - When NEEDLE is factored into two halves, a local period is the - length of the smallest word that shares a suffix with the left half - and shares a prefix with the right half. All factorizations of a - non-empty NEEDLE have a local period of at least 1 and no greater - than NEEDLE_LEN. - - A critical factorization has the property that the local period - equals the global period. All strings have at least one critical - factorization with the left half smaller than the global period. - And while some strings have more than one critical factorization, - it is provable that with an ordered alphabet, at least one of the - critical factorizations corresponds to a maximal suffix. - - Given an ordered alphabet, a critical factorization can be computed - in linear time, with 2 * NEEDLE_LEN comparisons, by computing the - shorter of two ordered maximal suffixes. The ordered maximal - suffixes are determined by lexicographic comparison while tracking - periodicity. */ -static size_t -critical_factorization (const unsigned char *needle, size_t needle_len, - size_t *period) -{ - /* Index of last byte of left half. */ - size_t max_suffix, max_suffix_rev; - size_t j; /* Index into NEEDLE for current candidate suffix. */ - size_t k; /* Offset into current period. */ - size_t p; /* Intermediate period. */ - unsigned char a, b; /* Current comparison bytes. */ - - /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered - out 0-length needles. */ - if (needle_len < 3) - { - *period = 1; - return needle_len - 1; - } - - /* Invariants: - 1 <= j < NEEDLE_LEN - 1 - 0 <= max_suffix{,_rev} < j - min(max_suffix, max_suffix_rev) < global period of NEEDLE - 1 <= p <= global period of NEEDLE - p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] - 1 <= k <= p - */ - - /* Perform lexicographic search. */ - max_suffix = 0; - j = k = p = 1; - while (j + k < needle_len) - { - a = CANON_ELEMENT (needle[j + k]); - b = CANON_ELEMENT (needle[max_suffix + k]); - if (a < b) - { - /* Suffix is smaller, period is entire prefix so far. */ - j += k; - k = 1; - p = j - max_suffix; - } - else if (a == b) - { - /* Advance through repetition of the current period. */ - if (k != p) - ++k; - else - { - j += p; - k = 1; - } - } - else /* b < a */ - { - /* Suffix is larger, start over from current location. */ - max_suffix = j++; - k = p = 1; - } - } - *period = p; - - /* Perform reverse lexicographic search. */ - max_suffix_rev = 0; - j = k = p = 1; - while (j + k < needle_len) - { - a = CANON_ELEMENT (needle[j + k]); - b = CANON_ELEMENT (needle[max_suffix_rev + k]); - if (b < a) - { - /* Suffix is smaller, period is entire prefix so far. */ - j += k; - k = 1; - p = j - max_suffix_rev; - } - else if (a == b) - { - /* Advance through repetition of the current period. */ - if (k != p) - ++k; - else - { - j += p; - k = 1; - } - } - else /* a < b */ - { - /* Suffix is larger, start over from current location. */ - max_suffix_rev = j++; - k = p = 1; - } - } - - /* Choose the shorter suffix. Return the index of the first byte of - the right half, rather than the last byte of the left half. - - For some examples, 'banana' has two critical factorizations, both - exposed by the two lexicographic extreme suffixes of 'anana' and - 'nana', where both suffixes have a period of 2. On the other - hand, with 'aab' and 'bba', both strings have a single critical - factorization of the last byte, with the suffix having a period - of 1. While the maximal lexicographic suffix of 'aab' is 'b', - the maximal lexicographic suffix of 'bba' is 'ba', which is not a - critical factorization. Conversely, the maximal reverse - lexicographic suffix of 'a' works for 'bba', but not 'ab' for - 'aab'. The shorter suffix of the two will always be a critical - factorization. */ - if (max_suffix_rev + 1 < max_suffix + 1) - return max_suffix + 1; - *period = p; - return max_suffix_rev + 1; -} - -/* Return the first location of non-empty NEEDLE within HAYSTACK, or - NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This - method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. - Performance is guaranteed to be linear, with an initialization cost - of 2 * NEEDLE_LEN comparisons. - - If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at - most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. - If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * - HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ -static RETURN_TYPE -two_way_short_needle (const unsigned char *haystack, size_t haystack_len, - const unsigned char *needle, size_t needle_len) -{ - size_t i; /* Index into current byte of NEEDLE. */ - size_t j; /* Index into current window of HAYSTACK. */ - size_t period; /* The period of the right half of needle. */ - size_t suffix; /* The index of the right half of needle. */ - - /* Factor the needle into two halves, such that the left half is - smaller than the global period, and the right half is - periodic (with a period as large as NEEDLE_LEN - suffix). */ - suffix = critical_factorization (needle, needle_len, &period); - - /* Perform the search. Each iteration compares the right half - first. */ - if (CMP_FUNC (needle, needle + period, suffix) == 0) - { - /* Entire needle is periodic; a mismatch in the left half can - only advance by the period, so use memory to avoid rescanning - known occurrences of the period in the right half. */ - size_t memory = 0; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Scan for matches in right half. */ - i = MAX (suffix, memory); - while (i < needle_len && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (memory < i + 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); - /* No match, so remember how many repetitions of period - on the right half were scanned. */ - j += period; - memory = needle_len - period; - } - else - { - j += i - suffix + 1; - memory = 0; - } - } - } - else - { - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Scan for matches in right half. */ - i = suffix; - while (i < needle_len && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; - } - } - return NULL; -} - -/* Return the first location of non-empty NEEDLE within HAYSTACK, or - NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This - method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. - Performance is guaranteed to be linear, with an initialization cost - of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. - - If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at - most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, - and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. - If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * - HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and - sublinear performance is not possible. */ -static RETURN_TYPE -two_way_long_needle (const unsigned char *haystack, size_t haystack_len, - const unsigned char *needle, size_t needle_len) -{ - size_t i; /* Index into current byte of NEEDLE. */ - size_t j; /* Index into current window of HAYSTACK. */ - size_t period; /* The period of the right half of needle. */ - size_t suffix; /* The index of the right half of needle. */ - size_t shift_table[1U << CHAR_BIT]; /* See below. */ - - /* Factor the needle into two halves, such that the left half is - smaller than the global period, and the right half is - periodic (with a period as large as NEEDLE_LEN - suffix). */ - suffix = critical_factorization (needle, needle_len, &period); - - /* Populate shift_table. For each possible byte value c, - shift_table[c] is the distance from the last occurrence of c to - the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. - shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ - for (i = 0; i < 1U << CHAR_BIT; i++) - shift_table[i] = needle_len; - for (i = 0; i < needle_len; i++) - shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; - - /* Perform the search. Each iteration compares the right half - first. */ - if (CMP_FUNC (needle, needle + period, suffix) == 0) - { - /* Entire needle is periodic; a mismatch in the left half can - only advance by the period, so use memory to avoid rescanning - known occurrences of the period in the right half. */ - size_t memory = 0; - size_t shift; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; - if (0 < shift) - { - if (memory && shift < period) - { - /* Since needle is periodic, but the last period has - a byte out of place, there can be no match until - after the mismatch. */ - shift = needle_len - period; - } - memory = 0; - j += shift; - continue; - } - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = MAX (suffix, memory); - while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (memory < i + 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); - /* No match, so remember how many repetitions of period - on the right half were scanned. */ - j += period; - memory = needle_len - period; - } - else - { - j += i - suffix + 1; - memory = 0; - } - } - } - else - { - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - size_t shift; - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; - if (0 < shift) - { - j += shift; - continue; - } - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = suffix; - while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; - } - } - return NULL; -} - -#undef AVAILABLE -#undef CANON_ELEMENT -#undef CMP_FUNC -#undef MAX -#undef RETURN_TYPE diff --git a/lib/gl/strcasecmp.c b/lib/gl/strcasecmp.c deleted file mode 100644 index 3d9ea4ac19..0000000000 --- a/lib/gl/strcasecmp.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Case-insensitive string comparison function. - Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#include <string.h> - -#include <ctype.h> -#include <limits.h> - -#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - -/* Compare strings S1 and S2, ignoring case, returning less than, equal to or - greater than zero if S1 is lexicographically less than, equal to or greater - than S2. - Note: This function does not work with multibyte strings! */ - -int -strcasecmp (const char *s1, const char *s2) -{ - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2) - return 0; - - do - { - c1 = TOLOWER (*p1); - c2 = TOLOWER (*p2); - - if (c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/lib/gl/string.in.h b/lib/gl/string.in.h deleted file mode 100644 index b5711c07c6..0000000000 --- a/lib/gl/string.in.h +++ /dev/null @@ -1,975 +0,0 @@ -/* A GNU-like <string.h>. - - Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STRING_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STRING_H@ - -#ifndef _GL_STRING_H -#define _GL_STRING_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include <stddef.h> - -/* MirBSD defines mbslen as a macro. */ -#if @GNULIB_MBSLEN@ && defined __MirBSD__ -# include <wchar.h> -#endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -# define __attribute__(Spec) /* empty */ -# endif -#endif -/* The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include <unistd.h> -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Return the first instance of C within N bytes of S, or NULL. */ -#if @GNULIB_MEMCHR@ -# if @REPLACE_MEMCHR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memchr rpl_memchr -# endif -_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); -# else -# if ! @HAVE_MEMCHR@ -_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const void * std::memchr (const void *, int, size_t); } - extern "C++" { void * std::memchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memchr, - void *, (void const *__s, int __c, size_t __n), - void const *, (void const *__s, int __c, size_t __n)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); -_GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); -# else -_GL_CXXALIASWARN (memchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memchr -/* Assume memchr is always declared. */ -_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " - "use gnulib module memchr for portability" ); -#endif - -/* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if @GNULIB_MEMMEM@ -# if @REPLACE_MEMMEM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memmem rpl_memmem -# endif -_GL_FUNCDECL_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# else -# if ! @HAVE_DECL_MEMMEM@ -_GL_FUNCDECL_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# endif -_GL_CXXALIASWARN (memmem); -#elif defined GNULIB_POSIXCHECK -# undef memmem -# if HAVE_RAW_DECL_MEMMEM -_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " - "use gnulib module memmem-simple for portability, " - "and module memmem for speed" ); -# endif -#endif - -/* Copy N bytes of SRC to DEST, return pointer to bytes after the - last written byte. */ -#if @GNULIB_MEMPCPY@ -# if ! @HAVE_MEMPCPY@ -_GL_FUNCDECL_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n)); -_GL_CXXALIASWARN (mempcpy); -#elif defined GNULIB_POSIXCHECK -# undef mempcpy -# if HAVE_RAW_DECL_MEMPCPY -_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " - "use gnulib module mempcpy for portability"); -# endif -#endif - -/* Search backwards through a block for a byte (specified as an int). */ -#if @GNULIB_MEMRCHR@ -# if ! @HAVE_DECL_MEMRCHR@ -_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::memrchr (const void *, int, size_t); } - extern "C++" { void * std::memrchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memrchr, - void *, (void const *, int, size_t), - void const *, (void const *, int, size_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else -_GL_CXXALIASWARN (memrchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memrchr -# if HAVE_RAW_DECL_MEMRCHR -_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " - "use gnulib module memrchr for portability"); -# endif -#endif - -/* Find the first occurrence of C in S. More efficient than - memchr(S,C,N), at the expense of undefined behavior if C does not - occur within N bytes. */ -#if @GNULIB_RAWMEMCHR@ -# if ! @HAVE_RAWMEMCHR@ -_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::rawmemchr (const void *, int); } - extern "C++" { void * std::rawmemchr (void *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (rawmemchr, - void *, (void const *__s, int __c_in), - void const *, (void const *__s, int __c_in)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (rawmemchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rawmemchr -# if HAVE_RAW_DECL_RAWMEMCHR -_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " - "use gnulib module rawmemchr for portability"); -# endif -#endif - -/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ -#if @GNULIB_STPCPY@ -# if ! @HAVE_STPCPY@ -_GL_FUNCDECL_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src)); -_GL_CXXALIASWARN (stpcpy); -#elif defined GNULIB_POSIXCHECK -# undef stpcpy -# if HAVE_RAW_DECL_STPCPY -_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " - "use gnulib module stpcpy for portability"); -# endif -#endif - -/* Copy no more than N bytes of SRC to DST, returning a pointer past the - last non-NUL byte written into DST. */ -#if @GNULIB_STPNCPY@ -# if @REPLACE_STPNCPY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef stpncpy -# define stpncpy rpl_stpncpy -# endif -_GL_FUNCDECL_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# else -# if ! @HAVE_STPNCPY@ -_GL_FUNCDECL_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# endif -_GL_CXXALIASWARN (stpncpy); -#elif defined GNULIB_POSIXCHECK -# undef stpncpy -# if HAVE_RAW_DECL_STPNCPY -_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " - "use gnulib module stpncpy for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strchr -/* Assume strchr is always declared. */ -_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbschr if you care about internationalization"); -#endif - -/* Find the first occurrence of C in S or the final NUL byte. */ -#if @GNULIB_STRCHRNUL@ -# if ! @HAVE_STRCHRNUL@ -_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * std::strchrnul (const char *, int); } - extern "C++" { char * std::strchrnul (char *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (strchrnul, - char *, (char const *__s, int __c_in), - char const *, (char const *__s, int __c_in)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (strchrnul); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strchrnul -# if HAVE_RAW_DECL_STRCHRNUL -_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " - "use gnulib module strchrnul for portability"); -# endif -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -#if @GNULIB_STRDUP@ -# if @REPLACE_STRDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strdup -# define strdup rpl_strdup -# endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); -# else -# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup - /* strdup exists as a function and as a macro. Get rid of the macro. */ -# undef strdup -# endif -# if !(@HAVE_DECL_STRDUP@ || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); -# endif -_GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP -_GL_WARN_ON_USE (strdup, "strdup is unportable - " - "use gnulib module strdup for portability"); -# endif -#endif - -/* Append no more than N characters from SRC onto DEST. */ -#if @GNULIB_STRNCAT@ -# if @REPLACE_STRNCAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strncat -# define strncat rpl_strncat -# endif -_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); -# else -_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); -# endif -_GL_CXXALIASWARN (strncat); -#elif defined GNULIB_POSIXCHECK -# undef strncat -# if HAVE_RAW_DECL_STRNCAT -_GL_WARN_ON_USE (strncat, "strncat is unportable - " - "use gnulib module strncat for portability"); -# endif -#endif - -/* Return a newly allocated copy of at most N bytes of STRING. */ -#if @GNULIB_STRNDUP@ -# if @REPLACE_STRNDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strndup -# define strndup rpl_strndup -# endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); -# else -# if ! @HAVE_DECL_STRNDUP@ -_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); -# endif -_GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP -_GL_WARN_ON_USE (strndup, "strndup is unportable - " - "use gnulib module strndup for portability"); -# endif -#endif - -/* Find the length (number of bytes) of STRING, but scan at most - MAXLEN bytes. If no '\0' terminator is found in that many bytes, - return MAXLEN. */ -#if @GNULIB_STRNLEN@ -# if @REPLACE_STRNLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strnlen -# define strnlen rpl_strnlen -# endif -_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); -# else -# if ! @HAVE_DECL_STRNLEN@ -_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); -# endif -_GL_CXXALIASWARN (strnlen); -#elif defined GNULIB_POSIXCHECK -# undef strnlen -# if HAVE_RAW_DECL_STRNLEN -_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " - "use gnulib module strnlen for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strcspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strcspn -/* Assume strcspn is always declared. */ -_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbscspn if you care about internationalization"); -#endif - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if @GNULIB_STRPBRK@ -# if ! @HAVE_STRPBRK@ -_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const char * strpbrk (const char *, const char *); } - extern "C++" { char * strpbrk (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strpbrk, - char *, (char const *__s, char const *__accept), - const char *, (char const *__s, char const *__accept)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); -_GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); -# else -_GL_CXXALIASWARN (strpbrk); -# endif -# if defined GNULIB_POSIXCHECK -/* strpbrk() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strpbrk -_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " - "in multibyte locales - " - "use mbspbrk if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strpbrk -# if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " - "use gnulib module strpbrk for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it cannot work with multibyte strings. */ -# undef strspn -/* Assume strspn is always declared. */ -_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbsspn if you care about internationalization"); -#endif - -#if defined GNULIB_POSIXCHECK -/* strrchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strrchr -/* Assume strrchr is always declared. */ -_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbsrchr if you care about internationalization"); -#endif - -/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP - to point to the next char after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of strtok() that is multithread-safe and supports - empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strtok_r(). */ -#if @GNULIB_STRSEP@ -# if ! @HAVE_STRSEP@ -_GL_FUNCDECL_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim)); -_GL_CXXALIASWARN (strsep); -# if defined GNULIB_POSIXCHECK -# undef strsep -_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " - "in multibyte locales - " - "use mbssep if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strsep -# if HAVE_RAW_DECL_STRSEP -_GL_WARN_ON_USE (strsep, "strsep is unportable - " - "use gnulib module strsep for portability"); -# endif -#endif - -#if @GNULIB_STRSTR@ -# if @REPLACE_STRSTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strstr rpl_strstr -# endif -_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); -# else - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strstr (const char *, const char *); } - extern "C++" { char * strstr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strstr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strstr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strstr() does not work with multibyte strings if the locale encoding is - different from UTF-8: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strstr -/* Assume strstr is always declared. */ -_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " - "work correctly on character strings in most " - "multibyte locales - " - "use mbsstr if you care about internationalization, " - "or use strstr if you care about speed"); -#endif - -/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison. */ -#if @GNULIB_STRCASESTR@ -# if @REPLACE_STRCASESTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strcasestr rpl_strcasestr -# endif -_GL_FUNCDECL_RPL (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strcasestr, char *, - (const char *haystack, const char *needle)); -# else -# if ! @HAVE_STRCASESTR@ -_GL_FUNCDECL_SYS (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strcasestr (const char *, const char *); } - extern "C++" { char * strcasestr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strcasestr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strcasestr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strcasestr() does not work with multibyte strings: - It is a glibc extension, and glibc implements it only for unibyte - locales. */ -# undef strcasestr -# if HAVE_RAW_DECL_STRCASESTR -_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " - "strings in multibyte locales - " - "use mbscasestr if you care about " - "internationalization, or use c-strcasestr if you want " - "a locale independent function"); -# endif -#endif - -/* Parse S into tokens separated by characters in DELIM. - If S is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = strtok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - This is a variant of strtok() that is multithread-safe. - - For the POSIX documentation for this function, see: - http://www.opengroup.org/susv3xsh/strtok.html - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strsep(). */ -#if @GNULIB_STRTOK_R@ -# if @REPLACE_STRTOK_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strtok_r -# define strtok_r rpl_strtok_r -# endif -_GL_FUNCDECL_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# else -# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK -# undef strtok_r -# endif -# if ! @HAVE_DECL_STRTOK_R@ -_GL_FUNCDECL_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# endif -_GL_CXXALIASWARN (strtok_r); -# if defined GNULIB_POSIXCHECK -_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " - "strings in multibyte locales - " - "use mbstok_r if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strtok_r -# if HAVE_RAW_DECL_STRTOK_R -_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " - "use gnulib module strtok_r for portability"); -# endif -#endif - - -/* The following functions are not specified by POSIX. They are gnulib - extensions. */ - -#if @GNULIB_MBSLEN@ -/* Return the number of multibyte characters in the character string STRING. - This considers multibyte characters, unlike strlen, which counts bytes. */ -# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ -# undef mbslen -# endif -# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbslen rpl_mbslen -# endif -_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); -# else -_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); -# endif -_GL_CXXALIASWARN (mbslen); -#endif - -#if @GNULIB_MBSNLEN@ -/* Return the number of multibyte characters in the character string starting - at STRING and ending at STRING + LEN. */ -_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) - _GL_ARG_NONNULL ((1)); -#endif - -#if @GNULIB_MBSCHR@ -/* Locate the first single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbschr); -#endif - -#if @GNULIB_MBSRCHR@ -/* Locate the last single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strrchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbsrchr); -#endif - -#if @GNULIB_MBSSTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. - Unlike strstr(), this function works correctly in multibyte locales with - encodings different from UTF-8. */ -_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASECMP@ -/* Compare the character strings S1 and S2, ignoring case, returning less than, - equal to or greater than zero if S1 is lexicographically less than, equal to - or greater than S2. - Note: This function may, in multibyte locales, return 0 for strings of - different lengths! - Unlike strcasecmp(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSNCASECMP@ -/* Compare the initial segment of the character string S1 consisting of at most - N characters with the initial segment of the character string S2 consisting - of at most N characters, ignoring case, returning less than, equal to or - greater than zero if the initial segment of S1 is lexicographically less - than, equal to or greater than the initial segment of S2. - Note: This function may, in multibyte locales, return 0 for initial segments - of different lengths! - Unlike strncasecmp(), this function works correctly in multibyte locales. - But beware that N is not a byte count but a character count! */ -_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPCASECMP@ -/* Compare the initial segment of the character string STRING consisting of - at most mbslen (PREFIX) characters with the character string PREFIX, - ignoring case. If the two match, return a pointer to the first byte - after this prefix in STRING. Otherwise, return NULL. - Note: This function may, in multibyte locales, return non-NULL if STRING - is of smaller length than PREFIX! - Unlike strncasecmp(), this function works correctly in multibyte - locales. */ -_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASESTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK, using case-insensitive comparison. - Note: This function may, in multibyte locales, return success even if - strlen (haystack) < strlen (needle) ! - Unlike strcasestr(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCSPN@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strcspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPBRK@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the pointer to it, or NULL if none - exists. - Unlike strpbrk(), this function works correctly in multibyte locales. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); -# else -_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); -# endif -_GL_CXXALIASWARN (mbspbrk); -#endif - -#if @GNULIB_MBSSPN@ -/* Find the first occurrence in the character string STRING of any character - not in the character string REJECT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSSEP@ -/* Search the next delimiter (multibyte character listed in the character - string DELIM) starting at the character string *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP to point - to the next multibyte character after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of mbstok_r() that supports empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbstok_r(). */ -_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSTOK_R@ -/* Parse the character string STRING into tokens separated by characters in - the character string DELIM. - If STRING is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = mbstok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbssep(). */ -_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) - _GL_ARG_NONNULL ((2, 3)); -#endif - -/* Map any int, typically from errno, into an error message. */ -#if @GNULIB_STRERROR@ -# if @REPLACE_STRERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror -# define strerror rpl_strerror -# endif -_GL_FUNCDECL_RPL (strerror, char *, (int)); -_GL_CXXALIAS_RPL (strerror, char *, (int)); -# else -_GL_CXXALIAS_SYS (strerror, char *, (int)); -# endif -_GL_CXXALIASWARN (strerror); -#elif defined GNULIB_POSIXCHECK -# undef strerror -/* Assume strerror is always declared. */ -_GL_WARN_ON_USE (strerror, "strerror is unportable - " - "use gnulib module strerror to guarantee non-NULL result"); -#endif - -/* Map any int, typically from errno, into an error message. Multithread-safe. - Uses the POSIX declaration, not the glibc declaration. */ -#if @GNULIB_STRERROR_R@ -# if @REPLACE_STRERROR_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror_r -# define strerror_r rpl_strerror_r -# endif -_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_STRERROR_R@ -_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# endif -# if @HAVE_DECL_STRERROR_R@ -_GL_CXXALIASWARN (strerror_r); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strerror_r -# if HAVE_RAW_DECL_STRERROR_R -_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " - "use gnulib module strerror_r-posix for portability"); -# endif -#endif - -#if @GNULIB_STRSIGNAL@ -# if @REPLACE_STRSIGNAL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strsignal rpl_strsignal -# endif -_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); -_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); -# else -# if ! @HAVE_DECL_STRSIGNAL@ -_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is - 'const char *'. */ -_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); -# endif -_GL_CXXALIASWARN (strsignal); -#elif defined GNULIB_POSIXCHECK -# undef strsignal -# if HAVE_RAW_DECL_STRSIGNAL -_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " - "use gnulib module strsignal for portability"); -# endif -#endif - -#if @GNULIB_STRVERSCMP@ -# if !@HAVE_STRVERSCMP@ -_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); -_GL_CXXALIASWARN (strverscmp); -#elif defined GNULIB_POSIXCHECK -# undef strverscmp -# if HAVE_RAW_DECL_STRVERSCMP -_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " - "use gnulib module strverscmp for portability"); -# endif -#endif - - -#endif /* _GL_STRING_H */ -#endif /* _GL_STRING_H */ diff --git a/lib/gl/strings.in.h b/lib/gl/strings.in.h deleted file mode 100644 index fb1f19014d..0000000000 --- a/lib/gl/strings.in.h +++ /dev/null @@ -1,94 +0,0 @@ -/* A substitute <strings.h>. - - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STRINGS_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STRINGS_H@ - -#ifndef _GL_STRINGS_H -#define _GL_STRINGS_H - - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Compare strings S1 and S2, ignoring case, returning less than, equal to or - greater than zero if S1 is lexicographically less than, equal to or greater - than S2. - Note: This function does not work in multibyte locales. */ -#if ! @HAVE_STRCASECMP@ -extern int strcasecmp (char const *s1, char const *s2) - _GL_ARG_NONNULL ((1, 2)); -#endif -#if defined GNULIB_POSIXCHECK -/* strcasecmp() does not work with multibyte strings: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strcasecmp -# if HAVE_RAW_DECL_STRCASECMP -_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " - "strings in multibyte locales - " - "use mbscasecmp if you care about " - "internationalization, or use c_strcasecmp , " - "gnulib module c-strcase) if you want a locale " - "independent function"); -# endif -#endif - -/* Compare no more than N bytes of strings S1 and S2, ignoring case, - returning less than, equal to or greater than zero if S1 is - lexicographically less than, equal to or greater than S2. - Note: This function cannot work correctly in multibyte locales. */ -#if ! @HAVE_DECL_STRNCASECMP@ -extern int strncasecmp (char const *s1, char const *s2, size_t n) - _GL_ARG_NONNULL ((1, 2)); -#endif -#if defined GNULIB_POSIXCHECK -/* strncasecmp() does not work with multibyte strings: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strncasecmp -# if HAVE_RAW_DECL_STRNCASECMP -_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " - "strings in multibyte locales - " - "use mbsncasecmp or mbspcasecmp if you care about " - "internationalization, or use c_strncasecmp , " - "gnulib module c-strcase) if you want a locale " - "independent function"); -# endif -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* _GL_STRING_H */ -#endif /* _GL_STRING_H */ diff --git a/lib/gl/strncasecmp.c b/lib/gl/strncasecmp.c deleted file mode 100644 index 788e4234e4..0000000000 --- a/lib/gl/strncasecmp.c +++ /dev/null @@ -1,63 +0,0 @@ -/* strncasecmp.c -- case insensitive string comparator - Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#include <string.h> - -#include <ctype.h> -#include <limits.h> - -#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - -/* Compare no more than N bytes of strings S1 and S2, ignoring case, - returning less than, equal to or greater than zero if S1 is - lexicographically less than, equal to or greater than S2. - Note: This function cannot work correctly in multibyte locales. */ - -int -strncasecmp (const char *s1, const char *s2, size_t n) -{ - register const unsigned char *p1 = (const unsigned char *) s1; - register const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2 || n == 0) - return 0; - - do - { - c1 = TOLOWER (*p1); - c2 = TOLOWER (*p2); - - if (--n == 0 || c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/lib/gl/strverscmp.c b/lib/gl/strverscmp.c deleted file mode 100644 index 5757d647f1..0000000000 --- a/lib/gl/strverscmp.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Compare strings while treating digits characters numerically. - Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2010 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if !_LIBC -# include <config.h> -#endif - -#include <string.h> -#include <ctype.h> - -/* states: S_N: normal, S_I: comparing integral part, S_F: comparing - fractional parts, S_Z: idem but with leading Zeroes only */ -#define S_N 0x0 -#define S_I 0x4 -#define S_F 0x8 -#define S_Z 0xC - -/* result_type: CMP: return diff; LEN: compare using len_diff/diff */ -#define CMP 2 -#define LEN 3 - - -/* ISDIGIT differs from isdigit, as follows: - - Its arg may be any int or unsigned int; it need not be an unsigned char - or EOF. - - It's typically faster. - POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to - isdigit unless it's important to use the locale's definition - of `digit' even when the host does not conform to POSIX. */ -#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) - -#undef __strverscmp -#undef strverscmp - -#ifndef weak_alias -# define __strverscmp strverscmp -#endif - -/* Compare S1 and S2 as strings holding indices/version numbers, - returning less than, equal to or greater than zero if S1 is less than, - equal to or greater than S2 (for more info, see the texinfo doc). -*/ - -int -__strverscmp (const char *s1, const char *s2) -{ - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - int state; - int diff; - - /* Symbol(s) 0 [1-9] others (padding) - Transition (10) 0 (01) d (00) x (11) - */ - static const unsigned int next_state[] = - { - /* state x d 0 - */ - /* S_N */ S_N, S_I, S_Z, S_N, - /* S_I */ S_N, S_I, S_I, S_I, - /* S_F */ S_N, S_F, S_F, S_F, - /* S_Z */ S_N, S_F, S_Z, S_Z - }; - - static const int result_type[] = - { - /* state x/x x/d x/0 x/- d/x d/d d/0 d/- - 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */ - - /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, - CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, - /* S_I */ CMP, -1, -1, CMP, 1, LEN, LEN, CMP, - 1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, - /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, - CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, - /* S_Z */ CMP, 1, 1, CMP, -1, CMP, CMP, CMP, - -1, CMP, CMP, CMP - }; - - if (p1 == p2) - return 0; - - c1 = *p1++; - c2 = *p2++; - /* Hint: '0' is a digit too. */ - state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0)); - - while ((diff = c1 - c2) == 0 && c1 != '\0') - { - state = next_state[state]; - c1 = *p1++; - c2 = *p2++; - state |= (c1 == '0') + (ISDIGIT (c1) != 0); - } - - state = result_type[state << 2 | ((c2 == '0') + (ISDIGIT (c2) != 0))]; - - switch (state) - { - case CMP: - return diff; - - case LEN: - while (ISDIGIT (*p1++)) - if (!ISDIGIT (*p2++)) - return 1; - - return ISDIGIT (*p2) ? -1 : diff; - - default: - return state; - } -} -#ifdef weak_alias -weak_alias (__strverscmp, strverscmp) -#endif diff --git a/lib/gl/sys_socket.in.h b/lib/gl/sys_socket.in.h deleted file mode 100644 index d62d8cfc3d..0000000000 --- a/lib/gl/sys_socket.in.h +++ /dev/null @@ -1,636 +0,0 @@ -/* Provide a sys/socket header file for systems lacking it (read: MinGW) - and for systems where it is incomplete. - Copyright (C) 2005-2010 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file is supposed to be used on platforms that lack <sys/socket.h>, - on platforms where <sys/socket.h> cannot be included standalone, and on - platforms where <sys/socket.h> does not provide all necessary definitions. - It is intended to provide definitions and prototypes needed by an - application. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H -/* Special invocation convention: - - On Cygwin 1.5.x we have a sequence of nested includes - <sys/socket.h> -> <cygwin/socket.h> -> <asm/socket.h> -> <cygwin/if.h>, - and the latter includes <sys/socket.h>. In this situation, the functions - are not yet declared, therefore we cannot provide the C++ aliases. */ - -#@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_SYS_SOCKET_H - -#if @HAVE_SYS_SOCKET_H@ - -# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H - -/* On many platforms, <sys/socket.h> assumes prior inclusion of - <sys/types.h>. */ -# include <sys/types.h> - -/* The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ - -# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H - -#endif - -#ifndef _GL_SYS_SOCKET_H -#define _GL_SYS_SOCKET_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -#if !@HAVE_SA_FAMILY_T@ -typedef unsigned short sa_family_t; -#endif - -#if @HAVE_STRUCT_SOCKADDR_STORAGE@ -/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */ -# if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ -# ifndef ss_family -# define ss_family __ss_family -# endif -# endif -#else -# include <alignof.h> -/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on - 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ -# define __ss_aligntype unsigned long int -# define _SS_SIZE 256 -# define _SS_PADSIZE \ - (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ - ? sizeof (sa_family_t) \ - : alignof (__ss_aligntype)) \ - + sizeof (__ss_aligntype))) - -struct sockaddr_storage -{ - sa_family_t ss_family; /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; -}; -#endif - -#if @HAVE_SYS_SOCKET_H@ - -/* A platform that has <sys/socket.h>. */ - -/* For shutdown(). */ -# if !defined SHUT_RD -# define SHUT_RD 0 -# endif -# if !defined SHUT_WR -# define SHUT_WR 1 -# endif -# if !defined SHUT_RDWR -# define SHUT_RDWR 2 -# endif - -#else - -# ifdef __CYGWIN__ -# error "Cygwin does have a sys/socket.h, doesn't it?!?" -# endif - -/* A platform that lacks <sys/socket.h>. - - Currently only MinGW is supported. See the gnulib manual regarding - Windows sockets. MinGW has the header files winsock2.h and - ws2tcpip.h that declare the sys/socket.h definitions we need. Note - that you can influence which definitions you get by setting the - WINVER symbol before including these two files. For example, - getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that - symbol is set indiriectly through WINVER). You can set this by - adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your - code may not run on older Windows releases then. My Windows 2000 - box was not able to run the code, for example. The situation is - slightly confusing because - <http://msdn.microsoft.com/en-us/library/ms738520> - suggests that getaddrinfo should be available on all Windows - releases. */ - - -# if @HAVE_WINSOCK2_H@ -# include <winsock2.h> -# endif -# if @HAVE_WS2TCPIP_H@ -# include <ws2tcpip.h> -# endif - -/* For shutdown(). */ -# if !defined SHUT_RD && defined SD_RECEIVE -# define SHUT_RD SD_RECEIVE -# endif -# if !defined SHUT_WR && defined SD_SEND -# define SHUT_WR SD_SEND -# endif -# if !defined SHUT_RDWR && defined SD_BOTH -# define SHUT_RDWR SD_BOTH -# endif - -# if @HAVE_WINSOCK2_H@ -/* Include headers needed by the emulation code. */ -# include <sys/types.h> -# include <io.h> - -typedef int socklen_t; - -# endif - -#endif - -#if @HAVE_WINSOCK2_H@ - -/* Re-define FD_ISSET to avoid a WSA call while we are not using - network sockets. */ -static inline int -rpl_fd_isset (SOCKET fd, fd_set * set) -{ - u_int i; - if (set == NULL) - return 0; - - for (i = 0; i < set->fd_count; i++) - if (set->fd_array[i] == fd) - return 1; - - return 0; -} - -# undef FD_ISSET -# define FD_ISSET(fd, set) rpl_fd_isset(fd, set) - -#endif - -/* Wrap everything else to use libc file descriptors for sockets. */ - -#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef close -# define close close_used_without_including_unistd_h -# else - _GL_WARN_ON_USE (close, - "close() used without including <unistd.h>"); -# endif -#endif - -#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname gethostname_used_without_including_unistd_h -# else - _GL_WARN_ON_USE (gethostname, - "gethostname() used without including <unistd.h>"); -# endif -#endif - -#if @GNULIB_SOCKET@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef socket -# define socket rpl_socket -# endif -_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol)); -_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol)); -# else -_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); -# endif -_GL_CXXALIASWARN (socket); -#elif @HAVE_WINSOCK2_H@ -# undef socket -# define socket socket_used_without_requesting_gnulib_module_socket -#elif defined GNULIB_POSIXCHECK -# undef socket -# if HAVE_RAW_DECL_SOCKET -_GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " - "use gnulib module socket for portability"); -# endif -#endif - -#if @GNULIB_CONNECT@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef connect -# define connect rpl_connect -# endif -_GL_FUNCDECL_RPL (connect, int, - (int fd, const struct sockaddr *addr, socklen_t addrlen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (connect, int, - (int fd, const struct sockaddr *addr, socklen_t addrlen)); -# else -_GL_CXXALIAS_SYS (connect, int, - (int fd, const struct sockaddr *addr, socklen_t addrlen)); -# endif -_GL_CXXALIASWARN (connect); -#elif @HAVE_WINSOCK2_H@ -# undef connect -# define connect socket_used_without_requesting_gnulib_module_connect -#elif defined GNULIB_POSIXCHECK -# undef connect -# if HAVE_RAW_DECL_CONNECT -_GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " - "use gnulib module connect for portability"); -# endif -#endif - -#if @GNULIB_ACCEPT@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef accept -# define accept rpl_accept -# endif -_GL_FUNCDECL_RPL (accept, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -_GL_CXXALIAS_RPL (accept, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -# else -/* Need to cast, because on Solaris 10 systems, the third parameter is - void *addrlen. */ -_GL_CXXALIAS_SYS_CAST (accept, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -# endif -_GL_CXXALIASWARN (accept); -#elif @HAVE_WINSOCK2_H@ -# undef accept -# define accept accept_used_without_requesting_gnulib_module_accept -#elif defined GNULIB_POSIXCHECK -# undef accept -# if HAVE_RAW_DECL_ACCEPT -_GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " - "use gnulib module accept for portability"); -# endif -#endif - -#if @GNULIB_BIND@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef bind -# define bind rpl_bind -# endif -_GL_FUNCDECL_RPL (bind, int, - (int fd, const struct sockaddr *addr, socklen_t addrlen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (bind, int, - (int fd, const struct sockaddr *addr, socklen_t addrlen)); -# else -_GL_CXXALIAS_SYS (bind, int, - (int fd, const struct sockaddr *addr, socklen_t addrlen)); -# endif -_GL_CXXALIASWARN (bind); -#elif @HAVE_WINSOCK2_H@ -# undef bind -# define bind bind_used_without_requesting_gnulib_module_bind -#elif defined GNULIB_POSIXCHECK -# undef bind -# if HAVE_RAW_DECL_BIND -_GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " - "use gnulib module bind for portability"); -# endif -#endif - -#if @GNULIB_GETPEERNAME@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getpeername -# define getpeername rpl_getpeername -# endif -_GL_FUNCDECL_RPL (getpeername, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (getpeername, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -# else -/* Need to cast, because on Solaris 10 systems, the third parameter is - void *addrlen. */ -_GL_CXXALIAS_SYS_CAST (getpeername, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -# endif -_GL_CXXALIASWARN (getpeername); -#elif @HAVE_WINSOCK2_H@ -# undef getpeername -# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername -#elif defined GNULIB_POSIXCHECK -# undef getpeername -# if HAVE_RAW_DECL_GETPEERNAME -_GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " - "use gnulib module getpeername for portability"); -# endif -#endif - -#if @GNULIB_GETSOCKNAME@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getsockname -# define getsockname rpl_getsockname -# endif -_GL_FUNCDECL_RPL (getsockname, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (getsockname, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -# else -/* Need to cast, because on Solaris 10 systems, the third parameter is - void *addrlen. */ -_GL_CXXALIAS_SYS_CAST (getsockname, int, - (int fd, struct sockaddr *addr, socklen_t *addrlen)); -# endif -_GL_CXXALIASWARN (getsockname); -#elif @HAVE_WINSOCK2_H@ -# undef getsockname -# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname -#elif defined GNULIB_POSIXCHECK -# undef getsockname -# if HAVE_RAW_DECL_GETSOCKNAME -_GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " - "use gnulib module getsockname for portability"); -# endif -#endif - -#if @GNULIB_GETSOCKOPT@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getsockopt -# define getsockopt rpl_getsockopt -# endif -_GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname, - void *optval, socklen_t *optlen) - _GL_ARG_NONNULL ((4, 5))); -_GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname, - void *optval, socklen_t *optlen)); -# else -/* Need to cast, because on Solaris 10 systems, the fifth parameter is - void *optlen. */ -_GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname, - void *optval, socklen_t *optlen)); -# endif -_GL_CXXALIASWARN (getsockopt); -#elif @HAVE_WINSOCK2_H@ -# undef getsockopt -# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt -#elif defined GNULIB_POSIXCHECK -# undef getsockopt -# if HAVE_RAW_DECL_GETSOCKOPT -_GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " - "use gnulib module getsockopt for portability"); -# endif -#endif - -#if @GNULIB_LISTEN@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef listen -# define listen rpl_listen -# endif -_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog)); -_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog)); -# else -_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); -# endif -_GL_CXXALIASWARN (listen); -#elif @HAVE_WINSOCK2_H@ -# undef listen -# define listen listen_used_without_requesting_gnulib_module_listen -#elif defined GNULIB_POSIXCHECK -# undef listen -# if HAVE_RAW_DECL_LISTEN -_GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " - "use gnulib module listen for portability"); -# endif -#endif - -#if @GNULIB_RECV@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef recv -# define recv rpl_recv -# endif -_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); -# else -_GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); -# endif -_GL_CXXALIASWARN (recv); -#elif @HAVE_WINSOCK2_H@ -# undef recv -# define recv recv_used_without_requesting_gnulib_module_recv -#elif defined GNULIB_POSIXCHECK -# undef recv -# if HAVE_RAW_DECL_RECV -_GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " - "use gnulib module recv for portability"); -# endif -#endif - -#if @GNULIB_SEND@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef send -# define send rpl_send -# endif -_GL_FUNCDECL_RPL (send, ssize_t, - (int fd, const void *buf, size_t len, int flags) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (send, ssize_t, - (int fd, const void *buf, size_t len, int flags)); -# else -_GL_CXXALIAS_SYS (send, ssize_t, - (int fd, const void *buf, size_t len, int flags)); -# endif -_GL_CXXALIASWARN (send); -#elif @HAVE_WINSOCK2_H@ -# undef send -# define send send_used_without_requesting_gnulib_module_send -#elif defined GNULIB_POSIXCHECK -# undef send -# if HAVE_RAW_DECL_SEND -_GL_WARN_ON_USE (send, "send is not always POSIX compliant - " - "use gnulib module send for portability"); -# endif -#endif - -#if @GNULIB_RECVFROM@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef recvfrom -# define recvfrom rpl_recvfrom -# endif -_GL_FUNCDECL_RPL (recvfrom, ssize_t, - (int fd, void *buf, size_t len, int flags, - struct sockaddr *from, socklen_t *fromlen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (recvfrom, ssize_t, - (int fd, void *buf, size_t len, int flags, - struct sockaddr *from, socklen_t *fromlen)); -# else -/* Need to cast, because on Solaris 10 systems, the sixth parameter is - void *fromlen. */ -_GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, - (int fd, void *buf, size_t len, int flags, - struct sockaddr *from, socklen_t *fromlen)); -# endif -_GL_CXXALIASWARN (recvfrom); -#elif @HAVE_WINSOCK2_H@ -# undef recvfrom -# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom -#elif defined GNULIB_POSIXCHECK -# undef recvfrom -# if HAVE_RAW_DECL_RECVFROM -_GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " - "use gnulib module recvfrom for portability"); -# endif -#endif - -#if @GNULIB_SENDTO@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sendto -# define sendto rpl_sendto -# endif -_GL_FUNCDECL_RPL (sendto, ssize_t, - (int fd, const void *buf, size_t len, int flags, - const struct sockaddr *to, socklen_t tolen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (sendto, ssize_t, - (int fd, const void *buf, size_t len, int flags, - const struct sockaddr *to, socklen_t tolen)); -# else -_GL_CXXALIAS_SYS (sendto, ssize_t, - (int fd, const void *buf, size_t len, int flags, - const struct sockaddr *to, socklen_t tolen)); -# endif -_GL_CXXALIASWARN (sendto); -#elif @HAVE_WINSOCK2_H@ -# undef sendto -# define sendto sendto_used_without_requesting_gnulib_module_sendto -#elif defined GNULIB_POSIXCHECK -# undef sendto -# if HAVE_RAW_DECL_SENDTO -_GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " - "use gnulib module sendto for portability"); -# endif -#endif - -#if @GNULIB_SETSOCKOPT@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setsockopt -# define setsockopt rpl_setsockopt -# endif -_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname, - const void * optval, socklen_t optlen) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname, - const void * optval, socklen_t optlen)); -# else -_GL_CXXALIAS_SYS (setsockopt, int, (int fd, int level, int optname, - const void * optval, socklen_t optlen)); -# endif -_GL_CXXALIASWARN (setsockopt); -#elif @HAVE_WINSOCK2_H@ -# undef setsockopt -# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt -#elif defined GNULIB_POSIXCHECK -# undef setsockopt -# if HAVE_RAW_DECL_SETSOCKOPT -_GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " - "use gnulib module setsockopt for portability"); -# endif -#endif - -#if @GNULIB_SHUTDOWN@ -# if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef shutdown -# define shutdown rpl_shutdown -# endif -_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how)); -_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how)); -# else -_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); -# endif -_GL_CXXALIASWARN (shutdown); -#elif @HAVE_WINSOCK2_H@ -# undef shutdown -# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown -#elif defined GNULIB_POSIXCHECK -# undef shutdown -# if HAVE_RAW_DECL_SHUTDOWN -_GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " - "use gnulib module shutdown for portability"); -# endif -#endif - -#if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else - _GL_WARN_ON_USE (select, - "select() used without including <sys/select.h>"); -# endif -#endif - -#if @GNULIB_ACCEPT4@ -/* Accept a connection on a socket, with specific opening flags. - The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - See also the Linux man page at - <http://www.kernel.org/doc/man-pages/online/pages/man2/accept4.2.html>. */ -# if @HAVE_ACCEPT4@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define accept4 rpl_accept4 -# endif -_GL_FUNCDECL_RPL (accept4, int, - (int sockfd, struct sockaddr *addr, socklen_t *addrlen, - int flags)); -_GL_CXXALIAS_RPL (accept4, int, - (int sockfd, struct sockaddr *addr, socklen_t *addrlen, - int flags)); -# else -_GL_FUNCDECL_SYS (accept4, int, - (int sockfd, struct sockaddr *addr, socklen_t *addrlen, - int flags)); -_GL_CXXALIAS_SYS (accept4, int, - (int sockfd, struct sockaddr *addr, socklen_t *addrlen, - int flags)); -# endif -_GL_CXXALIASWARN (accept4); -#elif defined GNULIB_POSIXCHECK -# undef accept4 -# if HAVE_RAW_DECL_ACCEPT4 -_GL_WARN_ON_USE (accept4, "accept4 is unportable - " - "use gnulib module accept4 for portability"); -# endif -#endif - -#endif /* _GL_SYS_SOCKET_H */ -#endif /* _GL_SYS_SOCKET_H */ -#endif diff --git a/lib/gl/sys_stat.in.h b/lib/gl/sys_stat.in.h deleted file mode 100644 index 4203a5899f..0000000000 --- a/lib/gl/sys_stat.in.h +++ /dev/null @@ -1,642 +0,0 @@ -/* Provide a more complete sys/stat header file. - Copyright (C) 2005-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ - -/* This file is supposed to be used on platforms where <sys/stat.h> is - incomplete. It is intended to provide definitions and prototypes - needed by an application. Start with what the system provides. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_sys_stat_h -/* Special invocation convention. */ - -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_SYS_STAT_H - -/* Get nlink_t. */ -#include <sys/types.h> - -/* Get struct timespec. */ -#include <time.h> - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#ifndef _GL_SYS_STAT_H -#define _GL_SYS_STAT_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Before doing "#define mkdir rpl_mkdir" below, we need to include all - headers that may declare mkdir(). */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include <io.h> /* mingw32, mingw64 */ -# include <direct.h> /* mingw64 */ -#endif - -#ifndef S_IFMT -# define S_IFMT 0170000 -#endif - -#if STAT_MACROS_BROKEN -# undef S_ISBLK -# undef S_ISCHR -# undef S_ISDIR -# undef S_ISFIFO -# undef S_ISLNK -# undef S_ISNAM -# undef S_ISMPB -# undef S_ISMPC -# undef S_ISNWK -# undef S_ISREG -# undef S_ISSOCK -#endif - -#ifndef S_ISBLK -# ifdef S_IFBLK -# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -# else -# define S_ISBLK(m) 0 -# endif -#endif - -#ifndef S_ISCHR -# ifdef S_IFCHR -# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -# else -# define S_ISCHR(m) 0 -# endif -#endif - -#ifndef S_ISDIR -# ifdef S_IFDIR -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -# else -# define S_ISDIR(m) 0 -# endif -#endif - -#ifndef S_ISDOOR /* Solaris 2.5 and up */ -# define S_ISDOOR(m) 0 -#endif - -#ifndef S_ISFIFO -# ifdef S_IFIFO -# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -# else -# define S_ISFIFO(m) 0 -# endif -#endif - -#ifndef S_ISLNK -# ifdef S_IFLNK -# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -# else -# define S_ISLNK(m) 0 -# endif -#endif - -#ifndef S_ISMPB /* V7 */ -# ifdef S_IFMPB -# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) -# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) -# else -# define S_ISMPB(m) 0 -# define S_ISMPC(m) 0 -# endif -#endif - -#ifndef S_ISNAM /* Xenix */ -# ifdef S_IFNAM -# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) -# else -# define S_ISNAM(m) 0 -# endif -#endif - -#ifndef S_ISNWK /* HP/UX */ -# ifdef S_IFNWK -# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) -# else -# define S_ISNWK(m) 0 -# endif -#endif - -#ifndef S_ISPORT /* Solaris 10 and up */ -# define S_ISPORT(m) 0 -#endif - -#ifndef S_ISREG -# ifdef S_IFREG -# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -# else -# define S_ISREG(m) 0 -# endif -#endif - -#ifndef S_ISSOCK -# ifdef S_IFSOCK -# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -# else -# define S_ISSOCK(m) 0 -# endif -#endif - - -#ifndef S_TYPEISMQ -# define S_TYPEISMQ(p) 0 -#endif - -#ifndef S_TYPEISTMO -# define S_TYPEISTMO(p) 0 -#endif - - -#ifndef S_TYPEISSEM -# ifdef S_INSEM -# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) -# else -# define S_TYPEISSEM(p) 0 -# endif -#endif - -#ifndef S_TYPEISSHM -# ifdef S_INSHD -# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) -# else -# define S_TYPEISSHM(p) 0 -# endif -#endif - -/* high performance ("contiguous data") */ -#ifndef S_ISCTG -# define S_ISCTG(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with data */ -#ifndef S_ISOFD -# define S_ISOFD(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with no data */ -#ifndef S_ISOFL -# define S_ISOFL(p) 0 -#endif - -/* 4.4BSD whiteout */ -#ifndef S_ISWHT -# define S_ISWHT(m) 0 -#endif - -/* If any of the following are undefined, - define them to their de facto standard values. */ -#if !S_ISUID -# define S_ISUID 04000 -#endif -#if !S_ISGID -# define S_ISGID 02000 -#endif - -/* S_ISVTX is a common extension to POSIX. */ -#ifndef S_ISVTX -# define S_ISVTX 01000 -#endif - -#if !S_IRUSR && S_IREAD -# define S_IRUSR S_IREAD -#endif -#if !S_IRUSR -# define S_IRUSR 00400 -#endif -#if !S_IRGRP -# define S_IRGRP (S_IRUSR >> 3) -#endif -#if !S_IROTH -# define S_IROTH (S_IRUSR >> 6) -#endif - -#if !S_IWUSR && S_IWRITE -# define S_IWUSR S_IWRITE -#endif -#if !S_IWUSR -# define S_IWUSR 00200 -#endif -#if !S_IWGRP -# define S_IWGRP (S_IWUSR >> 3) -#endif -#if !S_IWOTH -# define S_IWOTH (S_IWUSR >> 6) -#endif - -#if !S_IXUSR && S_IEXEC -# define S_IXUSR S_IEXEC -#endif -#if !S_IXUSR -# define S_IXUSR 00100 -#endif -#if !S_IXGRP -# define S_IXGRP (S_IXUSR >> 3) -#endif -#if !S_IXOTH -# define S_IXOTH (S_IXUSR >> 6) -#endif - -#if !S_IRWXU -# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) -#endif -#if !S_IRWXG -# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) -#endif -#if !S_IRWXO -# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) -#endif - -/* S_IXUGO is a common extension to POSIX. */ -#if !S_IXUGO -# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) -#endif - -#ifndef S_IRWXUGO -# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) -#endif - -/* Macros for futimens and utimensat. */ -#ifndef UTIME_NOW -# define UTIME_NOW (-1) -# define UTIME_OMIT (-2) -#endif - - -#if @GNULIB_FCHMODAT@ -# if !@HAVE_FCHMODAT@ -_GL_FUNCDECL_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag)); -_GL_CXXALIASWARN (fchmodat); -#elif defined GNULIB_POSIXCHECK -# undef fchmodat -# if HAVE_RAW_DECL_FCHMODAT -_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @REPLACE_FSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fstat rpl_fstat -# endif -_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); -#else -_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); -#endif -_GL_CXXALIASWARN (fstat); - - -#if @GNULIB_FSTATAT@ -# if @REPLACE_FSTATAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fstatat -# define fstatat rpl_fstatat -# endif -_GL_FUNCDECL_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# else -# if !@HAVE_FSTATAT@ -_GL_FUNCDECL_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# endif -_GL_CXXALIASWARN (fstatat); -#elif defined GNULIB_POSIXCHECK -# undef fstatat -# if HAVE_RAW_DECL_FSTATAT -_GL_WARN_ON_USE (fstatat, "fstatat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FUTIMENS@ -# if @REPLACE_FUTIMENS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef futimens -# define futimens rpl_futimens -# endif -_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); -_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); -# else -# if !@HAVE_FUTIMENS@ -_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -_GL_CXXALIASWARN (futimens); -#elif defined GNULIB_POSIXCHECK -# undef futimens -# if HAVE_RAW_DECL_FUTIMENS -_GL_WARN_ON_USE (futimens, "futimens is not portable - " - "use gnulib module futimens for portability"); -# endif -#endif - - -#if @GNULIB_LCHMOD@ -/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME - denotes a symbolic link. */ -# if !@HAVE_LCHMOD@ -/* The lchmod replacement follows symbolic links. Callers should take - this into account; lchmod should be applied only to arguments that - are known to not be symbolic links. On hosts that lack lchmod, - this can lead to race conditions between the check and the - invocation of lchmod, but we know of no workarounds that are - reliable in general. You might try requesting support for lchmod - from your operating system supplier. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lchmod chmod -# endif -/* Need to cast, because on mingw, the second parameter of chmod is - int mode. */ -_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, - (const char *filename, mode_t mode)); -# else -# if 0 /* assume already declared */ -_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); -# endif -# if @HAVE_LCHMOD@ -_GL_CXXALIASWARN (lchmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lchmod -# if HAVE_RAW_DECL_LCHMOD -_GL_WARN_ON_USE (lchmod, "lchmod is unportable - " - "use gnulib module lchmod for portability"); -# endif -#endif - - -#if @GNULIB_LSTAT@ -# if ! @HAVE_LSTAT@ -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); -# elif @REPLACE_LSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat -# endif -_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); -# endif -# if @HAVE_LSTAT@ -_GL_CXXALIASWARN (lstat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if @REPLACE_MKDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif -_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else -/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. - Additionally, it declares _mkdir (and depending on compile flags, an - alias mkdir), only in the nonstandard includes <direct.h> and <io.h>, - which are included above. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -static inline int -rpl_mkdir (char const *name, mode_t mode) -{ - return _mkdir (name); -} - -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkdir rpl_mkdir -# endif -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -# else -_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); -# endif -#endif -_GL_CXXALIASWARN (mkdir); - - -#if @GNULIB_MKDIRAT@ -# if !@HAVE_MKDIRAT@ -_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkdirat); -#elif defined GNULIB_POSIXCHECK -# undef mkdirat -# if HAVE_RAW_DECL_MKDIRAT -_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFO@ -# if @REPLACE_MKFIFO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkfifo -# define mkfifo rpl_mkfifo -# endif -_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); -# else -# if !@HAVE_MKFIFO@ -_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); -# endif -_GL_CXXALIASWARN (mkfifo); -#elif defined GNULIB_POSIXCHECK -# undef mkfifo -# if HAVE_RAW_DECL_MKFIFO -_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " - "use gnulib module mkfifo for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFOAT@ -# if !@HAVE_MKFIFOAT@ -_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkfifoat); -#elif defined GNULIB_POSIXCHECK -# undef mkfifoat -# if HAVE_RAW_DECL_MKFIFOAT -_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_MKNOD@ -# if @REPLACE_MKNOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mknod -# define mknod rpl_mknod -# endif -_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# else -# if !@HAVE_MKNOD@ -_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# endif -_GL_CXXALIASWARN (mknod); -#elif defined GNULIB_POSIXCHECK -# undef mknod -# if HAVE_RAW_DECL_MKNOD -_GL_WARN_ON_USE (mknod, "mknod is not portable - " - "use gnulib module mknod for portability"); -# endif -#endif - - -#if @GNULIB_MKNODAT@ -# if !@HAVE_MKNODAT@ -_GL_FUNCDECL_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev)); -_GL_CXXALIASWARN (mknodat); -#elif defined GNULIB_POSIXCHECK -# undef mknodat -# if HAVE_RAW_DECL_MKNODAT -_GL_WARN_ON_USE (mknodat, "mknodat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_STAT@ -# if @REPLACE_STAT@ -/* We can't use the object-like #define stat rpl_stat, because of - struct stat. This means that rpl_stat will not be used if the user - does (stat)(a,b). Oh well. */ -# undef stat -# ifdef _LARGE_FILES - /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, - so we have to replace stat64() instead of stat(). */ -# define stat stat64 -# undef stat64 -# define stat64(name, st) rpl_stat (name, st) -# else /* !_LARGE_FILES */ -# define stat(name, st) rpl_stat (name, st) -# endif /* !_LARGE_FILES */ -_GL_EXTERN_C int stat (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef stat -# if HAVE_RAW_DECL_STAT -_GL_WARN_ON_USE (stat, "stat is unportable - " - "use gnulib module stat for portability"); -# endif -#endif - - -#if @GNULIB_UTIMENSAT@ -# if @REPLACE_UTIMENSAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef utimensat -# define utimensat rpl_utimensat -# endif -_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# else -# if !@HAVE_UTIMENSAT@ -_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# endif -_GL_CXXALIASWARN (utimensat); -#elif defined GNULIB_POSIXCHECK -# undef utimensat -# if HAVE_RAW_DECL_UTIMENSAT -_GL_WARN_ON_USE (utimensat, "utimensat is not portable - " - "use gnulib module utimensat for portability"); -# endif -#endif - - -#endif /* _GL_SYS_STAT_H */ -#endif /* _GL_SYS_STAT_H */ -#endif diff --git a/lib/gl/tests/Makefile.am b/lib/gl/tests/Makefile.am deleted file mode 100644 index 4be0a1f091..0000000000 --- a/lib/gl/tests/Makefile.am +++ /dev/null @@ -1,405 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2010 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. - -AUTOMAKE_OPTIONS = 1.5 foreign - -SUBDIRS = . -TESTS = -XFAIL_TESTS = -TESTS_ENVIRONMENT = -noinst_PROGRAMS = -check_PROGRAMS = -noinst_HEADERS = -noinst_LIBRARIES = -check_LIBRARIES = libtests.a -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = - -AM_CPPFLAGS = \ - -D@lgltests_WITNESS@=1 \ - -I. -I$(srcdir) \ - -I../.. -I$(srcdir)/../.. \ - -I../../gl -I$(srcdir)/../../gl - -LDADD = libtests.a ../../gl/liblgnu.la libtests.a $(LIBTESTS_LIBDEPS) - -libtests_a_SOURCES = -libtests_a_LIBADD = $(lgltests_LIBOBJS) -libtests_a_DEPENDENCIES = $(lgltests_LIBOBJS) -EXTRA_libtests_a_SOURCES = -AM_LIBTOOLFLAGS = --preserve-dup-deps - -TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' - -## begin gnulib module alloca-opt-tests - -TESTS += test-alloca-opt -check_PROGRAMS += test-alloca-opt - -EXTRA_DIST += test-alloca-opt.c - -## end gnulib module alloca-opt-tests - -## begin gnulib module 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. - -BUILT_SOURCES += arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t - -ARG_NONNULL_H=arg-nonnull.h - -EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h - -## end gnulib module arg-nonnull - -## begin gnulib module binary-io - -libtests_a_SOURCES += binary-io.h - -## end gnulib module binary-io - -## begin gnulib module binary-io-tests - -TESTS += test-binary-io.sh -check_PROGRAMS += test-binary-io - -EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h - -## end gnulib module binary-io-tests - -## begin gnulib module byteswap-tests - -TESTS += test-byteswap -check_PROGRAMS += test-byteswap -EXTRA_DIST += test-byteswap.c macros.h - -## end gnulib module byteswap-tests - -## begin gnulib module 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. - -BUILT_SOURCES += c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += c++defs.h c++defs.h-t - -CXXDEFS_H=c++defs.h - -EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h - -## end gnulib module c++defs - -## begin gnulib module c-ctype-tests - -TESTS += test-c-ctype -check_PROGRAMS += test-c-ctype - -EXTRA_DIST += test-c-ctype.c macros.h - -## end gnulib module c-ctype-tests - -## begin gnulib module errno-tests - -TESTS += test-errno -check_PROGRAMS += test-errno - -EXTRA_DIST += test-errno.c - -## end gnulib module errno-tests - -## begin gnulib module fseeko-tests - -TESTS += test-fseeko.sh test-fseeko2.sh -check_PROGRAMS += test-fseeko -EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h - -## end gnulib module fseeko-tests - -## begin gnulib module ftello-tests - -TESTS += test-ftello.sh test-ftello2.sh test-ftello3 -check_PROGRAMS += test-ftello test-ftello3 -MOSTLYCLEANFILES += t-ftello3.tmp -EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c signature.h macros.h - -## end gnulib module ftello-tests - -## begin gnulib module func-tests - -TESTS += test-func -check_PROGRAMS += test-func -EXTRA_DIST += test-func.c macros.h - -## end gnulib module func-tests - -## begin gnulib module getpagesize - - -EXTRA_DIST += getpagesize.c - -EXTRA_libtests_a_SOURCES += getpagesize.c - -## end gnulib module getpagesize - -## begin gnulib module intprops - - -EXTRA_DIST += intprops.h - -## end gnulib module intprops - -## begin gnulib module memchr-tests - -TESTS += test-memchr -check_PROGRAMS += test-memchr -EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h - -## end gnulib module memchr-tests - -## begin gnulib module netdb-tests - -TESTS += test-netdb -check_PROGRAMS += test-netdb -EXTRA_DIST += test-netdb.c - -## end gnulib module netdb-tests - -## begin gnulib module read-file-tests - -TESTS += test-read-file -check_PROGRAMS += test-read-file -EXTRA_DIST += test-read-file.c - -## end gnulib module read-file-tests - -## begin gnulib module snprintf-tests - -TESTS += test-snprintf -check_PROGRAMS += test-snprintf - -EXTRA_DIST += test-snprintf.c signature.h macros.h - -## end gnulib module snprintf-tests - -## begin gnulib module sockets-tests - -TESTS += test-sockets -check_PROGRAMS += test-sockets -test_sockets_LDADD = $(LDADD) @LIBSOCKET@ -EXTRA_DIST += test-sockets.c - -## end gnulib module sockets-tests - -## begin gnulib module stdbool-tests - -TESTS += test-stdbool -check_PROGRAMS += test-stdbool -EXTRA_DIST += test-stdbool.c - -## end gnulib module stdbool-tests - -## begin gnulib module stddef-tests - -TESTS += test-stddef -check_PROGRAMS += test-stddef -EXTRA_DIST += test-stddef.c - -## end gnulib module stddef-tests - -## begin gnulib module stdint-tests - -TESTS += test-stdint -check_PROGRAMS += test-stdint -EXTRA_DIST += test-stdint.c - -## end gnulib module stdint-tests - -## begin gnulib module stdio-tests - -TESTS += test-stdio -check_PROGRAMS += test-stdio -EXTRA_DIST += test-stdio.c - -## end gnulib module stdio-tests - -## begin gnulib module stdlib-tests - -TESTS += test-stdlib -check_PROGRAMS += test-stdlib -EXTRA_DIST += test-stdlib.c test-sys_wait.h - -## end gnulib module stdlib-tests - -## begin gnulib module string-tests - -TESTS += test-string -check_PROGRAMS += test-string -EXTRA_DIST += test-string.c - -## end gnulib module string-tests - -## begin gnulib module strings-tests - -TESTS += test-strings -check_PROGRAMS += test-strings -EXTRA_DIST += test-strings.c - -## end gnulib module strings-tests - -## begin gnulib module strverscmp-tests - -TESTS += test-strverscmp -check_PROGRAMS += test-strverscmp -EXTRA_DIST += test-strverscmp.c signature.h macros.h - -## end gnulib module strverscmp-tests - -## begin gnulib module sys_socket-tests - -TESTS += test-sys_socket -check_PROGRAMS += test-sys_socket -EXTRA_DIST += test-sys_socket.c - -## end gnulib module sys_socket-tests - -## begin gnulib module sys_stat-tests - -TESTS += test-sys_stat -check_PROGRAMS += test-sys_stat -EXTRA_DIST += test-sys_stat.c - -## end gnulib module sys_stat-tests - -## begin gnulib module time-tests - -TESTS += test-time -check_PROGRAMS += test-time -EXTRA_DIST += test-time.c - -## end gnulib module time-tests - -## begin gnulib module unistd-tests - -TESTS += test-unistd -check_PROGRAMS += test-unistd -EXTRA_DIST += test-unistd.c - -## end gnulib module unistd-tests - -## begin gnulib module vasnprintf-tests - -TESTS += test-vasnprintf -check_PROGRAMS += test-vasnprintf - -EXTRA_DIST += test-vasnprintf.c macros.h - -## end gnulib module vasnprintf-tests - -## begin gnulib module vasprintf-tests - -TESTS += test-vasprintf -check_PROGRAMS += test-vasprintf - -EXTRA_DIST += test-vasprintf.c signature.h macros.h - -## end gnulib module vasprintf-tests - -## begin gnulib module verify-tests - -TESTS_ENVIRONMENT += MAKE='$(MAKE)' -TESTS += test-verify test-verify.sh -check_PROGRAMS += test-verify -EXTRA_DIST += test-verify.c test-verify.sh init.sh - -## end gnulib module verify-tests - -## begin gnulib module vsnprintf-tests - -TESTS += test-vsnprintf -check_PROGRAMS += test-vsnprintf - -EXTRA_DIST += test-vsnprintf.c signature.h macros.h - -## end gnulib module vsnprintf-tests - -## begin gnulib module 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/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h - -## end gnulib module warn-on-use - -## begin gnulib module wchar-tests - -TESTS += test-wchar -check_PROGRAMS += test-wchar -EXTRA_DIST += test-wchar.c - -## end gnulib module wchar-tests - -## begin gnulib module dummy - -libtests_a_SOURCES += dummy.c - -## end gnulib module dummy - -# Clean up after Solaris cc. -clean-local: - rm -rf SunWS_cache - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/lib/gl/tests/binary-io.h b/lib/gl/tests/binary-io.h deleted file mode 100644 index 5451fd48f4..0000000000 --- a/lib/gl/tests/binary-io.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008, 2009, 2010 Free Software Foundation, - Inc. - - This 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 _BINARY_H -#define _BINARY_H - -/* For systems that distinguish between text and binary I/O. - O_BINARY is usually declared in <fcntl.h>. */ -#include <fcntl.h> - -/* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...', - so we include it here first. */ -#include <stdio.h> - -#if !defined O_BINARY && defined _O_BINARY - /* For MSC-compatible compilers. */ -# define O_BINARY _O_BINARY -# define O_TEXT _O_TEXT -#endif -#if defined __BEOS__ || defined __HAIKU__ - /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ -# undef O_BINARY -# undef O_TEXT -#endif - -/* SET_BINARY (fd); - changes the file descriptor fd to perform binary I/O. */ -#if O_BINARY -# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ -# include <io.h> /* declares setmode() */ -# else -# define setmode _setmode -# undef fileno -# define fileno _fileno -# endif -# ifdef __DJGPP__ -# include <unistd.h> /* declares isatty() */ - /* Avoid putting stdin/stdout in binary mode if it is connected to - the console, because that would make it impossible for the user - to interrupt the program through Ctrl-C or Ctrl-Break. */ -# define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)) -# else -# define SET_BINARY(fd) ((void) setmode (fd, O_BINARY)) -# endif -#else - /* On reasonable systems, binary I/O is the default. */ -# undef O_BINARY -# define O_BINARY 0 -# define SET_BINARY(fd) /* do nothing */ ((void) 0) -#endif - -#endif /* _BINARY_H */ diff --git a/lib/gl/tests/dummy.c b/lib/gl/tests/dummy.c deleted file mode 100644 index 0f9a277962..0000000000 --- a/lib/gl/tests/dummy.c +++ /dev/null @@ -1,42 +0,0 @@ -/* A dummy file, to prevent empty libraries from breaking builds. - Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create - libraries without any object files. You might get an error like: - - > ar cru .libs/libgl.a - > ar: no archive members specified - - Compiling this file, and adding its object file to the library, will - prevent the library from being empty. */ - -/* Some systems, such as Solaris with cc 5.0, refuse to work with libraries - that don't export any symbol. You might get an error like: - - > cc ... libgnu.a - > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a - - Compiling this file, and adding its object file to the library, will - prevent the library from exporting no symbols. */ - -#ifdef __sun -/* This declaration ensures that the library will export at least 1 symbol. */ -int gl_dummy_symbol; -#else -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; -#endif diff --git a/lib/gl/tests/getpagesize.c b/lib/gl/tests/getpagesize.c deleted file mode 100644 index cc2526870f..0000000000 --- a/lib/gl/tests/getpagesize.c +++ /dev/null @@ -1,39 +0,0 @@ -/* getpagesize emulation for systems where it cannot be done in a C macro. - - Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible and Martin Lambers. */ - -#include <config.h> - -/* Specification. */ -#include <unistd.h> - -/* This implementation is only for native Win32 systems. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -# define WIN32_LEAN_AND_MEAN -# include <windows.h> - -int -getpagesize (void) -{ - SYSTEM_INFO system_info; - GetSystemInfo (&system_info); - return system_info.dwPageSize; -} - -#endif diff --git a/lib/gl/tests/init.sh b/lib/gl/tests/init.sh deleted file mode 100644 index 14f3b198d4..0000000000 --- a/lib/gl/tests/init.sh +++ /dev/null @@ -1,471 +0,0 @@ -# source this file; set up for tests - -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. - -# This 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/>. - -# Using this file in a test -# ========================= -# -# The typical skeleton of a test looks like this: -# -# #!/bin/sh -# . "${srcdir=.}/init.sh"; path_prepend_ . -# Execute some commands. -# Note that these commands are executed in a subdirectory, therefore you -# need to prepend "../" to relative filenames in the build directory. -# Note that the "path_prepend_ ." is useful only if the body of your -# test invokes programs residing in the initial directory. -# For example, if the programs you want to test are in src/, and this test -# script is named tests/test-1, then you would use "path_prepend_ ../src", -# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" -# to all tests via automake's TESTS_ENVIRONMENT. -# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure. -# Use the skip_ and fail_ functions to print a diagnostic and then exit -# with the corresponding exit code. -# Exit $? - -# Executing a test that uses this file -# ==================================== -# -# Running a single test: -# $ make check TESTS=test-foo.sh -# -# Running a single test, with verbose output: -# $ make check TESTS=test-foo.sh VERBOSE=yes -# -# Running a single test, with single-stepping: -# 1. Go into a sub-shell: -# $ bash -# 2. Set relevant environment variables from TESTS_ENVIRONMENT in the -# Makefile: -# $ export srcdir=../../tests # this is an example -# 3. Execute the commands from the test, copy&pasting them one by one: -# $ . "$srcdir/init.sh"; path_prepend_ . -# ... -# 4. Finally -# $ exit - -ME_=`expr "./$0" : '.*/\(.*\)$'` - -# We use a trap below for cleanup. This requires us to go through -# hoops to get the right exit status transported through the handler. -# So use `Exit STATUS' instead of `exit STATUS' inside of the tests. -# Turn off errexit here so that we don't trip the bug with OSF1/Tru64 -# sh inside this function. -Exit () { set +e; (exit $1); exit $1; } - -# Print warnings (e.g., about skipped and failed tests) to this file number. -# Override by defining to say, 9, in init.cfg, and putting say, -# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition -# of TESTS_ENVIRONMENT in your tests/Makefile.am file. -# This is useful when using automake's parallel tests mode, to print -# the reason for skip/failure to console, rather than to the .log files. -: ${stderr_fileno_=2} - -warn_() { echo "$@" 1>&$stderr_fileno_; } -fail_() { warn_ "$ME_: failed test: $@"; Exit 1; } -skip_() { warn_ "$ME_: skipped test: $@"; Exit 77; } -framework_failure_() { warn_ "$ME_: set-up failure: $@"; Exit 99; } - -# Sanitize this shell to POSIX mode, if possible. -DUALCASE=1; export DUALCASE -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; - esac -fi - -# We require $(...) support unconditionally. -# We require a few additional shell features only when $EXEEXT is nonempty, -# in order to support automatic $EXEEXT emulation: -# - hyphen-containing alias names -# - we prefer to use ${var#...} substitution, rather than having -# to work around lack of support for that feature. -# The following code attempts to find a shell with support for these features. -# If the current shell passes the test, we're done. Otherwise, test other -# shells until we find one that passes. If one is found, re-exec it. -# If no acceptable shell is found, skip the current test. -# -# The "...set -x; P=1 true 2>err..." test is to disqualify any shell that -# emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do. -# -# Use "9" to indicate success (rather than 0), in case some shell acts -# like Solaris 10's /bin/sh but exits successfully instead of with status 2. - -# Eval this code in a subshell to determine a shell's suitability. -# 10 - passes all tests; ok to use -# 9 - ok, but enabling "set -x" corrupts application stderr; prefer higher score -# ? - not ok -gl_shell_test_script_=' -test $(echo y) = y || exit 1 -score_=10 -if test "$VERBOSE" = yes; then - test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9 -fi -test -z "$EXEEXT" && exit $score_ -shopt -s expand_aliases -alias a-b="echo zoo" -v=abx - test ${v%x} = ab \ - && test ${v#a} = bx \ - && test $(a-b) = zoo \ - && exit $score_ -' - -if test "x$1" = "x--no-reexec"; then - shift -else - # Assume a working shell. Export to subshells (setup_ needs this). - gl_set_x_corrupts_stderr_=false - export gl_set_x_corrupts_stderr_ - - # Record the first marginally acceptable shell. - marginal_= - - # Search for a shell that meets our requirements. - for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \ - /bin/sh bash dash zsh pdksh fail - do - test "$re_shell_" = no_shell && continue - - # If we've made it all the way to the sentinel, "fail" without - # finding even a marginal shell, skip this test. - if test "$re_shell_" = fail; then - test -z "$marginal_" && skip_ failed to find an adequate shell - re_shell_=$marginal_ - break - fi - - # When testing the current shell, simply "eval" the test code. - # Otherwise, run it via $re_shell_ -c ... - if test "$re_shell_" = __current__; then - # 'eval'ing this code makes Solaris 10's /bin/sh exit with - # $? set to 2. It does not evaluate any of the code after the - # "unexpected" first `('. Thus, we must run it in a subshell. - ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1 - else - "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null - fi - - st_=$? - - # $re_shell_ works just fine. Use it. - test $st_ = 10 && break - - # If this is our first marginally acceptable shell, remember it. - if test "$st_:$marginal_" = 9: ; then - marginal_="$re_shell_" - gl_set_x_corrupts_stderr_=true - fi - done - - if test "$re_shell_" != __current__; then - # Found a usable shell. Preserve -v and -x. - case $- in - *v*x* | *x*v*) opts_=-vx ;; - *v*) opts_=-v ;; - *x*) opts_=-x ;; - *) opts_= ;; - esac - exec "$re_shell_" $opts_ "$0" --no-reexec "$@" - echo "$ME_: exec failed" 1>&2 - exit 127 - fi -fi - -test -n "$EXEEXT" && shopt -s expand_aliases - -# Enable glibc's malloc-perturbing option. -# This is cheap and useful for exposing code that depends on the fact that -# malloc-related functions often return memory that is mostly zeroed. -# If you have the time and cycles, use valgrind to do an even better job. -: ${MALLOC_PERTURB_=87} -export MALLOC_PERTURB_ - -# This is a stub function that is run upon trap (upon regular exit and -# interrupt). Override it with a per-test function, e.g., to unmount -# a partition, or to undo any other global state changes. -cleanup_() { :; } - -if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then - compare() { diff -u "$@"; } -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then - compare() { cmp -s "$@"; } -else - compare() { cmp "$@"; } -fi - -# An arbitrary prefix to help distinguish test directories. -testdir_prefix_() { printf gt; } - -# Run the user-overridable cleanup_ function, remove the temporary -# directory and exit with the incoming value of $?. -remove_tmp_() -{ - __st=$? - cleanup_ - # cd out of the directory we're about to remove - cd "$initial_cwd_" || cd / || cd /tmp - chmod -R u+rwx "$test_dir_" - # If removal fails and exit status was to be 0, then change it to 1. - rm -rf "$test_dir_" || { test $__st = 0 && __st=1; } - exit $__st -} - -# Given a directory name, DIR, if every entry in it that matches *.exe -# contains only the specified bytes (see the case stmt below), then print -# a space-separated list of those names and return 0. Otherwise, don't -# print anything and return 1. Naming constraints apply also to DIR. -find_exe_basenames_() -{ - feb_dir_=$1 - feb_fail_=0 - feb_result_= - feb_sp_= - for feb_file_ in $feb_dir_/*.exe; do - # If there was no *.exe file, or there existed a file named "*.exe" that - # was deleted between the above glob expansion and the existence test - # below, just skip it. - test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \ - && continue - case $feb_file_ in - *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;; - *) # Remove leading file name components as well as the .exe suffix. - feb_file_=${feb_file_##*/} - feb_file_=${feb_file_%.exe} - feb_result_="$feb_result_$feb_sp_$feb_file_";; - esac - feb_sp_=' ' - done - test $feb_fail_ = 0 && printf %s "$feb_result_" - return $feb_fail_ -} - -# Consider the files in directory, $1. -# For each file name of the form PROG.exe, create an alias named -# PROG that simply invokes PROG.exe, then return 0. If any selected -# file name or the directory name, $1, contains an unexpected character, -# define no alias and return 1. -create_exe_shims_() -{ - case $EXEEXT in - '') return 0 ;; - .exe) ;; - *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;; - esac - - base_names_=`find_exe_basenames_ $1` \ - || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 1; } - - if test -n "$base_names_"; then - for base_ in $base_names_; do - alias "$base_"="$base_$EXEEXT" - done - fi - - return 0 -} - -# Use this function to prepend to PATH an absolute name for each -# specified, possibly-$initial_cwd_-relative, directory. -path_prepend_() -{ - while test $# != 0; do - path_dir_=$1 - case $path_dir_ in - '') fail_ "invalid path dir: '$1'";; - /*) abs_path_dir_=$path_dir_;; - *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \ - || fail_ "invalid path dir: $path_dir_";; - esac - case $abs_path_dir_ in - *:*) fail_ "invalid path dir: '$abs_path_dir_'";; - esac - PATH="$abs_path_dir_:$PATH" - - # Create an alias, FOO, for each FOO.exe in this directory. - create_exe_shims_ "$abs_path_dir_" \ - || fail_ "something failed (above): $abs_path_dir_" - shift - done - export PATH -} - -setup_() -{ - if test "$VERBOSE" = yes; then - # Test whether set -x may cause the selected shell to corrupt an - # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh - # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5. - # If enabling verbose output this way would cause trouble, simply - # issue a warning and refrain. - if $gl_set_x_corrupts_stderr_; then - warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr" - else - set -x - fi - fi - - initial_cwd_=$PWD - - pfx_=`testdir_prefix_` - test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ - || fail_ "failed to create temporary directory in $initial_cwd_" - cd "$test_dir_" - - # As autoconf-generated configure scripts do, ensure that IFS - # is defined initially, so that saving and restoring $IFS works. - gl_init_sh_nl_=' -' - IFS=" "" $gl_init_sh_nl_" - - # This trap statement, along with a trap on 0 below, ensure that the - # temporary directory, $test_dir_, is removed upon exit as well as - # upon receipt of any of the listed signals. - for sig_ in 1 2 3 13 15; do - eval "trap 'Exit $(expr $sig_ + 128)' $sig_" - done -} - -# Create a temporary directory, much like mktemp -d does. -# Written by Jim Meyering. -# -# Usage: mktempd_ /tmp phoey.XXXXXXXXXX -# -# First, try to use the mktemp program. -# Failing that, we'll roll our own mktemp-like function: -# - try to get random bytes from /dev/urandom -# - failing that, generate output from a combination of quickly-varying -# sources and gzip. Ignore non-varying gzip header, and extract -# "random" bits from there. -# - given those bits, map to file-name bytes using tr, and try to create -# the desired directory. -# - make only $MAX_TRIES_ attempts - -# Helper function. Print $N pseudo-random bytes from a-zA-Z0-9. -rand_bytes_() -{ - n_=$1 - - # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first? - # But if they have openssl, they probably have mktemp, too. - - chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - dev_rand_=/dev/urandom - if test -r "$dev_rand_"; then - # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194. - dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \ - | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ - return - fi - - n_plus_50_=`expr $n_ + 50` - cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' - data_=` (eval "$cmds_") 2>&1 | gzip ` - - # Ensure that $data_ has length at least 50+$n_ - while :; do - len_=`echo "$data_"|wc -c` - test $n_plus_50_ -le $len_ && break; - data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip ` - done - - echo "$data_" \ - | dd bs=1 skip=50 count=$n_ 2>/dev/null \ - | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ -} - -mktempd_() -{ - case $# in - 2);; - *) fail_ "Usage: $ME DIR TEMPLATE";; - esac - - destdir_=$1 - template_=$2 - - MAX_TRIES_=4 - - # Disallow any trailing slash on specified destdir: - # it would subvert the post-mktemp "case"-based destdir test. - case $destdir_ in - /) ;; - */) fail_ "invalid destination dir: remove trailing slash(es)";; - esac - - case $template_ in - *XXXX) ;; - *) fail_ "invalid template: $template_ (must have a suffix of at least 4 X's)";; - esac - - fail=0 - - # First, try to use mktemp. - d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \ - || fail=1 - - # The resulting name must be in the specified directory. - case $d in "$destdir_"*);; *) fail=1;; esac - - # It must have created the directory. - test -d "$d" || fail=1 - - # It must have 0700 permissions. Handle sticky "S" bits. - perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1 - case $perms in drwx------*) ;; *) fail=1;; esac - - test $fail = 0 && { - echo "$d" - return - } - - # If we reach this point, we'll have to create a directory manually. - - # Get a copy of the template without its suffix of X's. - base_template_=`echo "$template_"|sed 's/XX*$//'` - - # Calculate how many X's we've just removed. - template_length_=`echo "$template_" | wc -c` - nx_=`echo "$base_template_" | wc -c` - nx_=`expr $template_length_ - $nx_` - - err_= - i_=1 - while :; do - X_=`rand_bytes_ $nx_` - candidate_dir_="$destdir_/$base_template_$X_" - err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \ - && { echo "$candidate_dir_"; return; } - test $MAX_TRIES_ -le $i_ && break; - i_=`expr $i_ + 1` - done - fail_ "$err_" -} - -# If you want to override the testdir_prefix_ function, -# or to add more utility functions, use this file. -test -f "$srcdir/init.cfg" \ - && . "$srcdir/init.cfg" - -setup_ "$@" -# This trap is here, rather than in the setup_ function, because some -# shells run the exit trap at shell function exit, rather than script exit. -trap remove_tmp_ 0 diff --git a/lib/gl/tests/intprops.h b/lib/gl/tests/intprops.h deleted file mode 100644 index 0c2787582f..0000000000 --- a/lib/gl/tests/intprops.h +++ /dev/null @@ -1,87 +0,0 @@ -/* intprops.h -- properties of integer types - - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software - Foundation, Inc. - - This 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/>. */ - -/* Written by Paul Eggert. */ - -#ifndef GL_INTPROPS_H -# define GL_INTPROPS_H - -# include <limits.h> - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if the arithmetic type T is an integer type. bool counts as - an integer. */ -# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) - -/* True if negative values of the signed integer type T use two's - complement, ones' complement, or signed magnitude representation, - respectively. Much GNU code assumes two's complement, but some - people like to be portable to all possible C hosts. */ -# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) -# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) -# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) - -/* True if the arithmetic type T is signed. */ -# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* The maximum and minimum values for the integer type T. These - macros have undefined behavior if T is signed and has padding bits. - If this is a problem for you, please let us know how to fix it for - your host. */ -# define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : TYPE_SIGNED_MAGNITUDE (t) \ - ? ~ (t) 0 \ - : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) -# define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ - : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) - -/* Return zero if T can be determined to be an unsigned type. - Otherwise, return 1. - When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a - tighter bound. Otherwise, it overestimates the true bound by one byte - when applied to unsigned types of size 2, 4, 16, ... bytes. - The symbol signed_type_or_expr__ is private to this header file. */ -# if __GNUC__ >= 2 -# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) -# else -# define signed_type_or_expr__(t) 1 -# endif - -/* Bound on length of the string representing an unsigned integer - value representable in B bits. log10 (2.0) < 146/485. The - smallest value of B where this bound is not tight is 2621. */ -# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) - -/* Bound on length of the string representing an integer type or expression T. - Subtract 1 for the sign bit if T is signed, and then add 1 more for - a minus sign if needed. */ -# define INT_STRLEN_BOUND(t) \ - (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \ - + signed_type_or_expr__ (t)) - -/* Bound on buffer size needed to represent an integer type or expression T, - including the terminating null. */ -# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) - -#endif /* GL_INTPROPS_H */ diff --git a/lib/gl/tests/macros.h b/lib/gl/tests/macros.h deleted file mode 100644 index 11db5a8af0..0000000000 --- a/lib/gl/tests/macros.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Common macros used by gnulib tests. - Copyright (C) 2006-2010 Free Software Foundation, Inc. - - This 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/>. */ - - -/* This file contains macros that are used by many gnulib tests. - Put here only frequently used macros, say, used by 10 tests or more. */ - -#include <stdio.h> -#include <stdlib.h> - -/* Define ASSERT_STREAM before including this file if ASSERT must - target a stream other than stderr. */ -#ifndef ASSERT_STREAM -# define ASSERT_STREAM stderr -#endif - -/* ASSERT (condition); - verifies that the specified condition is fulfilled. If not, a message - is printed to ASSERT_STREAM if defined (defaulting to stderr if - undefined) and the program is terminated with an error code. - - This macro has the following properties: - - The programmer specifies the expected condition, not the failure - condition. This simplifies thinking. - - The condition is tested always, regardless of compilation flags. - (Unlike the macro from <assert.h>.) - - On Unix platforms, the tester can debug the test program with a - debugger (provided core dumps are enabled: "ulimit -c unlimited"). - - For the sake of platforms where no debugger is available (such as - some mingw systems), an error message is printed on the error - stream that includes the source location of the ASSERT invocation. - */ -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \ - __FILE__, __LINE__); \ - fflush (ASSERT_STREAM); \ - abort (); \ - } \ - } \ - while (0) - -/* SIZEOF (array) - returns the number of elements of an array. It works for arrays that are - declared outside functions and for local variables of array type. It does - *not* work for function parameters of array type, because they are actually - parameters of pointer type. */ -#define SIZEOF(array) (sizeof (array) / sizeof (array[0])) diff --git a/lib/gl/tests/signature.h b/lib/gl/tests/signature.h deleted file mode 100644 index 6e15c43a2a..0000000000 --- a/lib/gl/tests/signature.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Macro for checking that a function declaration is compliant. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. - - This 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 SIGNATURE_CHECK - -/* Check that the function FN takes the specified arguments ARGS with - a return type of RET. This header is designed to be included after - <config.h> and the one system header that is supposed to contain - the function being checked, but prior to any other system headers - that are necessary for the unit test. Therefore, this file does - not include any system headers, nor reference anything outside of - the macro arguments. For an example, if foo.h should provide: - - extern int foo (char, float); - - then the unit test named test-foo.c would start out with: - - #include <config.h> - #include <foo.h> - #include "signature.h" - SIGNATURE_CHECK (foo, int, (char, float)); - #include <other.h> - ... -*/ -# define SIGNATURE_CHECK(fn, ret, args) \ - SIGNATURE_CHECK1 (fn, ret, args, __LINE__) - -/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test. - Note that the checks must not occupy the same line. */ -# define SIGNATURE_CHECK1(fn, ret, args, id) \ - SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */ -# define SIGNATURE_CHECK2(fn, ret, args, id) \ - static ret (* _GL_UNUSED signature_check ## id) args = fn - -#endif /* SIGNATURE_CHECK */ diff --git a/lib/gl/tests/test-alloca-opt.c b/lib/gl/tests/test-alloca-opt.c deleted file mode 100644 index cfbecafcb9..0000000000 --- a/lib/gl/tests/test-alloca-opt.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Test of optional automatic memory allocation. - Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <alloca.h> - -#if HAVE_ALLOCA - -static void -do_allocation (int n) -{ - void *ptr = alloca (n); - (void) ptr; -} - -void (*func) (int) = do_allocation; - -#endif - -int -main () -{ -#if HAVE_ALLOCA - int i; - - /* Repeat a lot of times, to make sure there's no memory leak. */ - for (i = 0; i < 100000; i++) - { - /* Try various values. - n = 0 gave a crash on Alpha with gcc-2.5.8. - Some versions of MacOS X have a stack size limit of 512 KB. */ - func (34); - func (134); - func (399); - func (510823); - func (129321); - func (0); - func (4070); - func (4095); - func (1); - func (16582); - } -#endif - - return 0; -} diff --git a/lib/gl/tests/test-binary-io.c b/lib/gl/tests/test-binary-io.c deleted file mode 100644 index 125150b21f..0000000000 --- a/lib/gl/tests/test-binary-io.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Test of binary mode I/O. - Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2005. */ - -#include <config.h> - -#include "binary-io.h" - -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -#include "macros.h" - -int -main () -{ - /* Test the O_BINARY macro. */ - { - int fd = - open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600); - if (write (fd, "Hello\n", 6) < 0) - exit (1); - close (fd); - } - { - struct stat statbuf; - if (stat ("t-bin-out2.tmp", &statbuf) < 0) - exit (1); - ASSERT (statbuf.st_size == 6); - } - unlink ("t-bin-out2.tmp"); - - /* Test the SET_BINARY macro. */ - SET_BINARY (1); - fputs ("Hello\n", stdout); - fclose (stdout); - fclose (stderr); - { - struct stat statbuf; - if (stat ("t-bin-out1.tmp", &statbuf) < 0) - exit (1); - ASSERT (statbuf.st_size == 6); - } - - return 0; -} diff --git a/lib/gl/tests/test-binary-io.sh b/lib/gl/tests/test-binary-io.sh deleted file mode 100755 index 33e128c309..0000000000 --- a/lib/gl/tests/test-binary-io.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp" -./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1 - -rm -fr $tmpfiles - -exit 0 diff --git a/lib/gl/tests/test-byteswap.c b/lib/gl/tests/test-byteswap.c deleted file mode 100644 index 0c036052f7..0000000000 --- a/lib/gl/tests/test-byteswap.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Test of <byteswap.h> substitute. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <byteswap.h> - -#include "macros.h" - -int -main () -{ - ASSERT (bswap_16 (0xABCD) == 0xCDAB); - ASSERT (bswap_32 (0xDEADBEEF) == 0xEFBEADDE); - - return 0; -} diff --git a/lib/gl/tests/test-c-ctype.c b/lib/gl/tests/test-c-ctype.c deleted file mode 100644 index ebe594dd4f..0000000000 --- a/lib/gl/tests/test-c-ctype.c +++ /dev/null @@ -1,386 +0,0 @@ -/* Test of character handling in C locale. - Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2005. */ - -#include <config.h> - -#include "c-ctype.h" - -#include <locale.h> - -#include "macros.h" - -static void -test_all (void) -{ - int c; - - for (c = -0x80; c < 0x100; c++) - { - ASSERT (c_isascii (c) == (c >= 0 && c < 0x80)); - - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - ASSERT (c_isalnum (c) == 1); - break; - default: - ASSERT (c_isalnum (c) == 0); - break; - } - - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - ASSERT (c_isalpha (c) == 1); - break; - default: - ASSERT (c_isalpha (c) == 0); - break; - } - - switch (c) - { - case '\t': case ' ': - ASSERT (c_isblank (c) == 1); - break; - default: - ASSERT (c_isblank (c) == 0); - break; - } - - ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f)); - - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - ASSERT (c_isdigit (c) == 1); - break; - default: - ASSERT (c_isdigit (c) == 0); - break; - } - - switch (c) - { - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - ASSERT (c_islower (c) == 1); - break; - default: - ASSERT (c_islower (c) == 0); - break; - } - - ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' ')); - - ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f)); - - ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c))); - - switch (c) - { - case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': - ASSERT (c_isspace (c) == 1); - break; - default: - ASSERT (c_isspace (c) == 0); - break; - } - - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - ASSERT (c_isupper (c) == 1); - break; - default: - ASSERT (c_isupper (c) == 0); - break; - } - - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - ASSERT (c_isxdigit (c) == 1); - break; - default: - ASSERT (c_isxdigit (c) == 0); - break; - } - - switch (c) - { - case 'A': - ASSERT (c_tolower (c) == 'a'); - ASSERT (c_toupper (c) == c); - break; - case 'B': - ASSERT (c_tolower (c) == 'b'); - ASSERT (c_toupper (c) == c); - break; - case 'C': - ASSERT (c_tolower (c) == 'c'); - ASSERT (c_toupper (c) == c); - break; - case 'D': - ASSERT (c_tolower (c) == 'd'); - ASSERT (c_toupper (c) == c); - break; - case 'E': - ASSERT (c_tolower (c) == 'e'); - ASSERT (c_toupper (c) == c); - break; - case 'F': - ASSERT (c_tolower (c) == 'f'); - ASSERT (c_toupper (c) == c); - break; - case 'G': - ASSERT (c_tolower (c) == 'g'); - ASSERT (c_toupper (c) == c); - break; - case 'H': - ASSERT (c_tolower (c) == 'h'); - ASSERT (c_toupper (c) == c); - break; - case 'I': - ASSERT (c_tolower (c) == 'i'); - ASSERT (c_toupper (c) == c); - break; - case 'J': - ASSERT (c_tolower (c) == 'j'); - ASSERT (c_toupper (c) == c); - break; - case 'K': - ASSERT (c_tolower (c) == 'k'); - ASSERT (c_toupper (c) == c); - break; - case 'L': - ASSERT (c_tolower (c) == 'l'); - ASSERT (c_toupper (c) == c); - break; - case 'M': - ASSERT (c_tolower (c) == 'm'); - ASSERT (c_toupper (c) == c); - break; - case 'N': - ASSERT (c_tolower (c) == 'n'); - ASSERT (c_toupper (c) == c); - break; - case 'O': - ASSERT (c_tolower (c) == 'o'); - ASSERT (c_toupper (c) == c); - break; - case 'P': - ASSERT (c_tolower (c) == 'p'); - ASSERT (c_toupper (c) == c); - break; - case 'Q': - ASSERT (c_tolower (c) == 'q'); - ASSERT (c_toupper (c) == c); - break; - case 'R': - ASSERT (c_tolower (c) == 'r'); - ASSERT (c_toupper (c) == c); - break; - case 'S': - ASSERT (c_tolower (c) == 's'); - ASSERT (c_toupper (c) == c); - break; - case 'T': - ASSERT (c_tolower (c) == 't'); - ASSERT (c_toupper (c) == c); - break; - case 'U': - ASSERT (c_tolower (c) == 'u'); - ASSERT (c_toupper (c) == c); - break; - case 'V': - ASSERT (c_tolower (c) == 'v'); - ASSERT (c_toupper (c) == c); - break; - case 'W': - ASSERT (c_tolower (c) == 'w'); - ASSERT (c_toupper (c) == c); - break; - case 'X': - ASSERT (c_tolower (c) == 'x'); - ASSERT (c_toupper (c) == c); - break; - case 'Y': - ASSERT (c_tolower (c) == 'y'); - ASSERT (c_toupper (c) == c); - break; - case 'Z': - ASSERT (c_tolower (c) == 'z'); - ASSERT (c_toupper (c) == c); - break; - case 'a': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'A'); - break; - case 'b': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'B'); - break; - case 'c': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'C'); - break; - case 'd': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'D'); - break; - case 'e': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'E'); - break; - case 'f': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'F'); - break; - case 'g': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'G'); - break; - case 'h': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'H'); - break; - case 'i': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'I'); - break; - case 'j': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'J'); - break; - case 'k': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'K'); - break; - case 'l': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'L'); - break; - case 'm': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'M'); - break; - case 'n': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'N'); - break; - case 'o': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'O'); - break; - case 'p': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'P'); - break; - case 'q': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Q'); - break; - case 'r': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'R'); - break; - case 's': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'S'); - break; - case 't': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'T'); - break; - case 'u': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'U'); - break; - case 'v': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'V'); - break; - case 'w': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'W'); - break; - case 'x': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'X'); - break; - case 'y': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Y'); - break; - case 'z': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Z'); - break; - default: - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == c); - break; - } - } -} - -int -main () -{ - test_all (); - - setlocale (LC_ALL, "de_DE"); - test_all (); - - setlocale (LC_ALL, "ja_JP.EUC-JP"); - test_all (); - - return 0; -} diff --git a/lib/gl/tests/test-errno.c b/lib/gl/tests/test-errno.c deleted file mode 100644 index 129b236fe9..0000000000 --- a/lib/gl/tests/test-errno.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Test of <errno.h> substitute. - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2008. */ - -#include <config.h> - -#include <errno.h> - -/* Verify that the POSIX mandated errno values exist and can be used as - initializers outside of a function. - The variable names happen to match the Linux/x86 error numbers. */ -int e1 = EPERM; -int e2 = ENOENT; -int e3 = ESRCH; -int e4 = EINTR; -int e5 = EIO; -int e6 = ENXIO; -int e7 = E2BIG; -int e8 = ENOEXEC; -int e9 = EBADF; -int e10 = ECHILD; -int e11 = EAGAIN; -int e11a = EWOULDBLOCK; -int e12 = ENOMEM; -int e13 = EACCES; -int e14 = EFAULT; -int e16 = EBUSY; -int e17 = EEXIST; -int e18 = EXDEV; -int e19 = ENODEV; -int e20 = ENOTDIR; -int e21 = EISDIR; -int e22 = EINVAL; -int e23 = ENFILE; -int e24 = EMFILE; -int e25 = ENOTTY; -int e26 = ETXTBSY; -int e27 = EFBIG; -int e28 = ENOSPC; -int e29 = ESPIPE; -int e30 = EROFS; -int e31 = EMLINK; -int e32 = EPIPE; -int e33 = EDOM; -int e34 = ERANGE; -int e35 = EDEADLK; -int e36 = ENAMETOOLONG; -int e37 = ENOLCK; -int e38 = ENOSYS; -int e39 = ENOTEMPTY; -int e40 = ELOOP; -int e42 = ENOMSG; -int e43 = EIDRM; -int e67 = ENOLINK; -int e71 = EPROTO; -int e72 = EMULTIHOP; -int e74 = EBADMSG; -int e75 = EOVERFLOW; -int e84 = EILSEQ; -int e88 = ENOTSOCK; -int e89 = EDESTADDRREQ; -int e90 = EMSGSIZE; -int e91 = EPROTOTYPE; -int e92 = ENOPROTOOPT; -int e93 = EPROTONOSUPPORT; -int e95 = EOPNOTSUPP; -int e95a = ENOTSUP; -int e97 = EAFNOSUPPORT; -int e98 = EADDRINUSE; -int e99 = EADDRNOTAVAIL; -int e100 = ENETDOWN; -int e101 = ENETUNREACH; -int e102 = ENETRESET; -int e103 = ECONNABORTED; -int e104 = ECONNRESET; -int e105 = ENOBUFS; -int e106 = EISCONN; -int e107 = ENOTCONN; -int e110 = ETIMEDOUT; -int e111 = ECONNREFUSED; -int e113 = EHOSTUNREACH; -int e114 = EALREADY; -int e115 = EINPROGRESS; -int e116 = ESTALE; -int e122 = EDQUOT; -int e125 = ECANCELED; - -/* Don't verify that these errno values are all different, except for possibly - EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has - ENOTSUP == EOPNOTSUPP. */ - -int -main () -{ - /* Verify that errno can be assigned. */ - errno = EOVERFLOW; - - /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */ - if (errno == EINVAL) - return 1; - - return 0; -} diff --git a/lib/gl/tests/test-fseeko.c b/lib/gl/tests/test-fseeko.c deleted file mode 100644 index be2a78dce1..0000000000 --- a/lib/gl/tests/test-fseeko.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Test of fseeko() function. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -/* None of the files accessed by this test are large, so disable the - fseek link warning if we are not using the gnulib fseek module. */ -#define _GL_NO_LARGE_FILES -#include <stdio.h> - -#include "signature.h" -SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int)); - - -#include "macros.h" - -#ifndef FUNC_UNGETC_BROKEN -# define FUNC_UNGETC_BROKEN 0 -#endif - -int -main (int argc, char **argv _GL_UNUSED) -{ - /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' - iff argc > 1. */ - int expected = argc > 1 ? 0 : -1; - /* Exit with success only if fseek/fseeko agree. */ - int r1 = fseeko (stdin, 0, SEEK_CUR); - int r2 = fseek (stdin, 0, SEEK_CUR); - ASSERT (r1 == r2 && r1 == expected); - if (argc > 1) - { - /* Test that fseek discards previously read ungetc data. */ - int ch = fgetc (stdin); - ASSERT (ch == '#'); - ASSERT (ungetc (ch, stdin) == ch); - ASSERT (fseeko (stdin, 2, SEEK_SET) == 0); - ch = fgetc (stdin); - ASSERT (ch == '/'); - if (2 < argc) - { - if (FUNC_UNGETC_BROKEN) - { - fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", - stderr); - return 77; - } - /* Test that fseek discards random ungetc data. */ - ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff)); - } - ASSERT (fseeko (stdin, 0, SEEK_END) == 0); - ASSERT (fgetc (stdin) == EOF); - /* Test that fseek resets end-of-file marker. */ - ASSERT (feof (stdin)); - ASSERT (fseeko (stdin, 0, SEEK_END) == 0); - ASSERT (!feof (stdin)); - } - return 0; -} diff --git a/lib/gl/tests/test-fseeko.sh b/lib/gl/tests/test-fseeko.sh deleted file mode 100755 index 5c558272cb..0000000000 --- a/lib/gl/tests/test-fseeko.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -./test-fseeko${EXEEXT} 1 < "$srcdir/test-fseeko.sh" || exit 1 -echo hi | ./test-fseeko${EXEEXT} || exit 1 -exit 0 diff --git a/lib/gl/tests/test-fseeko2.sh b/lib/gl/tests/test-fseeko2.sh deleted file mode 100755 index 6e1130cf58..0000000000 --- a/lib/gl/tests/test-fseeko2.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec ./test-fseeko${EXEEXT} 1 2 < "$srcdir/test-fseeko2.sh" diff --git a/lib/gl/tests/test-ftello.c b/lib/gl/tests/test-ftello.c deleted file mode 100644 index 5fae570f28..0000000000 --- a/lib/gl/tests/test-ftello.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Test of ftello() function. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -/* None of the files accessed by this test are large, so disable the - fseek link warning if we are not using the gnulib fseek module. */ -#define _GL_NO_LARGE_FILES -#include <stdio.h> - -#include "signature.h" -SIGNATURE_CHECK (ftello, off_t, (FILE *)); - -#include "binary-io.h" -#include "macros.h" - -#ifndef FUNC_UNGETC_BROKEN -# define FUNC_UNGETC_BROKEN 0 -#endif - -int -main (int argc, char **argv _GL_UNUSED) -{ - int ch; - /* Assume stdin is seekable iff argc > 1. */ - if (argc == 1) - { - ASSERT (ftell (stdin) == -1); - ASSERT (ftello (stdin) == -1); - return 0; - } - - /* mingw ftell is unreliable on text mode input. */ - SET_BINARY (0); - - /* Simple tests. For each test, make sure ftell and ftello agree. */ - ASSERT (ftell (stdin) == 0); - ASSERT (ftello (stdin) == 0); - - ch = fgetc (stdin); - ASSERT (ch == '#'); - ASSERT (ftell (stdin) == 1); - ASSERT (ftello (stdin) == 1); - - /* Test ftell after ungetc of read input. */ - ch = ungetc ('#', stdin); - ASSERT (ch == '#'); - ASSERT (ftell (stdin) == 0); - ASSERT (ftello (stdin) == 0); - - ch = fgetc (stdin); - ASSERT (ch == '#'); - ASSERT (ftell (stdin) == 1); - ASSERT (ftello (stdin) == 1); - - /* Test ftell after fseek. */ - ASSERT (fseek (stdin, 2, SEEK_SET) == 0); - ASSERT (ftell (stdin) == 2); - ASSERT (ftello (stdin) == 2); - - /* Test ftell after random ungetc. */ - ch = fgetc (stdin); - ASSERT (ch == '/'); - ch = ungetc ('@', stdin); - ASSERT (ch == '@'); - ASSERT (ftell (stdin) == 2); - ASSERT (ftello (stdin) == 2); - - ch = fgetc (stdin); - ASSERT (ch == '@'); - ASSERT (ftell (stdin) == 3); - ASSERT (ftello (stdin) == 3); - - if (2 < argc) - { - if (FUNC_UNGETC_BROKEN) - { - fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", - stderr); - return 77; - } - /* Test ftell after ungetc without read. */ - ASSERT (fseek (stdin, 0, SEEK_CUR) == 0); - ASSERT (ftell (stdin) == 3); - ASSERT (ftello (stdin) == 3); - - ch = ungetc ('~', stdin); - ASSERT (ch == '~'); - ASSERT (ftell (stdin) == 2); - ASSERT (ftello (stdin) == 2); - } - -#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */ - /* Test ftell beyond end of file. */ - ASSERT (fseek (stdin, 0, SEEK_END) == 0); - ch = ftello (stdin); - ASSERT (fseek (stdin, 10, SEEK_END) == 0); - ASSERT (ftell (stdin) == ch + 10); - ASSERT (ftello (stdin) == ch + 10); -#endif - - return 0; -} diff --git a/lib/gl/tests/test-ftello.sh b/lib/gl/tests/test-ftello.sh deleted file mode 100755 index 33d2e838db..0000000000 --- a/lib/gl/tests/test-ftello.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -./test-ftello${EXEEXT} 1 < "$srcdir/test-ftello.sh" || exit 1 -echo hi | ./test-ftello${EXEEXT} || exit 1 -exit 0 diff --git a/lib/gl/tests/test-ftello2.sh b/lib/gl/tests/test-ftello2.sh deleted file mode 100755 index ba750b003d..0000000000 --- a/lib/gl/tests/test-ftello2.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec ./test-ftello${EXEEXT} 1 2 < "$srcdir/test-ftello2.sh" diff --git a/lib/gl/tests/test-ftello3.c b/lib/gl/tests/test-ftello3.c deleted file mode 100644 index b07ba64610..0000000000 --- a/lib/gl/tests/test-ftello3.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Test of ftello() function. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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> - -/* None of the files accessed by this test are large, so disable the - fseek link warning if we are not using the gnulib fseek module. */ -#define _GL_NO_LARGE_FILES -#include <stdio.h> - -#include <string.h> - -#include "macros.h" - -#define TESTFILE "t-ftello3.tmp" - -int -main (void) -{ - FILE *fp; - - /* Create a file with some contents. */ - fp = fopen (TESTFILE, "w"); - if (fp == NULL) - goto skip; - if (fwrite ("foogarsh", 1, 8, fp) < 8) - goto skip; - if (fclose (fp)) - goto skip; - - /* The file's contents is now "foogarsh". */ - - /* Try writing after reading to EOF. */ - fp = fopen (TESTFILE, "r+"); - if (fp == NULL) - goto skip; - if (fseek (fp, -1, SEEK_END)) - goto skip; - ASSERT (getc (fp) == 'h'); - ASSERT (getc (fp) == EOF); - ASSERT (ftello (fp) == 8); - ASSERT (ftello (fp) == 8); - ASSERT (putc ('!', fp) == '!'); - ASSERT (ftello (fp) == 9); - ASSERT (fclose (fp) == 0); - fp = fopen (TESTFILE, "r"); - if (fp == NULL) - goto skip; - { - char buf[10]; - ASSERT (fread (buf, 1, 10, fp) == 9); - ASSERT (memcmp (buf, "foogarsh!", 9) == 0); - } - ASSERT (fclose (fp) == 0); - - /* The file's contents is now "foogarsh!". */ - - remove (TESTFILE); - return 0; - - skip: - fprintf (stderr, "Skipping test: prerequisite file operations failed.\n"); - remove (TESTFILE); - return 77; -} diff --git a/lib/gl/tests/test-func.c b/lib/gl/tests/test-func.c deleted file mode 100644 index 476e04dd9e..0000000000 --- a/lib/gl/tests/test-func.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Test whether __func__ is available - Copyright (C) 2008-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2008. */ - -#include <config.h> - -#include <string.h> - -#include "macros.h" - -int -main () -{ - ASSERT (strlen (__func__) > 0); - - /* On SunPRO C 5.9, sizeof __func__ evaluates to 0. The compiler warns: - "warning: null dimension: sizeof()". */ -#if !defined __SUNPRO_C - ASSERT (strlen (__func__) + 1 == sizeof __func__); -#endif - - ASSERT (strcmp (__func__, "main") == 0 - || strcmp (__func__, "<unknown function>") == 0); - - return 0; -} diff --git a/lib/gl/tests/test-memchr.c b/lib/gl/tests/test-memchr.c deleted file mode 100644 index 05e1bfaed2..0000000000 --- a/lib/gl/tests/test-memchr.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2008-2010 Free Software Foundation, Inc. - * Written by Eric Blake and Bruno Haible - * - * This 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 <string.h> - -#include "signature.h" -SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t)); - -#include <stdlib.h> - -#include "zerosize-ptr.h" -#include "macros.h" - -/* Calculating void * + int is not portable, so this wrapper converts - to char * to make the tests easier to write. */ -#define MEMCHR (char *) memchr - -int -main (void) -{ - size_t n = 0x100000; - char *input = malloc (n); - ASSERT (input); - - input[0] = 'a'; - input[1] = 'b'; - memset (input + 2, 'c', 1024); - memset (input + 1026, 'd', n - 1028); - input[n - 2] = 'e'; - input[n - 1] = 'a'; - - /* Basic behavior tests. */ - ASSERT (MEMCHR (input, 'a', n) == input); - - ASSERT (MEMCHR (input, 'a', 0) == NULL); - ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL); - - ASSERT (MEMCHR (input, 'b', n) == input + 1); - ASSERT (MEMCHR (input, 'c', n) == input + 2); - ASSERT (MEMCHR (input, 'd', n) == input + 1026); - - ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1); - ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2); - ASSERT (MEMCHR (input + 1, 0x789abc00 | 'e', n - 1) == input + n - 2); - - ASSERT (MEMCHR (input, 'f', n) == NULL); - ASSERT (MEMCHR (input, '\0', n) == NULL); - - /* Check that a very long haystack is handled quickly if the byte is - found near the beginning. */ - { - size_t repeat = 10000; - for (; repeat > 0; repeat--) - { - ASSERT (MEMCHR (input, 'c', n) == input + 2); - } - } - - /* Alignment tests. */ - { - int i, j; - for (i = 0; i < 32; i++) - { - for (j = 0; j < 256; j++) - input[i + j] = j; - for (j = 0; j < 256; j++) - { - ASSERT (MEMCHR (input + i, j, 256) == input + i + j); - } - } - } - - /* Check that memchr() does not read past the first occurrence of the - byte being searched. See the Austin Group's clarification - <http://www.opengroup.org/austin/docs/austin_454.txt>. - Test both '\0' and something else, since some implementations - special-case searching for NUL. - */ - { - char *page_boundary = (char *) zerosize_ptr (); - /* Too small, and we miss cache line boundary tests; too large, - and the test takes cubically longer to complete. */ - int limit = 257; - - if (page_boundary != NULL) - { - for (n = 1; n <= limit; n++) - { - char *mem = page_boundary - n; - memset (mem, 'X', n); - ASSERT (MEMCHR (mem, 'U', n) == NULL); - ASSERT (MEMCHR (mem, 0, n) == NULL); - - { - size_t i; - size_t k; - - for (i = 0; i < n; i++) - { - mem[i] = 'U'; - for (k = i + 1; k < n + limit; k++) - ASSERT (MEMCHR (mem, 'U', k) == mem + i); - mem[i] = 0; - for (k = i + 1; k < n + limit; k++) - ASSERT (MEMCHR (mem, 0, k) == mem + i); - mem[i] = 'X'; - } - } - } - } - } - - free (input); - - return 0; -} diff --git a/lib/gl/tests/test-netdb.c b/lib/gl/tests/test-netdb.c deleted file mode 100644 index 697bbc8dbf..0000000000 --- a/lib/gl/tests/test-netdb.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Test of <netdb.h> substitute. - Copyright (C) 2007-2008, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Simon Josefsson <simon@josefsson.org>, 2008. */ - -#include <config.h> -#include <netdb.h> - -/* Check that the 'struct hostent' type is defined. */ -struct hostent t1; - -/* Check that the 'socklen_t' type is defined. */ -socklen_t t2; - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-read-file.c b/lib/gl/tests/test-read-file.c deleted file mode 100644 index daa61668c6..0000000000 --- a/lib/gl/tests/test-read-file.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2006-2007, 2010 Free Software Foundation, Inc. - * Written by Simon Josefsson - * - * This 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 "read-file.h" - -#include <stdio.h> -#include <stdlib.h> -#include <sys/stat.h> - -#define FILE1 "/etc/resolv.conf" -#define FILE2 "/dev/null" - -int -main (void) -{ - struct stat statbuf; - int err = 0; - - /* We can perform the test only if the file exists and is readable. - Test whether it exists, then assume it is world-readable. */ - if (stat (FILE1, &statbuf) >= 0) - { - size_t len; - char *out = read_file (FILE1, &len); - - if (!out) - { - perror ("Could not read file"); - err = 1; - } - else - { - if (out[len] != '\0') - { - perror ("BAD: out[len] not zero"); - err = 1; - } - - if (S_ISREG (statbuf.st_mode)) - { - /* FILE1 is a regular file or a symlink to a regular file. */ - if (len != statbuf.st_size) - { - fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len, FILE1); - err = 1; - } - } - else - { - /* Assume FILE1 is not empty. */ - if (len == 0) - { - fprintf (stderr, "Read nothing from %s\n", FILE1); - err = 1; - } - } - free (out); - } - } - - /* We can perform the test only if the file exists and is readable. - Test whether it exists, then assume it is world-readable. */ - if (stat (FILE2, &statbuf) >= 0) - { - size_t len; - char *out = read_file (FILE2, &len); - - if (!out) - { - perror ("Could not read file"); - err = 1; - } - else - { - if (out[len] != '\0') - { - perror ("BAD: out[len] not zero"); - err = 1; - } - - /* /dev/null should always be empty. Ignore statbuf.st_size, since it - is not a regular file. */ - if (len != 0) - { - fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len, FILE2); - err = 1; - } - free (out); - } - } - - return err; -} diff --git a/lib/gl/tests/test-snprintf.c b/lib/gl/tests/test-snprintf.c deleted file mode 100644 index 62a411bf91..0000000000 --- a/lib/gl/tests/test-snprintf.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Test of snprintf() function. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <stdio.h> - -#include "signature.h" -SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...)); - -#include <string.h> - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - char buf[8]; - int size; - int retval; - - for (size = 0; size <= 8; size++) - { - memcpy (buf, "DEADBEEF", 8); - retval = snprintf (buf, size, "%d", 12345); - if (size < 6) - { -#if CHECK_SNPRINTF_POSIX - ASSERT (retval < 0 || retval >= size); -#endif - if (size > 0) - { - ASSERT (memcmp (buf, "12345", size - 1) == 0); - ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); - } -#if !CHECK_SNPRINTF_POSIX - if (size > 0) -#endif - ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); - } - else - { - ASSERT (retval == 5); - ASSERT (memcmp (buf, "12345\0EF", 8) == 0); - } - } - - return 0; -} diff --git a/lib/gl/tests/test-sockets.c b/lib/gl/tests/test-sockets.c deleted file mode 100644 index ab5460ad46..0000000000 --- a/lib/gl/tests/test-sockets.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - * Written by Simon Josefsson. - * - * This 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 <stdio.h> - -#include "sockets.h" - -int -main (void) -{ - int err; - - err = gl_sockets_startup (SOCKETS_1_1); - if (err != 0) - { - printf ("wsastartup failed %d\n", err); - return 1; - } - - err = gl_sockets_cleanup (); - if (err != 0) - { - printf ("wsacleanup failed %d\n", err); - return 1; - } - - (void) gl_fd_to_handle (0); - - return 0; -} diff --git a/lib/gl/tests/test-stdbool.c b/lib/gl/tests/test-stdbool.c deleted file mode 100644 index 2103d8bab9..0000000000 --- a/lib/gl/tests/test-stdbool.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Test of <stdbool.h> substitute. - Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -/* We want this test to succeed even when using gcc's -Werror; but to - do that requires a pragma that didn't exist before 4.3.0. */ -#ifndef __GNUC__ -# define ADDRESS_CHECK_OKAY -#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) -/* No way to silence -Waddress. */ -#else -# pragma GCC diagnostic ignored "-Waddress" -# define ADDRESS_CHECK_OKAY -#endif - -#include <config.h> - -#include <stdbool.h> - -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - -/* Several tests cannot be guaranteed with gnulib's <stdbool.h>, at - least, not for all compilers and compiler options. */ -#if HAVE_STDBOOL_H || defined __GNUC__ -struct s { _Bool s: 1; _Bool t; } s; -#endif - -char a[true == 1 ? 1 : -1]; -char b[false == 0 ? 1 : -1]; -char c[__bool_true_false_are_defined == 1 ? 1 : -1]; -#if HAVE_STDBOOL_H || defined __GNUC__ /* See above. */ -char d[(bool) 0.5 == true ? 1 : -1]; -# ifdef ADDRESS_CHECK_OKAY -bool e = &s; -# endif -char f[(_Bool) 0.0 == false ? 1 : -1]; -#endif -char g[true]; -char h[sizeof (_Bool)]; -#if HAVE_STDBOOL_H || defined __GNUC__ /* See above. */ -char i[sizeof s.t]; -#endif -enum { j = false, k = true, l = false * true, m = true * 256 }; -_Bool n[m]; -char o[sizeof n == m * sizeof n[0] ? 1 : -1]; -char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -/* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ -_Bool q = true; -_Bool *pq = &q; - -int -main () -{ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This is a runtime test, since a corresponding compile-time - test would rely on initializer extensions. */ - char digs[] = "0123456789"; - return &(digs + 5)[-2 + (bool) 1] != &digs[4]; -} diff --git a/lib/gl/tests/test-stddef.c b/lib/gl/tests/test-stddef.c deleted file mode 100644 index 2c392c7547..0000000000 --- a/lib/gl/tests/test-stddef.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Test of <stddef.h> substitute. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Eric Blake <ebb9@byu.net>, 2009. */ - -#include <config.h> - -#include <stddef.h> - -#include "verify.h" - -/* Check that appropriate types are defined. */ -wchar_t a = 'c'; -ptrdiff_t b = 1; -size_t c = 2; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -/* Check that offsetof produces integer constants with correct type. */ -struct d -{ - char e; - char f; -}; -/* Solaris 10 has a bug where offsetof is under-parenthesized, and - cannot be used as an arbitrary expression. However, since it is - unlikely to bite real code, we ignore that short-coming. */ -/* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */ -verify (sizeof (offsetof (struct d, e)) == sizeof (size_t)); -verify (offsetof (struct d, e) < -1); /* Must be unsigned. */ -verify (offsetof (struct d, f) == 1); - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-stdint.c b/lib/gl/tests/test-stdint.c deleted file mode 100644 index d64057a256..0000000000 --- a/lib/gl/tests/test-stdint.c +++ /dev/null @@ -1,361 +0,0 @@ -/* Test of <stdint.h> substitute. - Copyright (C) 2006-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2006. */ - -#include <config.h> - -/* Whether to enable pedantic checks. */ -#define DO_PEDANTIC 0 - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* likewise */ -#include <stdint.h> - -#include "verify.h" -#include "intprops.h" - -#if __GNUC__ >= 2 && DO_PEDANTIC -# define verify_same_types(expr1,expr2) \ - extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \ - extern void _verify_func(__LINE__) (__typeof__ (expr2) *); -# define _verify_func(line) _verify_func2(line) -# define _verify_func2(line) verify_func_ ## line -#else -# define verify_same_types(expr1,expr2) extern void verify_func (int) -#endif - -/* 7.18.1.1. Exact-width integer types */ -/* 7.18.2.1. Limits of exact-width integer types */ - -int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX }; -verify (TYPE_MINIMUM (int8_t) == INT8_MIN); -verify (TYPE_MAXIMUM (int8_t) == INT8_MAX); -verify_same_types (INT8_MIN, (int8_t) 0 + 0); -verify_same_types (INT8_MAX, (int8_t) 0 + 0); - -int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX }; -verify (TYPE_MINIMUM (int16_t) == INT16_MIN); -verify (TYPE_MAXIMUM (int16_t) == INT16_MAX); -verify_same_types (INT16_MIN, (int16_t) 0 + 0); -verify_same_types (INT16_MAX, (int16_t) 0 + 0); - -int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX }; -verify (TYPE_MINIMUM (int32_t) == INT32_MIN); -verify (TYPE_MAXIMUM (int32_t) == INT32_MAX); -verify_same_types (INT32_MIN, (int32_t) 0 + 0); -verify_same_types (INT32_MAX, (int32_t) 0 + 0); - -#ifdef INT64_MAX -int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX }; -verify (TYPE_MINIMUM (int64_t) == INT64_MIN); -verify (TYPE_MAXIMUM (int64_t) == INT64_MAX); -verify_same_types (INT64_MIN, (int64_t) 0 + 0); -verify_same_types (INT64_MAX, (int64_t) 0 + 0); -#endif - -uint8_t b1[2] = { UINT8_C (17), UINT8_MAX }; -verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX); -verify_same_types (UINT8_MAX, (uint8_t) 0 + 0); - -uint16_t b2[2] = { UINT16_C (17), UINT16_MAX }; -verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX); -verify_same_types (UINT16_MAX, (uint16_t) 0 + 0); - -uint32_t b3[2] = { UINT32_C (17), UINT32_MAX }; -verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX); -verify_same_types (UINT32_MAX, (uint32_t) 0 + 0); - -#ifdef UINT64_MAX -uint64_t b4[2] = { UINT64_C (17), UINT64_MAX }; -verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX); -verify_same_types (UINT64_MAX, (uint64_t) 0 + 0); -#endif - -#if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX -/* ok */ -#else -err or; -#endif - -#if UINT8_MAX && UINT16_MAX && UINT32_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.2. Minimum-width integer types */ -/* 7.18.2.2. Limits of minimum-width integer types */ - -int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX }; -verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN); -verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX); -verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0); -verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0); - -int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX }; -verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN); -verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX); -verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0); -verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0); - -int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX }; -verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN); -verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX); -verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0); -verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0); - -#ifdef INT_LEAST64_MAX -int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX }; -verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN); -verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX); -verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0); -verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0); -#endif - -uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX }; -verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX); -verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0); - -uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX }; -verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX); -verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0); - -uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX }; -verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX); -verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0); - -#ifdef UINT_LEAST64_MAX -uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX }; -verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX); -verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0); -#endif - -#if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX -/* ok */ -#else -err or; -#endif - -#if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.3. Fastest minimum-width integer types */ -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX }; -verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN); -verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX); -verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0); -verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0); - -int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX }; -verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN); -verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX); -verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0); -verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0); - -int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX }; -verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN); -verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX); -verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0); -verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0); - -#ifdef INT_FAST64_MAX -int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX }; -verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN); -verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX); -verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0); -verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0); -#endif - -uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX }; -verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX); -verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0); - -uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX }; -verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX); -verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0); - -uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX }; -verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX); -verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0); - -#ifdef UINT_FAST64_MAX -uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX }; -verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX); -verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0); -#endif - -#if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX -/* ok */ -#else -err or; -#endif - -#if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX }; -verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN); -verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX); -verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0); -verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0); - -uintptr_t h[2] = { 17, UINTPTR_MAX }; -verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX); -verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0); - -#if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.5. Greatest-width integer types */ -/* 7.18.2.5. Limits of greatest-width integer types */ - -intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX }; -verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); -verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); -verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0); -verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0); - -uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; -verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); -verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); - -/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in - the preprocessor. */ -#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__)) -#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX -/* ok */ -#else -err or; -#endif -#endif - -/* 7.18.3. Limits of other integer types */ - -#include <stddef.h> - -verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN); -verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX); -verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0); -verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0); - -#if PTRDIFF_MIN && PTRDIFF_MAX -/* ok */ -#else -err or; -#endif - -#include <signal.h> - -verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN); -verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX); -verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0); -verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0); - -#if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX -/* ok */ -#else -err or; -#endif - -verify (TYPE_MAXIMUM (size_t) == SIZE_MAX); -verify_same_types (SIZE_MAX, (size_t) 0 + 0); - -#if SIZE_MAX -/* ok */ -#else -err or; -#endif - -#if HAVE_WCHAR_T -verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN); -verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX); -verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0); -verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0); - -# if WCHAR_MIN != 17 && WCHAR_MAX -/* ok */ -# else -err or; -# endif -#endif - -#if HAVE_WINT_T -# include <wchar.h> - -verify (TYPE_MINIMUM (wint_t) == WINT_MIN); -verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); -verify_same_types (WINT_MIN, (wint_t) 0 + 0); -verify_same_types (WINT_MAX, (wint_t) 0 + 0); - -# if WINT_MIN != 17 && WINT_MAX -/* ok */ -# else -err or; -# endif -#endif - -/* 7.18.4. Macros for integer constants */ - -verify (INT8_C (17) == 17); -verify_same_types (INT8_C (17), (int_least8_t)0 + 0); -verify (UINT8_C (17) == 17); -verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0); - -verify (INT16_C (17) == 17); -verify_same_types (INT16_C (17), (int_least16_t)0 + 0); -verify (UINT16_C (17) == 17); -verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0); - -verify (INT32_C (17) == 17); -verify_same_types (INT32_C (17), (int_least32_t)0 + 0); -verify (UINT32_C (17) == 17); -verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0); - -#ifdef INT64_C -verify (INT64_C (17) == 17); -verify_same_types (INT64_C (17), (int_least64_t)0 + 0); -#endif -#ifdef UINT64_C -verify (UINT64_C (17) == 17); -verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0); -#endif - -verify (INTMAX_C (17) == 17); -verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); -verify (UINTMAX_C (17) == 17); -verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); - - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-stdio.c b/lib/gl/tests/test-stdio.c deleted file mode 100644 index 87100576f0..0000000000 --- a/lib/gl/tests/test-stdio.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Test of <stdio.h> substitute. - Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <stdio.h> - -#include "verify.h" - -/* Check that the various SEEK_* macros are defined. */ -int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -/* Check that the types are all defined. */ -fpos_t t1; -off_t t2; -size_t t3; -ssize_t t4; -va_list t5; - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-stdlib.c b/lib/gl/tests/test-stdlib.c deleted file mode 100644 index 1e7956b68c..0000000000 --- a/lib/gl/tests/test-stdlib.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Test of <stdlib.h> substitute. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <stdlib.h> - -#include "verify.h" - -/* Check that EXIT_SUCCESS is 0, per POSIX. */ -static int exitcode = EXIT_SUCCESS; -#if EXIT_SUCCESS -"oops" -#endif - -/* Check for GNU value (not guaranteed by POSIX, but is guaranteed by - gnulib). */ -#if EXIT_FAILURE != 1 -"oops" -#endif - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -#if GNULIB_TEST_SYSTEM_POSIX -# include "test-sys_wait.h" -#else -# define test_sys_wait_macros() 0 -#endif - -int -main (void) -{ - if (test_sys_wait_macros ()) - return 1; - - return exitcode; -} diff --git a/lib/gl/tests/test-string.c b/lib/gl/tests/test-string.c deleted file mode 100644 index 019a8174ac..0000000000 --- a/lib/gl/tests/test-string.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Test of <string.h> substitute. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <string.h> - -#include "verify.h" - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-strings.c b/lib/gl/tests/test-strings.c deleted file mode 100644 index caba95cd2a..0000000000 --- a/lib/gl/tests/test-strings.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Test of <strings.h> substitute. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <strings.h> - -int -main () -{ - return 0; -} diff --git a/lib/gl/tests/test-strverscmp.c b/lib/gl/tests/test-strverscmp.c deleted file mode 100644 index d7348150e1..0000000000 --- a/lib/gl/tests/test-strverscmp.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Test of strverscmp() function. - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - - This 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake <ebb9@byu.net>, 2008. */ - -#include <config.h> - -#include <string.h> - -#include "signature.h" -SIGNATURE_CHECK (strverscmp, int, (const char *, const char *)); - -#include "macros.h" - -int -main (void) -{ - ASSERT (strverscmp ("", "") == 0); - ASSERT (strverscmp ("a", "a") == 0); - ASSERT (strverscmp ("a", "b") < 0); - ASSERT (strverscmp ("b", "a") > 0); - ASSERT (strverscmp ("000", "00") < 0); - ASSERT (strverscmp ("00", "000") > 0); - ASSERT (strverscmp ("a0", "a") > 0); - ASSERT (strverscmp ("00", "01") < 0); - ASSERT (strverscmp ("01", "010") < 0); - ASSERT (strverscmp ("010", "09") < 0); - ASSERT (strverscmp ("09", "0") < 0); - ASSERT (strverscmp ("9", "10") < 0); - ASSERT (strverscmp ("0a", "0") > 0); - return 0; -} diff --git a/lib/gl/tests/test-sys_socket.c b/lib/gl/tests/test-sys_socket.c deleted file mode 100644 index e976ff6a7b..0000000000 --- a/lib/gl/tests/test-sys_socket.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Test of <sys/socket.h> substitute. - Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <sys/socket.h> - -#include <errno.h> - -#if HAVE_SHUTDOWN -/* Check some integer constant expressions. */ -int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; -#endif - -/* Check that the 'socklen_t' type is defined. */ -socklen_t t1; - -int -main (void) -{ - struct sockaddr_storage x; - sa_family_t i; - - /* Check some errno values. */ - switch (0) - { - case ENOTSOCK: - case EADDRINUSE: - case ENETRESET: - case ECONNABORTED: - case ECONNRESET: - case ENOTCONN: - case ESHUTDOWN: - break; - } - - x.ss_family = 42; - i = 42; - - /* Tell the compiler that these variables are used. */ - (void) x; - (void) i; - - return 0; -} diff --git a/lib/gl/tests/test-sys_stat.c b/lib/gl/tests/test-sys_stat.c deleted file mode 100644 index 5f1aacd1cc..0000000000 --- a/lib/gl/tests/test-sys_stat.c +++ /dev/null @@ -1,288 +0,0 @@ -/* Test of <sys/stat.h> substitute. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <sys/stat.h> - -#include "verify.h" - -/* Check the existence of some macros. */ -int a[] = - { - S_IFMT, - S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG, -#ifdef S_IFLNK /* missing on mingw and djgpp */ - S_IFLNK, -#endif -#ifdef S_IFSOCK /* missing on mingw and djgpp */ - S_IFSOCK, -#endif - S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, - S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP, - S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH, - S_ISUID, S_ISGID, S_ISVTX, - S_ISBLK (S_IFREG), - S_ISCHR (S_IFREG), - S_ISDIR (S_IFREG), - S_ISFIFO (S_IFREG), - S_ISREG (S_IFREG), - S_ISLNK (S_IFREG), - S_ISSOCK (S_IFREG), - S_ISDOOR (S_IFREG), - S_ISMPB (S_IFREG), - S_ISNAM (S_IFREG), - S_ISNWK (S_IFREG), - S_ISPORT (S_IFREG), - S_ISCTG (S_IFREG), - S_ISOFD (S_IFREG), - S_ISOFL (S_IFREG), - S_ISWHT (S_IFREG) - }; - -/* Sanity checks. */ - -verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR)); -verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP)); -verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH)); - -verify (S_ISBLK (S_IFBLK)); -verify (!S_ISBLK (S_IFCHR)); -verify (!S_ISBLK (S_IFDIR)); -verify (!S_ISBLK (S_IFIFO)); -verify (!S_ISBLK (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISBLK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISBLK (S_IFSOCK)); -#endif - -verify (!S_ISCHR (S_IFBLK)); -verify (S_ISCHR (S_IFCHR)); -verify (!S_ISCHR (S_IFDIR)); -verify (!S_ISCHR (S_IFIFO)); -verify (!S_ISCHR (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISCHR (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISCHR (S_IFSOCK)); -#endif - -verify (!S_ISDIR (S_IFBLK)); -verify (!S_ISDIR (S_IFCHR)); -verify (S_ISDIR (S_IFDIR)); -verify (!S_ISDIR (S_IFIFO)); -verify (!S_ISDIR (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISDIR (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISDIR (S_IFSOCK)); -#endif - -verify (!S_ISFIFO (S_IFBLK)); -verify (!S_ISFIFO (S_IFCHR)); -verify (!S_ISFIFO (S_IFDIR)); -verify (S_ISFIFO (S_IFIFO)); -verify (!S_ISFIFO (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISFIFO (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISFIFO (S_IFSOCK)); -#endif - -verify (!S_ISREG (S_IFBLK)); -verify (!S_ISREG (S_IFCHR)); -verify (!S_ISREG (S_IFDIR)); -verify (!S_ISREG (S_IFIFO)); -verify (S_ISREG (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISREG (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISREG (S_IFSOCK)); -#endif - -verify (!S_ISLNK (S_IFBLK)); -verify (!S_ISLNK (S_IFCHR)); -verify (!S_ISLNK (S_IFDIR)); -verify (!S_ISLNK (S_IFIFO)); -verify (!S_ISLNK (S_IFREG)); -#ifdef S_IFLNK -verify (S_ISLNK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISLNK (S_IFSOCK)); -#endif - -verify (!S_ISSOCK (S_IFBLK)); -verify (!S_ISSOCK (S_IFCHR)); -verify (!S_ISSOCK (S_IFDIR)); -verify (!S_ISSOCK (S_IFIFO)); -verify (!S_ISSOCK (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISSOCK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (S_ISSOCK (S_IFSOCK)); -#endif - -verify (!S_ISDOOR (S_IFBLK)); -verify (!S_ISDOOR (S_IFCHR)); -verify (!S_ISDOOR (S_IFDIR)); -verify (!S_ISDOOR (S_IFIFO)); -verify (!S_ISDOOR (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISDOOR (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISDOOR (S_IFSOCK)); -#endif - -verify (!S_ISMPB (S_IFBLK)); -verify (!S_ISMPB (S_IFCHR)); -verify (!S_ISMPB (S_IFDIR)); -verify (!S_ISMPB (S_IFIFO)); -verify (!S_ISMPB (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISMPB (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISMPB (S_IFSOCK)); -#endif - -verify (!S_ISNAM (S_IFBLK)); -verify (!S_ISNAM (S_IFCHR)); -verify (!S_ISNAM (S_IFDIR)); -verify (!S_ISNAM (S_IFIFO)); -verify (!S_ISNAM (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISNAM (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISNAM (S_IFSOCK)); -#endif - -verify (!S_ISNWK (S_IFBLK)); -verify (!S_ISNWK (S_IFCHR)); -verify (!S_ISNWK (S_IFDIR)); -verify (!S_ISNWK (S_IFIFO)); -verify (!S_ISNWK (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISNWK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISNWK (S_IFSOCK)); -#endif - -verify (!S_ISPORT (S_IFBLK)); -verify (!S_ISPORT (S_IFCHR)); -verify (!S_ISPORT (S_IFDIR)); -verify (!S_ISPORT (S_IFIFO)); -verify (!S_ISPORT (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISPORT (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISPORT (S_IFSOCK)); -#endif - -verify (!S_ISCTG (S_IFBLK)); -verify (!S_ISCTG (S_IFCHR)); -verify (!S_ISCTG (S_IFDIR)); -verify (!S_ISCTG (S_IFIFO)); -verify (!S_ISCTG (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISCTG (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISCTG (S_IFSOCK)); -#endif - -verify (!S_ISOFD (S_IFBLK)); -verify (!S_ISOFD (S_IFCHR)); -verify (!S_ISOFD (S_IFDIR)); -verify (!S_ISOFD (S_IFIFO)); -verify (!S_ISOFD (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISOFD (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISOFD (S_IFSOCK)); -#endif - -verify (!S_ISOFL (S_IFBLK)); -verify (!S_ISOFL (S_IFCHR)); -verify (!S_ISOFL (S_IFDIR)); -verify (!S_ISOFL (S_IFIFO)); -verify (!S_ISOFL (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISOFL (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISOFL (S_IFSOCK)); -#endif - -verify (!S_ISWHT (S_IFBLK)); -verify (!S_ISWHT (S_IFCHR)); -verify (!S_ISWHT (S_IFDIR)); -verify (!S_ISWHT (S_IFIFO)); -verify (!S_ISWHT (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISWHT (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISWHT (S_IFSOCK)); -#endif - -/* POSIX 2008 requires traditional encoding of permission constants. */ -verify (S_IRWXU == 00700); -verify (S_IRUSR == 00400); -verify (S_IWUSR == 00200); -verify (S_IXUSR == 00100); -verify (S_IRWXG == 00070); -verify (S_IRGRP == 00040); -verify (S_IWGRP == 00020); -verify (S_IXGRP == 00010); -verify (S_IRWXO == 00007); -verify (S_IROTH == 00004); -verify (S_IWOTH == 00002); -verify (S_IXOTH == 00001); -verify (S_ISUID == 04000); -verify (S_ISGID == 02000); -verify (S_ISVTX == 01000); - -#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \ - || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \ - || UTIME_NOW == UTIME_OMIT) -invalid UTIME macros -#endif - -/* Check the existence of some types. */ -nlink_t t1; - -struct timespec t2; - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-sys_wait.h b/lib/gl/tests/test-sys_wait.h deleted file mode 100644 index bb10450867..0000000000 --- a/lib/gl/tests/test-sys_wait.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Test of macros shared between <sys/wait.h> and <stdlib.h>. - Copyright (C) 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Eric Blake <ebb9@byu.net>, 2010. */ - -static int -test_sys_wait_macros (void) -{ - /* Check subset of <sys/wait.h> macros that must be visible here. - Note that some of these macros are only portable when operating - on an lvalue. */ - int i; - for (i = 0; i < 0x8000; i = (i ? i << 1 : 1)) - { - /* POSIX requires that for all valid process statuses, that - exactly one of these three macros is true. But not all - possible 16-bit values map to valid process status. - Traditionally, 8 of the bits are for WIFEXITED, 7 of the bits - to tell between WIFSIGNALED and WIFSTOPPED, and either 0x80 - or 0x8000 to flag that core was also dumped. Since we don't - know which byte is WIFEXITED, we skip the both possible bits - that can signal core dump. */ - if (i == 0x80) - continue; - if (!!WIFSIGNALED (i) + !!WIFEXITED (i) + !!WIFSTOPPED (i) != 1) - return 1; - } - i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i); - - switch (i) - { -#if 0 - /* Gnulib doesn't guarantee these, yet. */ - case WNOHANG: - case WUNTRACED: -#endif - break; - } - return 0; -} diff --git a/lib/gl/tests/test-time.c b/lib/gl/tests/test-time.c deleted file mode 100644 index 8e250bd2d5..0000000000 --- a/lib/gl/tests/test-time.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Test of <time.h> substitute. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <time.h> - -#include "verify.h" - -struct timespec a; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-unistd.c b/lib/gl/tests/test-unistd.c deleted file mode 100644 index ec02eeefca..0000000000 --- a/lib/gl/tests/test-unistd.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Test of <unistd.h> substitute. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <unistd.h> - -#include "verify.h" - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -/* Check that the various SEEK_* macros are defined. */ -int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; - -/* Check that the various *_FILENO macros are defined. */ -#if ! (defined STDIN_FILENO \ - && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3)) -missing or broken *_FILENO macros -#endif - -/* Check that the types are all defined. */ -size_t t1; -ssize_t t2; -#ifdef TODO /* Not implemented in gnulib yet */ -uid_t t3; -gid_t t4; -#endif -off_t t5; -pid_t t6; -#ifdef TODO -useconds_t t7; -intptr_t t8; -#endif - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/test-vasnprintf.c b/lib/gl/tests/test-vasnprintf.c deleted file mode 100644 index 15401eb4ca..0000000000 --- a/lib/gl/tests/test-vasnprintf.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Test of vasnprintf() and asnprintf() functions. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include "vasnprintf.h" - -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> - -#include "macros.h" - -static void -test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...)) -{ - char buf[8]; - int size; - - for (size = 0; size <= 8; size++) - { - size_t length = size; - char *result = my_asnprintf (NULL, &length, "%d", 12345); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - ASSERT (length == 5); - free (result); - } - - for (size = 0; size <= 8; size++) - { - size_t length; - char *result; - - memcpy (buf, "DEADBEEF", 8); - length = size; - result = my_asnprintf (buf, &length, "%d", 12345); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - ASSERT (length == 5); - if (size < 6) - ASSERT (result != buf); - ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); - if (result != buf) - free (result); - } -} - -static char * -my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) -{ - va_list args; - char *ret; - - va_start (args, format); - ret = vasnprintf (resultbuf, lengthp, format, args); - va_end (args); - return ret; -} - -static void -test_vasnprintf () -{ - test_function (my_asnprintf); -} - -static void -test_asnprintf () -{ - test_function (asnprintf); -} - -int -main (int argc, char *argv[]) -{ - test_vasnprintf (); - test_asnprintf (); - return 0; -} diff --git a/lib/gl/tests/test-vasprintf.c b/lib/gl/tests/test-vasprintf.c deleted file mode 100644 index cfde4f49c7..0000000000 --- a/lib/gl/tests/test-vasprintf.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Test of vasprintf() and asprintf() functions. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <stdio.h> - -#include "signature.h" -SIGNATURE_CHECK (asprintf, int, (char **, char const *, ...)); -SIGNATURE_CHECK (vasprintf, int, (char **, char const *, va_list)); - -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> - -#include "macros.h" - -static int -my_asprintf (char **result, const char *format, ...) -{ - va_list args; - int ret; - - va_start (args, format); - ret = vasprintf (result, format, args); - va_end (args); - return ret; -} - -static void -test_vasprintf () -{ - int repeat; - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = my_asprintf (&result, "%d", 12345); - ASSERT (retval == 5); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - free (result); - } - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = my_asprintf (&result, "%08lx", 12345UL); - ASSERT (retval == 8); - ASSERT (result != NULL); - ASSERT (strcmp (result, "00003039") == 0); - free (result); - } -} - -static void -test_asprintf () -{ - int repeat; - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = asprintf (&result, "%d", 12345); - ASSERT (retval == 5); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - free (result); - } - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = asprintf (&result, "%08lx", 12345UL); - ASSERT (retval == 8); - ASSERT (result != NULL); - ASSERT (strcmp (result, "00003039") == 0); - free (result); - } -} - -int -main (int argc, char *argv[]) -{ - test_vasprintf (); - test_asprintf (); - return 0; -} diff --git a/lib/gl/tests/test-verify.c b/lib/gl/tests/test-verify.c deleted file mode 100644 index 3f89ba9058..0000000000 --- a/lib/gl/tests/test-verify.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Test the "verify" module. - - Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible. */ - -#include <config.h> - -#include "verify.h" - -#ifndef EXP_FAIL -# define EXP_FAIL 0 -#endif - -int x; -enum { a, b, c }; - -#if EXP_FAIL == 1 -verify (x >= 0); /* should give ERROR: non-constant expression */ -#endif -verify (c == 2); /* should be ok */ -#if EXP_FAIL == 2 -verify (1 + 1 == 3); /* should give ERROR */ -#endif -verify (1 == 1); verify (1 == 1); /* should be ok */ - -enum -{ - item = verify_true (1 == 1) * 0 + 17 /* should be ok */ -}; - -static int -function (int n) -{ -#if EXP_FAIL == 3 - verify (n >= 0); /* should give ERROR: non-constant expression */ -#endif - verify (c == 2); /* should be ok */ -#if EXP_FAIL == 4 - verify (1 + 1 == 3); /* should give ERROR */ -#endif - verify (1 == 1); verify (1 == 1); /* should be ok */ - - if (n) - return ((void) verify_true (1 == 1), verify_true (1 == 1) + 7); /* should be ok */ -#if EXP_FAIL == 5 - return (verify_true (1 == 2), 5); /* should give ERROR */ -#endif - return 0; -} - -int -main (void) -{ - return !(function (0) == 0 && function (1) == 8); -} diff --git a/lib/gl/tests/test-verify.sh b/lib/gl/tests/test-verify.sh deleted file mode 100755 index 3e7676148a..0000000000 --- a/lib/gl/tests/test-verify.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -. "${srcdir=.}/init.sh" - -# We are not interested in triggering bugs in the compilers and tools -# (such as gcc 4.3.1 on openSUSE 11.0). -unset MALLOC_PERTURB_ - -# Rather than figure out how to invoke the compiler with the right -# include path ourselves, we let make do it: -(cd "$initial_cwd_" && rm -f test-verify.o \ - && $MAKE test-verify.o >/dev/null 2>&1) \ - || skip_ "cannot compile error-free" - -# Now, prove that we encounter all expected compilation failures: -: >out -: >err -for i in 1 2 3 4 5; do - (cd "$initial_cwd_" - rm -f test-verify.o - $MAKE CFLAGS=-DEXP_FAIL=$i test-verify.o) >>out 2>>err \ - && { warn_ "compiler didn't detect verification failure $i"; fail=1; } -done - -Exit $fail diff --git a/lib/gl/tests/test-vsnprintf.c b/lib/gl/tests/test-vsnprintf.c deleted file mode 100644 index 1bfa5540f7..0000000000 --- a/lib/gl/tests/test-vsnprintf.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Test of vsnprintf() function. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <stdio.h> - -#include "signature.h" -SIGNATURE_CHECK (vsnprintf, int, (char *, size_t, char const *, va_list)); - -#include <stdarg.h> -#include <string.h> - -#include "macros.h" - -static int -my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} - -int -main (int argc, char *argv[]) -{ - char buf[8]; - int size; - int retval; - - for (size = 0; size <= 8; size++) - { - memcpy (buf, "DEADBEEF", 8); - retval = my_snprintf (buf, size, "%d", 12345); - if (size < 6) - { -#if CHECK_VSNPRINTF_POSIX - ASSERT (retval < 0 || retval >= size); -#endif - if (size > 0) - { - ASSERT (memcmp (buf, "12345", size - 1) == 0); - ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); - } -#if !CHECK_VSNPRINTF_POSIX - if (size > 0) -#endif - ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); - } - else - { - ASSERT (retval == 5); - ASSERT (memcmp (buf, "12345\0EF", 8) == 0); - } - } - - return 0; -} diff --git a/lib/gl/tests/test-wchar.c b/lib/gl/tests/test-wchar.c deleted file mode 100644 index 2a03d6b669..0000000000 --- a/lib/gl/tests/test-wchar.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Test of <wchar.h> substitute. - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* Written by Bruno Haible <bruno@clisp.org>, 2007. */ - -#include <config.h> - -#include <wchar.h> - -#include "verify.h" - -/* Check that the types wchar_t and wint_t are defined. */ -wchar_t a = 'c'; -wint_t b = 'x'; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -} diff --git a/lib/gl/tests/zerosize-ptr.h b/lib/gl/tests/zerosize-ptr.h deleted file mode 100644 index cfab200871..0000000000 --- a/lib/gl/tests/zerosize-ptr.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Return a pointer to a zero-size object in memory. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. - - This 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/>. */ - -/* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL - argument. Therefore this file produces a non-NULL pointer which cannot - be dereferenced, if possible. */ - -#include <stdlib.h> - -/* Test whether mmap() and mprotect() are available. - We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. - HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an - mprotect() function in libgcc.a. */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# include <fcntl.h> -# include <unistd.h> -# include <sys/types.h> -# include <sys/mman.h> -/* Define MAP_FILE when it isn't otherwise. */ -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif - -/* Return a pointer to a zero-size object in memory (that is, actually, a - pointer to a page boundary where the previous page is readable and writable - and the next page is neither readable not writable), if possible. - Return NULL otherwise. */ - -static void * -zerosize_ptr (void) -{ -/* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is - not defined on HP-UX 11 (since it does not support MAP_FIXED). */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - return two_pages + pagesize; - } -#endif - return NULL; -} diff --git a/lib/gl/time.in.h b/lib/gl/time.in.h deleted file mode 100644 index 9d0d68031b..0000000000 --- a/lib/gl/time.in.h +++ /dev/null @@ -1,239 +0,0 @@ -/* A more-standard <time.h>. - - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Don't get in the way of glibc when it includes time.h merely to - declare a few standard symbols, rather than to declare all the - symbols. Also, Solaris 8 <time.h> eventually includes itself - recursively; if that is happening, just include the system <time.h> - without adding our own declarations. */ -#if (defined __need_time_t || defined __need_clock_t \ - || defined __need_timespec \ - || defined _GL_TIME_H) - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -#else - -# define _GL_TIME_H - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -/* NetBSD 5.0 mis-defines NULL. */ -# include <stddef.h> - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). - Or they define it with the wrong member names or define it in <sys/time.h> - (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the - pthreads-win32 library defines it in <pthread.h>. */ -# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ -# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -# include <sys/time.h> -# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -# include <pthread.h> -/* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */ -# undef asctime_r -# undef ctime_r -# undef gmtime_r -# undef localtime_r -# undef rand_r -# undef strtok_r -# else - -# ifdef __cplusplus -extern "C" { -# endif - -# undef timespec -# define timespec rpl_timespec -struct timespec -{ - time_t tv_sec; - long int tv_nsec; -}; - -# ifdef __cplusplus -} -# endif - -# endif -# endif - -/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires - time_t to be an integer type, even though C99 permits floating - point. We don't know of any implementation that uses floating - point, and it is much easier to write code that doesn't have to - worry about that corner case, so we force the issue. */ -struct __time_t_must_be_integral { - unsigned int __floating_time_t_unsupported : (time_t) 1; -}; - -/* Sleep for at least RQTP seconds unless interrupted, If interrupted, - return -1 and store the remaining time into RMTP. See - <http://www.opengroup.org/susv3xsh/nanosleep.html>. */ -# if @GNULIB_NANOSLEEP@ -# if @REPLACE_NANOSLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define nanosleep rpl_nanosleep -# endif -_GL_FUNCDECL_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# else -# if ! @HAVE_NANOSLEEP@ -_GL_FUNCDECL_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# endif -_GL_CXXALIASWARN (nanosleep); -# endif - -/* Return the 'time_t' representation of TP and normalize TP. */ -# if @GNULIB_MKTIME@ -# if @REPLACE_MKTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mktime rpl_mktime -# endif -_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); -# else -_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); -# endif -_GL_CXXALIASWARN (mktime); -# endif - -/* Convert TIMER to RESULT, assuming local time and UTC respectively. See - <http://www.opengroup.org/susv3xsh/localtime_r.html> and - <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */ -# if @GNULIB_TIME_R@ -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef localtime_r -# define localtime_r rpl_localtime_r -# endif -_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_LOCALTIME_R@ -_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -_GL_CXXALIASWARN (localtime_r); -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gmtime_r -# define gmtime_r rpl_gmtime_r -# endif -_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_LOCALTIME_R@ -_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -_GL_CXXALIASWARN (gmtime_r); -# endif - -/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store - the resulting broken-down time into TM. See - <http://www.opengroup.org/susv3xsh/strptime.html>. */ -# if @GNULIB_STRPTIME@ -# if ! @HAVE_STRPTIME@ -_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm)); -_GL_CXXALIASWARN (strptime); -# endif - -/* Convert TM to a time_t value, assuming UTC. */ -# if @GNULIB_TIMEGM@ -# if @REPLACE_TIMEGM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef timegm -# define timegm rpl_timegm -# endif -_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); -# else -# if ! @HAVE_TIMEGM@ -_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); -# endif -_GL_CXXALIASWARN (timegm); -# endif - -/* Encourage applications to avoid unsafe functions that can overrun - buffers when given outlandish struct tm values. Portable - applications should use strftime (or even sprintf) instead. */ -# if defined GNULIB_POSIXCHECK -# undef asctime -_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif - -#endif diff --git a/lib/gl/time_r.c b/lib/gl/time_r.c deleted file mode 100644 index 591bc02b23..0000000000 --- a/lib/gl/time_r.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Reentrant time functions like localtime_r. - - Copyright (C) 2003, 2006-2007, 2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Paul Eggert. */ - -#include <config.h> - -#include <time.h> - -static struct tm * -copy_tm_result (struct tm *dest, struct tm const *src) -{ - if (! src) - return 0; - *dest = *src; - return dest; -} - - -struct tm * -gmtime_r (time_t const * restrict t, struct tm * restrict tp) -{ - return copy_tm_result (tp, gmtime (t)); -} - -struct tm * -localtime_r (time_t const * restrict t, struct tm * restrict tp) -{ - return copy_tm_result (tp, localtime (t)); -} diff --git a/lib/gl/unistd.in.h b/lib/gl/unistd.in.h deleted file mode 100644 index 255869af1e..0000000000 --- a/lib/gl/unistd.in.h +++ /dev/null @@ -1,1344 +0,0 @@ -/* Substitute for and wrapper around <unistd.h>. - Copyright (C) 2003-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Special invocation convention: - - On mingw, several headers, including <winsock2.h>, include <unistd.h>, - but we need to ensure that both the system <unistd.h> and <winsock2.h> - are completely included before we replace gethostname. */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H -/* <unistd.h> is being indirectly included for the first time from - <winsock2.h>; avoid declaring any overrides. */ -# if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -# else -# error unexpected; report this to bug-gnulib@gnu.org -# endif -# define _GL_WINSOCK2_H_WITNESS - -/* Normal invocation. */ -#elif !defined _GL_UNISTD_H - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -#endif - -/* Get all possible declarations of gethostname(). */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_INCLUDING_WINSOCK2_H -# define _GL_INCLUDING_WINSOCK2_H -# include <winsock2.h> -# undef _GL_INCLUDING_WINSOCK2_H -#endif - -#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H -#define _GL_UNISTD_H - -/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ -#include <stddef.h> - -/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ -/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */ -/* But avoid namespace pollution on glibc systems. */ -#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ - && defined __CYGWIN__)) \ - && ! defined __GLIBC__ -# include <stdio.h> -#endif - -/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */ -/* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ - && ! defined __GLIBC__ -# include <fcntl.h> -#endif - -/* mingw fails to declare _exit in <unistd.h>. */ -/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ -/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include <stdlib.h> -#endif - -/* mingw declares getcwd in <io.h>, not in <unistd.h>. */ -#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -# include <io.h> -#endif - -/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. */ -/* But avoid namespace pollution on glibc systems. */ -#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \ - && !defined __GLIBC__ -# include <netdb.h> -#endif - -#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ - || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) -/* Get ssize_t. */ -# include <sys/types.h> -#endif - -/* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT -# include <getopt.h> -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -#if @GNULIB_GETHOSTNAME@ -/* Get all possible declarations of gethostname(). */ -# if @UNISTD_H_HAVE_WINSOCK2_H@ -# if !defined _GL_SYS_SOCKET_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef socket -# define socket socket_used_without_including_sys_socket_h -# undef connect -# define connect connect_used_without_including_sys_socket_h -# undef accept -# define accept accept_used_without_including_sys_socket_h -# undef bind -# define bind bind_used_without_including_sys_socket_h -# undef getpeername -# define getpeername getpeername_used_without_including_sys_socket_h -# undef getsockname -# define getsockname getsockname_used_without_including_sys_socket_h -# undef getsockopt -# define getsockopt getsockopt_used_without_including_sys_socket_h -# undef listen -# define listen listen_used_without_including_sys_socket_h -# undef recv -# define recv recv_used_without_including_sys_socket_h -# undef send -# define send send_used_without_including_sys_socket_h -# undef recvfrom -# define recvfrom recvfrom_used_without_including_sys_socket_h -# undef sendto -# define sendto sendto_used_without_including_sys_socket_h -# undef setsockopt -# define setsockopt setsockopt_used_without_including_sys_socket_h -# undef shutdown -# define shutdown shutdown_used_without_including_sys_socket_h -# else - _GL_WARN_ON_USE (socket, - "socket() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (connect, - "connect() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (accept, - "accept() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (bind, - "bind() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (getpeername, - "getpeername() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (getsockname, - "getsockname() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (getsockopt, - "getsockopt() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (listen, - "listen() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (recv, - "recv() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (send, - "send() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (recvfrom, - "recvfrom() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (sendto, - "sendto() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (setsockopt, - "setsockopt() used without including <sys/socket.h>"); - _GL_WARN_ON_USE (shutdown, - "shutdown() used without including <sys/socket.h>"); -# endif -# endif -# if !defined _GL_SYS_SELECT_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else - _GL_WARN_ON_USE (select, - "select() used without including <sys/select.h>"); -# endif -# endif -# endif -#endif - - -/* OS/2 EMX lacks these macros. */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - -/* Ensure *_OK macros exist. */ -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - - -/* Declare overridden functions. */ - - -#if defined GNULIB_POSIXCHECK -/* The access() function is a security risk. */ -_GL_WARN_ON_USE (access, "the access function is a security risk - " - "use the gnulib module faccessat instead"); -#endif - - -#if @GNULIB_CHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/chown.html>. */ -# if @REPLACE_CHOWN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef chown -# define chown rpl_chown -# endif -_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); -# else -# if !@HAVE_CHOWN@ -_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); -# endif -_GL_CXXALIASWARN (chown); -#elif defined GNULIB_POSIXCHECK -# undef chown -# if HAVE_RAW_DECL_CHOWN -_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " - "doesn't treat a uid or gid of -1 on some systems - " - "use gnulib module chown for portability"); -# endif -#endif - - -#if @GNULIB_CLOSE@ -# if @REPLACE_CLOSE@ -/* Automatically included by modules that need a replacement for close. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef close -# define close rpl_close -# endif -_GL_FUNCDECL_RPL (close, int, (int fd)); -_GL_CXXALIAS_RPL (close, int, (int fd)); -# else -_GL_CXXALIAS_SYS (close, int, (int fd)); -# endif -_GL_CXXALIASWARN (close); -#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -# undef close -# define close close_used_without_requesting_gnulib_module_close -#elif defined GNULIB_POSIXCHECK -# undef close -/* Assume close is always declared. */ -_GL_WARN_ON_USE (close, "close does not portably work on sockets - " - "use gnulib module close for portability"); -#endif - - -#if @REPLACE_DUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup rpl_dup -# endif -_GL_FUNCDECL_RPL (dup, int, (int oldfd)); -_GL_CXXALIAS_RPL (dup, int, (int oldfd)); -#else -_GL_CXXALIAS_SYS (dup, int, (int oldfd)); -#endif -_GL_CXXALIASWARN (dup); - - -#if @GNULIB_DUP2@ -/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if - NEWFD = OLDFD, otherwise close NEWFD first if it is open. - Return newfd if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/dup2.html>. */ -# if @REPLACE_DUP2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup2 rpl_dup2 -# endif -_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); -_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); -# else -# if !@HAVE_DUP2@ -_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIASWARN (dup2); -#elif defined GNULIB_POSIXCHECK -# undef dup2 -# if HAVE_RAW_DECL_DUP2 -_GL_WARN_ON_USE (dup2, "dup2 is unportable - " - "use gnulib module dup2 for portability"); -# endif -#endif - - -#if @GNULIB_DUP3@ -/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the - specified flags. - The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Close NEWFD first if it is open. - Return newfd if successful, otherwise -1 and errno set. - See the Linux man page at - <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */ -# if @HAVE_DUP3@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup3 rpl_dup3 -# endif -_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); -# else -_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); -# endif -_GL_CXXALIASWARN (dup3); -#elif defined GNULIB_POSIXCHECK -# undef dup3 -# if HAVE_RAW_DECL_DUP3 -_GL_WARN_ON_USE (dup3, "dup3 is unportable - " - "use gnulib module dup3 for portability"); -# endif -#endif - - -#if @GNULIB_ENVIRON@ -# if !@HAVE_DECL_ENVIRON@ -/* Set of environment variables and values. An array of strings of the form - "VARIABLE=VALUE", terminated with a NULL. */ -# if defined __APPLE__ && defined __MACH__ -# include <crt_externs.h> -# define environ (*_NSGetEnviron ()) -# else -# ifdef __cplusplus -extern "C" { -# endif -extern char **environ; -# ifdef __cplusplus -} -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if HAVE_RAW_DECL_ENVIRON -static inline char *** -rpl_environ (void) -{ - return &environ; -} -_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " - "use gnulib module environ for portability"); -# undef environ -# define environ (*rpl_environ ()) -# endif -#endif - - -#if @GNULIB_EUIDACCESS@ -/* Like access(), except that it uses the effective user id and group id of - the current process. */ -# if !@HAVE_EUIDACCESS@ -_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); -_GL_CXXALIASWARN (euidaccess); -# if defined GNULIB_POSIXCHECK -/* Like access(), this function is a security risk. */ -_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " - "use the gnulib module faccessat instead"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef euidaccess -# if HAVE_RAW_DECL_EUIDACCESS -_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " - "use gnulib module euidaccess for portability"); -# endif -#endif - - -#if @GNULIB_FACCESSAT@ -# if !@HAVE_FACCESSAT@ -_GL_FUNCDECL_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag)); -_GL_CXXALIASWARN (faccessat); -#elif defined GNULIB_POSIXCHECK -# undef faccessat -# if HAVE_RAW_DECL_FACCESSAT -_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " - "use gnulib module faccessat for portability"); -# endif -#endif - - -#if @GNULIB_FCHDIR@ -/* Change the process' current working directory to the directory on which - the given file descriptor is open. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/fchdir.html>. */ -# if ! @HAVE_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - -/* Gnulib internal hooks needed to maintain the fchdir metadata. */ -_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) - _GL_ARG_NONNULL ((2)); -_GL_EXTERN_C void _gl_unregister_fd (int fd); -_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); -_GL_EXTERN_C const char *_gl_directory_name (int fd); - -# endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); -#elif defined GNULIB_POSIXCHECK -# undef fchdir -# if HAVE_RAW_DECL_FCHDIR -_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " - "use gnulib module fchdir for portability"); -# endif -#endif - - -#if @GNULIB_FCHOWNAT@ -# if @REPLACE_FCHOWNAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fchownat -# define fchownat rpl_fchownat -# endif -_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# else -# if !@HAVE_FCHOWNAT@ -_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# endif -_GL_CXXALIASWARN (fchownat); -#elif defined GNULIB_POSIXCHECK -# undef fchownat -# if HAVE_RAW_DECL_FCHOWNAT -_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FSYNC@ -/* Synchronize changes to a file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/fsync.html>. */ -# if !@HAVE_FSYNC@ -_GL_FUNCDECL_SYS (fsync, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (fsync, int, (int fd)); -_GL_CXXALIASWARN (fsync); -#elif defined GNULIB_POSIXCHECK -# undef fsync -# if HAVE_RAW_DECL_FSYNC -_GL_WARN_ON_USE (fsync, "fsync is unportable - " - "use gnulib module fsync for portability"); -# endif -#endif - - -#if @GNULIB_FTRUNCATE@ -/* Change the size of the file to which FD is opened to become equal to LENGTH. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/ftruncate.html>. */ -# if !@HAVE_FTRUNCATE@ -_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); -# endif -_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); -_GL_CXXALIASWARN (ftruncate); -#elif defined GNULIB_POSIXCHECK -# undef ftruncate -# if HAVE_RAW_DECL_FTRUNCATE -_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " - "use gnulib module ftruncate for portability"); -# endif -#endif - - -#if @GNULIB_GETCWD@ -/* Get the name of the current working directory, and put it in SIZE bytes - of BUF. - Return BUF if successful, or NULL if the directory couldn't be determined - or SIZE was too small. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/getcwd.html>. - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ -# if @REPLACE_GETCWD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getcwd rpl_getcwd -# endif -_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); -_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); -# else -/* Need to cast, because on mingw, the second parameter is - int size. */ -_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); -# endif -_GL_CXXALIASWARN (getcwd); -#elif defined GNULIB_POSIXCHECK -# undef getcwd -# if HAVE_RAW_DECL_GETCWD -_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " - "use gnulib module getcwd for portability"); -# endif -#endif - - -#if @GNULIB_GETDOMAINNAME@ -/* Return the NIS domain name of the machine. - WARNING! The NIS domain name is unrelated to the fully qualified host name - of the machine. It is also unrelated to email addresses. - WARNING! The NIS domain name is usually the empty string or "(none)" when - not using NIS. - - Put up to LEN bytes of the NIS domain name into NAME. - Null terminate it if the name is shorter than LEN. - If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @REPLACE_GETDOMAINNAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdomainname -# define getdomainname rpl_getdomainname -# endif -_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); -# else -# if !@HAVE_DECL_GETDOMAINNAME@ -_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (getdomainname); -#elif defined GNULIB_POSIXCHECK -# undef getdomainname -# if HAVE_RAW_DECL_GETDOMAINNAME -_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " - "use gnulib module getdomainname for portability"); -# endif -#endif - - -#if @GNULIB_GETDTABLESIZE@ -/* Return the maximum number of file descriptors in the current process. - In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ -# if !@HAVE_GETDTABLESIZE@ -_GL_FUNCDECL_SYS (getdtablesize, int, (void)); -# endif -_GL_CXXALIAS_SYS (getdtablesize, int, (void)); -_GL_CXXALIASWARN (getdtablesize); -#elif defined GNULIB_POSIXCHECK -# undef getdtablesize -# if HAVE_RAW_DECL_GETDTABLESIZE -_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " - "use gnulib module getdtablesize for portability"); -# endif -#endif - - -#if @GNULIB_GETGROUPS@ -/* Return the supplemental groups that the current process belongs to. - It is unspecified whether the effective group id is in the list. - If N is 0, return the group count; otherwise, N describes how many - entries are available in GROUPS. Return -1 and set errno if N is - not 0 and not large enough. Fails with ENOSYS on some systems. */ -# if @REPLACE_GETGROUPS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getgroups -# define getgroups rpl_getgroups -# endif -_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); -_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); -# else -# if !@HAVE_GETGROUPS@ -_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIASWARN (getgroups); -#elif defined GNULIB_POSIXCHECK -# undef getgroups -# if HAVE_RAW_DECL_GETGROUPS -_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " - "use gnulib module getgroups for portability"); -# endif -#endif - - -#if @GNULIB_GETHOSTNAME@ -/* Return the standard host name of the machine. - WARNING! The host name may or may not be fully qualified. - - Put up to LEN bytes of the host name into NAME. - Null terminate it if the name is shorter than LEN. - If the host name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @UNISTD_H_HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname rpl_gethostname -# endif -_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); -# else -# if !@HAVE_GETHOSTNAME@ -_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 systems, the second parameter is - int len. */ -_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (gethostname); -#elif @UNISTD_H_HAVE_WINSOCK2_H@ -# undef gethostname -# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname -#elif defined GNULIB_POSIXCHECK -# undef gethostname -# if HAVE_RAW_DECL_GETHOSTNAME -_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " - "use gnulib module gethostname for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN@ -/* Returns the user's login name, or NULL if it cannot be found. Upon error, - returns NULL with errno set. - - See <http://www.opengroup.org/susv3xsh/getlogin.html>. - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if !@HAVE_GETLOGIN@ -_GL_FUNCDECL_SYS (getlogin, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getlogin, char *, (void)); -_GL_CXXALIASWARN (getlogin); -#elif defined GNULIB_POSIXCHECK -# undef getlogin -# if HAVE_RAW_DECL_GETLOGIN -_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " - "use gnulib module getlogin for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN_R@ -/* Copies the user's login name to NAME. - The array pointed to by NAME has room for SIZE bytes. - - Returns 0 if successful. Upon error, an error number is returned, or -1 in - the case that the login name cannot be found but no specific error is - provided (this case is hopefully rare but is left open by the POSIX spec). - - See <http://www.opengroup.org/susv3xsh/getlogin.html>. - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if !@HAVE_DECL_GETLOGIN_R@ -_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 systems, the second argument is - int size. */ -_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); -_GL_CXXALIASWARN (getlogin_r); -#elif defined GNULIB_POSIXCHECK -# undef getlogin_r -# if HAVE_RAW_DECL_GETLOGIN_R -_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " - "use gnulib module getlogin_r for portability"); -# endif -#endif - - -#if @GNULIB_GETPAGESIZE@ -# if @REPLACE_GETPAGESIZE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize rpl_getpagesize -# endif -_GL_FUNCDECL_RPL (getpagesize, int, (void)); -_GL_CXXALIAS_RPL (getpagesize, int, (void)); -# else -# if !@HAVE_GETPAGESIZE@ -# if !defined getpagesize -/* This is for POSIX systems. */ -# if !defined _gl_getpagesize && defined _SC_PAGESIZE -# if ! (defined __VMS && __VMS_VER < 70000000) -# define _gl_getpagesize() sysconf (_SC_PAGESIZE) -# endif -# endif -/* This is for older VMS. */ -# if !defined _gl_getpagesize && defined __VMS -# ifdef __ALPHA -# define _gl_getpagesize() 8192 -# else -# define _gl_getpagesize() 512 -# endif -# endif -/* This is for BeOS. */ -# if !defined _gl_getpagesize && @HAVE_OS_H@ -# include <OS.h> -# if defined B_PAGE_SIZE -# define _gl_getpagesize() B_PAGE_SIZE -# endif -# endif -/* This is for AmigaOS4.0. */ -# if !defined _gl_getpagesize && defined __amigaos4__ -# define _gl_getpagesize() 2048 -# endif -/* This is for older Unix systems. */ -# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ -# include <sys/param.h> -# ifdef EXEC_PAGESIZE -# define _gl_getpagesize() EXEC_PAGESIZE -# else -# ifdef NBPG -# ifndef CLSIZE -# define CLSIZE 1 -# endif -# define _gl_getpagesize() (NBPG * CLSIZE) -# else -# ifdef NBPC -# define _gl_getpagesize() NBPC -# endif -# endif -# endif -# endif -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize() _gl_getpagesize () -# else -static inline int -getpagesize () -{ - return _gl_getpagesize (); -} -# endif -# endif -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ -_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); -# endif -# if @HAVE_DECL_GETPAGESIZE@ -_GL_CXXALIASWARN (getpagesize); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getpagesize -# if HAVE_RAW_DECL_GETPAGESIZE -_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " - "use gnulib module getpagesize for portability"); -# endif -#endif - - -#if @GNULIB_GETUSERSHELL@ -/* Return the next valid login shell on the system, or NULL when the end of - the list has been reached. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (getusershell, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getusershell, char *, (void)); -_GL_CXXALIASWARN (getusershell); -#elif defined GNULIB_POSIXCHECK -# undef getusershell -# if HAVE_RAW_DECL_GETUSERSHELL -_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Rewind to pointer that is advanced at each getusershell() call. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (setusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (setusershell, void, (void)); -_GL_CXXALIASWARN (setusershell); -#elif defined GNULIB_POSIXCHECK -# undef setusershell -# if HAVE_RAW_DECL_SETUSERSHELL -_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Free the pointer that is advanced at each getusershell() call and - associated resources. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (endusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (endusershell, void, (void)); -_GL_CXXALIASWARN (endusershell); -#elif defined GNULIB_POSIXCHECK -# undef endusershell -# if HAVE_RAW_DECL_ENDUSERSHELL -_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - - -#if @GNULIB_LCHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Do not follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/lchown.html>. */ -# if @REPLACE_LCHOWN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lchown -# define lchown rpl_lchown -# endif -_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); -# else -# if !@HAVE_LCHOWN@ -_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); -# endif -_GL_CXXALIASWARN (lchown); -#elif defined GNULIB_POSIXCHECK -# undef lchown -# if HAVE_RAW_DECL_LCHOWN -_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " - "use gnulib module lchown for portability"); -# endif -#endif - - -#if @GNULIB_LINK@ -/* Create a new hard link for an existing file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/link.html>. */ -# if @REPLACE_LINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define link rpl_link -# endif -_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); -# else -# if !@HAVE_LINK@ -_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); -# endif -_GL_CXXALIASWARN (link); -#elif defined GNULIB_POSIXCHECK -# undef link -# if HAVE_RAW_DECL_LINK -_GL_WARN_ON_USE (link, "link is unportable - " - "use gnulib module link for portability"); -# endif -#endif - - -#if @GNULIB_LINKAT@ -/* Create a new hard link for an existing file, relative to two - directories. FLAG controls whether symlinks are followed. - Return 0 if successful, otherwise -1 and errno set. */ -# if @REPLACE_LINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef linkat -# define linkat rpl_linkat -# endif -_GL_FUNCDECL_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# else -# if !@HAVE_LINKAT@ -_GL_FUNCDECL_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# endif -_GL_CXXALIASWARN (linkat); -#elif defined GNULIB_POSIXCHECK -# undef linkat -# if HAVE_RAW_DECL_LINKAT -_GL_WARN_ON_USE (linkat, "linkat is unportable - " - "use gnulib module linkat for portability"); -# endif -#endif - - -#if @GNULIB_LSEEK@ -/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. - Return the new offset if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/lseek.html>. */ -# if @REPLACE_LSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lseek rpl_lseek -# endif -_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -# else -_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (lseek); -#elif defined GNULIB_POSIXCHECK -# undef lseek -# if HAVE_RAW_DECL_LSEEK -_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " - "systems - use gnulib module lseek for portability"); -# endif -#endif - - -#if @GNULIB_PIPE2@ -/* Create a pipe, applying the given flags when opening the read-end of the - pipe and the write-end of the pipe. - The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. - See also the Linux man page at - <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */ -# if @HAVE_PIPE2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pipe2 rpl_pipe2 -# endif -_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); -# else -_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); -# endif -_GL_CXXALIASWARN (pipe2); -#elif defined GNULIB_POSIXCHECK -# undef pipe2 -# if HAVE_RAW_DECL_PIPE2 -_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " - "use gnulib module pipe2 for portability"); -# endif -#endif - - -#if @GNULIB_PREAD@ -/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. - Return the number of bytes placed into BUF if successful, otherwise - set errno and return -1. 0 indicates EOF. See the POSIX:2001 - specification <http://www.opengroup.org/susv3xsh/pread.html>. */ -# if @REPLACE_PREAD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pread rpl_pread -# endif -_GL_FUNCDECL_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PREAD@ -_GL_FUNCDECL_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pread); -#elif defined GNULIB_POSIXCHECK -# undef pread -# if HAVE_RAW_DECL_PREAD -_GL_WARN_ON_USE (pread, "pread is unportable - " - "use gnulib module pread for portability"); -# endif -#endif - - -#if @GNULIB_PWRITE@ -/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. - Return the number of bytes written if successful, otherwise - set errno and return -1. 0 indicates nothing written. See the - POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/pwrite.html>. */ -# if @REPLACE_PWRITE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pwrite rpl_pwrite -# endif -_GL_FUNCDECL_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PWRITE@ -_GL_FUNCDECL_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pwrite); -#elif defined GNULIB_POSIXCHECK -# undef pwrite -# if HAVE_RAW_DECL_PWRITE -_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " - "use gnulib module pwrite for portability"); -# endif -#endif - - -#if @GNULIB_READLINK@ -/* Read the contents of the symbolic link FILE and place the first BUFSIZE - bytes of it into BUF. Return the number of bytes placed into BUF if - successful, otherwise -1 and errno set. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/readlink.html>. */ -# if @REPLACE_READLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define readlink rpl_readlink -# endif -_GL_FUNCDECL_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# else -# if !@HAVE_READLINK@ -_GL_FUNCDECL_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# endif -_GL_CXXALIASWARN (readlink); -#elif defined GNULIB_POSIXCHECK -# undef readlink -# if HAVE_RAW_DECL_READLINK -_GL_WARN_ON_USE (readlink, "readlink is unportable - " - "use gnulib module readlink for portability"); -# endif -#endif - - -#if @GNULIB_READLINKAT@ -# if !@HAVE_READLINKAT@ -_GL_FUNCDECL_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len)); -_GL_CXXALIASWARN (readlinkat); -#elif defined GNULIB_POSIXCHECK -# undef readlinkat -# if HAVE_RAW_DECL_READLINKAT -_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " - "use gnulib module readlinkat for portability"); -# endif -#endif - - -#if @GNULIB_RMDIR@ -/* Remove the directory DIR. */ -# if @REPLACE_RMDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define rmdir rpl_rmdir -# endif -_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); -# else -_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); -# endif -_GL_CXXALIASWARN (rmdir); -#elif defined GNULIB_POSIXCHECK -# undef rmdir -# if HAVE_RAW_DECL_RMDIR -_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " - "use gnulib module rmdir for portability"); -# endif -#endif - - -#if @GNULIB_SLEEP@ -/* Pause the execution of the current thread for N seconds. - Returns the number of seconds left to sleep. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/sleep.html>. */ -# if @REPLACE_SLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sleep -# define sleep rpl_sleep -# endif -_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); -_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); -# else -# if !@HAVE_SLEEP@ -_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIASWARN (sleep); -#elif defined GNULIB_POSIXCHECK -# undef sleep -# if HAVE_RAW_DECL_SLEEP -_GL_WARN_ON_USE (sleep, "sleep is unportable - " - "use gnulib module sleep for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINK@ -# if @REPLACE_SYMLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef symlink -# define symlink rpl_symlink -# endif -_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); -# else -# if !@HAVE_SYMLINK@ -_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); -# endif -_GL_CXXALIASWARN (symlink); -#elif defined GNULIB_POSIXCHECK -# undef symlink -# if HAVE_RAW_DECL_SYMLINK -_GL_WARN_ON_USE (symlink, "symlink is not portable - " - "use gnulib module symlink for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINKAT@ -# if !@HAVE_SYMLINKAT@ -_GL_FUNCDECL_SYS (symlinkat, int, - (char const *contents, int fd, char const *file) - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (symlinkat, int, - (char const *contents, int fd, char const *file)); -_GL_CXXALIASWARN (symlinkat); -#elif defined GNULIB_POSIXCHECK -# undef symlinkat -# if HAVE_RAW_DECL_SYMLINKAT -_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " - "use gnulib module symlinkat for portability"); -# endif -#endif - - -#if @GNULIB_TTYNAME_R@ -/* Store at most BUFLEN characters of the pathname of the terminal FD is - open on in BUF. Return 0 on success, otherwise an error number. */ -# if @REPLACE_TTYNAME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ttyname_r -# define ttyname_r rpl_ttyname_r -# endif -_GL_FUNCDECL_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# else -# if !@HAVE_TTYNAME_R@ -_GL_FUNCDECL_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# endif -_GL_CXXALIASWARN (ttyname_r); -#elif defined GNULIB_POSIXCHECK -# undef ttyname_r -# if HAVE_RAW_DECL_TTYNAME_R -_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " - "use gnulib module ttyname_r for portability"); -# endif -#endif - - -#if @GNULIB_UNLINK@ -# if @REPLACE_UNLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlink -# define unlink rpl_unlink -# endif -_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unlink, int, (char const *file)); -# else -_GL_CXXALIAS_SYS (unlink, int, (char const *file)); -# endif -_GL_CXXALIASWARN (unlink); -#elif defined GNULIB_POSIXCHECK -# undef unlink -# if HAVE_RAW_DECL_UNLINK -_GL_WARN_ON_USE (unlink, "unlink is not portable - " - "use gnulib module unlink for portability"); -# endif -#endif - - -#if @GNULIB_UNLINKAT@ -# if @REPLACE_UNLINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlinkat -# define unlinkat rpl_unlinkat -# endif -_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); -# else -# if !@HAVE_UNLINKAT@ -_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); -# endif -_GL_CXXALIASWARN (unlinkat); -#elif defined GNULIB_POSIXCHECK -# undef unlinkat -# if HAVE_RAW_DECL_UNLINKAT -_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_USLEEP@ -/* Pause the execution of the current thread for N microseconds. - Returns 0 on completion, or -1 on range error. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/sleep.html>. */ -# if @REPLACE_USLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef usleep -# define usleep rpl_usleep -# endif -_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); -_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); -# else -# if !@HAVE_USLEEP@ -_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIASWARN (usleep); -#elif defined GNULIB_POSIXCHECK -# undef usleep -# if HAVE_RAW_DECL_USLEEP -_GL_WARN_ON_USE (usleep, "usleep is unportable - " - "use gnulib module usleep for portability"); -# endif -#endif - - -#if @GNULIB_WRITE@ -/* Write up to COUNT bytes starting at BUF to file descriptor FD. - See the POSIX:2001 specification - <http://www.opengroup.org/susv3xsh/write.html>. */ -# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef write -# define write rpl_write -# endif -_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); -# else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); -# endif -_GL_CXXALIASWARN (write); -#endif - - -#endif /* _GL_UNISTD_H */ -#endif /* _GL_UNISTD_H */ diff --git a/lib/gl/vasnprintf.c b/lib/gl/vasnprintf.c deleted file mode 100644 index 8585e84156..0000000000 --- a/lib/gl/vasnprintf.c +++ /dev/null @@ -1,5577 +0,0 @@ -/* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file can be parametrized with the following macros: - VASNPRINTF The name of the function being defined. - FCHAR_T The element type of the format string. - DCHAR_T The element type of the destination (result) string. - FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters - in the format string are ASCII. MUST be set if - FCHAR_T and DCHAR_T are not the same type. - DIRECTIVE Structure denoting a format directive. - Depends on FCHAR_T. - DIRECTIVES Structure denoting the set of format directives of a - format string. Depends on FCHAR_T. - PRINTF_PARSE Function that parses a format string. - Depends on FCHAR_T. - DCHAR_CPY memcpy like function for DCHAR_T[] arrays. - DCHAR_SET memset like function for DCHAR_T[] arrays. - DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. - SNPRINTF The system's snprintf (or similar) function. - This may be either snprintf or swprintf. - TCHAR_T The element type of the argument and result string - of the said SNPRINTF function. This may be either - char or wchar_t. The code exploits that - sizeof (TCHAR_T) | sizeof (DCHAR_T) and - alignof (TCHAR_T) <= alignof (DCHAR_T). - DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. - DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. - DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. - DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. - DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ - -/* Tell glibc's <stdio.h> to provide a prototype for snprintf(). - This must come before <config.h> because <config.h> may include - <features.h>, and once <features.h> has been included, it's too late. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -#ifndef VASNPRINTF -# include <config.h> -#endif -#ifndef IN_LIBINTL -# include <alloca.h> -#endif - -/* Specification. */ -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# include "vasnwprintf.h" -# else -# include "vasnprintf.h" -# endif -#endif - -#include <locale.h> /* localeconv() */ -#include <stdio.h> /* snprintf(), sprintf() */ -#include <stdlib.h> /* abort(), malloc(), realloc(), free() */ -#include <string.h> /* memcpy(), strlen() */ -#include <errno.h> /* errno */ -#include <limits.h> /* CHAR_BIT */ -#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */ -#if HAVE_NL_LANGINFO -# include <langinfo.h> -#endif -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# include "wprintf-parse.h" -# else -# include "printf-parse.h" -# endif -#endif - -/* Checked size_t computations. */ -#include "xsize.h" - -#include "verify.h" - -#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL -# include <math.h> -# include "float+.h" -#endif - -#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL -# include <math.h> -# include "isnand-nolibm.h" -#endif - -#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL -# include <math.h> -# include "isnanl-nolibm.h" -# include "fpucw.h" -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL -# include <math.h> -# include "isnand-nolibm.h" -# include "printf-frexp.h" -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL -# include <math.h> -# include "isnanl-nolibm.h" -# include "printf-frexpl.h" -# include "fpucw.h" -#endif - -/* Default parameters. */ -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# define VASNPRINTF vasnwprintf -# define FCHAR_T wchar_t -# define DCHAR_T wchar_t -# define TCHAR_T wchar_t -# define DCHAR_IS_TCHAR 1 -# define DIRECTIVE wchar_t_directive -# define DIRECTIVES wchar_t_directives -# define PRINTF_PARSE wprintf_parse -# define DCHAR_CPY wmemcpy -# define DCHAR_SET wmemset -# else -# define VASNPRINTF vasnprintf -# define FCHAR_T char -# define DCHAR_T char -# define TCHAR_T char -# define DCHAR_IS_TCHAR 1 -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -# define PRINTF_PARSE printf_parse -# define DCHAR_CPY memcpy -# define DCHAR_SET memset -# endif -#endif -#if WIDE_CHAR_VERSION - /* TCHAR_T is wchar_t. */ -# define USE_SNPRINTF 1 -# if HAVE_DECL__SNWPRINTF - /* On Windows, the function swprintf() has a different signature than - on Unix; we use the function _snwprintf() or - on mingw - snwprintf() - instead. The mingw function snwprintf() has fewer bugs than the - MSVCRT function _snwprintf(), so prefer that. */ -# if defined __MINGW32__ -# define SNPRINTF snwprintf -# else -# define SNPRINTF _snwprintf -# endif -# else - /* Unix. */ -# define SNPRINTF swprintf -# endif -#else - /* TCHAR_T is char. */ - /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. - But don't use it on BeOS, since BeOS snprintf produces no output if the - size argument is >= 0x3000000. - Also don't use it on Linux libc5, since there snprintf with size = 1 - writes any output without bounds, like sprintf. */ -# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) -# define USE_SNPRINTF 1 -# else -# define USE_SNPRINTF 0 -# endif -# if HAVE_DECL__SNPRINTF - /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT - function _snprintf(), so prefer that. */ -# if defined __MINGW32__ -# define SNPRINTF snprintf - /* Here we need to call the native snprintf, not rpl_snprintf. */ -# undef snprintf -# else -# define SNPRINTF _snprintf -# endif -# else - /* Unix. */ -# define SNPRINTF snprintf - /* Here we need to call the native snprintf, not rpl_snprintf. */ -# undef snprintf -# endif -#endif -/* Here we need to call the native sprintf, not rpl_sprintf. */ -#undef sprintf - -/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" - warnings in this file. Use -Dlint to suppress them. */ -#ifdef lint -# define IF_LINT(Code) Code -#else -# define IF_LINT(Code) /* empty */ -#endif - -/* Avoid some warnings from "gcc -Wshadow". - This file doesn't use the exp() and remainder() functions. */ -#undef exp -#define exp expo -#undef remainder -#define remainder rem - -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION -# if (HAVE_STRNLEN && !defined _AIX) -# define local_strnlen strnlen -# else -# ifndef local_strnlen_defined -# define local_strnlen_defined 1 -static size_t -local_strnlen (const char *string, size_t maxlen) -{ - const char *end = memchr (string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} -# endif -# endif -#endif - -#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T -# if HAVE_WCSLEN -# define local_wcslen wcslen -# else - /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid - a dependency towards this library, here is a local substitute. - Define this substitute only once, even if this file is included - twice in the same compilation unit. */ -# ifndef local_wcslen_defined -# define local_wcslen_defined 1 -static size_t -local_wcslen (const wchar_t *s) -{ - const wchar_t *ptr; - - for (ptr = s; *ptr != (wchar_t) 0; ptr++) - ; - return ptr - s; -} -# endif -# endif -#endif - -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION -# if HAVE_WCSNLEN -# define local_wcsnlen wcsnlen -# else -# ifndef local_wcsnlen_defined -# define local_wcsnlen_defined 1 -static size_t -local_wcsnlen (const wchar_t *s, size_t maxlen) -{ - const wchar_t *ptr; - - for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) - ; - return ptr - s; -} -# endif -# endif -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL -/* Determine the decimal-point character according to the current locale. */ -# ifndef decimal_point_char_defined -# define decimal_point_char_defined 1 -static char -decimal_point_char (void) -{ - const char *point; - /* Determine it in a multithread-safe way. We know nl_langinfo is - multithread-safe on glibc systems and MacOS X systems, but is not required - to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. - localeconv() is rarely multithread-safe. */ -# if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__)) - point = nl_langinfo (RADIXCHAR); -# elif 1 - char pointbuf[5]; - sprintf (pointbuf, "%#.0f", 1.0); - point = &pointbuf[1]; -# else - point = localeconv () -> decimal_point; -# endif - /* The decimal point is always a single byte: either '.' or ','. */ - return (point[0] != '\0' ? point[0] : '.'); -} -# endif -#endif - -#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL - -/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ -static int -is_infinite_or_zero (double x) -{ - return isnand (x) || x + x == x; -} - -#endif - -#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL - -/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ -static int -is_infinite_or_zerol (long double x) -{ - return isnanl (x) || x + x == x; -} - -#endif - -#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL - -/* Converting 'long double' to decimal without rare rounding bugs requires - real bignums. We use the naming conventions of GNU gmp, but vastly simpler - (and slower) algorithms. */ - -typedef unsigned int mp_limb_t; -# define GMP_LIMB_BITS 32 -verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); - -typedef unsigned long long mp_twolimb_t; -# define GMP_TWOLIMB_BITS 64 -verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); - -/* Representation of a bignum >= 0. */ -typedef struct -{ - size_t nlimbs; - mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ -} mpn_t; - -/* Compute the product of two bignums >= 0. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -multiply (mpn_t src1, mpn_t src2, mpn_t *dest) -{ - const mp_limb_t *p1; - const mp_limb_t *p2; - size_t len1; - size_t len2; - - if (src1.nlimbs <= src2.nlimbs) - { - len1 = src1.nlimbs; - p1 = src1.limbs; - len2 = src2.nlimbs; - p2 = src2.limbs; - } - else - { - len1 = src2.nlimbs; - p1 = src2.limbs; - len2 = src1.nlimbs; - p2 = src1.limbs; - } - /* Now 0 <= len1 <= len2. */ - if (len1 == 0) - { - /* src1 or src2 is zero. */ - dest->nlimbs = 0; - dest->limbs = (mp_limb_t *) malloc (1); - } - else - { - /* Here 1 <= len1 <= len2. */ - size_t dlen; - mp_limb_t *dp; - size_t k, i, j; - - dlen = len1 + len2; - dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); - if (dp == NULL) - return NULL; - for (k = len2; k > 0; ) - dp[--k] = 0; - for (i = 0; i < len1; i++) - { - mp_limb_t digit1 = p1[i]; - mp_twolimb_t carry = 0; - for (j = 0; j < len2; j++) - { - mp_limb_t digit2 = p2[j]; - carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; - carry += dp[i + j]; - dp[i + j] = (mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; - } - dp[i + len2] = (mp_limb_t) carry; - } - /* Normalise. */ - while (dlen > 0 && dp[dlen - 1] == 0) - dlen--; - dest->nlimbs = dlen; - dest->limbs = dp; - } - return dest->limbs; -} - -/* Compute the quotient of a bignum a >= 0 and a bignum b > 0. - a is written as a = q * b + r with 0 <= r < b. q is the quotient, r - the remainder. - Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, - q is incremented. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -divide (mpn_t a, mpn_t b, mpn_t *q) -{ - /* Algorithm: - First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] - with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). - If m<n, then q:=0 and r:=a. - If m>=n=1, perform a single-precision division: - r:=0, j:=m, - while j>0 do - {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = - = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r<b[0]<beta} - j:=j-1, r:=r*beta+a[j], q[j]:=floor(r/b[0]), r:=r-b[0]*q[j]. - Normalise [q[m-1],...,q[0]], yields q. - If m>=n>1, perform a multiple-precision division: - We have a/b < beta^(m-n+1). - s:=intDsize-1-(highest bit in b[n-1]), 0<=s<intDsize. - Shift a and b left by s bits, copying them. r:=a. - r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2. - For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} - Compute q* : - q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). - In case of overflow (q* >= beta) set q* := beta-1. - Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] - and c3 := b[n-2] * q*. - {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow - occurred. Furthermore 0 <= c3 < beta^2. - If there was overflow and - r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, - the next test can be skipped.} - While c3 > c2, {Here 0 <= c2 < c3 < beta^2} - Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. - If q* > 0: - Put r := r - b * q* * beta^j. In detail: - [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. - hence: u:=0, for i:=0 to n-1 do - u := u + q* * b[i], - r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), - u:=u div beta (+ 1, if carry in subtraction) - r[n+j]:=r[n+j]-u. - {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 - < q* + 1 <= beta, - the carry u does not overflow.} - If a negative carry occurs, put q* := q* - 1 - and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. - Set q[j] := q*. - Normalise [q[m-n],..,q[0]]; this yields the quotient q. - Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the - rest r. - The room for q[j] can be allocated at the memory location of r[n+j]. - Finally, round-to-even: - Shift r left by 1 bit. - If r > b or if r = b and q[0] is odd, q := q+1. - */ - const mp_limb_t *a_ptr = a.limbs; - size_t a_len = a.nlimbs; - const mp_limb_t *b_ptr = b.limbs; - size_t b_len = b.nlimbs; - mp_limb_t *roomptr; - mp_limb_t *tmp_roomptr = NULL; - mp_limb_t *q_ptr; - size_t q_len; - mp_limb_t *r_ptr; - size_t r_len; - - /* Allocate room for a_len+2 digits. - (Need a_len+1 digits for the real division and 1 more digit for the - final rounding of q.) */ - roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); - if (roomptr == NULL) - return NULL; - - /* Normalise a. */ - while (a_len > 0 && a_ptr[a_len - 1] == 0) - a_len--; - - /* Normalise b. */ - for (;;) - { - if (b_len == 0) - /* Division by zero. */ - abort (); - if (b_ptr[b_len - 1] == 0) - b_len--; - else - break; - } - - /* Here m = a_len >= 0 and n = b_len > 0. */ - - if (a_len < b_len) - { - /* m<n: trivial case. q=0, r := copy of a. */ - r_ptr = roomptr; - r_len = a_len; - memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); - q_ptr = roomptr + a_len; - q_len = 0; - } - else if (b_len == 1) - { - /* n=1: single precision division. - beta^(m-1) <= a < beta^m ==> beta^(m-2) <= a/b < beta^m */ - r_ptr = roomptr; - q_ptr = roomptr + 1; - { - mp_limb_t den = b_ptr[0]; - mp_limb_t remainder = 0; - const mp_limb_t *sourceptr = a_ptr + a_len; - mp_limb_t *destptr = q_ptr + a_len; - size_t count; - for (count = a_len; count > 0; count--) - { - mp_twolimb_t num = - ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; - *--destptr = num / den; - remainder = num % den; - } - /* Normalise and store r. */ - if (remainder > 0) - { - r_ptr[0] = remainder; - r_len = 1; - } - else - r_len = 0; - /* Normalise q. */ - q_len = a_len; - if (q_ptr[q_len - 1] == 0) - q_len--; - } - } - else - { - /* n>1: multiple precision division. - beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> - beta^(m-n-1) <= a/b < beta^(m-n+1). */ - /* Determine s. */ - size_t s; - { - mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ - s = 31; - if (msd >= 0x10000) - { - msd = msd >> 16; - s -= 16; - } - if (msd >= 0x100) - { - msd = msd >> 8; - s -= 8; - } - if (msd >= 0x10) - { - msd = msd >> 4; - s -= 4; - } - if (msd >= 0x4) - { - msd = msd >> 2; - s -= 2; - } - if (msd >= 0x2) - { - msd = msd >> 1; - s -= 1; - } - } - /* 0 <= s < GMP_LIMB_BITS. - Copy b, shifting it left by s bits. */ - if (s > 0) - { - tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); - if (tmp_roomptr == NULL) - { - free (roomptr); - return NULL; - } - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = tmp_roomptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - /* accu must be zero, since that was how s was determined. */ - if (accu != 0) - abort (); - } - b_ptr = tmp_roomptr; - } - /* Copy a, shifting it left by s bits, yields r. - Memory layout: - At the beginning: r = roomptr[0..a_len], - at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ - r_ptr = roomptr; - if (s == 0) - { - memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); - r_ptr[a_len] = 0; - } - else - { - const mp_limb_t *sourceptr = a_ptr; - mp_limb_t *destptr = r_ptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = a_len; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - *destptr++ = (mp_limb_t) accu; - } - q_ptr = roomptr + b_len; - q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ - { - size_t j = a_len - b_len; /* m-n */ - mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ - mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ - mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ - ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; - /* Division loop, traversed m-n+1 times. - j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ - for (;;) - { - mp_limb_t q_star; - mp_limb_t c1; - if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ - { - /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ - mp_twolimb_t num = - ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) - | r_ptr[j + b_len - 1]; - q_star = num / b_msd; - c1 = num % b_msd; - } - else - { - /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ - q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ - /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta - <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta - <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) - {<= beta !}. - If yes, jump directly to the subtraction loop. - (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta - <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ - if (r_ptr[j + b_len] > b_msd - || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) - /* r[j+n] >= b[n-1]+1 or - r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a - carry. */ - goto subtract; - } - /* q_star = q*, - c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, <beta). */ - { - mp_twolimb_t c2 = /* c1*beta+r[j+n-2] */ - ((mp_twolimb_t) c1 << GMP_LIMB_BITS) | r_ptr[j + b_len - 2]; - mp_twolimb_t c3 = /* b[n-2] * q* */ - (mp_twolimb_t) b_2msd * (mp_twolimb_t) q_star; - /* While c2 < c3, increase c2 and decrease c3. - Consider c3-c2. While it is > 0, decrease it by - b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 - this can happen only twice. */ - if (c3 > c2) - { - q_star = q_star - 1; /* q* := q* - 1 */ - if (c3 - c2 > b_msdd) - q_star = q_star - 1; /* q* := q* - 1 */ - } - } - if (q_star > 0) - subtract: - { - /* Subtract r := r - b * q* * beta^j. */ - mp_limb_t cr; - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = r_ptr + j; - mp_twolimb_t carry = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - /* Here 0 <= carry <= q*. */ - carry = - carry - + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ - + (mp_limb_t) ~(*destptr); - /* Here 0 <= carry <= beta*q* + beta-1. */ - *destptr++ = ~(mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; /* <= q* */ - } - cr = (mp_limb_t) carry; - } - /* Subtract cr from r_ptr[j + b_len], then forget about - r_ptr[j + b_len]. */ - if (cr > r_ptr[j + b_len]) - { - /* Subtraction gave a carry. */ - q_star = q_star - 1; /* q* := q* - 1 */ - /* Add b back. */ - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = r_ptr + j; - mp_limb_t carry = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - mp_limb_t source1 = *sourceptr++; - mp_limb_t source2 = *destptr; - *destptr++ = source1 + source2 + carry; - carry = - (carry - ? source1 >= (mp_limb_t) ~source2 - : source1 > (mp_limb_t) ~source2); - } - } - /* Forget about the carry and about r[j+n]. */ - } - } - /* q* is determined. Store it as q[j]. */ - q_ptr[j] = q_star; - if (j == 0) - break; - j--; - } - } - r_len = b_len; - /* Normalise q. */ - if (q_ptr[q_len - 1] == 0) - q_len--; -# if 0 /* Not needed here, since we need r only to compare it with b/2, and - b is shifted left by s bits. */ - /* Shift r right by s bits. */ - if (s > 0) - { - mp_limb_t ptr = r_ptr + r_len; - mp_twolimb_t accu = 0; - size_t count; - for (count = r_len; count > 0; count--) - { - accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; - accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); - *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); - } - } -# endif - /* Normalise r. */ - while (r_len > 0 && r_ptr[r_len - 1] == 0) - r_len--; - } - /* Compare r << 1 with b. */ - if (r_len > b_len) - goto increment_q; - { - size_t i; - for (i = b_len;;) - { - mp_limb_t r_i = - (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) - | (i < r_len ? r_ptr[i] << 1 : 0); - mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); - if (r_i > b_i) - goto increment_q; - if (r_i < b_i) - goto keep_q; - if (i == 0) - break; - i--; - } - } - if (q_len > 0 && ((q_ptr[0] & 1) != 0)) - /* q is odd. */ - increment_q: - { - size_t i; - for (i = 0; i < q_len; i++) - if (++(q_ptr[i]) != 0) - goto keep_q; - q_ptr[q_len++] = 1; - } - keep_q: - if (tmp_roomptr != NULL) - free (tmp_roomptr); - q->limbs = q_ptr; - q->nlimbs = q_len; - return roomptr; -} - -/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal - representation. - Destroys the contents of a. - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -convert_to_decimal (mpn_t a, size_t extra_zeroes) -{ - mp_limb_t *a_ptr = a.limbs; - size_t a_len = a.nlimbs; - /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ - size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); - char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); - if (c_ptr != NULL) - { - char *d_ptr = c_ptr; - for (; extra_zeroes > 0; extra_zeroes--) - *d_ptr++ = '0'; - while (a_len > 0) - { - /* Divide a by 10^9, in-place. */ - mp_limb_t remainder = 0; - mp_limb_t *ptr = a_ptr + a_len; - size_t count; - for (count = a_len; count > 0; count--) - { - mp_twolimb_t num = - ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; - *ptr = num / 1000000000; - remainder = num % 1000000000; - } - /* Store the remainder as 9 decimal digits. */ - for (count = 9; count > 0; count--) - { - *d_ptr++ = '0' + (remainder % 10); - remainder = remainder / 10; - } - /* Normalize a. */ - if (a_ptr[a_len - 1] == 0) - a_len--; - } - /* Remove leading zeroes. */ - while (d_ptr > c_ptr && d_ptr[-1] == '0') - d_ptr--; - /* But keep at least one zero. */ - if (d_ptr == c_ptr) - *d_ptr++ = '0'; - /* Terminate the string. */ - *d_ptr = '\0'; - } - return c_ptr; -} - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and >= 0: - write x as x = 2^e * m, where m is a bignum. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -decode_long_double (long double x, int *ep, mpn_t *mp) -{ - mpn_t m; - int exp; - long double y; - size_t i; - - /* Allocate memory for result. */ - m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; - m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); - if (m.limbs == NULL) - return NULL; - /* Split into exponential part and mantissa. */ - y = frexpl (x, &exp); - if (!(y >= 0.0L && y < 1.0L)) - abort (); - /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the - latter is an integer. */ - /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. - I'm not sure whether it's safe to cast a 'long double' value between - 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only - 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', - doesn't matter). */ -# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 -# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); - hi = (int) y; - y -= hi; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# else - { - mp_limb_t d; - y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); - d = (int) y; - y -= d; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; - } -# endif -# endif - for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - hi = (int) y; - y -= hi; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess - precision. */ - if (!(y == 0.0L)) - abort (); -#endif - /* Normalise. */ - while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) - m.nlimbs--; - *mp = m; - *ep = exp - LDBL_MANT_BIT; - return m.limbs; -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and >= 0: - write x as x = 2^e * m, where m is a bignum. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -decode_double (double x, int *ep, mpn_t *mp) -{ - mpn_t m; - int exp; - double y; - size_t i; - - /* Allocate memory for result. */ - m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; - m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); - if (m.limbs == NULL) - return NULL; - /* Split into exponential part and mantissa. */ - y = frexp (x, &exp); - if (!(y >= 0.0 && y < 1.0)) - abort (); - /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the - latter is an integer. */ - /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. - I'm not sure whether it's safe to cast a 'double' value between - 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only - 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', - doesn't matter). */ -# if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 -# if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); - hi = (int) y; - y -= hi; - if (!(y >= 0.0 && y < 1.0)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# else - { - mp_limb_t d; - y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); - d = (int) y; - y -= d; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; - } -# endif -# endif - for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - hi = (int) y; - y -= hi; - if (!(y >= 0.0 && y < 1.0)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } - if (!(y == 0.0)) - abort (); - /* Normalise. */ - while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) - m.nlimbs--; - *mp = m; - *ep = exp - DBL_MANT_BIT; - return m.limbs; -} - -# endif - -/* Assuming x = 2^e * m is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) -{ - int s; - size_t extra_zeroes; - unsigned int abs_n; - unsigned int abs_s; - mp_limb_t *pow5_ptr; - size_t pow5_len; - unsigned int s_limbs; - unsigned int s_bits; - mpn_t pow5; - mpn_t z; - void *z_memory; - char *digits; - - if (memory == NULL) - return NULL; - /* x = 2^e * m, hence - y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) - = round (2^s * 5^n * m). */ - s = e + n; - extra_zeroes = 0; - /* Factor out a common power of 10 if possible. */ - if (s > 0 && n > 0) - { - extra_zeroes = (s < n ? s : n); - s -= extra_zeroes; - n -= extra_zeroes; - } - /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. - Before converting to decimal, we need to compute - z = round (2^s * 5^n * m). */ - /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same - sign. 2.322 is slightly larger than log(5)/log(2). */ - abs_n = (n >= 0 ? n : -n); - abs_s = (s >= 0 ? s : -s); - pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 - + abs_s / GMP_LIMB_BITS + 1) - * sizeof (mp_limb_t)); - if (pow5_ptr == NULL) - { - free (memory); - return NULL; - } - /* Initialize with 1. */ - pow5_ptr[0] = 1; - pow5_len = 1; - /* Multiply with 5^|n|. */ - if (abs_n > 0) - { - static mp_limb_t const small_pow5[13 + 1] = - { - 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, - 48828125, 244140625, 1220703125 - }; - unsigned int n13; - for (n13 = 0; n13 <= abs_n; n13 += 13) - { - mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; - size_t j; - mp_twolimb_t carry = 0; - for (j = 0; j < pow5_len; j++) - { - mp_limb_t digit2 = pow5_ptr[j]; - carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; - pow5_ptr[j] = (mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; - } - if (carry > 0) - pow5_ptr[pow5_len++] = (mp_limb_t) carry; - } - } - s_limbs = abs_s / GMP_LIMB_BITS; - s_bits = abs_s % GMP_LIMB_BITS; - if (n >= 0 ? s >= 0 : s <= 0) - { - /* Multiply with 2^|s|. */ - if (s_bits > 0) - { - mp_limb_t *ptr = pow5_ptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = pow5_len; count > 0; count--) - { - accu += (mp_twolimb_t) *ptr << s_bits; - *ptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - if (accu > 0) - { - *ptr = (mp_limb_t) accu; - pow5_len++; - } - } - if (s_limbs > 0) - { - size_t count; - for (count = pow5_len; count > 0;) - { - count--; - pow5_ptr[s_limbs + count] = pow5_ptr[count]; - } - for (count = s_limbs; count > 0;) - { - count--; - pow5_ptr[count] = 0; - } - pow5_len += s_limbs; - } - pow5.limbs = pow5_ptr; - pow5.nlimbs = pow5_len; - if (n >= 0) - { - /* Multiply m with pow5. No division needed. */ - z_memory = multiply (m, pow5, &z); - } - else - { - /* Divide m by pow5 and round. */ - z_memory = divide (m, pow5, &z); - } - } - else - { - pow5.limbs = pow5_ptr; - pow5.nlimbs = pow5_len; - if (n >= 0) - { - /* n >= 0, s < 0. - Multiply m with pow5, then divide by 2^|s|. */ - mpn_t numerator; - mpn_t denominator; - void *tmp_memory; - tmp_memory = multiply (m, pow5, &numerator); - if (tmp_memory == NULL) - { - free (pow5_ptr); - free (memory); - return NULL; - } - /* Construct 2^|s|. */ - { - mp_limb_t *ptr = pow5_ptr + pow5_len; - size_t i; - for (i = 0; i < s_limbs; i++) - ptr[i] = 0; - ptr[s_limbs] = (mp_limb_t) 1 << s_bits; - denominator.limbs = ptr; - denominator.nlimbs = s_limbs + 1; - } - z_memory = divide (numerator, denominator, &z); - free (tmp_memory); - } - else - { - /* n < 0, s > 0. - Multiply m with 2^s, then divide by pow5. */ - mpn_t numerator; - mp_limb_t *num_ptr; - num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) - * sizeof (mp_limb_t)); - if (num_ptr == NULL) - { - free (pow5_ptr); - free (memory); - return NULL; - } - { - mp_limb_t *destptr = num_ptr; - { - size_t i; - for (i = 0; i < s_limbs; i++) - *destptr++ = 0; - } - if (s_bits > 0) - { - const mp_limb_t *sourceptr = m.limbs; - mp_twolimb_t accu = 0; - size_t count; - for (count = m.nlimbs; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s_bits; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - if (accu > 0) - *destptr++ = (mp_limb_t) accu; - } - else - { - const mp_limb_t *sourceptr = m.limbs; - size_t count; - for (count = m.nlimbs; count > 0; count--) - *destptr++ = *sourceptr++; - } - numerator.limbs = num_ptr; - numerator.nlimbs = destptr - num_ptr; - } - z_memory = divide (numerator, pow5, &z); - free (num_ptr); - } - } - free (pow5_ptr); - free (memory); - - /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ - - if (z_memory == NULL) - return NULL; - digits = convert_to_decimal (z, extra_zeroes); - free (z_memory); - return digits; -} - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_long_double (long double x, int n) -{ - int e IF_LINT(= 0); - mpn_t m; - void *memory = decode_long_double (x, &e, &m); - return scale10_round_decimal_decoded (e, m, memory, n); -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_double (double x, int n) -{ - int e IF_LINT(= 0); - mpn_t m; - void *memory = decode_double (x, &e, &m); - return scale10_round_decimal_decoded (e, m, memory, n); -} - -# endif - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and > 0: - Return an approximation for n with 10^n <= x < 10^(n+1). - The approximation is usually the right n, but may be off by 1 sometimes. */ -static int -floorlog10l (long double x) -{ - int exp; - long double y; - double z; - double l; - - /* Split into exponential part and mantissa. */ - y = frexpl (x, &exp); - if (!(y >= 0.0L && y < 1.0L)) - abort (); - if (y == 0.0L) - return INT_MIN; - if (y < 0.5L) - { - while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) - { - y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); - exp -= GMP_LIMB_BITS; - } - if (y < (1.0L / (1 << 16))) - { - y *= 1.0L * (1 << 16); - exp -= 16; - } - if (y < (1.0L / (1 << 8))) - { - y *= 1.0L * (1 << 8); - exp -= 8; - } - if (y < (1.0L / (1 << 4))) - { - y *= 1.0L * (1 << 4); - exp -= 4; - } - if (y < (1.0L / (1 << 2))) - { - y *= 1.0L * (1 << 2); - exp -= 2; - } - if (y < (1.0L / (1 << 1))) - { - y *= 1.0L * (1 << 1); - exp -= 1; - } - } - if (!(y >= 0.5L && y < 1.0L)) - abort (); - /* Compute an approximation for l = log2(x) = exp + log2(y). */ - l = exp; - z = y; - if (z < 0.70710678118654752444) - { - z *= 1.4142135623730950488; - l -= 0.5; - } - if (z < 0.8408964152537145431) - { - z *= 1.1892071150027210667; - l -= 0.25; - } - if (z < 0.91700404320467123175) - { - z *= 1.0905077326652576592; - l -= 0.125; - } - if (z < 0.9576032806985736469) - { - z *= 1.0442737824274138403; - l -= 0.0625; - } - /* Now 0.95 <= z <= 1.01. */ - z = 1 - z; - /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) - Four terms are enough to get an approximation with error < 10^-7. */ - l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); - /* Finally multiply with log(2)/log(10), yields an approximation for - log10(x). */ - l *= 0.30102999566398119523; - /* Round down to the next integer. */ - return (int) l + (l < 0 ? -1 : 0); -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and > 0: - Return an approximation for n with 10^n <= x < 10^(n+1). - The approximation is usually the right n, but may be off by 1 sometimes. */ -static int -floorlog10 (double x) -{ - int exp; - double y; - double z; - double l; - - /* Split into exponential part and mantissa. */ - y = frexp (x, &exp); - if (!(y >= 0.0 && y < 1.0)) - abort (); - if (y == 0.0) - return INT_MIN; - if (y < 0.5) - { - while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) - { - y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); - exp -= GMP_LIMB_BITS; - } - if (y < (1.0 / (1 << 16))) - { - y *= 1.0 * (1 << 16); - exp -= 16; - } - if (y < (1.0 / (1 << 8))) - { - y *= 1.0 * (1 << 8); - exp -= 8; - } - if (y < (1.0 / (1 << 4))) - { - y *= 1.0 * (1 << 4); - exp -= 4; - } - if (y < (1.0 / (1 << 2))) - { - y *= 1.0 * (1 << 2); - exp -= 2; - } - if (y < (1.0 / (1 << 1))) - { - y *= 1.0 * (1 << 1); - exp -= 1; - } - } - if (!(y >= 0.5 && y < 1.0)) - abort (); - /* Compute an approximation for l = log2(x) = exp + log2(y). */ - l = exp; - z = y; - if (z < 0.70710678118654752444) - { - z *= 1.4142135623730950488; - l -= 0.5; - } - if (z < 0.8408964152537145431) - { - z *= 1.1892071150027210667; - l -= 0.25; - } - if (z < 0.91700404320467123175) - { - z *= 1.0905077326652576592; - l -= 0.125; - } - if (z < 0.9576032806985736469) - { - z *= 1.0442737824274138403; - l -= 0.0625; - } - /* Now 0.95 <= z <= 1.01. */ - z = 1 - z; - /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) - Four terms are enough to get an approximation with error < 10^-7. */ - l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); - /* Finally multiply with log(2)/log(10), yields an approximation for - log10(x). */ - l *= 0.30102999566398119523; - /* Round down to the next integer. */ - return (int) l + (l < 0 ? -1 : 0); -} - -# endif - -/* Tests whether a string of digits consists of exactly PRECISION zeroes and - a single '1' digit. */ -static int -is_borderline (const char *digits, size_t precision) -{ - for (; precision > 0; precision--, digits++) - if (*digits != '0') - return 0; - if (*digits != '1') - return 0; - digits++; - return *digits == '\0'; -} - -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 - -/* Use a different function name, to make it possible that the 'wchar_t' - parametrization and the 'char' parametrization get compiled in the same - translation unit. */ -# if WIDE_CHAR_VERSION -# define MAX_ROOM_NEEDED wmax_room_needed -# else -# define MAX_ROOM_NEEDED max_room_needed -# endif - -/* Returns the number of TCHAR_T units needed as temporary space for the result - of sprintf or SNPRINTF of a single conversion directive. */ -static inline size_t -MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion, - arg_type type, int flags, size_t width, int has_precision, - size_t precision, int pad_ourselves) -{ - size_t tmp_length; - - switch (conversion) - { - case 'd': case 'i': case 'u': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Multiply by 2, as an estimate for FLAG_GROUP. */ - tmp_length = xsum (tmp_length, tmp_length); - /* Add 1, to account for a leading sign. */ - tmp_length = xsum (tmp_length, 1); - break; - - case 'o': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Add 1, to account for a leading sign. */ - tmp_length = xsum (tmp_length, 1); - break; - - case 'x': case 'X': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Add 2, to account for a leading sign or alternate form. */ - tmp_length = xsum (tmp_length, 2); - break; - - case 'f': case 'F': - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) (LDBL_MAX_EXP - * 0.30103 /* binary -> decimal */ - * 2 /* estimate for FLAG_GROUP */ - ) - + 1 /* turn floor into ceil */ - + 10; /* sign, decimal point etc. */ - else - tmp_length = - (unsigned int) (DBL_MAX_EXP - * 0.30103 /* binary -> decimal */ - * 2 /* estimate for FLAG_GROUP */ - ) - + 1 /* turn floor into ceil */ - + 10; /* sign, decimal point etc. */ - tmp_length = xsum (tmp_length, precision); - break; - - case 'e': case 'E': case 'g': case 'G': - tmp_length = - 12; /* sign, decimal point, exponent etc. */ - tmp_length = xsum (tmp_length, precision); - break; - - case 'a': case 'A': - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) (LDBL_DIG - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (DBL_DIG - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - break; - - case 'c': -# if HAVE_WINT_T && !WIDE_CHAR_VERSION - if (type == TYPE_WIDE_CHAR) - tmp_length = MB_CUR_MAX; - else -# endif - tmp_length = 1; - break; - - case 's': -# if HAVE_WCHAR_T - if (type == TYPE_WIDE_STRING) - { -# if WIDE_CHAR_VERSION - /* ISO C says about %ls in fwprintf: - "If the precision is not specified or is greater than the size - of the array, the array shall contain a null wide character." - So if there is a precision, we must not use wcslen. */ - const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; - - if (has_precision) - tmp_length = local_wcsnlen (arg, precision); - else - tmp_length = local_wcslen (arg); -# else - /* ISO C says about %ls in fprintf: - "If a precision is specified, no more than that many bytes are - written (including shift sequences, if any), and the array - shall contain a null wide character if, to equal the multibyte - character sequence length given by the precision, the function - would need to access a wide character one past the end of the - array." - So if there is a precision, we must not use wcslen. */ - /* This case has already been handled separately in VASNPRINTF. */ - abort (); -# endif - } - else -# endif - { -# if WIDE_CHAR_VERSION - /* ISO C says about %s in fwprintf: - "If the precision is not specified or is greater than the size - of the converted array, the converted array shall contain a - null wide character." - So if there is a precision, we must not use strlen. */ - /* This case has already been handled separately in VASNPRINTF. */ - abort (); -# else - /* ISO C says about %s in fprintf: - "If the precision is not specified or greater than the size of - the array, the array shall contain a null character." - So if there is a precision, we must not use strlen. */ - const char *arg = ap->arg[arg_index].a.a_string; - - if (has_precision) - tmp_length = local_strnlen (arg, precision); - else - tmp_length = strlen (arg); -# endif - } - break; - - case 'p': - tmp_length = - (unsigned int) (sizeof (void *) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1 /* turn floor into ceil */ - + 2; /* account for leading 0x */ - break; - - default: - abort (); - } - - if (!pad_ourselves) - { -# if ENABLE_UNISTDIO - /* Padding considers the number of characters, therefore the number of - elements after padding may be - > max (tmp_length, width) - but is certainly - <= tmp_length + width. */ - tmp_length = xsum (tmp_length, width); -# else - /* Padding considers the number of elements, says POSIX. */ - if (tmp_length < width) - tmp_length = width; -# endif - } - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - return tmp_length; -} - -#endif - -DCHAR_T * -VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - const FCHAR_T *format, va_list args) -{ - DIRECTIVES d; - arguments a; - - if (PRINTF_PARSE (format, &d, &a) < 0) - /* errno is already set. */ - return NULL; - -#define CLEANUP() \ - free (d.dir); \ - if (a.arg) \ - free (a.arg); - - if (PRINTF_FETCHARGS (args, &a) < 0) - { - CLEANUP (); - errno = EINVAL; - return NULL; - } - - { - size_t buf_neededlength; - TCHAR_T *buf; - TCHAR_T *buf_malloced; - const FCHAR_T *cp; - size_t i; - DIRECTIVE *dp; - /* Output string accumulator. */ - DCHAR_T *result; - size_t allocated; - size_t length; - - /* Allocate a small buffer that will hold a directive passed to - sprintf or snprintf. */ - buf_neededlength = - xsum4 (7, d.max_width_length, d.max_precision_length, 6); -#if HAVE_ALLOCA - if (buf_neededlength < 4000 / sizeof (TCHAR_T)) - { - buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); - buf_malloced = NULL; - } - else -#endif - { - size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); - if (size_overflow_p (buf_memsize)) - goto out_of_memory_1; - buf = (TCHAR_T *) malloc (buf_memsize); - if (buf == NULL) - goto out_of_memory_1; - buf_malloced = buf; - } - - if (resultbuf != NULL) - { - result = resultbuf; - allocated = *lengthp; - } - else - { - result = NULL; - allocated = 0; - } - length = 0; - /* Invariants: - result is either == resultbuf or == NULL or malloc-allocated. - If length > 0, then result != NULL. */ - - /* Ensures that allocated >= needed. Aborts through a jump to - out_of_memory if needed is SIZE_MAX or otherwise too big. */ -#define ENSURE_ALLOCATION(needed) \ - if ((needed) > allocated) \ - { \ - size_t memory_size; \ - DCHAR_T *memory; \ - \ - allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ - if ((needed) > allocated) \ - allocated = (needed); \ - memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ - if (size_overflow_p (memory_size)) \ - goto out_of_memory; \ - if (result == resultbuf || result == NULL) \ - memory = (DCHAR_T *) malloc (memory_size); \ - else \ - memory = (DCHAR_T *) realloc (result, memory_size); \ - if (memory == NULL) \ - goto out_of_memory; \ - if (result == resultbuf && length > 0) \ - DCHAR_CPY (memory, result, length); \ - result = memory; \ - } - - for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) - { - if (cp != dp->dir_start) - { - size_t n = dp->dir_start - cp; - size_t augmented_length = xsum (length, n); - - ENSURE_ALLOCATION (augmented_length); - /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we - need that the format string contains only ASCII characters - if FCHAR_T and DCHAR_T are not the same type. */ - if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) - { - DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); - length = augmented_length; - } - else - { - do - result[length++] = (unsigned char) *cp++; - while (--n > 0); - } - } - if (i == d.count) - break; - - /* Execute a single directive. */ - if (dp->conversion == '%') - { - size_t augmented_length; - - if (!(dp->arg_index == ARG_NONE)) - abort (); - augmented_length = xsum (length, 1); - ENSURE_ALLOCATION (augmented_length); - result[length] = '%'; - length = augmented_length; - } - else - { - if (!(dp->arg_index != ARG_NONE)) - abort (); - - if (dp->conversion == 'n') - { - switch (a.arg[dp->arg_index].type) - { - case TYPE_COUNT_SCHAR_POINTER: - *a.arg[dp->arg_index].a.a_count_schar_pointer = length; - break; - case TYPE_COUNT_SHORT_POINTER: - *a.arg[dp->arg_index].a.a_count_short_pointer = length; - break; - case TYPE_COUNT_INT_POINTER: - *a.arg[dp->arg_index].a.a_count_int_pointer = length; - break; - case TYPE_COUNT_LONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longint_pointer = length; - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; - break; -#endif - default: - abort (); - } - } -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - else if (dp->conversion == 'U') - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - switch (type) - { - case TYPE_U8_STRING: - { - const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; - const uint8_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u8_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u8_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u8_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT8_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-8 to locale encoding. */ - converted = - u8_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-8 to UTF-16/UTF-32. */ - converted = - U8_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - case TYPE_U16_STRING: - { - const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; - const uint16_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u16_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u16_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u16_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT16_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-16 to locale encoding. */ - converted = - u16_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-16 to UTF-8/UTF-32. */ - converted = - U16_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - case TYPE_U32_STRING: - { - const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; - const uint32_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u32_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u32_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u32_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT32_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-32 to locale encoding. */ - converted = - u32_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-32 to UTF-8/UTF-16. */ - converted = - U32_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - default: - abort (); - } - } -#endif -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T - else if (dp->conversion == 's' -# if WIDE_CHAR_VERSION - && a.arg[dp->arg_index].type != TYPE_WIDE_STRING -# else - && a.arg[dp->arg_index].type == TYPE_WIDE_STRING -# endif - ) - { - /* The normal handling of the 's' directive below requires - allocating a temporary buffer. The determination of its - length (tmp_length), in the case when a precision is - specified, below requires a conversion between a char[] - string and a wchar_t[] wide string. It could be done, but - we have no guarantee that the implementation of sprintf will - use the exactly same algorithm. Without this guarantee, it - is possible to have buffer overrun bugs. In order to avoid - such bugs, we implement the entire processing of the 's' - directive ourselves. */ - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - -# if WIDE_CHAR_VERSION - /* %s in vasnwprintf. See the specification of fwprintf. */ - { - const char *arg = a.arg[dp->arg_index].a.a_string; - const char *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only as many bytes as needed to produce PRECISION - wide characters, from the left. */ -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count; -# if HAVE_MBRTOWC - count = mbrlen (arg_end, MB_CUR_MAX, &state); -# else - count = mblen (arg_end, MB_CUR_MAX); -# endif - if (count == 0) - /* Found the terminating NUL. */ - break; - if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of wide - characters. */ -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (;;) - { - int count; -# if HAVE_MBRTOWC - count = mbrlen (arg_end, MB_CUR_MAX, &state); -# else - count = mblen (arg_end, MB_CUR_MAX); -# endif - if (count == 0) - /* Found the terminating NUL. */ - break; - if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - - if (has_precision || has_width) - { - /* We know the number of wide characters in advance. */ - size_t remaining; -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - ENSURE_ALLOCATION (xsum (length, characters)); - for (remaining = characters; remaining > 0; remaining--) - { - wchar_t wc; - int count; -# if HAVE_MBRTOWC - count = mbrtowc (&wc, arg, arg_end - arg, &state); -# else - count = mbtowc (&wc, arg, arg_end - arg); -# endif - if (count <= 0) - /* mbrtowc not consistent with mbrlen, or mbtowc - not consistent with mblen. */ - abort (); - result[length++] = wc; - arg += count; - } - if (!(arg == arg_end)) - abort (); - } - else - { -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - while (arg < arg_end) - { - wchar_t wc; - int count; -# if HAVE_MBRTOWC - count = mbrtowc (&wc, arg, arg_end - arg, &state); -# else - count = mbtowc (&wc, arg, arg_end - arg); -# endif - if (count <= 0) - /* mbrtowc not consistent with mbrlen, or mbtowc - not consistent with mblen. */ - abort (); - ENSURE_ALLOCATION (xsum (length, 1)); - result[length++] = wc; - arg += count; - } - } - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } -# else - /* %ls in vasnprintf. See the specification of fprintf. */ - { - const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; - const wchar_t *arg_end; - size_t characters; -# if !DCHAR_IS_TCHAR - /* This code assumes that TCHAR_T is 'char'. */ - verify (sizeof (TCHAR_T) == 1); - TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t tmpdst_len; -# endif - size_t w; - - if (has_precision) - { - /* Use only as many wide characters as needed to produce - at most PRECISION bytes, from the left. */ -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - while (precision > 0) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg_end == 0) - /* Found the terminating null wide character. */ - break; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg_end, &state); -# else - count = wctomb (cbuf, *arg_end); -# endif - if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - if (precision < count) - break; - arg_end++; - characters += count; - precision -= count; - } - } -# if DCHAR_IS_TCHAR - else if (has_width) -# else - else -# endif - { - /* Use the entire string, and count the number of - bytes. */ -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (;;) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg_end == 0) - /* Found the terminating null wide character. */ - break; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg_end, &state); -# else - count = wctomb (cbuf, *arg_end); -# endif - if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end++; - characters += count; - } - } -# if DCHAR_IS_TCHAR - else - { - /* Use the entire string. */ - arg_end = arg + local_wcslen (arg); - /* The number of bytes doesn't matter. */ - characters = 0; - } -# endif - -# if !DCHAR_IS_TCHAR - /* Convert the string into a piece of temporary memory. */ - tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); - if (tmpsrc == NULL) - goto out_of_memory; - { - TCHAR_T *tmpptr = tmpsrc; - size_t remaining; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - for (remaining = characters; remaining > 0; ) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - /* Inconsistency. */ - abort (); - memcpy (tmpptr, cbuf, count); - tmpptr += count; - arg++; - remaining -= count; - } - if (!(arg == arg_end)) - abort (); - } - - /* Convert from TCHAR_T[] to DCHAR_T[]. */ - tmpdst = - DCHAR_CONV_FROM_ENCODING (locale_charset (), - iconveh_question_mark, - tmpsrc, characters, - NULL, - NULL, &tmpdst_len); - if (tmpdst == NULL) - { - int saved_errno = errno; - free (tmpsrc); - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - free (tmpsrc); -# endif - - if (has_width) - { -# if ENABLE_UNISTDIO - /* Outside POSIX, it's preferrable to compare the width - against the number of _characters_ of the converted - value. */ - w = DCHAR_MBSNLEN (result + length, characters); -# else - /* The width is compared against the number of _bytes_ - of the converted value, says POSIX. */ - w = characters; -# endif - } - else - /* w doesn't matter. */ - w = 0; - - if (has_width && width > w - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - w; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_TCHAR - if (has_precision || has_width) - { - /* We know the number of bytes in advance. */ - size_t remaining; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - ENSURE_ALLOCATION (xsum (length, characters)); - for (remaining = characters; remaining > 0; ) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - /* Inconsistency. */ - abort (); - memcpy (result + length, cbuf, count); - length += count; - arg++; - remaining -= count; - } - if (!(arg == arg_end)) - abort (); - } - else - { -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - while (arg < arg_end) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - ENSURE_ALLOCATION (xsum (length, count)); - memcpy (result + length, cbuf, count); - length += count; - arg++; - } - } -# else - ENSURE_ALLOCATION (xsum (length, tmpdst_len)); - DCHAR_CPY (result + length, tmpdst, tmpdst_len); - free (tmpdst); - length += tmpdst_len; -# endif - - if (has_width && width > w - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - w; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } -# endif - } -#endif -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL - else if ((dp->conversion == 'a' || dp->conversion == 'A') -# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) - && (0 -# if NEED_PRINTF_DOUBLE - || a.arg[dp->arg_index].type == TYPE_DOUBLE -# endif -# if NEED_PRINTF_LONG_DOUBLE - || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE -# endif - ) -# endif - ) - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - size_t tmp_length; - DCHAR_T tmpbuf[700]; - DCHAR_T *tmp; - DCHAR_T *pad_ptr; - DCHAR_T *p; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - /* Allocate a temporary buffer of sufficient size. */ - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) ((LDBL_DIG + 1) - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) ((DBL_DIG + 1) - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - - if (tmp_length < width) - tmp_length = width; - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (DCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } - - pad_ptr = NULL; - p = tmp; - if (type == TYPE_LONGDOUBLE) - { -# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE - long double arg = a.arg[dp->arg_index].a.a_longdouble; - - if (isnanl (arg)) - { - if (dp->conversion == 'A') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - DECL_LONG_DOUBLE_ROUNDING - - BEGIN_LONG_DOUBLE_ROUNDING (); - - if (signbit (arg)) /* arg < 0.0L or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0L && arg + arg == arg) - { - if (dp->conversion == 'A') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { - int exponent; - long double mantissa; - - if (arg > 0.0L) - mantissa = printf_frexpl (arg, &exponent); - else - { - exponent = 0; - mantissa = 0.0L; - } - - if (has_precision - && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) - { - /* Round the mantissa. */ - long double tail = mantissa; - size_t q; - - for (q = precision; ; q--) - { - int digit = (int) tail; - tail -= digit; - if (q == 0) - { - if (digit & 1 ? tail >= 0.5L : tail > 0.5L) - tail = 1 - tail; - else - tail = - tail; - break; - } - tail *= 16.0L; - } - if (tail != 0.0L) - for (q = precision; q > 0; q--) - tail *= 0.0625L; - mantissa += tail; - } - - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - { - int digit; - - digit = (int) mantissa; - mantissa -= digit; - *p++ = '0' + digit; - if ((flags & FLAG_ALT) - || mantissa > 0.0L || precision > 0) - { - *p++ = decimal_point_char (); - /* This loop terminates because we assume - that FLT_RADIX is a power of 2. */ - while (mantissa > 0.0L) - { - mantissa *= 16.0L; - digit = (int) mantissa; - mantissa -= digit; - *p++ = digit - + (digit < 10 - ? '0' - : dp->conversion - 10); - if (precision > 0) - precision--; - } - while (precision > 0) - { - *p++ = '0'; - precision--; - } - } - } - *p++ = dp->conversion - 'A' + 'P'; -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - - END_LONG_DOUBLE_ROUNDING (); - } -# else - abort (); -# endif - } - else - { -# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE - double arg = a.arg[dp->arg_index].a.a_double; - - if (isnand (arg)) - { - if (dp->conversion == 'A') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - - if (signbit (arg)) /* arg < 0.0 or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0 && arg + arg == arg) - { - if (dp->conversion == 'A') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { - int exponent; - double mantissa; - - if (arg > 0.0) - mantissa = printf_frexp (arg, &exponent); - else - { - exponent = 0; - mantissa = 0.0; - } - - if (has_precision - && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) - { - /* Round the mantissa. */ - double tail = mantissa; - size_t q; - - for (q = precision; ; q--) - { - int digit = (int) tail; - tail -= digit; - if (q == 0) - { - if (digit & 1 ? tail >= 0.5 : tail > 0.5) - tail = 1 - tail; - else - tail = - tail; - break; - } - tail *= 16.0; - } - if (tail != 0.0) - for (q = precision; q > 0; q--) - tail *= 0.0625; - mantissa += tail; - } - - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - { - int digit; - - digit = (int) mantissa; - mantissa -= digit; - *p++ = '0' + digit; - if ((flags & FLAG_ALT) - || mantissa > 0.0 || precision > 0) - { - *p++ = decimal_point_char (); - /* This loop terminates because we assume - that FLT_RADIX is a power of 2. */ - while (mantissa > 0.0) - { - mantissa *= 16.0; - digit = (int) mantissa; - mantissa -= digit; - *p++ = digit - + (digit < 10 - ? '0' - : dp->conversion - 10); - if (precision > 0) - precision--; - } - while (precision > 0) - { - *p++ = '0'; - precision--; - } - } - } - *p++ = dp->conversion - 'A' + 'P'; -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - } -# else - abort (); -# endif - } - /* The generated string now extends from tmp to p, with the - zero padding insertion point being at pad_ptr. */ - if (has_width && p - tmp < width) - { - size_t pad = width - (p - tmp); - DCHAR_T *end = p + pad; - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > tmp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - - p = end; - } - - { - size_t count = p - tmp; - - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); - - /* Make room for the result. */ - if (count >= allocated - length) - { - size_t n = xsum (length, count); - - ENSURE_ALLOCATION (n); - } - - /* Append the result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); - if (tmp != tmpbuf) - free (tmp); - length += count; - } - } -#endif -#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL - else if ((dp->conversion == 'f' || dp->conversion == 'F' - || dp->conversion == 'e' || dp->conversion == 'E' - || dp->conversion == 'g' || dp->conversion == 'G' - || dp->conversion == 'a' || dp->conversion == 'A') - && (0 -# if NEED_PRINTF_DOUBLE - || a.arg[dp->arg_index].type == TYPE_DOUBLE -# elif NEED_PRINTF_INFINITE_DOUBLE - || (a.arg[dp->arg_index].type == TYPE_DOUBLE - /* The systems (mingw) which produce wrong output - for Inf, -Inf, and NaN also do so for -0.0. - Therefore we treat this case here as well. */ - && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) -# endif -# if NEED_PRINTF_LONG_DOUBLE - || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE -# elif NEED_PRINTF_INFINITE_LONG_DOUBLE - || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE - /* Some systems produce wrong output for Inf, - -Inf, and NaN. Some systems in this category - (IRIX 5.3) also do so for -0.0. Therefore we - treat this case here as well. */ - && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) -# endif - )) - { -# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) - arg_type type = a.arg[dp->arg_index].type; -# endif - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - size_t tmp_length; - DCHAR_T tmpbuf[700]; - DCHAR_T *tmp; - DCHAR_T *pad_ptr; - DCHAR_T *p; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - /* POSIX specifies the default precision to be 6 for %f, %F, - %e, %E, but not for %g, %G. Implementations appear to use - the same default precision also for %g, %G. But for %a, %A, - the default precision is 0. */ - if (!has_precision) - if (!(dp->conversion == 'a' || dp->conversion == 'A')) - precision = 6; - - /* Allocate a temporary buffer of sufficient size. */ -# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE - tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); -# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE - tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); -# elif NEED_PRINTF_LONG_DOUBLE - tmp_length = LDBL_DIG + 1; -# elif NEED_PRINTF_DOUBLE - tmp_length = DBL_DIG + 1; -# else - tmp_length = 0; -# endif - if (tmp_length < precision) - tmp_length = precision; -# if NEED_PRINTF_LONG_DOUBLE -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - if (type == TYPE_LONGDOUBLE) -# endif - if (dp->conversion == 'f' || dp->conversion == 'F') - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - if (!(isnanl (arg) || arg + arg == arg)) - { - /* arg is finite and nonzero. */ - int exponent = floorlog10l (arg < 0 ? -arg : arg); - if (exponent >= 0 && tmp_length < exponent + precision) - tmp_length = exponent + precision; - } - } -# endif -# if NEED_PRINTF_DOUBLE -# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE - if (type == TYPE_DOUBLE) -# endif - if (dp->conversion == 'f' || dp->conversion == 'F') - { - double arg = a.arg[dp->arg_index].a.a_double; - if (!(isnand (arg) || arg + arg == arg)) - { - /* arg is finite and nonzero. */ - int exponent = floorlog10 (arg < 0 ? -arg : arg); - if (exponent >= 0 && tmp_length < exponent + precision) - tmp_length = exponent + precision; - } - } -# endif - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - - if (tmp_length < width) - tmp_length = width; - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (DCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } - - pad_ptr = NULL; - p = tmp; - -# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - if (type == TYPE_LONGDOUBLE) -# endif - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - - if (isnanl (arg)) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - DECL_LONG_DOUBLE_ROUNDING - - BEGIN_LONG_DOUBLE_ROUNDING (); - - if (signbit (arg)) /* arg < 0.0L or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0L && arg + arg == arg) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { -# if NEED_PRINTF_LONG_DOUBLE - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - char *digits; - size_t ndigits; - - digits = - scale10_round_decimal_long_double (arg, precision); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits > precision) - do - { - --ndigits; - *p++ = digits[ndigits]; - } - while (ndigits > precision); - else - *p++ = '0'; - /* Here ndigits <= precision. */ - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > ndigits; precision--) - *p++ = '0'; - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - int exponent; - - if (arg == 0.0L) - { - exponent = 0; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else - { - /* arg > 0.0L. */ - int adjusted; - char *digits; - size_t ndigits; - - exponent = floorlog10l (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_long_double (arg, - (int)precision - exponent); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits == precision + 1) - break; - if (ndigits < precision - || ndigits > precision + 2) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits == precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision+1. */ - if (is_borderline (digits, precision)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_long_double (arg, - (int)precision - exponent + 1); - if (digits2 == NULL) - { - free (digits); - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - if (strlen (digits2) == precision + 1) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision+1. */ - - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - - *p++ = dp->conversion; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', '.', '2', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+.2d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+.2d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - if (precision == 0) - precision = 1; - /* precision >= 1. */ - - if (arg == 0.0L) - /* The exponent is 0, >= -4, < precision. - Use fixed-point notation. */ - { - size_t ndigits = precision; - /* Number of trailing zeroes that have to be - dropped. */ - size_t nzeroes = - (flags & FLAG_ALT ? 0 : precision - 1); - - --ndigits; - *p++ = '0'; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = '0'; - } - } - } - else - { - /* arg > 0.0L. */ - int exponent; - int adjusted; - char *digits; - size_t ndigits; - size_t nzeroes; - - exponent = floorlog10l (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_long_double (arg, - (int)(precision - 1) - exponent); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits == precision) - break; - if (ndigits < precision - 1 - || ndigits > precision + 1) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits < precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision. */ - if (is_borderline (digits, precision - 1)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_long_double (arg, - (int)(precision - 1) - exponent + 1); - if (digits2 == NULL) - { - free (digits); - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - if (strlen (digits2) == precision) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision. */ - - /* Determine the number of trailing zeroes - that have to be dropped. */ - nzeroes = 0; - if ((flags & FLAG_ALT) == 0) - while (nzeroes < ndigits - && digits[nzeroes] == '0') - nzeroes++; - - /* The exponent is now determined. */ - if (exponent >= -4 - && exponent < (long)precision) - { - /* Fixed-point notation: - max(exponent,0)+1 digits, then the - decimal point, then the remaining - digits without trailing zeroes. */ - if (exponent >= 0) - { - size_t count = exponent + 1; - /* Note: count <= precision = ndigits. */ - for (; count > 0; count--) - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - size_t count = -exponent - 1; - *p++ = '0'; - *p++ = decimal_point_char (); - for (; count > 0; count--) - *p++ = '0'; - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - /* Exponential notation. */ - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', '.', '2', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+.2d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+.2d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - - free (digits); - } - } - else - abort (); -# else - /* arg is finite. */ - if (!(arg == 0.0L)) - abort (); - - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion; /* 'e' or 'E' */ - *p++ = '+'; - *p++ = '0'; - *p++ = '0'; - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - *p++ = '0'; - if (flags & FLAG_ALT) - { - size_t ndigits = - (precision > 0 ? precision - 1 : 0); - *p++ = decimal_point_char (); - for (; ndigits > 0; --ndigits) - *p++ = '0'; - } - } - else if (dp->conversion == 'a' || dp->conversion == 'A') - { - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion - 'A' + 'P'; - *p++ = '+'; - *p++ = '0'; - } - else - abort (); -# endif - } - - END_LONG_DOUBLE_ROUNDING (); - } - } -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - else -# endif -# endif -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - { - double arg = a.arg[dp->arg_index].a.a_double; - - if (isnand (arg)) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - - if (signbit (arg)) /* arg < 0.0 or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0 && arg + arg == arg) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { -# if NEED_PRINTF_DOUBLE - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - char *digits; - size_t ndigits; - - digits = - scale10_round_decimal_double (arg, precision); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits > precision) - do - { - --ndigits; - *p++ = digits[ndigits]; - } - while (ndigits > precision); - else - *p++ = '0'; - /* Here ndigits <= precision. */ - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > ndigits; precision--) - *p++ = '0'; - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - int exponent; - - if (arg == 0.0) - { - exponent = 0; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else - { - /* arg > 0.0. */ - int adjusted; - char *digits; - size_t ndigits; - - exponent = floorlog10 (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_double (arg, - (int)precision - exponent); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits == precision + 1) - break; - if (ndigits < precision - || ndigits > precision + 2) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits == precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision+1. */ - if (is_borderline (digits, precision)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_double (arg, - (int)precision - exponent + 1); - if (digits2 == NULL) - { - free (digits); - goto out_of_memory; - } - if (strlen (digits2) == precision + 1) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision+1. */ - - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - - *p++ = dp->conversion; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { '%', '+', '.', '3', 'd', '\0' }; -# else - { '%', '+', '.', '2', 'd', '\0' }; -# endif - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - { - static const char decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - "%+.3d"; -# else - "%+.2d"; -# endif - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, decimal_format, exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, decimal_format, exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } - } -# endif - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - if (precision == 0) - precision = 1; - /* precision >= 1. */ - - if (arg == 0.0) - /* The exponent is 0, >= -4, < precision. - Use fixed-point notation. */ - { - size_t ndigits = precision; - /* Number of trailing zeroes that have to be - dropped. */ - size_t nzeroes = - (flags & FLAG_ALT ? 0 : precision - 1); - - --ndigits; - *p++ = '0'; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = '0'; - } - } - } - else - { - /* arg > 0.0. */ - int exponent; - int adjusted; - char *digits; - size_t ndigits; - size_t nzeroes; - - exponent = floorlog10 (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_double (arg, - (int)(precision - 1) - exponent); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits == precision) - break; - if (ndigits < precision - 1 - || ndigits > precision + 1) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits < precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision. */ - if (is_borderline (digits, precision - 1)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_double (arg, - (int)(precision - 1) - exponent + 1); - if (digits2 == NULL) - { - free (digits); - goto out_of_memory; - } - if (strlen (digits2) == precision) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision. */ - - /* Determine the number of trailing zeroes - that have to be dropped. */ - nzeroes = 0; - if ((flags & FLAG_ALT) == 0) - while (nzeroes < ndigits - && digits[nzeroes] == '0') - nzeroes++; - - /* The exponent is now determined. */ - if (exponent >= -4 - && exponent < (long)precision) - { - /* Fixed-point notation: - max(exponent,0)+1 digits, then the - decimal point, then the remaining - digits without trailing zeroes. */ - if (exponent >= 0) - { - size_t count = exponent + 1; - /* Note: count <= precision = ndigits. */ - for (; count > 0; count--) - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - size_t count = -exponent - 1; - *p++ = '0'; - *p++ = decimal_point_char (); - for (; count > 0; count--) - *p++ = '0'; - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - /* Exponential notation. */ - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { '%', '+', '.', '3', 'd', '\0' }; -# else - { '%', '+', '.', '2', 'd', '\0' }; -# endif - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - { - static const char decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - "%+.3d"; -# else - "%+.2d"; -# endif - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, decimal_format, exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, decimal_format, exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } - } -# endif - } - - free (digits); - } - } - else - abort (); -# else - /* arg is finite. */ - if (!(arg == 0.0)) - abort (); - - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion; /* 'e' or 'E' */ - *p++ = '+'; - /* Produce the same number of exponent digits as - the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - *p++ = '0'; -# endif - *p++ = '0'; - *p++ = '0'; - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - *p++ = '0'; - if (flags & FLAG_ALT) - { - size_t ndigits = - (precision > 0 ? precision - 1 : 0); - *p++ = decimal_point_char (); - for (; ndigits > 0; --ndigits) - *p++ = '0'; - } - } - else - abort (); -# endif - } - } - } -# endif - - /* The generated string now extends from tmp to p, with the - zero padding insertion point being at pad_ptr. */ - if (has_width && p - tmp < width) - { - size_t pad = width - (p - tmp); - DCHAR_T *end = p + pad; - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > tmp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - - p = end; - } - - { - size_t count = p - tmp; - - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); - - /* Make room for the result. */ - if (count >= allocated - length) - { - size_t n = xsum (length, count); - - ENSURE_ALLOCATION (n); - } - - /* Append the result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); - if (tmp != tmpbuf) - free (tmp); - length += count; - } - } -#endif - else - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int has_width; - size_t width; -#endif -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION - int has_precision; - size_t precision; -#endif -#if NEED_PRINTF_UNBOUNDED_PRECISION - int prec_ourselves; -#else -# define prec_ourselves 0 -#endif -#if NEED_PRINTF_FLAG_LEFTADJUST -# define pad_ourselves 1 -#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int pad_ourselves; -#else -# define pad_ourselves 0 -#endif - TCHAR_T *fbp; - unsigned int prefix_count; - int prefixes[2] IF_LINT (= { 0 }); - int orig_errno; -#if !USE_SNPRINTF - size_t tmp_length; - TCHAR_T tmpbuf[700]; - TCHAR_T *tmp; -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } -#endif - - /* Decide whether to handle the precision ourselves. */ -#if NEED_PRINTF_UNBOUNDED_PRECISION - switch (dp->conversion) - { - case 'd': case 'i': case 'u': - case 'o': - case 'x': case 'X': case 'p': - prec_ourselves = has_precision && (precision > 0); - break; - default: - prec_ourselves = 0; - break; - } -#endif - - /* Decide whether to perform the padding ourselves. */ -#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) - switch (dp->conversion) - { -# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO - /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need - to perform the padding after this conversion. Functions - with unistdio extensions perform the padding based on - character count rather than element count. */ - case 'c': case 's': -# endif -# if NEED_PRINTF_FLAG_ZERO - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': -# endif - pad_ourselves = 1; - break; - default: - pad_ourselves = prec_ourselves; - break; - } -#endif - -#if !USE_SNPRINTF - /* Allocate a temporary buffer of sufficient size for calling - sprintf. */ - tmp_length = - MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, - flags, width, has_precision, precision, - pad_ourselves); - - if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (TCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } -#endif - - /* Construct the format string for calling snprintf or - sprintf. */ - fbp = buf; - *fbp++ = '%'; -#if NEED_PRINTF_FLAG_GROUPING - /* The underlying implementation doesn't support the ' flag. - Produce no grouping characters in this case; this is - acceptable because the grouping is locale dependent. */ -#else - if (flags & FLAG_GROUP) - *fbp++ = '\''; -#endif - if (flags & FLAG_LEFT) - *fbp++ = '-'; - if (flags & FLAG_SHOWSIGN) - *fbp++ = '+'; - if (flags & FLAG_SPACE) - *fbp++ = ' '; - if (flags & FLAG_ALT) - *fbp++ = '#'; -#if __GLIBC__ >= 2 && !defined __UCLIBC__ - if (flags & FLAG_LOCALIZED) - *fbp++ = 'I'; -#endif - if (!pad_ourselves) - { - if (flags & FLAG_ZERO) - *fbp++ = '0'; - if (dp->width_start != dp->width_end) - { - size_t n = dp->width_end - dp->width_start; - /* The width specification is known to consist only - of standard ASCII characters. */ - if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) - { - memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); - fbp += n; - } - else - { - const FCHAR_T *mp = dp->width_start; - do - *fbp++ = (unsigned char) *mp++; - while (--n > 0); - } - } - } - if (!prec_ourselves) - { - if (dp->precision_start != dp->precision_end) - { - size_t n = dp->precision_end - dp->precision_start; - /* The precision specification is known to consist only - of standard ASCII characters. */ - if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) - { - memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); - fbp += n; - } - else - { - const FCHAR_T *mp = dp->precision_start; - do - *fbp++ = (unsigned char) *mp++; - while (--n > 0); - } - } - } - - switch (type) - { -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - case TYPE_ULONGLONGINT: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - *fbp++ = 'I'; - *fbp++ = '6'; - *fbp++ = '4'; - break; -# else - *fbp++ = 'l'; - /*FALLTHROUGH*/ -# endif -#endif - case TYPE_LONGINT: - case TYPE_ULONGINT: -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: -#endif -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: -#endif - *fbp++ = 'l'; - break; - case TYPE_LONGDOUBLE: - *fbp++ = 'L'; - break; - default: - break; - } -#if NEED_PRINTF_DIRECTIVE_F - if (dp->conversion == 'F') - *fbp = 'f'; - else -#endif - *fbp = dp->conversion; -#if USE_SNPRINTF -# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; -# else - /* On glibc2 systems from glibc >= 2.3 - probably also older - ones - we know that snprintf's return value conforms to - ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and - gl_SNPRINTF_TRUNCATION_C99 pass. - Therefore we can avoid using %n in this situation. - On glibc2 systems from 2004-10-18 or newer, the use of %n - in format strings in writable memory may crash the program - (if compiled with _FORTIFY_SOURCE=2), so we should avoid it - in this situation. */ - /* On native Win32 systems (such as mingw), we can avoid using - %n because: - - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, - snprintf does not write more than the specified number - of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes - '4', '5', '6' into buf, not '4', '5', '\0'.) - - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf - allows us to recognize the case of an insufficient - buffer size: it returns -1 in this case. - On native Win32 systems (such as mingw) where the OS is - Windows Vista, the use of %n in format strings by default - crashes the program. See - <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and - <http://msdn2.microsoft.com/en-us/library/ms175782(VS.80).aspx> - So we should avoid %n in this situation. */ - fbp[1] = '\0'; -# endif -#else - fbp[1] = '\0'; -#endif - - /* Construct the arguments for calling snprintf or sprintf. */ - prefix_count = 0; - if (!pad_ourselves && dp->width_arg_index != ARG_NONE) - { - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; - } - if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) - { - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; - } - -#if USE_SNPRINTF - /* The SNPRINTF result is appended after result[0..length]. - The latter is an array of DCHAR_T; SNPRINTF appends an - array of TCHAR_T to it. This is possible because - sizeof (TCHAR_T) divides sizeof (DCHAR_T) and - alignof (TCHAR_T) <= alignof (DCHAR_T). */ -# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) - /* Ensure that maxlen below will be >= 2. Needed on BeOS, - where an snprintf() with maxlen==1 acts like sprintf(). */ - ENSURE_ALLOCATION (xsum (length, - (2 + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR)); - /* Prepare checking whether snprintf returns the count - via %n. */ - *(TCHAR_T *) (result + length) = '\0'; -#endif - - orig_errno = errno; - - for (;;) - { - int count = -1; - -#if USE_SNPRINTF - int retcount = 0; - size_t maxlen = allocated - length; - /* SNPRINTF can fail if its second argument is - > INT_MAX. */ - if (maxlen > INT_MAX / TCHARS_PER_DCHAR) - maxlen = INT_MAX / TCHARS_PER_DCHAR; - maxlen = maxlen * TCHARS_PER_DCHAR; -# define SNPRINTF_BUF(arg) \ - switch (prefix_count) \ - { \ - case 0: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - arg, &count); \ - break; \ - case 1: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - prefixes[0], arg, &count); \ - break; \ - case 2: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - prefixes[0], prefixes[1], arg, \ - &count); \ - break; \ - default: \ - abort (); \ - } -#else -# define SNPRINTF_BUF(arg) \ - switch (prefix_count) \ - { \ - case 0: \ - count = sprintf (tmp, buf, arg); \ - break; \ - case 1: \ - count = sprintf (tmp, buf, prefixes[0], arg); \ - break; \ - case 2: \ - count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ - arg); \ - break; \ - default: \ - abort (); \ - } -#endif - - errno = 0; - switch (type) - { - case TYPE_SCHAR: - { - int arg = a.arg[dp->arg_index].a.a_schar; - SNPRINTF_BUF (arg); - } - break; - case TYPE_UCHAR: - { - unsigned int arg = a.arg[dp->arg_index].a.a_uchar; - SNPRINTF_BUF (arg); - } - break; - case TYPE_SHORT: - { - int arg = a.arg[dp->arg_index].a.a_short; - SNPRINTF_BUF (arg); - } - break; - case TYPE_USHORT: - { - unsigned int arg = a.arg[dp->arg_index].a.a_ushort; - SNPRINTF_BUF (arg); - } - break; - case TYPE_INT: - { - int arg = a.arg[dp->arg_index].a.a_int; - SNPRINTF_BUF (arg); - } - break; - case TYPE_UINT: - { - unsigned int arg = a.arg[dp->arg_index].a.a_uint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_LONGINT: - { - long int arg = a.arg[dp->arg_index].a.a_longint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_ULONGINT: - { - unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - { - long long int arg = a.arg[dp->arg_index].a.a_longlongint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_ULONGLONGINT: - { - unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_DOUBLE: - { - double arg = a.arg[dp->arg_index].a.a_double; - SNPRINTF_BUF (arg); - } - break; - case TYPE_LONGDOUBLE: - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - SNPRINTF_BUF (arg); - } - break; - case TYPE_CHAR: - { - int arg = a.arg[dp->arg_index].a.a_char; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: - { - wint_t arg = a.arg[dp->arg_index].a.a_wide_char; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_STRING: - { - const char *arg = a.arg[dp->arg_index].a.a_string; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: - { - const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_POINTER: - { - void *arg = a.arg[dp->arg_index].a.a_pointer; - SNPRINTF_BUF (arg); - } - break; - default: - abort (); - } - -#if USE_SNPRINTF - /* Portability: Not all implementations of snprintf() - are ISO C 99 compliant. Determine the number of - bytes that snprintf() has produced or would have - produced. */ - if (count >= 0) - { - /* Verify that snprintf() has NUL-terminated its - result. */ - if (count < maxlen - && ((TCHAR_T *) (result + length)) [count] != '\0') - abort (); - /* Portability hack. */ - if (retcount > count) - count = retcount; - } - else - { - /* snprintf() doesn't understand the '%n' - directive. */ - if (fbp[1] != '\0') - { - /* Don't use the '%n' directive; instead, look - at the snprintf() return value. */ - fbp[1] = '\0'; - continue; - } - else - { - /* Look at the snprintf() return value. */ - if (retcount < 0) - { -# if !HAVE_SNPRINTF_RETVAL_C99 - /* HP-UX 10.20 snprintf() is doubly deficient: - It doesn't understand the '%n' directive, - *and* it returns -1 (rather than the length - that would have been required) when the - buffer is too small. - But a failure at this point can also come - from other reasons than a too small buffer, - such as an invalid wide string argument to - the %ls directive, or possibly an invalid - floating-point argument. */ - size_t tmp_length = - MAX_ROOM_NEEDED (&a, dp->arg_index, - dp->conversion, type, flags, - width, has_precision, - precision, pad_ourselves); - - if (maxlen < tmp_length) - { - /* Make more room. But try to do through - this reallocation only once. */ - size_t bigger_need = - xsum (length, - xsum (tmp_length, - TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR); - /* And always grow proportionally. - (There may be several arguments, each - needing a little more room than the - previous one.) */ - size_t bigger_need2 = - xsum (xtimes (allocated, 2), 12); - if (bigger_need < bigger_need2) - bigger_need = bigger_need2; - ENSURE_ALLOCATION (bigger_need); - continue; - } -# endif - } - else - count = retcount; - } - } -#endif - - /* Attempt to handle failure. */ - if (count < 0) - { - /* SNPRINTF or sprintf failed. Save and use the errno - that it has set, if any. */ - int saved_errno = errno; - - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = - (saved_errno != 0 - ? saved_errno - : (dp->conversion == 'c' || dp->conversion == 's' - ? EILSEQ - : EINVAL)); - return NULL; - } - -#if USE_SNPRINTF - /* Handle overflow of the allocated buffer. - If such an overflow occurs, a C99 compliant snprintf() - returns a count >= maxlen. However, a non-compliant - snprintf() function returns only count = maxlen - 1. To - cover both cases, test whether count >= maxlen - 1. */ - if ((unsigned int) count + 1 >= maxlen) - { - /* If maxlen already has attained its allowed maximum, - allocating more memory will not increase maxlen. - Instead of looping, bail out. */ - if (maxlen == INT_MAX / TCHARS_PER_DCHAR) - goto overflow; - else - { - /* Need at least (count + 1) * sizeof (TCHAR_T) - bytes. (The +1 is for the trailing NUL.) - But ask for (count + 2) * sizeof (TCHAR_T) - bytes, so that in the next round, we likely get - maxlen > (unsigned int) count + 1 - and so we don't get here again. - And allocate proportionally, to avoid looping - eternally if snprintf() reports a too small - count. */ - size_t n = - xmax (xsum (length, - ((unsigned int) count + 2 - + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR), - xtimes (allocated, 2)); - - ENSURE_ALLOCATION (n); - continue; - } - } -#endif - -#if NEED_PRINTF_UNBOUNDED_PRECISION - if (prec_ourselves) - { - /* Handle the precision. */ - TCHAR_T *prec_ptr = -# if USE_SNPRINTF - (TCHAR_T *) (result + length); -# else - tmp; -# endif - size_t prefix_count; - size_t move; - - prefix_count = 0; - /* Put the additional zeroes after the sign. */ - if (count >= 1 - && (*prec_ptr == '-' || *prec_ptr == '+' - || *prec_ptr == ' ')) - prefix_count = 1; - /* Put the additional zeroes after the 0x prefix if - (flags & FLAG_ALT) || (dp->conversion == 'p'). */ - else if (count >= 2 - && prec_ptr[0] == '0' - && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) - prefix_count = 2; - - move = count - prefix_count; - if (precision > move) - { - /* Insert zeroes. */ - size_t insert = precision - move; - TCHAR_T *prec_end; - -# if USE_SNPRINTF - size_t n = - xsum (length, - (count + insert + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR); - length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; - ENSURE_ALLOCATION (n); - length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; - prec_ptr = (TCHAR_T *) (result + length); -# endif - - prec_end = prec_ptr + count; - prec_ptr += prefix_count; - - while (prec_end > prec_ptr) - { - prec_end--; - prec_end[insert] = prec_end[0]; - } - - prec_end += insert; - do - *--prec_end = '0'; - while (prec_end > prec_ptr); - - count += insert; - } - } -#endif - -#if !USE_SNPRINTF - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); -#endif - -#if !DCHAR_IS_TCHAR - /* Convert from TCHAR_T[] to DCHAR_T[]. */ - if (dp->conversion == 'c' || dp->conversion == 's') - { - /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING - TYPE_WIDE_STRING. - The result string is not certainly ASCII. */ - const TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t tmpdst_len; - /* This code assumes that TCHAR_T is 'char'. */ - verify (sizeof (TCHAR_T) == 1); -# if USE_SNPRINTF - tmpsrc = (TCHAR_T *) (result + length); -# else - tmpsrc = tmp; -# endif - tmpdst = - DCHAR_CONV_FROM_ENCODING (locale_charset (), - iconveh_question_mark, - tmpsrc, count, - NULL, - NULL, &tmpdst_len); - if (tmpdst == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - ENSURE_ALLOCATION (xsum (length, tmpdst_len)); - DCHAR_CPY (result + length, tmpdst, tmpdst_len); - free (tmpdst); - count = tmpdst_len; - } - else - { - /* The result string is ASCII. - Simple 1:1 conversion. */ -# if USE_SNPRINTF - /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a - no-op conversion, in-place on the array starting - at (result + length). */ - if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) -# endif - { - const TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t n; - -# if USE_SNPRINTF - if (result == resultbuf) - { - tmpsrc = (TCHAR_T *) (result + length); - /* ENSURE_ALLOCATION will not move tmpsrc - (because it's part of resultbuf). */ - ENSURE_ALLOCATION (xsum (length, count)); - } - else - { - /* ENSURE_ALLOCATION will move the array - (because it uses realloc(). */ - ENSURE_ALLOCATION (xsum (length, count)); - tmpsrc = (TCHAR_T *) (result + length); - } -# else - tmpsrc = tmp; - ENSURE_ALLOCATION (xsum (length, count)); -# endif - tmpdst = result + length; - /* Copy backwards, because of overlapping. */ - tmpsrc += count; - tmpdst += count; - for (n = count; n > 0; n--) - *--tmpdst = (unsigned char) *--tmpsrc; - } - } -#endif - -#if DCHAR_IS_TCHAR && !USE_SNPRINTF - /* Make room for the result. */ - if (count > allocated - length) - { - /* Need at least count elements. But allocate - proportionally. */ - size_t n = - xmax (xsum (length, count), xtimes (allocated, 2)); - - ENSURE_ALLOCATION (n); - } -#endif - - /* Here count <= allocated - length. */ - - /* Perform padding. */ -#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - if (pad_ourselves && has_width) - { - size_t w; -# if ENABLE_UNISTDIO - /* Outside POSIX, it's preferrable to compare the width - against the number of _characters_ of the converted - value. */ - w = DCHAR_MBSNLEN (result + length, count); -# else - /* The width is compared against the number of _bytes_ - of the converted value, says POSIX. */ - w = count; -# endif - if (w < width) - { - size_t pad = width - w; - - /* Make room for the result. */ - if (xsum (count, pad) > allocated - length) - { - /* Need at least count + pad elements. But - allocate proportionally. */ - size_t n = - xmax (xsum3 (length, count, pad), - xtimes (allocated, 2)); - -# if USE_SNPRINTF - length += count; - ENSURE_ALLOCATION (n); - length -= count; -# else - ENSURE_ALLOCATION (n); -# endif - } - /* Here count + pad <= allocated - length. */ - - { -# if !DCHAR_IS_TCHAR || USE_SNPRINTF - DCHAR_T * const rp = result + length; -# else - DCHAR_T * const rp = tmp; -# endif - DCHAR_T *p = rp + count; - DCHAR_T *end = p + pad; - DCHAR_T *pad_ptr; -# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO - if (dp->conversion == 'c' - || dp->conversion == 's') - /* No zero-padding for string directives. */ - pad_ptr = NULL; - else -# endif - { - pad_ptr = (*rp == '-' ? rp + 1 : rp); - /* No zero-padding of "inf" and "nan". */ - if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') - || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) - pad_ptr = NULL; - } - /* The generated string now extends from rp to p, - with the zero padding insertion point being at - pad_ptr. */ - - count = count + pad; /* = end - rp */ - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > rp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - } - } - } -#endif - - /* Here still count <= allocated - length. */ - -#if !DCHAR_IS_TCHAR || USE_SNPRINTF - /* The snprintf() result did fit. */ -#else - /* Append the sprintf() result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); -#endif -#if !USE_SNPRINTF - if (tmp != tmpbuf) - free (tmp); -#endif - -#if NEED_PRINTF_DIRECTIVE_F - if (dp->conversion == 'F') - { - /* Convert the %f result to upper case for %F. */ - DCHAR_T *rp = result + length; - size_t rc; - for (rc = count; rc > 0; rc--, rp++) - if (*rp >= 'a' && *rp <= 'z') - *rp = *rp - 'a' + 'A'; - } -#endif - - length += count; - break; - } - errno = orig_errno; -#undef pad_ourselves -#undef prec_ourselves - } - } - } - - /* Add the final NUL. */ - ENSURE_ALLOCATION (xsum (length, 1)); - result[length] = '\0'; - - if (result != resultbuf && length + 1 < allocated) - { - /* Shrink the allocated memory if possible. */ - DCHAR_T *memory; - - memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); - if (memory != NULL) - result = memory; - } - - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - *lengthp = length; - /* Note that we can produce a big string of a length > INT_MAX. POSIX - says that snprintf() fails with errno = EOVERFLOW in this case, but - that's only because snprintf() returns an 'int'. This function does - not have this limitation. */ - return result; - -#if USE_SNPRINTF - overflow: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EOVERFLOW; - return NULL; -#endif - - out_of_memory: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - out_of_memory_1: - CLEANUP (); - errno = ENOMEM; - return NULL; - } -} - -#undef MAX_ROOM_NEEDED -#undef TCHARS_PER_DCHAR -#undef SNPRINTF -#undef USE_SNPRINTF -#undef DCHAR_SET -#undef DCHAR_CPY -#undef PRINTF_PARSE -#undef DIRECTIVES -#undef DIRECTIVE -#undef DCHAR_IS_TCHAR -#undef TCHAR_T -#undef DCHAR_T -#undef FCHAR_T -#undef VASNPRINTF diff --git a/lib/gl/vasnprintf.h b/lib/gl/vasnprintf.h deleted file mode 100644 index 6bf9c59cd9..0000000000 --- a/lib/gl/vasnprintf.h +++ /dev/null @@ -1,80 +0,0 @@ -/* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _VASNPRINTF_H -#define _VASNPRINTF_H - -/* Get va_list. */ -#include <stdarg.h> - -/* Get size_t. */ -#include <stddef.h> - -#ifndef __attribute__ -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable __attribute__ only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Write formatted output to a string dynamically allocated with malloc(). - You can pass a preallocated buffer for the result in RESULTBUF and its - size in *LENGTHP; otherwise you pass RESULTBUF = NULL. - If successful, return the address of the string (this may be = RESULTBUF - if no dynamic memory allocation was necessary) and set *LENGTHP to the - number of resulting bytes, excluding the trailing NUL. Upon error, set - errno and return NULL. - - When dynamic memory allocation occurs, the preallocated buffer is left - alone (with possibly modified contents). This makes it possible to use - a statically allocated or stack-allocated buffer, like this: - - char buf[100]; - size_t len = sizeof (buf); - char *output = vasnprintf (buf, &len, format, args); - if (output == NULL) - ... error handling ...; - else - { - ... use the output string ...; - if (output != buf) - free (output); - } - */ -#if REPLACE_VASNPRINTF -# define asnprintf rpl_asnprintf -# define vasnprintf rpl_vasnprintf -#endif -extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) - __attribute__ ((__format__ (__printf__, 3, 4))); -extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) - __attribute__ ((__format__ (__printf__, 3, 0))); - -#ifdef __cplusplus -} -#endif - -#endif /* _VASNPRINTF_H */ diff --git a/lib/gl/vasprintf.c b/lib/gl/vasprintf.c deleted file mode 100644 index b8c52a9ec8..0000000000 --- a/lib/gl/vasprintf.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include <config.h> - -/* Specification. */ -#ifdef IN_LIBASPRINTF -# include "vasprintf.h" -#else -# include <stdio.h> -#endif - -#include <errno.h> -#include <limits.h> -#include <stdlib.h> - -#include "vasnprintf.h" - -int -vasprintf (char **resultp, const char *format, va_list args) -{ - size_t length; - char *result = vasnprintf (NULL, &length, format, args); - if (result == NULL) - return -1; - - if (length > INT_MAX) - { - free (result); - errno = EOVERFLOW; - return -1; - } - - *resultp = result; - /* Return the number of resulting bytes, excluding the trailing NUL. */ - return length; -} diff --git a/lib/gl/verify.h b/lib/gl/verify.h deleted file mode 100644 index a29f8666df..0000000000 --- a/lib/gl/verify.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Compile-time assert-like macros. - - Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ - -#ifndef VERIFY_H -# define VERIFY_H 1 - -/* Each of these macros verifies that its argument R is nonzero. To - be portable, R should be an integer constant expression. Unlike - assert (R), there is no run-time overhead. - - There are two macros, since no single macro can be used in all - contexts in C. verify_true (R) is for scalar contexts, including - integer constant expression contexts. verify (R) is for declaration - contexts, e.g., the top level. - - Symbols ending in "__" are private to this header. - - The code below uses several ideas. - - * The first step is ((R) ? 1 : -1). Given an expression R, of - integral or boolean or floating-point type, this yields an - expression of integral type, whose value is later verified to be - constant and nonnegative. - - * Next this expression W is wrapped in a type - struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. - If W is negative, this yields a compile-time error. No compiler can - deal with a bit-field of negative size. - - One might think that an array size check would have the same - effect, that is, that the type struct { unsigned int dummy[W]; } - would work as well. However, inside a function, some compilers - (such as C++ compilers and GNU C) allow local parameters and - variables inside array size expressions. With these compilers, - an array size check would not properly diagnose this misuse of - the verify macro: - - void function (int n) { verify (n < 0); } - - * For the verify macro, the struct verify_type__ will need to - somehow be embedded into a declaration. To be portable, this - declaration must declare an object, a constant, a function, or a - typedef name. If the declared entity uses the type directly, - such as in - - struct dummy {...}; - typedef struct {...} dummy; - extern struct {...} *dummy; - extern void dummy (struct {...} *); - extern struct {...} *dummy (void); - - two uses of the verify macro would yield colliding declarations - if the entity names are not disambiguated. A workaround is to - attach the current line number to the entity name: - - #define _GL_CONCAT0(x, y) x##y - #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) - extern struct {...} * _GL_CONCAT (dummy, __LINE__); - - But this has the problem that two invocations of verify from - within the same macro would collide, since the __LINE__ value - would be the same for both invocations. (The GCC __COUNTER__ - macro solves this problem, but is not portable.) - - A solution is to use the sizeof operator. It yields a number, - getting rid of the identity of the type. Declarations like - - extern int dummy [sizeof (struct {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - - can be repeated. - - * Should the implementation use a named struct or an unnamed struct? - Which of the following alternatives can be used? - - extern int dummy [sizeof (struct {...})]; - extern int dummy [sizeof (struct verify_type__ {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern void dummy (int [sizeof (struct verify_type__ {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; - - In the second and sixth case, the struct type is exported to the - outer scope; two such declarations therefore collide. GCC warns - about the first, third, and fourth cases. So the only remaining - possibility is the fifth case: - - extern int (*dummy (void)) [sizeof (struct {...})]; - - * GCC warns about duplicate declarations of the dummy function if - -Wredundant_decls is used. GCC 4.3 and later have a builtin - __COUNTER__ macro that can let us generate unique identifiers for - each dummy function, to suppress this warning. - - * This implementation exploits the fact that GCC does not warn about - the last declaration mentioned above. If a future version of GCC - introduces a warning for this, the problem could be worked around - by using code specialized to GCC, just as __COUNTER__ is already - being used if available. - - #if 4 <= __GNUC__ - # define verify(R) [another version to keep GCC happy] - #endif - - * In C++, any struct definition inside sizeof is invalid. - Use a template type to work around the problem. */ - -/* Concatenate two preprocessor tokens. */ -# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -# define _GL_CONCAT0(x, y) x##y - -/* _GL_COUNTER is an integer, preferably one that changes each time we - use it. Use __COUNTER__ if it works, falling back on __LINE__ - otherwise. __LINE__ isn't perfect, but it's better than a - constant. */ -# if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -# else -# define _GL_COUNTER __LINE__ -# endif - -/* Generate a symbol with the given prefix, making it unique if - possible. */ -# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) - -/* Verify requirement R at compile-time, as an integer constant expression. - Return 1. */ - -# ifdef __cplusplus -template <int w> - struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; -# define verify_true(R) \ - (!!sizeof (verify_type__<(R) ? 1 : -1>)) -# else -# define verify_true(R) \ - (!!sizeof \ - (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) -# endif - -/* Verify requirement R at compile-time, as a declaration without a - trailing ';'. */ - -# define verify(R) \ - extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)] - -#endif diff --git a/lib/gl/vsnprintf.c b/lib/gl/vsnprintf.c deleted file mode 100644 index 2ec3cae9d7..0000000000 --- a/lib/gl/vsnprintf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc. - Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/* Specification. */ -#include <stdio.h> - -#include <errno.h> -#include <limits.h> -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> - -#include "vasnprintf.h" - -/* Print formatted output to string STR. Similar to vsprintf, but - additional length SIZE limit how much is written into STR. Returns - string length of formatted string (which may be larger than SIZE). - STR may be NULL, in which case nothing will be written. On error, - return a negative value. */ -int -vsnprintf (char *str, size_t size, const char *format, va_list args) -{ - char *output; - size_t len; - size_t lenbuf = size; - - output = vasnprintf (str, &lenbuf, format, args); - len = lenbuf; - - if (!output) - return -1; - - if (output != str) - { - if (size) - { - size_t pruned_len = (len < size ? len : size - 1); - memcpy (str, output, pruned_len); - str[pruned_len] = '\0'; - } - - free (output); - } - - if (len > INT_MAX) - { - errno = EOVERFLOW; - return -1; - } - - return len; -} diff --git a/lib/gl/w32sock.h b/lib/gl/w32sock.h deleted file mode 100644 index 1bcee466d6..0000000000 --- a/lib/gl/w32sock.h +++ /dev/null @@ -1,61 +0,0 @@ -/* w32sock.h --- internal auxilliary functions for Windows socket functions - - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* Written by Paolo Bonzini */ - -#include <errno.h> - -/* Get O_RDWR and O_BINARY. */ -#include <fcntl.h> - -/* Get _get_osfhandle() and _open_osfhandle(). */ -#include <io.h> - -#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) -#define SOCKET_TO_FD(fh) (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY)) - -static inline void -set_winsock_errno (void) -{ - int err = WSAGetLastError (); - - /* Map some WSAE* errors to the runtime library's error codes. */ - switch (err) - { - case WSA_INVALID_HANDLE: - errno = EBADF; - break; - case WSA_NOT_ENOUGH_MEMORY: - errno = ENOMEM; - break; - case WSA_INVALID_PARAMETER: - errno = EINVAL; - break; - case WSAEWOULDBLOCK: - errno = EWOULDBLOCK; - break; - case WSAENAMETOOLONG: - errno = ENAMETOOLONG; - break; - case WSAENOTEMPTY: - errno = ENOTEMPTY; - break; - default: - errno = (err > 10000 && err < 10025) ? err - 10000 : err; - break; - } -} diff --git a/lib/gl/wchar.in.h b/lib/gl/wchar.in.h deleted file mode 100644 index edae751f5e..0000000000 --- a/lib/gl/wchar.in.h +++ /dev/null @@ -1,433 +0,0 @@ -/* A substitute for ISO C99 <wchar.h>, for platforms that have issues. - - Copyright (C) 2007-2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake. */ - -/* - * ISO C 99 <wchar.h> for platforms that have issues. - * <http://www.opengroup.org/susv3xbd/wchar.h.html> - * - * For now, this just ensures proper prerequisite inclusion order and - * the declaration of wcwidth(). - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H -/* Special invocation convention: - - Inside glibc and uClibc header files. - - On HP-UX 11.00 we have a sequence of nested includes - <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>, - once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h> - and once directly. In both situations 'wint_t' is not yet defined, - therefore we cannot provide the function overrides; instead include only - the system's <wchar.h>. - - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and - the latter includes <wchar.h>. But here, we have no way to detect whether - <wctype.h> is completely included or is still being included. */ - -#@INCLUDE_NEXT@ @NEXT_WCHAR_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_WCHAR_H - -#define _GL_ALREADY_INCLUDING_WCHAR_H - -#if @HAVE_FEATURES_H@ -# include <features.h> /* for __GLIBC__ */ -#endif - -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. - But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include <stddef.h> -# include <stdio.h> -# include <time.h> -#endif - -/* Include the original <wchar.h> if it exists. - Some builds of uClibc lack it. */ -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_WCHAR_H@ -# @INCLUDE_NEXT@ @NEXT_WCHAR_H@ -#endif - -#undef _GL_ALREADY_INCLUDING_WCHAR_H - -#ifndef _GL_WCHAR_H -#define _GL_WCHAR_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ -#if !@HAVE_WINT_T@ && !defined wint_t -# define wint_t int -# ifndef WEOF -# define WEOF -1 -# endif -#else -# ifndef WEOF -# define WEOF ((wint_t) -1) -# endif -#endif - - -/* Override mbstate_t if it is too small. - On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for - implementing mbrtowc for encodings like UTF-8. */ -#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ -typedef int rpl_mbstate_t; -# undef mbstate_t -# define mbstate_t rpl_mbstate_t -# define GNULIB_defined_mbstate_t 1 -#endif - - -/* Convert a single-byte character to a wide character. */ -#if @GNULIB_BTOWC@ -# if @REPLACE_BTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef btowc -# define btowc rpl_btowc -# endif -_GL_FUNCDECL_RPL (btowc, wint_t, (int c)); -_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); -# else -# if !@HAVE_BTOWC@ -_GL_FUNCDECL_SYS (btowc, wint_t, (int c)); -# endif -_GL_CXXALIAS_SYS (btowc, wint_t, (int c)); -# endif -_GL_CXXALIASWARN (btowc); -#elif defined GNULIB_POSIXCHECK -# undef btowc -# if HAVE_RAW_DECL_BTOWC -_GL_WARN_ON_USE (btowc, "btowc is unportable - " - "use gnulib module btowc for portability"); -# endif -#endif - - -/* Convert a wide character to a single-byte character. */ -#if @GNULIB_WCTOB@ -# if @REPLACE_WCTOB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wctob -# define wctob rpl_wctob -# endif -_GL_FUNCDECL_RPL (wctob, int, (wint_t wc)); -_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); -# else -# if !defined wctob && !@HAVE_DECL_WCTOB@ -/* wctob is provided by gnulib, or wctob exists but is not declared. */ -_GL_FUNCDECL_SYS (wctob, int, (wint_t wc)); -# endif -_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); -# endif -_GL_CXXALIASWARN (wctob); -#elif defined GNULIB_POSIXCHECK -# undef wctob -# if HAVE_RAW_DECL_WCTOB -_GL_WARN_ON_USE (wctob, "wctob is unportable - " - "use gnulib module wctob for portability"); -# endif -#endif - - -/* Test whether *PS is in the initial state. */ -#if @GNULIB_MBSINIT@ -# if @REPLACE_MBSINIT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsinit -# define mbsinit rpl_mbsinit -# endif -_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); -# else -# if !@HAVE_MBSINIT@ -_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsinit); -#elif defined GNULIB_POSIXCHECK -# undef mbsinit -# if HAVE_RAW_DECL_MBSINIT -_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " - "use gnulib module mbsinit for portability"); -# endif -#endif - - -/* Convert a multibyte character to a wide character. */ -#if @GNULIB_MBRTOWC@ -# if @REPLACE_MBRTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbrtowc -# define mbrtowc rpl_mbrtowc -# endif -_GL_FUNCDECL_RPL (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# else -# if !@HAVE_MBRTOWC@ -_GL_FUNCDECL_SYS (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbrtowc); -#elif defined GNULIB_POSIXCHECK -# undef mbrtowc -# if HAVE_RAW_DECL_MBRTOWC -_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " - "use gnulib module mbrtowc for portability"); -# endif -#endif - - -/* Recognize a multibyte character. */ -#if @GNULIB_MBRLEN@ -# if @REPLACE_MBRLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbrlen -# define mbrlen rpl_mbrlen -# endif -_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# else -# if !@HAVE_MBRLEN@ -_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbrlen); -#elif defined GNULIB_POSIXCHECK -# undef mbrlen -# if HAVE_RAW_DECL_MBRLEN -_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " - "use gnulib module mbrlen for portability"); -# endif -#endif - - -/* Convert a string to a wide string. */ -#if @GNULIB_MBSRTOWCS@ -# if @REPLACE_MBSRTOWCS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsrtowcs -# define mbsrtowcs rpl_mbsrtowcs -# endif -_GL_FUNCDECL_RPL (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_MBSRTOWCS@ -_GL_FUNCDECL_SYS (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsrtowcs); -#elif defined GNULIB_POSIXCHECK -# undef mbsrtowcs -# if HAVE_RAW_DECL_MBSRTOWCS -_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " - "use gnulib module mbsrtowcs for portability"); -# endif -#endif - - -/* Convert a string to a wide string. */ -#if @GNULIB_MBSNRTOWCS@ -# if @REPLACE_MBSNRTOWCS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsnrtowcs -# define mbsnrtowcs rpl_mbsnrtowcs -# endif -_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_MBSNRTOWCS@ -_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsnrtowcs); -#elif defined GNULIB_POSIXCHECK -# undef mbsnrtowcs -# if HAVE_RAW_DECL_MBSNRTOWCS -_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " - "use gnulib module mbsnrtowcs for portability"); -# endif -#endif - - -/* Convert a wide character to a multibyte character. */ -#if @GNULIB_WCRTOMB@ -# if @REPLACE_WCRTOMB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcrtomb -# define wcrtomb rpl_wcrtomb -# endif -_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# else -# if !@HAVE_WCRTOMB@ -_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcrtomb); -#elif defined GNULIB_POSIXCHECK -# undef wcrtomb -# if HAVE_RAW_DECL_WCRTOMB -_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " - "use gnulib module wcrtomb for portability"); -# endif -#endif - - -/* Convert a wide string to a string. */ -#if @GNULIB_WCSRTOMBS@ -# if @REPLACE_WCSRTOMBS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsrtombs -# define wcsrtombs rpl_wcsrtombs -# endif -_GL_FUNCDECL_RPL (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_WCSRTOMBS@ -_GL_FUNCDECL_SYS (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcsrtombs); -#elif defined GNULIB_POSIXCHECK -# undef wcsrtombs -# if HAVE_RAW_DECL_WCSRTOMBS -_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " - "use gnulib module wcsrtombs for portability"); -# endif -#endif - - -/* Convert a wide string to a string. */ -#if @GNULIB_WCSNRTOMBS@ -# if @REPLACE_WCSNRTOMBS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsnrtombs -# define wcsnrtombs rpl_wcsnrtombs -# endif -_GL_FUNCDECL_RPL (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_WCSNRTOMBS@ -_GL_FUNCDECL_SYS (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcsnrtombs); -#elif defined GNULIB_POSIXCHECK -# undef wcsnrtombs -# if HAVE_RAW_DECL_WCSNRTOMBS -_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " - "use gnulib module wcsnrtombs for portability"); -# endif -#endif - - -/* Return the number of screen columns needed for WC. */ -#if @GNULIB_WCWIDTH@ -# if @REPLACE_WCWIDTH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcwidth -# define wcwidth rpl_wcwidth -# endif -_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t)); -_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); -# else -# if !@HAVE_DECL_WCWIDTH@ -/* wcwidth exists but is not declared. */ -_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t)); -# endif -_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); -# endif -_GL_CXXALIASWARN (wcwidth); -#elif defined GNULIB_POSIXCHECK -# undef wcwidth -# if HAVE_RAW_DECL_WCWIDTH -_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " - "use gnulib module wcwidth for portability"); -# endif -#endif - - -#endif /* _GL_WCHAR_H */ -#endif /* _GL_WCHAR_H */ -#endif diff --git a/lib/gl/xsize.h b/lib/gl/xsize.h deleted file mode 100644 index 1d43dfe4c2..0000000000 --- a/lib/gl/xsize.h +++ /dev/null @@ -1,108 +0,0 @@ -/* xsize.h -- Checked size_t computations. - - Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _XSIZE_H -#define _XSIZE_H - -/* Get size_t. */ -#include <stddef.h> - -/* Get SIZE_MAX. */ -#include <limits.h> -#if HAVE_STDINT_H -# include <stdint.h> -#endif - -/* The size of memory objects is often computed through expressions of - type size_t. Example: - void* p = malloc (header_size + n * element_size). - These computations can lead to overflow. When this happens, malloc() - returns a piece of memory that is way too small, and the program then - crashes while attempting to fill the memory. - To avoid this, the functions and macros in this file check for overflow. - The convention is that SIZE_MAX represents overflow. - malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc - implementation that uses mmap --, it's recommended to use size_overflow_p() - or size_in_bounds_p() before invoking malloc(). - The example thus becomes: - size_t size = xsum (header_size, xtimes (n, element_size)); - void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); -*/ - -/* Convert an arbitrary value >= 0 to type size_t. */ -#define xcast_size_t(N) \ - ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) - -/* Sum of two sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum (size_t size1, size_t size2) -{ - size_t sum = size1 + size2; - return (sum >= size1 ? sum : SIZE_MAX); -} - -/* Sum of three sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum3 (size_t size1, size_t size2, size_t size3) -{ - return xsum (xsum (size1, size2), size3); -} - -/* Sum of four sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) -{ - return xsum (xsum (xsum (size1, size2), size3), size4); -} - -/* Maximum of two sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xmax (size_t size1, size_t size2) -{ - /* No explicit check is needed here, because for any n: - max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ - return (size1 >= size2 ? size1 : size2); -} - -/* Multiplication of a count with an element size, with overflow check. - The count must be >= 0 and the element size must be > 0. - This is a macro, not an inline function, so that it works correctly even - when N is of a wider type and N > SIZE_MAX. */ -#define xtimes(N, ELSIZE) \ - ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) - -/* Check for overflow. */ -#define size_overflow_p(SIZE) \ - ((SIZE) == SIZE_MAX) -/* Check against overflow. */ -#define size_in_bounds_p(SIZE) \ - ((SIZE) != SIZE_MAX) - -#endif /* _XSIZE_H */ diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index b11df42fcf..8f595c7ebf 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -48,6 +48,7 @@ typedef int ssize_t; #include <sys/stat.h> #include <sys/socket.h> #include <time.h> +#include <u64.h> /* gnulib for uint64_t */ /* some systems had problems with long long int, thus, * it is not used. diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4 deleted file mode 100644 index c3defdea33..0000000000 --- a/lib/m4/hooks.m4 +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2009, 2010, 2011 Free Software Foundation, Inc. -# -# Author: Nikos Mavrogiannopoulos, Simon Josefsson -# -# This file is part of GnuTLS. -# -# The GnuTLS is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation; either version 2.1 of -# the License, or (at your option) any later version. -# -# The GnuTLS is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with GnuTLS; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA - -AC_DEFUN([LIBGNUTLS_HOOKS], -[ - # Library code modified: REVISION++ - # Interfaces changed/added/removed: CURRENT++ REVISION=0 - # Interfaces added: AGE++ - # Interfaces removed: AGE=0 - AC_SUBST(LT_CURRENT, 27) - AC_SUBST(LT_REVISION, 0) - AC_SUBST(LT_AGE, 0) - - AC_SUBST(LT_SSL_CURRENT, 27) - AC_SUBST(LT_SSL_REVISION, 0) - AC_SUBST(LT_SSL_AGE, 0) - - AC_SUBST(CXX_LT_CURRENT, 28) - AC_SUBST(CXX_LT_REVISION, 0) - AC_SUBST(CXX_LT_AGE, 0) - - # Used when creating the Windows libgnutls-XX.def files. - DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}` - AC_SUBST(DLL_VERSION) - - cryptolib="nettle" - - AC_ARG_WITH(libgcrypt, - AS_HELP_STRING([--with-libgcrypt], [use libgcrypt as crypto library]), - libgcrypt=$withval, - libgcrypt=no) - if test "$libgcrypt" = "yes"; then - cryptolib=libgcrypt - AC_DEFINE([HAVE_GCRYPT], 1, [whether the gcrypt library is in use]) - AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [#include <gcrypt.h>], - [enum gcry_cipher_algos i = GCRY_CIPHER_CAMELLIA128]) - if test "$ac_cv_libgcrypt" != yes; then - AC_MSG_ERROR([[ -*** -*** Libgcrypt v1.4.0 or later was not found. You may want to get it from -*** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ -*** - ]]) - fi - fi - - AC_MSG_CHECKING([whether to use nettle]) -if test "$cryptolib" = "nettle";then - AC_MSG_RESULT(yes) - AC_LIB_HAVE_LINKFLAGS([nettle],, [#include <nettle/aes.h>], - [nettle_aes_invert_key (0, 0)]) - if test "$ac_cv_libnettle" != yes; then - AC_MSG_ERROR([[ - *** - *** Libnettle 2.1 was not found. - ]]) - fi - AC_TRY_COMPILE(, - [ - #include <nettle/gcm.h> - gcm_set_nonce(0, 0, 0); - return 0; - ], [ - AC_DEFINE([NETTLE_GCM], 1, [Nettle supports GCM]) - ], [ - ]) - NETTLE_LIBS="-lgmp -lpthread -lhogweed" -else - AC_MSG_RESULT(no) -fi - AC_SUBST(NETTLE_LIBS) - AM_CONDITIONAL(ENABLE_NETTLE, test "$cryptolib" = "nettle") - - AC_ARG_WITH(included-libtasn1, - AS_HELP_STRING([--with-included-libtasn1], [use the included libtasn1]), - included_libtasn1=$withval, - included_libtasn1=no) - if test "$included_libtasn1" = "no"; then - AC_LIB_HAVE_LINKFLAGS(tasn1,, [#include <libtasn1.h>], - [asn1_check_version (NULL)]) - if test "$ac_cv_libtasn1" != yes; then - included_libtasn1=yes - AC_MSG_WARN([[ - *** - *** Libtasn1 was not found. Will use the included one. - ]]) - fi - fi - AC_MSG_CHECKING([whether to use the included minitasn1]) - AC_MSG_RESULT($included_libtasn1) - AM_CONDITIONAL(ENABLE_MINITASN1, test "$included_libtasn1" = "yes") - - if test "$included_libtasn1" = "no"; then - GNUTLS_REQUIRES_PRIVATE="Requires.private: libtasn1" - fi - - AC_ARG_WITH(included-pakchois, - AS_HELP_STRING([--with-included-pakchois], [use the included pakchois]), - included_pakchois=$withval, - included_pakchois=no) - if test "$included_pakchois" = "no"; then - AC_LIB_HAVE_LINKFLAGS(pakchois,, [#include <pakchois/pakchois.h>], - [pakchois_module_load(0,0);]) - if test "$ac_cv_pakchois" != yes; then - included_pakchois=yes - AC_MSG_WARN([[ - *** - *** Pakchois was not found. Will use the included one. - ]]) - fi - fi - #not other option for now. The released pakchois cannot open an arbitrary PKCS11 module, - #and the author is reluctant to add such feature. - included_pakchois=yes - AC_MSG_CHECKING([whether to use the included pakchois]) - AC_MSG_RESULT($included_pakchois) - AM_CONDITIONAL(ENABLE_LOCAL_PAKCHOIS, test "$included_pakchois" = "yes") - if test "$included_pakchois" = "yes";then - AC_CHECK_LIB(pthread, pthread_mutex_lock,, - [AC_MSG_WARN([could not find pthread_mutex_lock])]) - AC_CHECK_LIB(dl, dlopen,, - [AC_MSG_WARN([could not find dlopen])]) - - fi - - AC_ARG_WITH(lzo, - AS_HELP_STRING([--with-lzo], [use experimental LZO compression]), - use_lzo=$withval, use_lzo=no) - AC_MSG_CHECKING([whether to include LZO compression support]) - AC_MSG_RESULT($use_lzo) - LZO_LIBS= - if test "$use_lzo" = "yes"; then - AC_CHECK_LIB(lzo2, lzo1x_1_compress, LZO_LIBS=-llzo2) - if test "$LZO_LIBS" = ""; then - AC_CHECK_LIB(lzo, lzo1x_1_compress, LZO_LIBS=-llzo, [ - use_lzo=no - AC_MSG_WARN( - *** - *** Could not find liblzo or liblzo2. Disabling LZO compression. - ) - ]) - fi - fi - AC_SUBST(LZO_LIBS) - if test "$use_lzo" = "yes"; then - AC_DEFINE([USE_LZO], 1, [whether to use the LZO compression]) - if test "$LZO_LIBS" = "-llzo"; then - AC_CHECK_HEADERS(lzo1x.h) - elif test "$LZO_LIBS" = "-llzo2"; then - AC_CHECK_HEADERS(lzo/lzo1x.h) - fi - fi - AM_CONDITIONAL(USE_LZO, test "$use_lzo" = "yes") - - AC_MSG_CHECKING([whether C99 macros are supported]) - AC_TRY_COMPILE(, - [ - #define test_mac(...) - int z,y,x; - test_mac(x,y,z); - return 0; - ], [ - AC_DEFINE([C99_MACROS], 1, [C99 macros are supported]) - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - AC_MSG_WARN([C99 macros not supported. This may affect compiling.]) - ]) - - AC_MSG_CHECKING([whether to enable Opaque PRF input support]) - AC_ARG_ENABLE(opaque-prf-input, - AS_HELP_STRING([--enable-opaque-prf-input=DD], - [enable Opaque PRF input using DD as extension type]), - ac_opaque_prf_input=$enableval, ac_opaque_prf_input=no) - if test "$ac_opaque_prf_input" != "no"; then - if ! echo $ac_opaque_prf_input | egrep -q '^[[0-9]]+$'; then - ac_opaque_prf_input=no - AC_MSG_WARN([[ - *** Could not parse Opaque PRF Input extension type. - *** Use --enable-opaque-prf-input=XX where XX is decimal, for example - *** to use extension value 42 use --enable-opqaue-prf-input=42]]) - fi - fi - if test "$ac_opaque_prf_input" != "no"; then - AC_MSG_RESULT([yes (extension value $ac_opaque_prf_input)]) - AC_DEFINE_UNQUOTED([ENABLE_OPRFI], $ac_opaque_prf_input, - [enable Opaque PRF Input]) - else - AC_MSG_RESULT(no) - fi - AM_CONDITIONAL(ENABLE_OPRFI, test "$ac_opaque_prf_input" != "no") - - AC_MSG_CHECKING([whether to disable SRP authentication support]) - AC_ARG_ENABLE(srp-authentication, - AS_HELP_STRING([--disable-srp-authentication], - [disable the SRP authentication support]), - ac_enable_srp=no) - if test x$ac_enable_srp != xno; then - AC_MSG_RESULT(no) - AC_DEFINE([ENABLE_SRP], 1, [enable SRP authentication]) - else - ac_full=0 - AC_MSG_RESULT(yes) - fi - AM_CONDITIONAL(ENABLE_SRP, test "$ac_enable_srp" != "no") - - AC_MSG_CHECKING([whether to disable PSK authentication support]) - AC_ARG_ENABLE(psk-authentication, - AS_HELP_STRING([--disable-psk-authentication], - [disable the PSK authentication support]), - ac_enable_psk=no) - if test x$ac_enable_psk != xno; then - AC_MSG_RESULT(no) - AC_DEFINE([ENABLE_PSK], 1, [enable PSK authentication]) - else - ac_full=0 - AC_MSG_RESULT(yes) - fi - AM_CONDITIONAL(ENABLE_PSK, test "$ac_enable_psk" != "no") - - AC_MSG_CHECKING([whether to disable anonymous authentication support]) - AC_ARG_ENABLE(anon-authentication, - AS_HELP_STRING([--disable-anon-authentication], - [disable the anonymous authentication support]), - ac_enable_anon=no) - if test x$ac_enable_anon != xno; then - AC_MSG_RESULT(no) - AC_DEFINE([ENABLE_ANON], 1, [enable anonymous authentication]) - else - ac_full=0 - AC_MSG_RESULT(yes) - fi - AM_CONDITIONAL(ENABLE_ANON, test "$ac_enable_anon" != "no") - - # Allow disabling Camellia - if test "$nettle" != "yes";then - AC_ARG_ENABLE(camellia, - AS_HELP_STRING([--disable-camellia], [disable Camellia cipher]), - enable_camellia=$enableval, enable_camellia=yes) - else - enable_camellia=no - fi - - AC_MSG_CHECKING([whether to disable Camellia cipher]) - if test "$enable_camellia" != "no"; then - AC_MSG_RESULT([no]) - AC_DEFINE([ENABLE_CAMELLIA], 1, [enable camellia block cipher]) - else - AC_MSG_RESULT([yes]) - fi - - AC_MSG_CHECKING([whether to disable extra PKI stuff]) - AC_ARG_ENABLE(extra-pki, - AS_HELP_STRING([--disable-extra-pki], - [only enable the basic PKI stuff]), - enable_pki=$enableval, enable_pki=yes) - if test "$enable_pki" != "yes"; then - ac_full=0 - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - AC_DEFINE([ENABLE_PKI], 1, [whether to include all the PKCS/PKI stuff]) - fi - AM_CONDITIONAL(ENABLE_PKI, test "$enable_pki" = "yes") - - ac_enable_openpgp=yes - AC_MSG_CHECKING([whether to disable OpenPGP Certificate authentication support]) - AC_ARG_ENABLE(openpgp-authentication, - AS_HELP_STRING([--disable-openpgp-authentication], - [disable the OpenPGP authentication support]), - ac_enable_openpgp=no) - if test x$ac_enable_openpgp = xno; then - AC_MSG_RESULT(yes) - ac_full=0 - else - AC_DEFINE([ENABLE_OPENPGP], 1, [use openpgp authentication]) - AC_MSG_RESULT(no) - fi - AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes") - - AC_MSG_CHECKING([whether to disable SessionTicket extension support]) - AC_ARG_ENABLE(session-ticket, - AS_HELP_STRING([--disable-session-ticket], - [disable the SessionTicket extension support]), - ac_session_ticket=no) - if test x$ac_session_ticket != xno; then - AC_MSG_RESULT(no) - AC_DEFINE([ENABLE_SESSION_TICKET], 1, [enable SessionTicket extension]) - else - ac_full=0 - AC_MSG_RESULT(yes) - fi - AM_CONDITIONAL(ENABLE_SESSION_TICKET, test "$ac_enable_session_ticket" != "no") - - # For cryptodev - AC_MSG_CHECKING([whether to add cryptodev support]) - AC_ARG_ENABLE(cryptodev, - AS_HELP_STRING([--enable-cryptodev], [enable cryptodev support]), - enable_cryptodev=yes,enable_cryptodev=no) - AC_MSG_RESULT($enable_cryptodev) - - if test "$enable_cryptodev" = "yes"; then - AC_DEFINE([ENABLE_CRYPTODEV], 1, [Enable cryptodev support]) - fi - - # For storing integers in pointers without warnings - # http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc - AC_CHECK_SIZEOF(void *) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(int) - case $ac_cv_sizeof_void_p in - $ac_cv_sizeof_long) - AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long)], - [Additional cast to bring void* to a type castable to int.]) - ;; - *) - AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], []) - ;; - esac -]) diff --git a/lib/minitasn1/Makefile.am b/lib/minitasn1/Makefile.am index 54d15143e5..e5be71bc49 100644 --- a/lib/minitasn1/Makefile.am +++ b/lib/minitasn1/Makefile.am @@ -22,8 +22,7 @@ # MA 02110-1301, USA AM_CPPFLAGS = -DASN1_BUILDING \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ + -I$(srcdir)/../../gl \ -I$(srcdir)/.. noinst_LTLIBRARIES = libminitasn1.la diff --git a/lib/nettle/Makefile.am b/lib/nettle/Makefile.am index a580fc258e..e902e774d5 100644 --- a/lib/nettle/Makefile.am +++ b/lib/nettle/Makefile.am @@ -23,8 +23,7 @@ AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) AM_CPPFLAGS = \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ + -I$(srcdir)/../../gl \ -I$(srcdir)/../includes \ -I$(builddir)/../includes \ -I$(srcdir)/.. diff --git a/lib/opencdk/Makefile.am b/lib/opencdk/Makefile.am index 5728d8bfb0..882c39f060 100644 --- a/lib/opencdk/Makefile.am +++ b/lib/opencdk/Makefile.am @@ -22,8 +22,7 @@ # MA 02110-1301, USA AM_CPPFLAGS = \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ + -I$(srcdir)/../../gl \ -I$(srcdir)/../includes \ -I$(builddir)/../includes \ -I$(srcdir)/.. diff --git a/lib/openpgp/Makefile.am b/lib/openpgp/Makefile.am index 3b73c97366..4f00d704d3 100644 --- a/lib/openpgp/Makefile.am +++ b/lib/openpgp/Makefile.am @@ -23,8 +23,7 @@ AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) AM_CPPFLAGS = \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ + -I$(srcdir)/../../gl \ -I$(srcdir)/../includes \ -I$(builddir)/../includes \ -I$(srcdir)/.. \ diff --git a/lib/po/LINGUAS b/lib/po/LINGUAS deleted file mode 100644 index 0f7f5bc56f..0000000000 --- a/lib/po/LINGUAS +++ /dev/null @@ -1,12 +0,0 @@ -en@boldquot -en@quot -cs -de -fr -it -ms -nl -pl -sv -vi -zh_CN diff --git a/lib/po/Makevars b/lib/po/Makevars deleted file mode 100644 index 6487d53ac7..0000000000 --- a/lib/po/Makevars +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = bug-gnutls@gnu.org - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/lib/po/POTFILES.in b/lib/po/POTFILES.in deleted file mode 100644 index 25a582a429..0000000000 --- a/lib/po/POTFILES.in +++ /dev/null @@ -1,5 +0,0 @@ -# List of source files which contain translatable strings. -gnutls_errors.c -gnutls_alert.c -x509/output.c -openpgp/output.c diff --git a/lib/po/cs.po.in b/lib/po/cs.po.in deleted file mode 100644 index 970c2eb472..0000000000 --- a/lib/po/cs.po.in +++ /dev/null @@ -1,1112 +0,0 @@ -# Czech translation of libgnutls. -# Copyright (C) 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Petr Pisar <petr.pisar@atlas.cz>, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: libgnutls 2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2009-12-27 17:23+0100\n" -"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n" -"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Úspěch." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Nezdařilo se vyjednat seznam podporovaných šifer." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "Tento druh šifry není podporován." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Certifikát a daný klíč se k sobě nehodí." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Nezdařilo se vyjednat podporovanou kompresní metodu." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "Narazil jsem na neznámý algoritmus veřejného klíče." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Byl vyjednán algoritmus, který není povolen." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "Byl přijat packet s velkou TLS strukturou." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "Byl přijat packet s neplatnou verzí struktury." - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Diffieho-Hellmanovo prvočíslo poslané serverem není přijatelné (není dost dlouhé)." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "Byl přijat TLS packet s neočekávanou délkou." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "Zadaná relace byla z nějakého důvodu zneplatněna." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "Vnitřní chyba GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "Přijato neplatné rozšíření TLS." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "Bylo přijato nepřekonatelné upozornění TLS." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "Byl přijat neočekávaný TLS packet." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "Bylo přijato varovné upozornění TLS." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Při výpočtu packetu TLS Finished došlo k chybě." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "Druhá strana neposlala žádný certifikát." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Kryptografický algoritmus s nižší prioritou je již přítomen." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Nebyly nalezeny žádné dočasné parametry RSA." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Nebyly nalezeny žádné dočasné parametry DH." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "Byl přijat neočekávaný packet zahajující TLS." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "Prohlížení velkého celého čísla selhalo." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Velké celé číslo nebylo možné exportovat." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Dešifrování selhalo." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Šifrování selhalo." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Dešifrovaní veřejného klíče selhalo." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Šifrování veřejného klíče selhalo." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Podepisování veřejného klíče selhalo." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Podpis veřejného klíče se nepodařilo ověřit." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Dekomprese packetu s TLS strukturou selhala." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Komprese packetu s TLS strukturou selhala." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "Vnitřní chyba při alokaci paměti." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Byla požadována neimplementovaná nebo zakázaná vlastnost." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Na takový požadavek chybí prokázání totožnosti." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Chyba v souboru s hesly." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Chybná výplň v PKCS1 packetu." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "Požadovaná relace vypršela." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "Hašování selhalo." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Chyba při dekódování Base64." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Neočekávaná Base64 hlavička (chyba)." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Chyba kódování do Base64." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Chyba při rozebírání souboru s hesly." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "Požadovaná data nebyla dostupná." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Chyba v pull funkci." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Chyba v push funkci." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Bylo dosaženo horní meze pořadového čísla packetu se strukturou. Zírám!" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Chyba v certifikátu." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Neznámé alternativní jméno subjektu v X.509 certifikátu." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Nepodporované kritické rozšíření v X.509 certifikátu." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "Bylo zaznamenáno použití klíče v rozporu s pravidly." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Zdroj je dočasně nedostupný, zkusí se znovu." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "Funkce byla přerušena." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "Druhá strana požádala o znovuzahájení relace." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Byla přijata aplikační data TLS, zatímco měla přijít data zahájení." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Chyba databázovém jádře." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Tento druh certifikátu není podporován." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Zadaný paměťový buffer je pro uložení parametrů příliš malý." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "Požadavek je neplatný." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "Byl přijat neplatný parametr." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Chyba při čtení souboru." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "ASN1 parser: Prvek nebyl nalezen." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "ASN1 parser: Identifikátor nebyl nalezen." - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "ASN1 parser: Chyba při rozebírání DER." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "ASN1 parser: Hodnota nebyla nalezena." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "ASN1 parser: Obecná chyba při rozebírání." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "ASN1 parser: Hodnota není platná." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "ASN1 parser: Chyba ve ZNAČCE." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "ASN1 parser: chyba v implicitní značce" - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "ASN1 parser: Chyba v typu „ANY“." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "ASN1 parser: Chyba syntaxe." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "ASN1 parser: Přetečení při rozebírání DER." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "Bylo přijato příliš mnoho packetů s prázdnou strukturou." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Inicializace GnuTLS-extra selhala." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "Verze knihovny GnuTLS se neshoduje s verzí knihovny GnuTLS-extra." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "Verze knihovny gcrypt je příliš stará." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "Verze knihovny tasn1 je příliš stará." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "ID OpenPGP uživatele bylo odvoláno." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Chyba při načítání souboru s klíči. " - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "Inicializace LZO selhala." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Žádné podporované kompresní algoritmy nebyly nalezeny." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Žádné podporované režimy šifer nebyly nalezeny." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Nebylo možné získat OpenPGP klíč." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Nebylo možné najít OpenPGP podklíč." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "Zadané SRP uživatelské jméno je neplatné." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "OpenPGP otisk není podporován." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Certifikát má nepodporované atributy." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "Tento OID není podporován." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "Hašovací algoritmus není znám." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "Typ obsahu struktury PKCS není znám." - -# „Bag“ překládá jako „kufřík“ Klíma -# <http://crypto-world.info/klima/2001/chip-2001-04-176-178.pdf>. Jedná se -# o prvek struktury PFX. -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "Typ kufříku ve struktuře PKCS není znám." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "Zadané heslo obsahuje neplatné znaky." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "MAC (autentizační kód zprávy) se nepodařilo ověřit." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Některé hranice omezení byly dosaženy." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Nezdařilo se získat náhodná data." - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Přijata TLS/IA zpráva Intermediate Phase Finished" - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Přijata TLS/IA zpráva Final Phase Finished" - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Kontrolní součet fáze TLS/IA se nepodařilo ověřit" - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "Zadaný algoritmus nebo protokol není znám." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "Zahajovací data jsou příliš velká (DoS?), zkontrolujte gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(neznámý chybový kód)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Oznámení o uzavření" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Neočekávaná zpráva" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Chybný MAC zprávy" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Dešifrování selhalo" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Přetečení struktury" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Dekomprese selhala" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Zahájení (handshake) selhalo" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Certifikát je špatný" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Certifikát není podporován" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Certifikát byl odvolán" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Certifikát vypršel" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Neznámý certifikát" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Neplatný parametr" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "Autorita není známa" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Přístup byl zamítnut" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Chyba dekódování" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Chyba dešifrování" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Omezení na export" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Chyba ve verzi protokolu" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Nedostatečné zabezpečení" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Uživatel zrušen" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "Vnitřní chyba" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Znovuvyjednání není dovoleno" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Zadaný certifikát nebylo možné získat" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "Bylo odesláno nepodporované rozšíření" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Odeslané jméno serveru nebylo rozpoznáno" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "SRP/PSK jméno uživatele chybí nebo není známo" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Vyjednávání vnitřní aplikace (IA) selhalo" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Ověření vnitřní aplikace (IA) selhalo" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tOmezení délky cesty: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tJazyk politiky: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tPolitika:\n" -"\t\t\t\tASCII: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tHexavýpis: " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tDigitální podpis.\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tNepopiratelnost.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tŠifrování klíčů.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tŠifrování dat.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tDohodnutí klíče.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tPodepisování certifikátu.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tPodepisování CRL.\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tPouze šifrování klíčů.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tPouze dešifrování klíčů.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "pozor: distribuční místo CRL obsahuje znak NULL, bude nahrazen „!“\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tTLS WWW server.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tTLS WWW klient.\n" - -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tPodepisování kódu.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tOchrana e-mailu.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tČasové razítkování.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tPodepisování OCSP.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tJakýkoliv účel.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tCertifikační autorita (CA): NE\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tCertifikační autorita (CA): ANO\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tOmezení délky cesty: %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "pozor: SAN obsahuje znak NULL, bude nahrazen „!“\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tXMPP adresa: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\tOID dalšíhoJména: %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\tdalšíJméno v DER: " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\tdalšíJméno v ASCII: " - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tRozšíření:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tZákladní omezení (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "kritické" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "není kritické" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\t\tIdentifikátor klíče subjektu (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tIdentifikátor klíče autority (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tUžití klíče (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tÚčel klíče (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tAlternativní jméno subjektu (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tMísta distribuce CRL (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tInformace o zástupném certifikátu (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tNeznámé rozšíření %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tHexavýpis: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tVerze: %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tSériové číslo (hex): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tVydavatel: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tPlatnost:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tNe před: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tNe po: %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tSubjekt: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "není známo" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgoritmus veřejného klíče subjektu: %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tModul (%d bitů:)\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tMocnitel (%d bitů):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tVeřejný klíč (%d bitů):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tAlgoritmus podpisu: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "varování: podepsáno vadným podpisovým algoritmem, kterým lze falšovat.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tPodpis:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tMD5 otisk:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tSHA-1 otisk:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tID veřejného klíče:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "podepsáno pomocí %s (rozbito!), " - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "podepsáno pomocí %s, " - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Informace X.509 certifikátu:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Další Informace:\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tVerze: 1 (implicitní)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tData aktualizací:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tVydáno: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tDalší v: %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tRozšíření:\n" - -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tČíslo CRL (%s): " - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tIdentifikátor klíče autority (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tNeznámé rozšíření %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tHexavýpis: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tOdvolané certifikáty (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tŽádné odvolané certifikáty.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tSériové číslo (hex): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tOdvoláno v: %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Informace o seznamu odvolaných X.509 certifikátů (CRL):\n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tMocnitel:\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tAtributy:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tHeslo výzvy: %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tNeznámý atribut %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Informace PKCS #10 žádosti o certifikát:\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tUžití klíče:\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "chyba: get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tDigitální podpisy.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tŠifrování komunikace.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tŠifrování uložených dat.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tAutentizace.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tPodepisování certifikátu.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tID (hex): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tOtisk (hex): " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tOdvolán: Ano\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tOdvolán: Ne\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tČasová razítka:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tVytvoření: %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tVypršení: Nikdy\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tVypršení: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgoritmus veřejného klíče: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tJméno[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tOdvolané jméno[%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tPodklíč[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "jméno[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "odvolané jméno[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "otisk: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "vytvořen: %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "platnost nikdy nevyprší, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "platnost vyprší: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "algoritmus klíče %s (%d bitů)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "neznámý algoritmus klíče (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Informace o OpenPGP certifikátu:\n" diff --git a/lib/po/de.po.in b/lib/po/de.po.in deleted file mode 100644 index 1b75bd62bd..0000000000 --- a/lib/po/de.po.in +++ /dev/null @@ -1,974 +0,0 @@ -# German gnutls translation. -# Copyright (C) 2006 Free Software Foundation, Inc. -# This file is distributed under the same license as the gnutls package. -# Jens Seidel <jensseidel@users.sf.net>, 2006. -# -msgid "" -msgstr "" -"Project-Id-Version: gnutls 1.4.0\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2008-09-16 16:45+0200\n" -"PO-Revision-Date: 2006-12-12 09:37+0100\n" -"Last-Translator: Michael Piefel <piefel@informatik.hu-berlin.de>\n" -"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/gnutls_errors.c:53 -msgid "Success." -msgstr "Erfolg." - -#: lib/gnutls_errors.c:54 -msgid "Could not negotiate a supported cipher suite." -msgstr "Konnte keine unterstützte Code-Suite aushandeln." - -#: lib/gnutls_errors.c:56 -msgid "The cipher type is unsupported." -msgstr "Der Code-Typ wird nicht unterstützt." - -#: lib/gnutls_errors.c:58 -msgid "The certificate and the given key do not match." -msgstr "Das Zertifikat und der gegebene Schlüssel passen nicht zueinander." - -#: lib/gnutls_errors.c:60 -msgid "Could not negotiate a supported compression method." -msgstr "Konnte keine unterstützte Kompressionsmethode aushandeln." - -#: lib/gnutls_errors.c:62 -msgid "An unknown public key algorithm was encountered." -msgstr "Ein unbekannter öffentlicher-Schlüssel-Algorithmus trat auf." - -#: lib/gnutls_errors.c:65 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Ein nicht aktivierter Algorithmus wurde ausgehandelt." - -#: lib/gnutls_errors.c:67 -msgid "A large TLS record packet was received." -msgstr "Ein großes TLS-Datensatzpaket wurde empfangen." - -#: lib/gnutls_errors.c:69 -msgid "A record packet with illegal version was received." -msgstr "Ein Datensatzpaket mit illegaler Version wurde empfangen." - -#: lib/gnutls_errors.c:72 -msgid "The Diffie Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Die Diffie-Hellman-Primzahl, die vom Server gesendet wurde, ist nicht akzeptabel (nicht lang genug)." - -#: lib/gnutls_errors.c:74 -msgid "A TLS packet with unexpected length was received." -msgstr "Ein TLS-Paket mit unerwarteter Länge wurde empfangen." - -#: lib/gnutls_errors.c:77 -msgid "The specified session has been invalidated for some reason." -msgstr "Die angegebene Sitzung wurde aus irgendwelchen Gründen ungültig." - -#: lib/gnutls_errors.c:80 -msgid "GnuTLS internal error." -msgstr "Interner GnuTLS-Fehler." - -#: lib/gnutls_errors.c:81 -msgid "An illegal TLS extension was received." -msgstr "Eine illegale TLS-Erweiterung wurde empfangen." - -#: lib/gnutls_errors.c:83 -msgid "A TLS fatal alert has been received." -msgstr "Ein fataler TLS-Alarm wurde empfangen." - -#: lib/gnutls_errors.c:85 -msgid "An unexpected TLS packet was received." -msgstr "Ein unerwartetes TLS-Paket wurde empfangen." - -#: lib/gnutls_errors.c:87 -msgid "A TLS warning alert has been received." -msgstr "Eine TLS-Warnmeldung wurde empfangen." - -#: lib/gnutls_errors.c:90 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Ein Fehler trat bei der fertiggestellten TLS-Paketberechnung auf." - -#: lib/gnutls_errors.c:92 -msgid "The peer did not send any certificate." -msgstr "Die Gegenstelle sendete kein Zertifikat." - -#: lib/gnutls_errors.c:95 -msgid "There is already a crypto algorithm with lower priority." -msgstr "" - -#: lib/gnutls_errors.c:98 -msgid "No temporary RSA parameters were found." -msgstr "Es wurden keine temporären RSA-Parameter gefunden." - -#: lib/gnutls_errors.c:100 -msgid "No temporary DH parameters were found." -msgstr "Es wurden keine temporären DH-Parameter gefunden." - -#: lib/gnutls_errors.c:102 -msgid "An unexpected TLS handshake packet was received." -msgstr "Ein unerwartetes TLS-Handshake-Paket wurde empfangen." - -#: lib/gnutls_errors.c:104 -msgid "The scanning of a large integer has failed." -msgstr "Das Lesen einer großen Ganzzahl schlug fehl." - -#: lib/gnutls_errors.c:106 -msgid "Could not export a large integer." -msgstr "Konnte keine große Ganzzahl exportieren." - -#: lib/gnutls_errors.c:108 -msgid "Decryption has failed." -msgstr "Die Entschlüsselung schlug fehl." - -#: lib/gnutls_errors.c:109 -msgid "Encryption has failed." -msgstr "Die Verschlüsselung schlug fehl." - -#: lib/gnutls_errors.c:110 -msgid "Public key decryption has failed." -msgstr "Die Entschlüsselung mittels öffentlichem Schlüssel schlug fehl." - -#: lib/gnutls_errors.c:112 -msgid "Public key encryption has failed." -msgstr "Die Verschlüsselung mittels öffentlichem Schlüssel schlug fehl." - -#: lib/gnutls_errors.c:114 -msgid "Public key signing has failed." -msgstr "Das Signieren mittels öffentlichem Schlüssel schlug fehl." - -#: lib/gnutls_errors.c:116 -msgid "Public key signature verification has failed." -msgstr "Die Verifizierung der Signatur mittels öffentlichem Schlüssel schlug fehl." - -#: lib/gnutls_errors.c:118 -msgid "Decompression of the TLS record packet has failed." -msgstr "Die Dekomprimierung des TLS-Datensatzpakets schlug fehl." - -#: lib/gnutls_errors.c:120 -msgid "Compression of the TLS record packet has failed." -msgstr "Die Komprimierung des TLS-Datensatzpakets schlug fehl." - -#: lib/gnutls_errors.c:123 -msgid "Internal error in memory allocation." -msgstr "Interner Fehler bei Speicheranfoderung." - -#: lib/gnutls_errors.c:125 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Eine nicht implementierte oder deaktivierte Eigenschaft wurde abgefragt." - -#: lib/gnutls_errors.c:127 -msgid "Insufficient credentials for that request." -msgstr "Unzureichende Berechtigungsnachweise für diese Anfrage." - -#: lib/gnutls_errors.c:129 -msgid "Error in password file." -msgstr "Fehler in Passwortdatei." - -#: lib/gnutls_errors.c:130 -msgid "Wrong padding in PKCS1 packet." -msgstr "Falsche Auffüllung in PKCS1-Paket." - -#: lib/gnutls_errors.c:132 -msgid "The requested session has expired." -msgstr "Die abgefragte Sitzung ist ausgelaufen." - -#: lib/gnutls_errors.c:133 -msgid "Hashing has failed." -msgstr "Hashing schlug fehl." - -#: lib/gnutls_errors.c:134 -msgid "Base64 decoding error." -msgstr "Base64-Entschlüsselungsfehler." - -#: lib/gnutls_errors.c:136 -#, fuzzy -msgid "Base64 unexpected header error." -msgstr "Base64-Entschlüsselungsfehler." - -#: lib/gnutls_errors.c:139 -msgid "Base64 encoding error." -msgstr "Base64-Verschlüsselungsfehler." - -#: lib/gnutls_errors.c:141 -msgid "Parsing error in password file." -msgstr "Lesefehler in Passwortdatei." - -#: lib/gnutls_errors.c:143 -msgid "The requested data were not available." -msgstr "Die abgefragten Daten waren nicht verfügbar." - -#: lib/gnutls_errors.c:145 -msgid "Error in the pull function." -msgstr "Fehler in der Pull-Funktion." - -#: lib/gnutls_errors.c:146 -msgid "Error in the push function." -msgstr "Fehler in der Push-Funktion." - -#: lib/gnutls_errors.c:148 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Das obere Limit der Datensatzpaketsequenznummern wurde erreicht. Huch!" - -#: lib/gnutls_errors.c:150 -msgid "Error in the certificate." -msgstr "Fehler im Zertifikat." - -#: lib/gnutls_errors.c:152 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Unbekannter Betreffalternativenname im X.509-Zertifikat." - -#: lib/gnutls_errors.c:155 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Nicht unterstützte kritische Erweiterung im X.509-Zertifikat." - -#: lib/gnutls_errors.c:157 -msgid "Key usage violation in certificate has been detected." -msgstr "Schlüsselverwendungsverletzung im Zertifikat wurde entdeckt." - -#: lib/gnutls_errors.c:159 lib/gnutls_errors.c:160 -msgid "Function was interrupted." -msgstr "Funktion wurde unterbrochen." - -#: lib/gnutls_errors.c:161 -msgid "Rehandshake was requested by the peer." -msgstr "Neuer Handshake wurde von der Gegenstelle gefordert." - -#: lib/gnutls_errors.c:164 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "TLS-Anwendungsdaten wurden empfangen, während Handshake-Daten erwartet wurden." - -#: lib/gnutls_errors.c:166 -msgid "Error in Database backend." -msgstr "Fehler im Datenbank-Backend." - -#: lib/gnutls_errors.c:167 -msgid "The certificate type is not supported." -msgstr "Der Zertifikattyp wird nicht unterstützt." - -#: lib/gnutls_errors.c:169 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Der verfügbare Speicherpuffer ist zu kurz, um Parameter aufzunehmen." - -#: lib/gnutls_errors.c:171 -msgid "The request is invalid." -msgstr "Die Anfrage ist ungültig." - -#: lib/gnutls_errors.c:172 -msgid "An illegal parameter has been received." -msgstr "Ein illegaler Parameter wurde empfangen." - -#: lib/gnutls_errors.c:174 -msgid "Error while reading file." -msgstr "Fehler beim Dateilesen." - -#: lib/gnutls_errors.c:176 -msgid "ASN1 parser: Element was not found." -msgstr "ASN1-Parser: Element wurde nicht gefunden." - -# FIXME: full stop is missing -#: lib/gnutls_errors.c:178 -msgid "ASN1 parser: Identifier was not found" -msgstr "ASN1-Parser: Identifikator wurde nicht gefunden." - -#: lib/gnutls_errors.c:180 -msgid "ASN1 parser: Error in DER parsing." -msgstr "ASN1-Parser: Fehler im DER-Parsen." - -#: lib/gnutls_errors.c:182 -msgid "ASN1 parser: Value was not found." -msgstr "ASN1-Parser: Wert wurde nicht gefunden." - -#: lib/gnutls_errors.c:184 -msgid "ASN1 parser: Generic parsing error." -msgstr "ASN1-Parser: Allgemeiner Verarbeitungsfehler." - -#: lib/gnutls_errors.c:186 -msgid "ASN1 parser: Value is not valid." -msgstr "ASN1-Parser: Wert ist nicht gültig." - -#: lib/gnutls_errors.c:188 -msgid "ASN1 parser: Error in TAG." -msgstr "ASN1-Parser: Fehler in TAG." - -# FIXME: capitalisation, full stop -#: lib/gnutls_errors.c:189 -msgid "ASN1 parser: error in implicit tag" -msgstr "ASN1-Parser: Fehler in implizitem Tag." - -#: lib/gnutls_errors.c:191 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "ASN1-Parser: Fehler im Typ 'ANY'." - -#: lib/gnutls_errors.c:193 -msgid "ASN1 parser: Syntax error." -msgstr "ASN1-Parser: Syntaxfehler." - -#: lib/gnutls_errors.c:195 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "ASN1-Parser: Überlauf beim DER-Parsen." - -#: lib/gnutls_errors.c:198 -msgid "Too many empty record packets have been received." -msgstr "Zu viele leere Datensatzpakete wurden empfangen." - -#: lib/gnutls_errors.c:200 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Die Initialisierung von GnuTLS-extra schlug fehl." - -#: lib/gnutls_errors.c:203 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "Die Version der GnuTLS-Bibliothek stimmt nicht mit der Version der GnuTLS-extra-Bibliothek überein." - -#: lib/gnutls_errors.c:205 -msgid "The gcrypt library version is too old." -msgstr "Die Version der Bibliothek gcrypt ist zu alt." - -#: lib/gnutls_errors.c:208 -msgid "The tasn1 library version is too old." -msgstr "Die Version der Bibliothek tasn1 ist zu alt." - -#: lib/gnutls_errors.c:210 -#, fuzzy -msgid "The OpenPGP User ID is revoked." -msgstr "Der OpenPGP-Fingerabdruck wird nicht unterstützt." - -#: lib/gnutls_errors.c:212 -msgid "Error loading the keyring." -msgstr "Fehler beim Laden des Schlüsselrings." - -#: lib/gnutls_errors.c:214 -msgid "The initialization of LZO has failed." -msgstr "Die Initialisierung von LZO schlug fehl." - -#: lib/gnutls_errors.c:216 -msgid "No supported compression algorithms have been found." -msgstr "Keine unterstützten Kompressionsalgorithmen wurden gefunden." - -#: lib/gnutls_errors.c:218 -msgid "No supported cipher suites have been found." -msgstr "Keine unterstützten Code-Suites wurden gefunden." - -#: lib/gnutls_errors.c:220 -msgid "Could not get OpenPGP key." -msgstr "Konnte OpenPGP-Schlüssel nicht bekommen." - -#: lib/gnutls_errors.c:222 -#, fuzzy -msgid "Could not find OpenPGP subkey." -msgstr "Konnte OpenPGP-Schlüssel nicht bekommen." - -#: lib/gnutls_errors.c:225 -msgid "The SRP username supplied is illegal." -msgstr "Der angegebene SRP-Benutzername ist illegal." - -#: lib/gnutls_errors.c:228 -msgid "The OpenPGP fingerprint is not supported." -msgstr "Der OpenPGP-Fingerabdruck wird nicht unterstützt." - -#: lib/gnutls_errors.c:230 -msgid "The certificate has unsupported attributes." -msgstr "Das Zertifikat hat nichtunterstützte Attribute." - -# CHECKME -#: lib/gnutls_errors.c:232 -msgid "The OID is not supported." -msgstr "OID wird nicht unterstützt." - -#: lib/gnutls_errors.c:234 -msgid "The hash algorithm is unknown." -msgstr "Der Hash-Algorithmus ist unbekannt." - -#: lib/gnutls_errors.c:236 -msgid "The PKCS structure's content type is unknown." -msgstr "Der Inhaltstyp der PKCS-Struktur ist unbekannt." - -# CHECKME -#: lib/gnutls_errors.c:238 -msgid "The PKCS structure's bag type is unknown." -msgstr "Der Verpackungstyp der PKCS-Struktur ist unbekannt." - -#: lib/gnutls_errors.c:240 -msgid "The given password contains invalid characters." -msgstr "Das angegebene Passwort enthält ungültige Zeichen." - -#: lib/gnutls_errors.c:242 -msgid "The Message Authentication Code verification failed." -msgstr "Die Überprüfung des Authentifizierungscodes der Nachricht schlug fehl." - -#: lib/gnutls_errors.c:244 -msgid "Some constraint limits were reached." -msgstr "Einige beschränkende Limits wurden erreicht." - -#: lib/gnutls_errors.c:246 -msgid "Failed to acquire random data." -msgstr "Konnte keine zufälligen Daten erhalten." - -# FIXME: missing fullstops in next three msgid's -#: lib/gnutls_errors.c:249 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Empfing eine »TLS/IA Intermediate Phase Finished«-Mitteilung" - -#: lib/gnutls_errors.c:251 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Empfing eine »TLS/IA Final Phase Finished«-Mitteilung" - -#: lib/gnutls_errors.c:253 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Verifizierung der TLS/IA-Phasenprüfsumme schlug fehl" - -#: lib/gnutls_errors.c:256 -#, fuzzy -msgid "The specified algorithm or protocol is unknown." -msgstr "Der Hash-Algorithmus ist unbekannt." - -#: lib/gnutls_errors.c:259 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "" - -#: lib/gnutls_errors.c:348 -msgid "(unknown error code)" -msgstr "" - -#: lib/gnutls_alert.c:42 -msgid "Close notify" -msgstr "" - -#: lib/gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "" - -#: lib/gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "" - -#: lib/gnutls_alert.c:45 -#, fuzzy -msgid "Decryption failed" -msgstr "Die Entschlüsselung schlug fehl." - -#: lib/gnutls_alert.c:46 -msgid "Record overflow" -msgstr "" - -#: lib/gnutls_alert.c:47 -#, fuzzy -msgid "Decompression failed" -msgstr "Die Entschlüsselung schlug fehl." - -#: lib/gnutls_alert.c:48 -#, fuzzy -msgid "Handshake failed" -msgstr "Hashing schlug fehl." - -#: lib/gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "" - -#: lib/gnutls_alert.c:50 -#, fuzzy -msgid "Certificate is not supported" -msgstr "Der Zertifikattyp wird nicht unterstützt." - -#: lib/gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "" - -#: lib/gnutls_alert.c:52 -#, fuzzy -msgid "Certificate is expired" -msgstr "Der Zertifikattyp wird nicht unterstützt." - -#: lib/gnutls_alert.c:53 -#, fuzzy -msgid "Unknown certificate" -msgstr "Fehler im Zertifikat." - -#: lib/gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "" - -#: lib/gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "" - -#: lib/gnutls_alert.c:56 -msgid "Access was denied" -msgstr "" - -#: lib/gnutls_alert.c:57 -msgid "Decode error" -msgstr "" - -#: lib/gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "" - -#: lib/gnutls_alert.c:59 -msgid "Export restriction" -msgstr "" - -#: lib/gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "" - -#: lib/gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "" - -#: lib/gnutls_alert.c:62 -msgid "User canceled" -msgstr "" - -#: lib/gnutls_alert.c:63 -#, fuzzy -msgid "Internal error" -msgstr "Interner GnuTLS-Fehler." - -#: lib/gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "" - -#: lib/gnutls_alert.c:66 -#, fuzzy -msgid "Could not retrieve the specified certificate" -msgstr "Konnte keine unterstützte Code-Suite aushandeln." - -#: lib/gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "" - -#: lib/gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "" - -#: lib/gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "" - -#: lib/gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "" - -#: lib/gnutls_alert.c:75 -#, fuzzy -msgid "Inner application verification failed" -msgstr "Die Überprüfung des Authentifizierungscodes der Nachricht schlug fehl." - -#: lib/x509/output.c:113 lib/x509/output.c:389 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "" - -#: lib/x509/output.c:114 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "" - -#: lib/x509/output.c:123 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" - -#: lib/x509/output.c:125 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" - -#: lib/x509/output.c:217 -msgid "\t\t\tDigital signature.\n" -msgstr "" - -#: lib/x509/output.c:219 -msgid "\t\t\tNon repudiation.\n" -msgstr "" - -#: lib/x509/output.c:221 -msgid "\t\t\tKey encipherment.\n" -msgstr "" - -#: lib/x509/output.c:223 -msgid "\t\t\tData encipherment.\n" -msgstr "" - -#: lib/x509/output.c:225 -msgid "\t\t\tKey agreement.\n" -msgstr "" - -#: lib/x509/output.c:227 lib/openpgp/output.c:107 -msgid "\t\t\tCertificate signing.\n" -msgstr "" - -#: lib/x509/output.c:229 -msgid "\t\t\tCRL signing.\n" -msgstr "" - -#: lib/x509/output.c:231 -msgid "\t\t\tKey encipher only.\n" -msgstr "" - -#: lib/x509/output.c:233 -msgid "\t\t\tKey decipher only.\n" -msgstr "" - -#: lib/x509/output.c:348 -msgid "\t\t\tTLS WWW Server.\n" -msgstr "" - -#: lib/x509/output.c:350 -msgid "\t\t\tTLS WWW Client.\n" -msgstr "" - -#: lib/x509/output.c:352 -msgid "\t\t\tCode signing.\n" -msgstr "" - -#: lib/x509/output.c:354 -msgid "\t\t\tEmail protection.\n" -msgstr "" - -#: lib/x509/output.c:356 -msgid "\t\t\tTime stamping.\n" -msgstr "" - -#: lib/x509/output.c:358 -msgid "\t\t\tOCSP signing.\n" -msgstr "" - -#: lib/x509/output.c:360 -msgid "\t\t\tAny purpose.\n" -msgstr "" - -#: lib/x509/output.c:384 -msgid "\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "" - -#: lib/x509/output.c:386 -msgid "\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "" - -#: lib/x509/output.c:491 -#, c-format -msgid "\t\t\tXMPP Address: %.*s\n" -msgstr "" - -#: lib/x509/output.c:494 -#, c-format -msgid "\t\t\totherName OID: %.*s\n" -msgstr "" - -#: lib/x509/output.c:495 -msgid "\t\t\totherName DER: " -msgstr "" - -#: lib/x509/output.c:497 -msgid "" -"\n" -"\t\t\totherName ASCII: " -msgstr "" - -#: lib/x509/output.c:523 lib/x509/output.c:1195 lib/openpgp/output.c:326 -#, c-format -msgid "\tVersion: %d\n" -msgstr "" - -#: lib/x509/output.c:537 -msgid "\tSerial Number (hex): " -msgstr "" - -#: lib/x509/output.c:554 lib/x509/output.c:1209 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "" - -#: lib/x509/output.c:561 -msgid "\tValidity:\n" -msgstr "" - -#: lib/x509/output.c:574 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "" - -#: lib/x509/output.c:588 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "" - -#: lib/x509/output.c:602 -#, c-format -msgid "\tSubject: %s\n" -msgstr "" - -#: lib/x509/output.c:617 lib/x509/output.c:894 lib/x509/output.c:1305 -#: lib/openpgp/output.c:238 -msgid "unknown" -msgstr "" - -#: lib/x509/output.c:619 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "" - -#: lib/x509/output.c:633 lib/openpgp/output.c:258 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "" - -#: lib/x509/output.c:635 lib/openpgp/output.c:260 -msgid "\t\tExponent:\n" -msgstr "" - -#: lib/x509/output.c:654 lib/openpgp/output.c:285 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "" - -#: lib/x509/output.c:656 lib/openpgp/output.c:287 -msgid "\t\tP:\n" -msgstr "" - -#: lib/x509/output.c:658 lib/openpgp/output.c:289 -msgid "\t\tQ:\n" -msgstr "" - -#: lib/x509/output.c:660 lib/openpgp/output.c:291 -msgid "\t\tG:\n" -msgstr "" - -#: lib/x509/output.c:706 -msgid "\tExtensions:\n" -msgstr "" - -#: lib/x509/output.c:716 -#, c-format -msgid "\t\tBasic Constraints (%s):\n" -msgstr "" - -#: lib/x509/output.c:717 lib/x509/output.c:732 lib/x509/output.c:747 -#: lib/x509/output.c:762 lib/x509/output.c:777 lib/x509/output.c:794 -#: lib/x509/output.c:809 lib/x509/output.c:826 lib/x509/output.c:838 -msgid "critical" -msgstr "" - -#: lib/x509/output.c:717 lib/x509/output.c:732 lib/x509/output.c:747 -#: lib/x509/output.c:762 lib/x509/output.c:777 lib/x509/output.c:794 -#: lib/x509/output.c:809 lib/x509/output.c:826 lib/x509/output.c:838 -msgid "not critical" -msgstr "" - -#: lib/x509/output.c:731 -#, c-format -msgid "\t\tSubject Key Identifier (%s):\n" -msgstr "" - -#: lib/x509/output.c:746 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "" - -#: lib/x509/output.c:761 -#, c-format -msgid "\t\tKey Usage (%s):\n" -msgstr "" - -#: lib/x509/output.c:776 -#, c-format -msgid "\t\tKey Purpose (%s):\n" -msgstr "" - -#: lib/x509/output.c:793 -#, c-format -msgid "\t\tSubject Alternative Name (%s):\n" -msgstr "" - -#: lib/x509/output.c:808 -#, c-format -msgid "\t\tCRL Distribution points (%s):\n" -msgstr "" - -#: lib/x509/output.c:825 -#, c-format -msgid "\t\tProxy Certificate Information (%s):\n" -msgstr "" - -#: lib/x509/output.c:837 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "" - -#: lib/x509/output.c:866 -msgid "\t\t\tASCII: " -msgstr "" - -#: lib/x509/output.c:870 -msgid "\t\t\tHexdump: " -msgstr "" - -#: lib/x509/output.c:895 lib/x509/output.c:1306 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "" - -#: lib/x509/output.c:901 lib/x509/output.c:1312 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "" - -#: lib/x509/output.c:926 lib/x509/output.c:1337 -msgid "\tSignature:\n" -msgstr "" - -#: lib/x509/output.c:949 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" - -#: lib/x509/output.c:951 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" - -#: lib/x509/output.c:985 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" - -#: lib/x509/output.c:1151 -msgid "X.509 Certificate Information:\n" -msgstr "" - -#: lib/x509/output.c:1155 -msgid "Other Information:\n" -msgstr "" - -#: lib/x509/output.c:1191 -msgid "\tVersion: 1 (default)\n" -msgstr "" - -#: lib/x509/output.c:1216 -msgid "\tUpdate dates:\n" -msgstr "" - -#: lib/x509/output.c:1229 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "" - -#: lib/x509/output.c:1245 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "" - -#: lib/x509/output.c:1255 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "" - -#: lib/x509/output.c:1257 -#, fuzzy -msgid "\tNo revoked certificates.\n" -msgstr "Fehler im Zertifikat." - -#: lib/x509/output.c:1276 -msgid "\t\tSerial Number (hex): " -msgstr "" - -#: lib/x509/output.c:1285 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "" - -#: lib/x509/output.c:1368 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "" - -#: lib/openpgp/output.c:85 -msgid "\t\tKey Usage:\n" -msgstr "" - -#: lib/openpgp/output.c:94 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "" - -#: lib/openpgp/output.c:99 -msgid "\t\t\tDigital signatures.\n" -msgstr "" - -#: lib/openpgp/output.c:101 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "" - -#: lib/openpgp/output.c:103 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "" - -#: lib/openpgp/output.c:105 -msgid "\t\t\tAuthentication.\n" -msgstr "" - -#: lib/openpgp/output.c:128 -msgid "\tID (hex): " -msgstr "" - -#: lib/openpgp/output.c:149 -msgid "\tFingerprint (hex): " -msgstr "" - -#: lib/openpgp/output.c:166 -msgid "\tRevoked: True\n" -msgstr "" - -#: lib/openpgp/output.c:168 -msgid "\tRevoked: False\n" -msgstr "" - -#: lib/openpgp/output.c:176 -msgid "\tTime stamps:\n" -msgstr "" - -#: lib/openpgp/output.c:193 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "" - -#: lib/openpgp/output.c:207 -msgid "\t\tExpiration: Never\n" -msgstr "" - -#: lib/openpgp/output.c:216 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "" - -#: lib/openpgp/output.c:240 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "" - -#: lib/openpgp/output.c:349 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "" - -#: lib/openpgp/output.c:352 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "" - -#: lib/openpgp/output.c:369 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" - -#: lib/openpgp/output.c:404 -msgid "OpenPGP Certificate Information:\n" -msgstr "" - -#~ msgid "The specified GnuPG TrustDB version is not supported. TrustDB v4 is supported." -#~ msgstr "Die angegebene Version von GnuPG-TrustDB wird nicht unterstützt. TrustDB Version 4 wird unterstützt." diff --git a/lib/po/fr.po.in b/lib/po/fr.po.in deleted file mode 100644 index 7fa9ccac2a..0000000000 --- a/lib/po/fr.po.in +++ /dev/null @@ -1,1109 +0,0 @@ -# translation of libgnutls to French -# Copyright (C) 2008 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Nicolas Provost <nprovost@quadriv.com>, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: libgnutls 2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2009-12-29 21:15+0100\n" -"Last-Translator: Nicolas Provost <nprovost@quadriv.com>\n" -"Language-Team: French <traduc@traduc.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Succs." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Impossible de ngocier une mthode de chiffrement." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "Algorithme de chiffrement non support." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Le certificat ne correspond pas avec la clef fournie." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Echec lors de la ngociation d'une mthode de compression." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "Algorithme de clef publique inconnu." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Un algorithme non encore oprationnel a t ngoci." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "Un paquet TLS volumineux de donnes applicatives a t reu." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "Un paquet de donnes contenant un numro de version incorrect a t reu." - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Le nombre de Diffie-Hellman envoy par le serveur n'est pas suffisamment grand." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "Un paquet TLS de longueur incorrecte a t reu." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "La session courante a t invalide pour une raison non prcise." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "Erreur interne GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "Une extension TLS incorrecte a t reue." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "Une alerte TLS fatale a t reue." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "Un paquet TLS incorrect a t reu." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "Un avertissement TLS a t reu." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Erreur durant la prparation du paquet TLS de fin d'tablissement de session (\"TLS Finished\")." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "La machine distante n'a pas envoy de certificat." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Un algorithme de chiffrement de priorit infrieure a dj t slectionn." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Paramtres temporaires RSA non trouvs." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Paramtres temporaires DH non trouvs." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "Un paquet de ngociation (handshake) TLS incorrect a t reu." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "Echec lors de la recherche d'un grand entier." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Impossible de transmettre un grand nombre entier." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Le dcryptage a chou." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Le chiffrement a chou." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Le dchiffrement a chou (clef publique)." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Le chiffrement a chou (clef publique)." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Echec de la signature (clef publique)." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Echec lors de la vrification de la signature (clef publique)." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Echec de la dcompression d'un paquet TLS de donnes applicatives (\"TLS Record\")." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Echec de la compression d'un paquet TLS de donnes applicatives (\"TLS Record\")." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "Erreur interne d'allocation mmoire." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Une fonctionnalit non supporte a t demande." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Droits insuffisants pour satisfaire cette demande." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Erreur dans le fichier de mots de passe." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Bourrage (padding) PKCS1 incorrect." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "La session a expir." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "Le calcul d'empreinte (hash) a chou." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Erreur de dcodage Base64." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Erreur au niveau de l'entte Base64." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Erreur d'encodage Base64." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Erreur d'analyse du fichier de mots de passe." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "Les donnes demandes ne sont pas disponibles." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Erreur au niveau de la fonction \"pull\"." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Erreur au niveau de la fonction \"push\"." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "La valeur maximale des numros de squence des paquets de donnes applicatives \"TLS Record\" a t atteinte !" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Erreur dans le certificat." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "L'entre \"Subject Alternative Name\" (autre nom du sujet) du certificat X509 est vide." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Une extension critique du certificat X509 n'est pas supporte." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "Utilisation de la clef d'un certificat pour un usage non prvu." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Ressource temporairement indisponible, ressayer." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "Interruption de fonction." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "Une rengociation a t demande par la machine distante." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Des donnes applicatives TLS ont t reues alors que des donnes de ngociation taient attendues." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Erreur dans la structure de la base de donnes." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Ce type de certificat n'est pas support." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Le tampon mmoire donn est trop petit pour contenir tous les paramtres." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "Requte incorrecte." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "Un paramtre incorrect a t reu." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Erreur de lecture de fichier." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "Element manquant durant l'analyse ASN1." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "Identifiant non trouv durant l'analyse ASN1." - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "Erreur de dcodage DER durant l'analyse ASN1." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "Valeur non trouve durant l'analyse ASN1." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "Erreur durant l'analyse ASN1." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "Valeur incorrecte dtecte durant l'analyse ASN1." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "Erreur d'tiquette (tag) dtecte durant l'analyse ASN1." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "Erreur d'tiquette (tag implicite) dtecte durant l'analyse ASN1." - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "Erreur dans un type \"ANY\" dtecte lors de l'analyse ASN1." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "Erreur de syntaxe dtecte lors de l'analyse ASN1." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "Dpassement de capacit lors du dcodage DER durant l'analyse ASN1." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "Trop de paquets de donnes applicatives (\"TLS Record\") vides ont t reus." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Echec de l'initialisation de GnuTLS-extra." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "La version de la librairie GnuTLS ne correspond pas celle de la librairie GnuTLS-extra." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "La version utilise de la librairie gcrypt est trop ancienne." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "La version utilise de la librairie tasn1 est trop ancienne." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "L'identifiant d'utilisateur OpenPGP (User ID) est rvoqu." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Erreur durant le chargement du trousseau de clefs." - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "Echec de l'initialisation de LZO." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Aucun algorithme de compression n'est disponible." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Aucune mthode de chiffrement n'est disponible." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Impossible d'obtenir la clef OpenPGP." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Impossible de trouver la sous-clef OpenPGP." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "Le nom d'utilisateur SRP communiqu est illicite." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "Cette empreinte OpenPGP n'est pas supporte." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Le certificat possde des attributs non supports." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "Identifiant OID non support." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "Algorithme d'empreinte (hash) inconnu." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "Type de structure PKCS inconnu." - -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "Type de conteneur (bag) PKCS inconnu." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "Le mot de passe fourni comporte des caractres invalides." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "Echec de la vrification du code d'authentification du message (MAC)." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Certaines valeurs limites ont t atteintes." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Impossible de gnrer une valeur alatoire." - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Un message signalant l'avant-dernire tape de l'change de donnes et clefs complmentaires (\"TLS/IA Intermediate Phase Finished\") a t reu." - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Un message signalant la fin de l'change de donnes et clefs complmentaires (\"TLS/IA Final Phase Finished\") a t reu." - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Echec de la vrification de la somme de contrle durant la phase \"TLS/IA\" (change complmentaire de donnes et clefs)." - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "L'algorithme ou le protocole demand est inconnu." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "La taille des donnes de ngociation (handshake) est trop grande (dni de service ?). Contrlez gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(code d'erreur inconnu)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Notification de fermeture" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Message inattendu" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Mauvais bloc MAC" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Le dcryptage a chou" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Dpassement de taille d'enregistrement" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Echec de dcompression" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Echec de ngociation" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Mauvais certificat" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Ce certificat n'est pas support" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Le certificat est rvoqu" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Le certificat a expir" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Certificat inconnu" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Paramtre illgal" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "Autorit racine CA inconnue" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Accs refus" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Erreur de dcodage" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Erreur de dchiffrage" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Restriction l'export" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Erreur de version de protocole" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Scurit insuffisante" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Annulation par l'utilisateur" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "Erreur interne" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Rengociation interdite" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Impossible d'obtenir le certificat spcifi" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "Une extension non supporte a t transmise" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Le nom de serveur transmis n'est pas reconnu" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "Le nom d'utilisateur SRP/PSK est absent ou inconnu" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Echec de ngociation interne l'application" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "La vrification interne l'application a chou" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tProfondeur de chemin de certificats (Path Length Constraint): %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tTermes de politique d'utilisation: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tPolitique-d'utilisation:\n" -"\t\t\t\tASCII:" - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tCode-hexadcimal :" - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tSignature lectronique.\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tNon rpudiation.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tChiffrement de clef.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tChiffrement de donnes.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tValidation de clef.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tSignature de certificat.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tSignature de liste de rvocation (CRL).\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tChiffrement de clef seulement.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tDchiffrement de clef seulement.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "attention : le point de distribution contient un caractre NUL, remplac par '!'\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tServeur web TLS.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tClient web TLS.\n" - -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tSignature de code.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tProtection d'email.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tHorodatage.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tSignature OCSP.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tToutes utilisations.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tCertificat autorit (CA): NON\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tCertificat autorit (CA): OUI\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tProfondeur de chemin de certificats (Path Length Constraint): %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "attention : le champ SAN contient un caractre NUL, remplac par '!'\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tAdresse XMPP: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\tautre nom OID: %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\tautre Nom DER: " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\tautreNom ASCII:" - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tExtensions:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tContraintes de base (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "critique" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "non critique" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\t\tIdentifiant de clef du sujet (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tIdentifiant de la clef de l'autorit (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tUsages possibles de la clef (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tUtilisation prvue de la clef (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tAutre nom du sujet (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tPoints de distribution des listes de rvocation (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tDtails du certificat du proxy (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tExtension inconnue %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tCode hexadcimal: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tVersion: %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tNumro de srie (hexadcimal): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tEmetteur: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tValidit:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tPas avant: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tPas aprs: %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tSujet: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "inconnu" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgorithme de clef publique du sujet: %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tModule (bits %d):\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tExposant (bits %d):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tClef publique (bits %d):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tAlgorithme de signature: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "attention : sign en utilisant un algorithme de signature dj \"cass\" (faible) potentiellement corruptible.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tSignature:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tEmpreinte MD5:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tEmpreinte SHA-1:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tId de clef publique:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "sign avec %s (cass !)," - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "sign avec %s," - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Dtail du certificat X509:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Autres informations :\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tVersion: 1 (dfaut)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tDates de mise jour:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tEmis: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tProchainement: %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tExtensions:\n" - -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tNumro de liste de rvoc. CRL (%s):" - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tIdentifiant de la clef de l'autorit (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tExtension inconnue %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tCode hexadcimal: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tCertificats rvoqus (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tCertificats non rvoqus.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tNumro de srie (hexa): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tRvoqu le : %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Dtails sur la liste de rvocation du certificat X509 : \n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tExposant:\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tAttributs:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tMot de passe \"challenge\": %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tAttribut inconnu %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Informations de requte de certificat PKCS10 :\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tUsages possibles de la clef :\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "Erreur: get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tSignatures lectroniques.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tChiffrement de communications.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tChiffrement de stockage de donnes.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tAuthentification.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tSignature de certificat.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tID (hexa) :" - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tEmpreinte (hexa) : " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tRvoqu: oui\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tRvoqu: non\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tHorodatage:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tCration: %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tExpiration: jamais\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tExpiration: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgorithme de clef publique: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tNom[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tNom rvoqu[%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tSous-clef[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "nom[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "nom rvoqu[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "empreinte: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "cr: %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "n'expire jamais, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "expire: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "algorithme de cl %s (%d bits)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "algorithme de clef inconnu (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Dtails du certificat OpenPGP :\n" diff --git a/lib/po/it.po.in b/lib/po/it.po.in deleted file mode 100644 index 6878f2b27d..0000000000 --- a/lib/po/it.po.in +++ /dev/null @@ -1,1108 +0,0 @@ -# Italian translation for libgnutls. -# Copyright (C) 2010 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Sergio Zanchetta <primes2h@ubuntu.com>, 2010. -msgid "" -msgstr "" -"Project-Id-Version: libgnutls-2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2010-03-26 10:40+0100\n" -"Last-Translator: Sergio Zanchetta <primes2h@ubuntu.com>\n" -"Language-Team: Italian <tp@lists.linux.it>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Successo." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Impossibile negoziare una suite supportata di cifrari." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "Il tipo di cifrario non è supportato." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Il certificato e la chiave fornita non corrispondono." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Impossibile negoziare un metodo di compressione supportato." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "È stato trovato un algoritmo a chiave pubblica sconosciuto." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "È stato negoziato un algoritmo non abilitato." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "È stato ricevuto un grande pacchetto di record TLS." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "È stato ricevuto un pacchetto di record con versione non valida." - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Il numero primo di Diffie-Hellman inviato dal server non è accettabile (non è abbastanza lungo)." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "È stato ricevuto un pacchetto TLS di lunghezza inattesa." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "La sessione specificata è stata invalidata per qualche motivo." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "Errore interno di GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "È stata ricevuta una estensione TLS non lecita." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "È stato ricevuto un segnale di allarme critico TLS." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "È stato ricevuto un pacchetto TLS inatteso." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "È stato ricevuto un segnale di avviso TLS." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "È stato rilevato un errore nel calcolo del pacchetto TLS Finished." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "Il peer non ha inviato alcun certificato." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Esiste già un algoritmo di cifratura con priorità più bassa." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Non è stato trovato alcun parametro RSA temporaneo." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Non è stato trovato alcun parametro DH temporaneo." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "È stato ricevuto un pacchetto di handshake TLS inatteso." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "La scansione di un intero large non è riuscita." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Impossibile esportare un intero large." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Decifrazione non riuscita." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Cifratura non riuscita." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Decifrazione della chiave pubblica non riuscita." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Cifratura della chiave pubblica non riuscita." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Firma della chiave pubblica non riuscita." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Verifica della firma della chiave pubblica non riuscita." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Decompressione del pacchetto di record TLS non riuscita." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Compressione del pacchetto di record TLS non riuscita." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "Errore interno nell'allocazione di memoria." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "È stata richiesta una funzione non implementata o disabilitata." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Credenziali non sufficienti per quella richiesta." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Errore nel file di password." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Riempimento non corretto nel pacchetto PKCS1." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "La sessione richiesta è scaduta." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "L'hash non è riuscito." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Errore nella decodifica base64." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Errore inatteso nell'header base64." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Errore nella codifica base64." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Errore di analisi nel file di password." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "I dati richiesti non erano disponibili." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Errore nella funzione pull." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Errore nella funzione push." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "È stato raggiunto il limite superiore nel numero di pacchetti di record sequenziali." - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Errore nel certificato." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Nome alternativo del soggetto sconosciuto nel certificato X.509." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Estensione critica non supportata nel certificato X.509." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "È stata rilevata una violazione nell'utilizzo della chiave nel certificato." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Risorsa temporaneamente non disponibile, riprovare." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "La funzione è stata interrotta." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "Il peer ha richiesto nuovamente l'handshake." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Sono stati ricevuti dati TLS Application, mentre erano attesi dati handshake." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Errore nel backend del database." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Il tipo di certificato non è supportato." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Il buffer di memoria fornito è troppo corto per contenere i parametri." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "La richiesta non è valida." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "È stato ricevuto un parametro non lecito." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Errore nella lettura del file." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "Analizzatore ASN1: elemento non trovato." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "Analizzatore ASN1: l'identificativo non è stato trovato." - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "Analizzatore ASN1: errore nell'analisi DER." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "Analizzatore ASN1: valore non trovato." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "Analizzatore ASN1: errore generico di analisi." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "Analizzatore ASN1: valore non valido." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "Analizzatore ASN1: errore nel TAG." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "Analizzatore ASN1: errore nel tag implicito." - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "Analizzatore ASN1: errore nel tipo \"ANY\"." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "Analizzatore ASN1: errore di sintassi." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "Analizzatore ASN1: overflow nell'analisi DER." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "Sono stati ricevuti troppi pacchetti di record vuoti." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "L'inizializzazione di GnuTLS-extra non è riuscita." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "La versione della libreria GnuTLS non corrisponde a quella della libreria GnuTLS-extra." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "Versione troppo vecchia della libreria gcrypt." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "Versione troppo vecchia della libreria tasn1." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "L'ID utente OpenPGP è revocato." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Errore nel caricare il portachiavi." - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "L'inizializzazione di LZO non è riuscita." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Non è stato trovato alcun algoritmo di compressione supportato." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Non è stata trovata alcuna suite di cifratura supportata." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Impossibile ottenere la chiave OpenPGP." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Impossibile trovare la sottochiave OpenPGP." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "Il nome utente SRP fornito non è lecito." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "L'impronta digitale OpenPGP non è supportata." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Il certificato contiene attributi non supportati." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "L'OID non è supportato." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "L'algoritmo di hash è sconosciuto." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "Il tipo di contenuto della struttura PKCS è sconosciuto." - -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "Il tipo di contenitore della struttura PKCS è sconosciuto." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "La password fornita contiene caratteri non validi." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "La verifica del codice di autenticazione dei messaggi (MAC) non è riuscita." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Sono stati raggiunti alcuni valori limite sui vincoli." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Acquisizione di dati casuali non riuscita." - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Ricevuto un messaggio di fine della fase intermedia TLS/IA" - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Ricevuto un messaggio di fine della fase finale TLS/IA" - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Verifica del codice di controllo nella fase TLS/IA non riuscita" - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "L'algoritmo o il protocollo specificato è sconosciuto." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "La dimensione dei dati di handshake è troppo grande (DoS?), controllare gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(codice di errore sconosciuto)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Notifica di chiusura" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Messaggio inatteso" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Record con MAC errato" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Decifrazione non riuscita" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Overflow del record" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Decompressione non riuscita" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Handshake non riuscito" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Il certificato non è valido" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Il certificato non è supportato" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Il certificato è stato revocato" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Il certificato è scaduto" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Certificato sconosciuto" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Parametro non lecito" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "La CA è sconosciuta" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "L'accesso è stato negato" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Errore di decodifica" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Errore di decifrazione" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Limite all'esportazione" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Errore nella versione del protocollo" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Sicurezza insufficiente" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Annullato dall'utente" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "Errore interno" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Non è permessa alcuna rinegoziazione" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Impossibile recuperare il certificato specificato" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "È stata inviata una estensione non supportata" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Il nome server inviato non è stato riconosciuto" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "Il nome utente SRP/PSK è mancante o sconosciuto" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Negoziazione dell'applicazione interna non riuscita" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Verifica dell'applicazione interna non riuscita" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tVincolo sulla lunghezza del percorso: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tLingua della politica: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tPolitica:\n" -"\t\t\t\tASCII: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tDump esadecimale: " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tFirma digitale.\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tNon ripudio.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tCifratura della chiave.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tCifratura dei dati.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tAccordo sulla chiave.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tFirma del certificato.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tFirma della CRL.\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tSolo cifratura della chiave.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tSolo decifratura della chiave.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "attenzione: distributionPoint contiene un NUL incorporato, sostituzione con \"!\"\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tServer WWW TLS.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tClient WWW TLS.\n" - -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tFirma del codice.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tProtezione email.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tMarcatura temporale.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tFirma OCSP.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tQualsiasi scopo.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tAutorità di certificazione (CA): FALSO\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tAutorità di certificazione (CA): VERO\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tVincolo sulla lunghezza del percorso: %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "attenzione: SAN contiene un NUL incorporato, sostituzione con \"!\"\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tIndirizzo XMPP: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\tOID di otherName: %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\tDER di otherName: " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\tASCII di otherName: " - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tEstensioni:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tVincoli di base (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "critico" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "non critico" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\t\tIdentificativo di chiave del soggetto (SKI) (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tIdentificativo di chiave dell'autorità (AKI) (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tUso della chiave (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tScopo della chiave (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tNome alternativo del soggetto (SAN) (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tPunti di distribuzione CRL (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tInformazioni sul certificato proxy (PC) (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tEstensione sconosciuta %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tDump esadecimale: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tVersione: %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tNumero seriale (hex): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tEmittente: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tValidità:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tNon prima: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tNon dopo: %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tSoggetto: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "sconosciuto" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgoritmo a chiave pubblica del soggetto (SPK): %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tModulo (bit %d):\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tEsponente (bit %d):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tChiave pubblica (bit %d):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tAlgoritmo di firma: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "attenzione: è stato firmato usando un algoritmo di firma difettoso che può essere contraffatto.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tFirma:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tImpronta digitale MD5:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tImpronta digitale SHA-1:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tId della chiave pubblica:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "firmato usando %s (difettoso), " - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "firmato usando %s, " - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Informazioni sul certificato X.509:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Altre informazioni:\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tVersione: 1 (predefinita)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tDate di aggiornamento:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tRilasciato il: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tProssimo il: %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tEstensioni:\n" - -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tNumero CRL (%s): " - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tIdentificativo di chiave dell'autorità (AKI) (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tEstensione sconosciuta %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tDump esadecimale: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tCertificati revocati (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tNessun certificato revocato.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tNumero seriale (hex): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tRevocato a: %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Informazioni sull'elenco di revoca del certificato (CRL) X.509:\n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tEsponente:\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tAttributi:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tChallenge password: %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tAttributo sconosciuto %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Informazioni sulla richiesta di certificato (CR) PKCS #10:\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tUso della chiave:\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "errore: get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tFirma digitale.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tCifratura delle comunicazioni.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tCifratura dei dati di memorizzazione.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tAutenticazione.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tFirma del certificato.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tID (hex): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tImpronta digitale (hex): " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tRevocato: vero\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tRevocato: falso\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tMarche temporali:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tCreazione: %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tScadenza: mai\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tScadenza: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgoritmo di chiave pubblica: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tNome[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tNome revocato[%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tSottochiave[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "nome[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "nome revocato[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "impronta digitale: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "creata il: %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "senza scadenza," - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "scade il: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "algoritmo della chiave %s (%d bit)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "algoritmo di chiave sconosciuto (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Informazioni sul certificato OpenPGP:\n" diff --git a/lib/po/ms.po.in b/lib/po/ms.po.in deleted file mode 100644 index 4260eb4927..0000000000 --- a/lib/po/ms.po.in +++ /dev/null @@ -1,966 +0,0 @@ -# gnutls Bahasa Melayu (Malay) (ms) -# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc. -# This file is distributed under the same license as the gnutls package. -# Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>, 2006, 2007, 2008. -# -msgid "" -msgstr "" -"Project-Id-Version: gnutls 2.5.7\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2008-09-16 16:45+0200\n" -"PO-Revision-Date: 2008-11-01 00:39+0800\n" -"Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>\n" -"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/gnutls_errors.c:53 -msgid "Success." -msgstr "Berjaya." - -#: lib/gnutls_errors.c:54 -msgid "Could not negotiate a supported cipher suite." -msgstr "Tidak dapat merunding sut cipher yang disokong." - -#: lib/gnutls_errors.c:56 -msgid "The cipher type is unsupported." -msgstr "Jenis cipher tidak disokong." - -#: lib/gnutls_errors.c:58 -msgid "The certificate and the given key do not match." -msgstr "Sijil dan kekunci diberi tidak sepadan." - -#: lib/gnutls_errors.c:60 -msgid "Could not negotiate a supported compression method." -msgstr "Tidak dapat merunding kaedah mampatan disokong." - -#: lib/gnutls_errors.c:62 -msgid "An unknown public key algorithm was encountered." -msgstr "Algoritma kekunci awam tidak diketahui dijumpai." - -#: lib/gnutls_errors.c:65 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Algoritma yang tidak dihidupkan telah dirundingkan." - -#: lib/gnutls_errors.c:67 -msgid "A large TLS record packet was received." -msgstr "Paket rekod TLS besar telah diterima." - -#: lib/gnutls_errors.c:69 -msgid "A record packet with illegal version was received." -msgstr "Paket rekod dengan versi tidak sah telah diterima." - -#: lib/gnutls_errors.c:72 -msgid "The Diffie Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Perdana Diffie Hellman yang dihantar oleh pelayan tidak boleh diterima (tidak cukup panjang)." - -#: lib/gnutls_errors.c:74 -msgid "A TLS packet with unexpected length was received." -msgstr "Paket TLS dengan panjang tidak dijangka telah diterima." - -#: lib/gnutls_errors.c:77 -msgid "The specified session has been invalidated for some reason." -msgstr "Sesi yang dinyatakan telah dinyahsahkan atas sebab tertentu." - -#: lib/gnutls_errors.c:80 -msgid "GnuTLS internal error." -msgstr "Ralat dalaman GnuTLS." - -#: lib/gnutls_errors.c:81 -msgid "An illegal TLS extension was received." -msgstr "Sambungan TLS tidak sah telah diterima." - -#: lib/gnutls_errors.c:83 -msgid "A TLS fatal alert has been received." -msgstr "Amaran teruk TLS telah diterima." - -#: lib/gnutls_errors.c:85 -msgid "An unexpected TLS packet was received." -msgstr "Paket TLS tidak dijangka telah diterima." - -#: lib/gnutls_errors.c:87 -msgid "A TLS warning alert has been received." -msgstr "Arahan amaran telah diterima." - -#: lib/gnutls_errors.c:90 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Ralat ditemui pada pengiraan paket Selesai TLS" - -#: lib/gnutls_errors.c:92 -msgid "The peer did not send any certificate." -msgstr "Rakan tidak menghantar sebarang sijil." - -#: lib/gnutls_errors.c:95 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Telah terdapat algoritma kripto dengan keutamaan rendah." - -#: lib/gnutls_errors.c:98 -msgid "No temporary RSA parameters were found." -msgstr "Tiada parameter RSA sementara telah dijumpai." - -#: lib/gnutls_errors.c:100 -msgid "No temporary DH parameters were found." -msgstr "Tiada parameter DH sementara telah dijumpai." - -#: lib/gnutls_errors.c:102 -msgid "An unexpected TLS handshake packet was received." -msgstr "Paket handshake TLS tidak dijangka telah diterima." - -#: lib/gnutls_errors.c:104 -msgid "The scanning of a large integer has failed." -msgstr "Pengesanan integer besar telah gagal." - -#: lib/gnutls_errors.c:106 -msgid "Could not export a large integer." -msgstr "Tidak dapat mengeksport integer besar." - -#: lib/gnutls_errors.c:108 -msgid "Decryption has failed." -msgstr "Nyahenkripsi telah gagal." - -#: lib/gnutls_errors.c:109 -msgid "Encryption has failed." -msgstr "Enkripsi telah gagal." - -#: lib/gnutls_errors.c:110 -msgid "Public key decryption has failed." -msgstr "Nyahenkripsi kekunci awam telah gagal." - -#: lib/gnutls_errors.c:112 -msgid "Public key encryption has failed." -msgstr "Enkripsi kekunci awam telah gagal." - -#: lib/gnutls_errors.c:114 -msgid "Public key signing has failed." -msgstr "Tandatangan kekunci awam telah gagal." - -#: lib/gnutls_errors.c:116 -msgid "Public key signature verification has failed." -msgstr "Pengesahan tandatangan kekunci awam telah gagal." - -#: lib/gnutls_errors.c:118 -msgid "Decompression of the TLS record packet has failed." -msgstr "Nyahmampatan paket rekod TLS telah gagal." - -#: lib/gnutls_errors.c:120 -msgid "Compression of the TLS record packet has failed." -msgstr "Mampatan paket rekod TLS telah gagal." - -#: lib/gnutls_errors.c:123 -msgid "Internal error in memory allocation." -msgstr "Ralat dalaman dalam pengumpukan memori." - -#: lib/gnutls_errors.c:125 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Ciri tidak disediakan atau dimatikan telah diminta." - -#: lib/gnutls_errors.c:127 -msgid "Insufficient credentials for that request." -msgstr "Akuan tidak mencukupi untuk permintaan tersebut." - -#: lib/gnutls_errors.c:129 -msgid "Error in password file." -msgstr "Ralat dalam fail katalaluan." - -#: lib/gnutls_errors.c:130 -msgid "Wrong padding in PKCS1 packet." -msgstr "Pelapik salah dalam paket PKCS1." - -#: lib/gnutls_errors.c:132 -msgid "The requested session has expired." -msgstr "Sesi diminta telah tamat tempoh." - -#: lib/gnutls_errors.c:133 -msgid "Hashing has failed." -msgstr "Menghash telah gagal." - -#: lib/gnutls_errors.c:134 -msgid "Base64 decoding error." -msgstr "Ralat menyahkod base64." - -#: lib/gnutls_errors.c:136 -msgid "Base64 unexpected header error." -msgstr "Ralat pengepala tidak dijangka base64." - -#: lib/gnutls_errors.c:139 -msgid "Base64 encoding error." -msgstr "Ralat mengenkod base64." - -#: lib/gnutls_errors.c:141 -msgid "Parsing error in password file." -msgstr "Ralat huraian dalam fail katalaluan." - -#: lib/gnutls_errors.c:143 -msgid "The requested data were not available." -msgstr "Data yang diminta tiada." - -#: lib/gnutls_errors.c:145 -msgid "Error in the pull function." -msgstr "Ralat dalam fungsi tarik." - -#: lib/gnutls_errors.c:146 -msgid "Error in the push function." -msgstr "Ralat dalam fungsi tolak." - -#: lib/gnutls_errors.c:148 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Had atas nombor jujukan paket rakaman telah dicapai. Wow!" - -#: lib/gnutls_errors.c:150 -msgid "Error in the certificate." -msgstr "Ralat dalam sijil." - -#: lib/gnutls_errors.c:152 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Nama Subjek Alternatif tidak diketahu dalam sijil X.509." - -#: lib/gnutls_errors.c:155 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Sambungan kritikal tidak disokong dalam sijil X.509." - -#: lib/gnutls_errors.c:157 -msgid "Key usage violation in certificate has been detected." -msgstr "Pelanggaran penggunaan kekunci dalam sijik telah dikesan." - -#: lib/gnutls_errors.c:159 lib/gnutls_errors.c:160 -msgid "Function was interrupted." -msgstr "Fungsi telah dibatalkan." - -#: lib/gnutls_errors.c:161 -msgid "Rehandshake was requested by the peer." -msgstr "Rehandshake diminta oleh peer." - -#: lib/gnutls_errors.c:164 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Data Aplikasi TLS telah diterima, semasa menjangka data handshake." - -#: lib/gnutls_errors.c:166 -msgid "Error in Database backend." -msgstr "Ralat dalam backend Pengkalan Data." - -#: lib/gnutls_errors.c:167 -msgid "The certificate type is not supported." -msgstr "Jenis sijil tidak disokong." - -#: lib/gnutls_errors.c:169 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Buffer memori yang diberikan terlalu pendek untuk memegang parameter." - -#: lib/gnutls_errors.c:171 -msgid "The request is invalid." -msgstr "Permintaan tidak sah." - -#: lib/gnutls_errors.c:172 -msgid "An illegal parameter has been received." -msgstr "Parameter tidak sah telah diterima." - -#: lib/gnutls_errors.c:174 -msgid "Error while reading file." -msgstr "Ralat apabila membaca fail." - -#: lib/gnutls_errors.c:176 -msgid "ASN1 parser: Element was not found." -msgstr "Penghurai ASN1: Elemen tidak dijumpai." - -#: lib/gnutls_errors.c:178 -msgid "ASN1 parser: Identifier was not found" -msgstr "Penghurai ASN1: Pengenalan tidak dijumpai" - -#: lib/gnutls_errors.c:180 -msgid "ASN1 parser: Error in DER parsing." -msgstr "Penghurai ASN1: Ralat dalam huraian DER." - -#: lib/gnutls_errors.c:182 -msgid "ASN1 parser: Value was not found." -msgstr "Penghurai ASN1: Nilai tidak dijumpai." - -#: lib/gnutls_errors.c:184 -msgid "ASN1 parser: Generic parsing error." -msgstr "Penghurai ASN1: Ralat menghurai generik." - -#: lib/gnutls_errors.c:186 -msgid "ASN1 parser: Value is not valid." -msgstr "Penghurai ASN1: Nilai tidak sah." - -#: lib/gnutls_errors.c:188 -msgid "ASN1 parser: Error in TAG." -msgstr "Penghurai ASN1: Ralat dalam TAG." - -#: lib/gnutls_errors.c:189 -msgid "ASN1 parser: error in implicit tag" -msgstr "Penghurai ASN1: ralat dalam tag tersirat" - -#: lib/gnutls_errors.c:191 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "Penghurai ASN1: Ralat dalam jenis 'ANY'." - -#: lib/gnutls_errors.c:193 -msgid "ASN1 parser: Syntax error." -msgstr "Penghurai ASN1: Ralat sintaks." - -#: lib/gnutls_errors.c:195 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "Penghurai ASN1: Limpahan dalam penghuraian DER." - -#: lib/gnutls_errors.c:198 -msgid "Too many empty record packets have been received." -msgstr "Terlalu banyak paket rekod kosong telah diterima." - -#: lib/gnutls_errors.c:200 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Pemulaan GnuTLS-extra telah gagal." - -#: lib/gnutls_errors.c:203 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "Versi pustaka GnuTLS tidak sepadan dengan versi pustaka GnuTLS-extra." - -#: lib/gnutls_errors.c:205 -msgid "The gcrypt library version is too old." -msgstr "Versi pustaka gcrypt terlalu lama." - -#: lib/gnutls_errors.c:208 -msgid "The tasn1 library version is too old." -msgstr "Versi pustaka tasn1 terlalu lama." - -#: lib/gnutls_errors.c:210 -msgid "The OpenPGP User ID is revoked." -msgstr "ID Pengguna OpenPGP telah dibatalkan." - -#: lib/gnutls_errors.c:212 -msgid "Error loading the keyring." -msgstr "Ralat memuatkan cecincin kunci." - -#: lib/gnutls_errors.c:214 -msgid "The initialization of LZO has failed." -msgstr "Pemulaan LZO telah gagal." - -#: lib/gnutls_errors.c:216 -msgid "No supported compression algorithms have been found." -msgstr "Tiada algoritma pemampat yang disokong dijumpai." - -#: lib/gnutls_errors.c:218 -msgid "No supported cipher suites have been found." -msgstr "Tiada sut cipher yang disokong dijumpai." - -#: lib/gnutls_errors.c:220 -msgid "Could not get OpenPGP key." -msgstr "Tidak dapat memperoleh kekunci OpenPGP." - -#: lib/gnutls_errors.c:222 -msgid "Could not find OpenPGP subkey." -msgstr "Tidak dapat mencari subkekunci OpenPGP." - -#: lib/gnutls_errors.c:225 -msgid "The SRP username supplied is illegal." -msgstr "Namapengguna SRP yang diberikan tidak sah." - -#: lib/gnutls_errors.c:228 -msgid "The OpenPGP fingerprint is not supported." -msgstr "Cap jari OpenPGP tidak disokong." - -#: lib/gnutls_errors.c:230 -msgid "The certificate has unsupported attributes." -msgstr "Sijil tidak mempunyai ciri disokong." - -#: lib/gnutls_errors.c:232 -msgid "The OID is not supported." -msgstr "OID tidak disokong." - -#: lib/gnutls_errors.c:234 -msgid "The hash algorithm is unknown." -msgstr "Algoritma hash tidak diketahui." - -#: lib/gnutls_errors.c:236 -msgid "The PKCS structure's content type is unknown." -msgstr "Jenis kandungan struktur PKCS tidak diketahui." - -#: lib/gnutls_errors.c:238 -msgid "The PKCS structure's bag type is unknown." -msgstr "Jenis beg struktur PKCS tidak diketahui." - -#: lib/gnutls_errors.c:240 -msgid "The given password contains invalid characters." -msgstr "Katalaluan diberikan mengandungi aksara tidak sah." - -#: lib/gnutls_errors.c:242 -msgid "The Message Authentication Code verification failed." -msgstr "Pengesahan Message Authentication Code gagal." - -#: lib/gnutls_errors.c:244 -msgid "Some constraint limits were reached." -msgstr "Beberapa had kekangan telah dicapai." - -#: lib/gnutls_errors.c:246 -msgid "Failed to acquire random data." -msgstr "Gagal untuk mendapatkan data rawak." - -#: lib/gnutls_errors.c:249 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Menerima mesej TLS/IA Intermediate Phase Finished" - -#: lib/gnutls_errors.c:251 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Menerima mesej TLS/IA Final Phase Finished" - -#: lib/gnutls_errors.c:253 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Pengesahan checksum fasa TLS/IA gagal" - -#: lib/gnutls_errors.c:256 -msgid "The specified algorithm or protocol is unknown." -msgstr "Algoritma atau protokol dinyataka tidak diketahui." - -#: lib/gnutls_errors.c:259 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "Saiz data jabat tangan terlalu besar (DoS?), periksa gnutls_handshake_set_max_packet_length()." - -#: lib/gnutls_errors.c:348 -msgid "(unknown error code)" -msgstr "(kod ralat tidak diketahui)" - -#: lib/gnutls_alert.c:42 -msgid "Close notify" -msgstr "Pemberitahuan tutup" - -#: lib/gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Mesej tidak dijangka" - -#: lib/gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Rekod MAC buruk" - -#: lib/gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Nyahenkripsi gagal" - -#: lib/gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Rekod melimpah" - -#: lib/gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Nyahmampatan gagal" - -#: lib/gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Jabat tangan gagal" - -#: lib/gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Sijil buruk" - -#: lib/gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Sijil tidak disokong" - -#: lib/gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Sijil telah dibatalkan" - -#: lib/gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Sijil tamat tempoh" - -#: lib/gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Sijil tidak diketahui" - -#: lib/gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Parameter tidak sah" - -#: lib/gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "CA tidak diketahui" - -#: lib/gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Akses telah dihalang" - -#: lib/gnutls_alert.c:57 -msgid "Decode error" -msgstr "Ralat decode" - -#: lib/gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Ralat decrypt" - -#: lib/gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Halangan eksport" - -#: lib/gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Ralat dalam versi protokol" - -#: lib/gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Sekuriti tidak mencukupi" - -#: lib/gnutls_alert.c:62 -msgid "User canceled" -msgstr "Pengguna membatalkan" - -#: lib/gnutls_alert.c:63 -msgid "Internal error" -msgstr "Ralat dalaman" - -#: lib/gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Tiada perbincangan semula dibenarkan" - -#: lib/gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Tidak dapat mendapatkan sijil dinyatakan" - -#: lib/gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "Sambungan tidak disokong telah dihantar" - -#: lib/gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Nama pelayan dihantar tidak dikenali" - -#: lib/gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "Nama pengguna SRP/PSK tiada atau tidak diketahui" - -#: lib/gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Perbincangan aplikasi dalaman gagal" - -#: lib/gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Pengesahan aplikasi dalaman gagal" - -#: lib/x509/output.c:113 lib/x509/output.c:389 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tKekangan Panjang Laluan: %d\n" - -#: lib/x509/output.c:114 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tBahasa Polisi: %s" - -#: lib/x509/output.c:123 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tPolisi:\n" -"\t\t\t\tASCII: " - -#: lib/x509/output.c:125 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\tLambakan Hex: " - -#: lib/x509/output.c:217 -msgid "\t\t\tDigital signature.\n" -msgstr "\t\t\tTandatangan digital.\n" - -#: lib/x509/output.c:219 -msgid "\t\t\tNon repudiation.\n" -msgstr "\t\t\tTidak ditolak.\n" - -#: lib/x509/output.c:221 -msgid "\t\t\tKey encipherment.\n" -msgstr "\t\t\tPenyulitan kekunci.\n" - -#: lib/x509/output.c:223 -msgid "\t\t\tData encipherment.\n" -msgstr "\t\t\tPenyulitan data.\n" - -#: lib/x509/output.c:225 -msgid "\t\t\tKey agreement.\n" -msgstr "\t\t\tPersetujuan kekunci.\n" - -#: lib/x509/output.c:227 lib/openpgp/output.c:107 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tMenandatangan sijil.\n" - -#: lib/x509/output.c:229 -msgid "\t\t\tCRL signing.\n" -msgstr "\t\t\tMenandatangan CRL.\n" - -#: lib/x509/output.c:231 -msgid "\t\t\tKey encipher only.\n" -msgstr "\t\t\tEncipher kekunci sahaja.\n" - -#: lib/x509/output.c:233 -msgid "\t\t\tKey decipher only.\n" -msgstr "\t\t\tDecipher kekunci sahaja.\n" - -#: lib/x509/output.c:348 -msgid "\t\t\tTLS WWW Server.\n" -msgstr "\t\t\tPelayan WWW TLS.\n" - -#: lib/x509/output.c:350 -msgid "\t\t\tTLS WWW Client.\n" -msgstr "\t\t\tKlien WWW TLS.\n" - -#: lib/x509/output.c:352 -msgid "\t\t\tCode signing.\n" -msgstr "\t\t\tMenandatangan kod.\n" - -#: lib/x509/output.c:354 -msgid "\t\t\tEmail protection.\n" -msgstr "\t\t\tPerlindungan emel.\n" - -#: lib/x509/output.c:356 -msgid "\t\t\tTime stamping.\n" -msgstr "\t\t\tCap waktu.\n" - -#: lib/x509/output.c:358 -msgid "\t\t\tOCSP signing.\n" -msgstr "\t\t\tMenandatangan OCSP.\n" - -#: lib/x509/output.c:360 -msgid "\t\t\tAny purpose.\n" -msgstr "\t\t\tSebarang tujuan.\n" - -#: lib/x509/output.c:384 -msgid "\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "\t\t\tPihak Berkuasa Sijil (CA): SALAH\n" - -#: lib/x509/output.c:386 -msgid "\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "\t\t\tPenguasa Sijil (CA): BENAR\n" - -#: lib/x509/output.c:491 -#, c-format -msgid "\t\t\tXMPP Address: %.*s\n" -msgstr "\t\t\tAlamat XMPP: %.*s\n" - -#: lib/x509/output.c:494 -#, c-format -msgid "\t\t\totherName OID: %.*s\n" -msgstr "\t\t\tnamaLain OID: %.*s\n" - -#: lib/x509/output.c:495 -msgid "\t\t\totherName DER: " -msgstr "\t\t\tnamaLain DER:" - -#: lib/x509/output.c:497 -msgid "" -"\n" -"\t\t\totherName ASCII: " -msgstr "" -"\n" -"\t\t\tnamaLain ASCII:" - -#: lib/x509/output.c:523 lib/x509/output.c:1195 lib/openpgp/output.c:326 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tVersi: %d\n" - -#: lib/x509/output.c:537 -msgid "\tSerial Number (hex): " -msgstr "\tNombor Siri (hex):" - -#: lib/x509/output.c:554 lib/x509/output.c:1209 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tPengeluar: %s\n" - -#: lib/x509/output.c:561 -msgid "\tValidity:\n" -msgstr "\tKesahan:\n" - -#: lib/x509/output.c:574 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tTidak Sebelum: %s\n" - -#: lib/x509/output.c:588 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tTidak Selepas: %s\n" - -#: lib/x509/output.c:602 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tSubjek: %s\n" - -#: lib/x509/output.c:617 lib/x509/output.c:894 lib/x509/output.c:1305 -#: lib/openpgp/output.c:238 -msgid "unknown" -msgstr "tidak diketahui" - -#: lib/x509/output.c:619 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgoritma Kekunci Awam Subjek: %s\n" - -#: lib/x509/output.c:633 lib/openpgp/output.c:258 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tModulus (%d bit):\n" - -#: lib/x509/output.c:635 lib/openpgp/output.c:260 -msgid "\t\tExponent:\n" -msgstr "\t\tEksponen:\n" - -#: lib/x509/output.c:654 lib/openpgp/output.c:285 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tKekunci awam (%d bit):\n" - -#: lib/x509/output.c:656 lib/openpgp/output.c:287 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: lib/x509/output.c:658 lib/openpgp/output.c:289 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: lib/x509/output.c:660 lib/openpgp/output.c:291 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: lib/x509/output.c:706 -msgid "\tExtensions:\n" -msgstr "\tSambungan:\n" - -#: lib/x509/output.c:716 -#, c-format -msgid "\t\tBasic Constraints (%s):\n" -msgstr "\t\tKekangan Asas (%s):\n" - -#: lib/x509/output.c:717 lib/x509/output.c:732 lib/x509/output.c:747 -#: lib/x509/output.c:762 lib/x509/output.c:777 lib/x509/output.c:794 -#: lib/x509/output.c:809 lib/x509/output.c:826 lib/x509/output.c:838 -msgid "critical" -msgstr "kritikal" - -#: lib/x509/output.c:717 lib/x509/output.c:732 lib/x509/output.c:747 -#: lib/x509/output.c:762 lib/x509/output.c:777 lib/x509/output.c:794 -#: lib/x509/output.c:809 lib/x509/output.c:826 lib/x509/output.c:838 -msgid "not critical" -msgstr "tidak kritikal" - -#: lib/x509/output.c:731 -#, c-format -msgid "\t\tSubject Key Identifier (%s):\n" -msgstr "\t\tSubjek Kekunci Pengenalan (%s):\n" - -#: lib/x509/output.c:746 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tPengesahan Kekunci Pengenalan (%s):\n" - -#: lib/x509/output.c:761 -#, c-format -msgid "\t\tKey Usage (%s):\n" -msgstr "\t\tPenggunaan Kekunci (%s):\n" - -#: lib/x509/output.c:776 -#, c-format -msgid "\t\tKey Purpose (%s):\n" -msgstr "\t\tTujuan Kekunci (%s):\n" - -#: lib/x509/output.c:793 -#, c-format -msgid "\t\tSubject Alternative Name (%s):\n" -msgstr "\t\tNama Alternatif Subjek (%s):\n" - -#: lib/x509/output.c:808 -#, c-format -msgid "\t\tCRL Distribution points (%s):\n" -msgstr "\t\tTitik Edaran CRL (%s):\n" - -#: lib/x509/output.c:825 -#, c-format -msgid "\t\tProxy Certificate Information (%s):\n" -msgstr "\t\tMaklumat Sijil Proksi (%s):\n" - -#: lib/x509/output.c:837 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tSambungan tidak diketahui %s (%s):\n" - -#: lib/x509/output.c:866 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: lib/x509/output.c:870 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tLambakan Hex: " - -#: lib/x509/output.c:895 lib/x509/output.c:1306 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tAlgoritma tandatangan: %s\n" - -#: lib/x509/output.c:901 lib/x509/output.c:1312 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "amaran: ditandatangan menggunakan algoritma tandatangan rosak yang boleh dipalsukan.\n" - -#: lib/x509/output.c:926 lib/x509/output.c:1337 -msgid "\tSignature:\n" -msgstr "\tTandatangan:\n" - -#: lib/x509/output.c:949 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tCap jari MD5:\n" -"\t\t" - -#: lib/x509/output.c:951 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tCap jari SHA-1:\n" -"\t\t" - -#: lib/x509/output.c:985 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tId Kekunci Awam:\n" -"\t\t" - -#: lib/x509/output.c:1151 -msgid "X.509 Certificate Information:\n" -msgstr "Maklumat Sijil X.509:\n" - -#: lib/x509/output.c:1155 -msgid "Other Information:\n" -msgstr "Maklumat Lain:\n" - -#: lib/x509/output.c:1191 -msgid "\tVersion: 1 (default)\n" -msgstr "\tVersi: 1 (default)\n" - -#: lib/x509/output.c:1216 -msgid "\tUpdate dates:\n" -msgstr "\tTarikh kemaskini:\n" - -#: lib/x509/output.c:1229 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tDikeluarkan: %s\n" - -#: lib/x509/output.c:1245 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tSeterusnya pada: %s\n" - -#: lib/x509/output.c:1255 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tSijil dibatalkan (%d):\n" - -#: lib/x509/output.c:1257 -msgid "\tNo revoked certificates.\n" -msgstr "\tTiada sijil dibatalkan.\n" - -#: lib/x509/output.c:1276 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tNombor Siri (hex): " - -#: lib/x509/output.c:1285 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tDibatalkan pada: %s\n" - -#: lib/x509/output.c:1368 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Maklumat Senarai Pembatalan Sijil X.509:\n" - -#: lib/openpgp/output.c:85 -msgid "\t\tKey Usage:\n" -msgstr "\t\tPenggunaan Kekunci:\n" - -#: lib/openpgp/output.c:94 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "ralat: get_key_usage: %s\n" - -#: lib/openpgp/output.c:99 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tTandatangan digital.\n" - -#: lib/openpgp/output.c:101 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tPenyulitan komunikasi.\n" - -#: lib/openpgp/output.c:103 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tPenyulitan data simpanan.\n" - -#: lib/openpgp/output.c:105 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tPengesahan.\n" - -#: lib/openpgp/output.c:128 -msgid "\tID (hex): " -msgstr "\tID (hex): " - -#: lib/openpgp/output.c:149 -msgid "\tFingerprint (hex): " -msgstr "\tCapjari (hex): " - -#: lib/openpgp/output.c:166 -msgid "\tRevoked: True\n" -msgstr "\tDibatalkan: Betul\n" - -#: lib/openpgp/output.c:168 -msgid "\tRevoked: False\n" -msgstr "\tDibatalkan: Salah\n" - -#: lib/openpgp/output.c:176 -msgid "\tTime stamps:\n" -msgstr "\tCap waktu:\n" - -#: lib/openpgp/output.c:193 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tPenciptaan: %s\n" - -#: lib/openpgp/output.c:207 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tTamat tempoh: Tiada\n" - -#: lib/openpgp/output.c:216 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tTamat tempoh: %s\n" - -#: lib/openpgp/output.c:240 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgoritma Kekunci Awam: %s\n" - -#: lib/openpgp/output.c:349 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tNama[%d]: %s\n" - -#: lib/openpgp/output.c:352 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tNama Dibatalkan[%d]: %s\n" - -#: lib/openpgp/output.c:369 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tSubkekunci[%d]:\n" - -#: lib/openpgp/output.c:404 -msgid "OpenPGP Certificate Information:\n" -msgstr "Maklumat Sijil OpenPGP:\n" diff --git a/lib/po/nl.po.in b/lib/po/nl.po.in deleted file mode 100644 index 6cfc8a8cdb..0000000000 --- a/lib/po/nl.po.in +++ /dev/null @@ -1,1112 +0,0 @@ -# Dutch translations for libgnutls. -# Copyright (C) 2010 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# -# Benno Schulenberg <benno@vertaalt.nl>, 2007, 2008, 2010. -# Erwin Poeze <erwin.poeze@gmail.com>, 2009, 2010. -msgid "" -msgstr "" -"Project-Id-Version: libgnutls-2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2010-05-02 17:07+0200\n" -"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n" -"Language-Team: Dutch <vertaling@vrijschrift.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 1.0\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Gelukt." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Kan geen gemeenschappelijke coderingsmethode overeenkomen." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "De coderingsmethode wordt niet ondersteund." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Het certificaat en de gegeven sleutel passen niet bij elkaar." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Kan geen gemeenschappelijke compressiemethode overeenkomen." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "Onbekend versleutelingsalgoritme gevonden." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Er werd een uitgeschakeld algoritme overeengekomen." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "Er werd een groot TLS-datapakket ontvangen." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "Er werd een datapakket met een ongedige versie ontvangen." - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Het door de server toegezonden Diffie-Hellman-priemgetal is niet acceptabel (niet lang genoeg)." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "Er werd een TLS-pakket met een onverwachte lengte ontvangen." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "De aangegeven sessie is om een of andere reden ongeldig geworden." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "**Interne fout** in GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "Er werd een ongeldige TLS-uitbreiding ontvangen." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "Er werd een ernstig TLS-alarm ontvangen." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "Er werd een onverwacht TLS-pakket ontvangen." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "Er is een TLS-waarschuwing ontvangen." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Er is een fout opgetreden tijdens de TLS-pakketeinde-berekening." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "De andere computer heeft geen certificaat gestuurd." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Er is al een encryptie-algoritme met een lagere prioriteit." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Er zijn geen tijdelijke RSA-parameters gevonden." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Er zijn geen tijdelijke DH-parameters gevonden." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "Er werd een onverwacht TLS-handshake-pakket ontvangen." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "Het lezen van een groot geheel getal is mislukt." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Het exporteren van een groot geheel getal is mislukt." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Ontsleuteling is mislukt." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Versleuteling is mislukt." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Ontsleuteling met publieke sleutel is mislukt." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Versleuteling met publieke sleutel is mislukt." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Ondertekenen met publieke sleutel is mislukt." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Controle van ondertekening met publieke sleutel is mislukt." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Decompressie van het TLS-datapakket is mislukt." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Compressie van het TLS-datapakket is mislukt." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "**Interne fout** bij reserveren van geheugen." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Er werd een uitgeschakelde of ongeïmplementeerde functie gevraagd." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Onvoldoende rechten voor dat verzoek." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Fout in wachtwoordenbestand." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Onjuiste opvulbytes in PKCS1-pakket." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "De gevraagde sessie is verlopen." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "Hashen is mislukt." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Base64-decoderingsfout." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Onverwachte fout in base64-kopregel." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Base64-coderingsfout." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Fout in de indeling van wachtwoordenbestand." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "De gevraagde gegevens zijn niet beschikbaar." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Fout in de 'pull'-functie." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Fout in de 'push'-functie." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Het hoogste volgnummer voor datapakketten is bereikt. Wauw!" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Fout in het certificaat." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Onbekende naam van toegevoegd onderwerp in X.509-certificaat." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Niet-ondersteunde kritieke uitbreiding in X.509-certificaat." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "Er is een overtreding van het sleutelgebruik in het certificaat geconstateerd." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Bron is tijdelijk niet beschikbaar; probeer het later nogmaals." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "Functie werd onderbroken." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "De andere computer heeft om een hernieuwde handshake gevraagd." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Er werd TLS-toepassingsdata ontvangen, terwijl handshake-gegevens verwacht werden." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Fout in databank-backend." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Het certificaattype wordt niet ondersteund." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Beschikbare buffer is te klein voor de gegeven parameters." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "Het verzoek is ongeldig." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "Er werd een ongeoorloofde parameter ontvangen." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Fout tijdens lezen van bestand." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "ASN1-parser: Element niet gevonden." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "ASN1-parser: Naam niet gevonden." - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "ASN1-parser: Fout in ontleden van DER." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "ASN1-parser: Waarde niet gevonden." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "ASN1-parser: Algemene ontledingsfout." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "ASN1-parser: Waarde is ongeldig." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "ASN1-parser: Fout in TAG." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "ASN1-parser: Fout in impliete tag." - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "ASN1-parser: Fout in type 'ANY'." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "ASN1-parser: Syntaxfout." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "ASN1-parser: Overloop in DER-ontleding." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "Er zijn te veel lege datapakketten ontvangen." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Het initialiseren van GnuTLS-extra is mislukt." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "De versies van de GnuTLS- en GnuTLS-extra-bibliotheken komen niet overeen." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "De versie van de gcrypt-bibliotheek is te oud." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "De versie van de tasn1-bibliotheek is te oud." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "Het OpenPGP-gebruikers-ID is ingetrokken." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Fout tijdens laden van de sleutelring." - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "Het initialiseren van LZO is mislukt." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Er is geen ondersteund compressie-algoritme gevonden." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Er is geen ondersteund encryptie-algoritme gevonden." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Kan OpenPGP-sleutel niet verkrijgen." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Kan OpenPGP-subsleutel niet vinden." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "De gegeven SRP-gebruikersnaam is ongeldig." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "De OpenPGP-vingerafdruk wordt niet ondersteund." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Het certificaat heeft niet-ondersteunde eigenschappen." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "Het OID wordt niet ondersteund." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "Onbekend hash-algoritme." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "Onbekend inhoudstype van PKCS-structuur." - -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "Onbekend buideltype van PKCS-structuur." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "Het opgegeven wachtwoord bevat ongeldige tekens." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "Verificatie van berichtauthenticatiecode is mislukt." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Sommige beperkingsgrenzen werden bereikt." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Kan geen willekeurige bits verkrijgen." - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "TLS/IA-tussenfasebeëindigingsbericht ontvangen" - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "TLS/IA-eindfasebeëindigingsbericht ontvangen" - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Verificatie van TLS/IA-fasecontrolesom is mislukt" - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "Het opgegeven algoritme of protocol is onbekend." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "De gegevensgrootte van de handshake is te groot (DoS-aanval?); controleer gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(onbekende foutcode)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Afsluitingsbericht" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Onverwacht bericht" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Record met ongeldige MAC" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Ontsleuteling is mislukt" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Recordoverloop" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Decompressie is mislukt" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Handshake is mislukt" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Certificaat is ongeldig" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Certificaat wordt niet ondersteund" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Certificaat is ingetrokken" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Certificaat is verlopen" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Onbekend certificaat" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Ongeldige parameter" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "CA is onbekend" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Toegang werd geweigerd" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Decoderingsfout" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Ontsleutelingsfout" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Exportbeperking" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Fout in protocolversie" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Onvoldoende veiligheid" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Door gebruiker geannuleerd" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "**Interne fout**" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Heronderhandeling is niet toegestaan" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Kan het opgegeven certificaat niet ophalen" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "Een niet-ondersteunde uitbreiding werd toegezonden" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "De toegezonden servernaam werd niet herkend" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "De SRP/PSK-gebruikersnaam ontbreekt of is onbekend" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Inwendige programmaonderhandeling is mislukt" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Inwendige programmaverificatie is mislukt" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tPadlengtebeperking: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tBeleidstaal: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tBeleid:\n" -"\t\t\t\tASCII: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tHexdump: " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tDigitale ondertekening.\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tNiet-herroeping.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tSleutel-encryptie.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tData-encryptie.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tSleutelovereenstemming.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tCertificaatondertekening.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tCRL-ondertekening.\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tAlleen sleutel-encryptie.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tAlleen sleutel-decryptie.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "Waarschuwing: distributiepunt bevat een NUL-waarde, wordt vervangen door '!'\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tTLS WWW-server.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tTLS WWW-cliënt.\n" - -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tCode-ondertekening.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tE-mailbescherming.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tTijdsstempels.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tOCSP-ondertekening.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tElk doel.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tCertificaatautoriteit (CA): ONWAAR\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tCertificaatautoriteit (CA): WAAR\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tPadlengtebeperking: %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "Waarschuwing: SAN bevat een NUL-waarde, wordt vervangen door '!'\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tXMPP-adres: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\tAndere naam (OID): %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\tAndere naam (DER): " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\tAndere naam (ASCII): " - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tUitbreidingen:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tFundamentele beperkingen (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "kritiek" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "niet kritiek" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\t\tOnderwerps-ID van sleutel (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tAutoriteits-ID van sleutel (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tGebruik van sleutel (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tDoel van sleutel (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tToegevoegde onderwerpen (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tCRL-distributiepunten (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tInformatie over proxy-certificaat (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tOnbekende uitbreiding %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tHexdump: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tVersie: %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tSerienummer (hex): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tUitgever: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tGeldigheid:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tNiet vóór: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tNiet na: %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tOnderwerp: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "onbekend" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgoritme van publieke sleutel: %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tModulus (bits %d):\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tExponent (bits %d):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tPublieke sleutel (bits %d):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tOndertekeningsalgoritme: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "Waarschuwing: ondertekend met een algoritme dat vervalst kan worden.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tOndertekening:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tMD5-vingerafdruk:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tSHA-1-vingerafdruk:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tID van publieke sleutel:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "ondertekend met %s (beschadigd!), " - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "ondertekend met %s, " - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Informatie over X.509-certificaten:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Andere informatie:\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tVersie: 1 (standaard)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tBijwerkingsdata:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tUitgegeven: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tVolgende op: %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tUitbreidingen:\n" - -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tCRL-nummer (%s): " - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tAutoriteits-ID van sleutel (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tOnbekende uitbreiding %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tHexdump: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tIngetrokken certificaten (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tGeen ingetrokken certificaten.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tSerienummer (hex): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tIngetrokken op: %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Informatie over ingetrokken X.509-certificaten:\n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tExponent:\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tEigenschappen:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tTest-wachtwoord: %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tOnbekende eigenschap %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Informatie over PKCS #10-certificaatverzoek:\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tGebruik van sleutel:\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "fout in get_key_usage(): %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tDigitale ondertekeningen.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tEncryptie van communicatie.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tEncryptie van opgeslagen data.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tAuthenticatie.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tCertificaatondertekening.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tID (hex): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tVingerafdruk (hex): " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tIngetrokken: Ja\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tIngetrokken: Nee\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tTijdsstempels:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tAangemaakt op: %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tVervaldatum: Nooit\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tVervaldatum: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgoritme van publieke sleutel: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tNaam[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tIngetrokken naam[%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tSubsleutel[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "naam[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "ingetrokken naam[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "vingerafdruk: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "aangemaakt: %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "verloopt nooit, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "verloopt: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "versleutelingsalgoritme %s (%d bits)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "onbekend versleutelingsalgoritme (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Informatie over OpenPGP-certificaten:\n" diff --git a/lib/po/pl.po.in b/lib/po/pl.po.in deleted file mode 100644 index f78185fc6e..0000000000 --- a/lib/po/pl.po.in +++ /dev/null @@ -1,1109 +0,0 @@ -# Polish translation for gnutls. -# Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Jakub Bogusz <qboosh@pld-linux.org>, 2006-2010. -# -msgid "" -msgstr "" -"Project-Id-Version: libgnutls-2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2010-01-04 15:09+0100\n" -"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n" -"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Sukces." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Nie udao si wynegocjowa obsugiwanego zestawu certyfikatw." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "Ten typ certyfikatu nie jest obsugiwany." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Certyfikat i dany klucz nie pasuj do siebie." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Nie udao si wynegocjowa obsugiwanej metody kompresji." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "Napotkano nieznany algorytm klucza publicznego." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Wynegocjowano algorytm, ktry nie zosta wczony." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "Odebrano duy pakiet rekordu TLS." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "Odebrano pakiet rekordu o niedozwolonej wersji." - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Liczba pierwsza Diffie Hellmana wysana przez serwer jest nieakceptowalna (zbyt maa)." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "Odebrano pakiet TLS o nieoczekiwanej dugoci." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "Podana sesja zostaa z jakiego powodu uniewaniona." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "Bd wewntrzny GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "Odebrano niedozwolone rozszerzenie TLS." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "Odebrano krytyczny alarm TLS." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "Odebrano nieoczekiwany pakiet TLS." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "Odebrano ostrzegawczy alarm TLS." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Wykryto bd przy obliczaniu pakietu TLS Finished." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "Druga strona nie wysaa adnego certyfikatu." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Istnieje ju algorytm kryptograficzny z niszym priorytetem." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Nie znaleziono parametrw tymczasowych RSA." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Nie znaleziono parametrw tymczasowych DH." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "Odebrano nieoczekiwany pakiet nawizania TLS." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "Poszukiwanie duej liczby cakowitej nie powiodo si." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Nie udao si wyeksportowa duej liczby cakowitej." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Odszyfrowywanie nie powiodo si." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Szyfrowanie nie powiodo si." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Odszyfrowywanie z kluczem publicznym nie powiodo si." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Szyfrowanie z kluczem publicznym nie powiodo si." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Podpisywanie z kluczem publicznym nie powiodo si." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Sprawdzenie podpisu z kluczem publicznym nie powiodo si." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Dekompresja pakietu rekordu TLS nie powioda si." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Kompresja pakietu rekordu TLS nie powioda si." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "Bd wewntrzny przy przydzielaniu pamici." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Zadano niezaimplementowanej lub wyczonej opcji." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Niewystarczajce uprawnienia dla tego dania." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Bd w pliku hase." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Bdne wyrwnanie w pakiecie PKCS1." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "dana sesja wygasa." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "Funkcja skrtu nie powioda si." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Bd dekodowania base64." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Nieoczekiwany bd nagwka base64." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Bd kodowania base64." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Bd przetwarzania pliku hase." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "dane dane nie byy dostpne." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Bd w funkcji pull." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Bd w funkcji push." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Osignito grne ograniczenie numerw sekwencyjnych pakietw rekordw. Wow!" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Bd w certyfikacie." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Nieznana nazwa Subject Alternative w certyfikacie X.509." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Nieobsugiwane rozszerzenie krytyczne w certyfikacie X.509." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "Wykryto naruszenie uycia klucza w certyfikacie." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Zasoby chwilowo niedostpne, prosz sprbowa ponownie." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "Funkcja zostaa przerwana." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "Druga strona zadaa ponownego nawizania sesji." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Odebrano dane aplikacji TLS, ale oczekiwano na nawizanie sesji." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Bd w backendzie bazy danych." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Ten typ certyfikatu nie jest obsugiwany." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Przekazany bufor pamici jest zbyt may do przechowania parametrw." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "danie jest nieprawidowe." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "Odebrano niedozwolony parametr." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Bd podczas odczytu pliku." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "Analiza ASN1: Nie znaleziono elementu." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "Analiza ASN1: Nie znaleziono identyfikatora." - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "Analiza ASN1: Bd przy analizie DER." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "Analiza ASN1: Nie znaleziono wartoci." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "Analiza ASN1: Oglny bd przetwarzania." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "Analiza ASN1: Warto nie jest prawidowa." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "Analiza ASN1: Bd w znaczniku." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "Analiza ASN1: bd w domylnym znaczniku." - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "Analiza ASN1: Bd w typie 'ANY'." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "Analiza ASN1: Bd skadni." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "Analiza ASN1: Przepenienie przy analizie DER." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "Odebrano zbyt duo pustych pakietw rekordw." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Inicjalizacja GnuTLS-extra nie powioda si." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "Wersja biblioteki GnuTLS nie zgadza si z wersj biblioteki GnuTLS-extra." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "Wersja biblioteki gcrypt jest zbyt stara." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "Wersja biblioteki tasn1 jest zbyt stara." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "Identyfikator uytkownika OpenPGP jest uniewaniony." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Bd przy wczytywaniu zbioru kluczy." - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "Inicjalizacja LZO nie powioda si." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Nie znaleziono obsugiwanego algorytmu kompresji." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Nie znaleziono obsugiwanego zestawu certyfikatw." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Nie udao si uzyska klucza OpenPGP." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Nie udao si odnale podklucza OpenPGP." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "Podana nazwa uytkownika SRP nie jest dozwolona." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "Odcisk klucza OpenPGP nie jest obsugiwany." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Certyfikat ma nieobsugiwane atrybuty." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "OID nie jest obsugiwany." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "Algorytm skrtu jest nieznany." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "Typ zawartoci struktury PKCS jest nieznany." - -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "Typ opakowania struktury PKCS jest nieznany." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "Podane haso zawiera nieprawidowe znaki." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "Sprawdzenie kodu autentycznoci wiadomoci (MAC) nie powiodo si." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Osignito niektre ograniczenia." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Nie udao si pozyska danych losowych." - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Odebrano wiadomo TLS/IA Intermediate Phase Finished" - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Odebrano wiadomo TLS/IA Final Phase Finished" - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Sprawdzenie sumy kontrolnej frazy TLS/IA nie powiodo si" - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "Podany algorytm lub protok jest nieznany." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "Rozmiar danych nawizania jest zbyt duy (DoS?), prosz sprawdzi gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(nieznany kod bdu)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Powiadomienie o zamkniciu" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Nieoczekiwany komunikat" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Bdny MAC rekordu" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Odszyfrowywanie nie powiodo si" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Przepenienie rekordu" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Dekompresja nie powioda si" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Nawizanie komunikacji nie powiodo si" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Bdny certyfikat" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Nieobsugiwany certyfikat" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Certyfikat zosta anulowany" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Certyfikat wygas" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Nieznany certyfikat" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Niedozwolony parametr" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "Nieznane CA" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Dostp zabroniony" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Bd dekodowania" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Bd odszyfrowywania" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Ograniczenia eksportowe" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Bd w wersji protokou" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Niewystarczajce bezpieczestwo" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Anulowane przez uytkownika" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "Bd wewntrzny" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Renegocjacja niedozwolona" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Nie udao si pobra wskazanego certyfikatu" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "Wysano nieobsugiwane rozszerzenie" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Nierozpoznana wysana nazwa serwera" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "Brak lub nieznana nazwa uytkownika SRP/PSK" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Negocjacja w ramach aplikacji nie powioda si" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Weryfikacja w ramach aplikacji nie powioda si" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tOgraniczenie dugoci cieki: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tJzyk polityki: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tPolityka:\n" -"\t\t\tASCII: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tZrzut hex: " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tPodpis cyfrowy.\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tBez odmowy.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tSzyfrowanie klucza.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tSzyfrowanie danych.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tUzgodnienie klucza.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tPodpisanie certyfikatu.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tPodpisanie CRL.\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tTylko szyfrowanie klucza.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tTylko deszyfrowanie klucza.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "uwaga: distributionPoint zawiera znak NUL, zastpiono znakiem '!'\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tSerwer WWW TLS.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tKlient WWW TLS.\n" - -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tPodpisywanie kodu.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tOchrona poczty elektronicznej.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tOznaczanie czasu.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tPodpisywanie OCSP.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tDowolne zastosowanie.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tCA: NIE\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tCA: TAK\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tOgraniczenie dugoci cieki: %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "warning: SAN zawiera znak NUL, zastpiono znakiem '!'\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tAdres XMPP: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\tOID otherName: %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\tDER otherName: " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\tASCII otherName: " - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tRozszerzenia:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tOgraniczenia podstawowe (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "krytyczny" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "niekrytyczny" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\t\tIdentyfikator klucza przedmiotu (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tIdentyfikator klucza autorytetu (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tUycie klucza (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tPrzeznaczenie klucza (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tAlternatywna nazwa przedmiotu (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tPunkty rozprowadzania CRL (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tInformacja o certyfikacie proxy (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tNieznane rozszerzenie %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tZrzut hex: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tWersja: %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tNumer seryjny (hex): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tWystawca: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tWano:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tNie wczeniej ni: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tNie pniej ni: %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tPrzedmiot: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "nieznany" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgorytm klucza publicznego: %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tReszta (bitw: %d):\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tWykadnik (bitw: %d):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tKlucz publiczny (bitw: %d):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tAlgorytm podpisu: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "uwaga: podpisano zamanym algorytmem podpisu, ktry moe by podrobiony.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tPodpis:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tOdcisk MD5:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tOdcisk SHA-1:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tIdentyfikator klucza publicznego:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "podpisano przy uyciu %s (uszkodzonego!), " - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "podpisano przy uyciu %s, " - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Informacja o certyfikacie X.509:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Inne informacje:\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tWersja: 1 (domylna)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tDaty uaktualnie:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tWystawiono: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tNastpnie: %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tRozszerzenia:\n" - -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tNumer CRL (%s): " - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tIdentyfikator klucza autorytetu (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tNieznane rozszerzenie %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tZrzut hex: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tUniewanione certyfikaty (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tBrak uniewanionych certyfikatw.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tNumer seryjny (hex): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tUniewaniono: %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Informacja o licie uniewanie certyfikatw X.509:\n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tWykadnik:\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tAtrybuty:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tHaso wyzwania: %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tNieznane rozszerzenie %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Informacja o daniu certyfikatu PKCS #10:\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tUycie klucza:\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "bd: get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tPodpisy cyfrowe.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tSzyfrowanie komunikacji.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tSzyfrowanie przechowywanych danych.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tUwierzytelnianie.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tPodpisanie certyfikatu.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tID (hex): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tOdcisk (hex): " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tUniewaniony: tak\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tUniewaniony: nie\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tOznaczenia czasu:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tUtworzenie: %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tWyganicie: nigdy\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tWyganicie: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgorytm klucza publicznego: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tNazwa[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tNazwa uniewaniona[%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tPodklucz[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "nazwa[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "nazwa uniewaniona[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "odcisk: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "utworzono: %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "nigdy nie wygasa, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "wygasa: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "algorytm klucza publicznego %s (bitw: %d)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "nieznany algorytm klucza publicznego (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Informacja o certyfikacie OpenPGP:\n" diff --git a/lib/po/sv.po.in b/lib/po/sv.po.in deleted file mode 100644 index b7234b4453..0000000000 --- a/lib/po/sv.po.in +++ /dev/null @@ -1,1121 +0,0 @@ -# Swedish translation of libgnutls. -# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Daniel Nylander <po@danielnylander.se>, 2006, 2007, 2008, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: libgnutls 2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2009-12-27 18:01+0100\n" -"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" -"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Lyckades." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Kunde inte förhandla fram en krypteringssvit som stöds." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "Krypteringstypen stöds inte." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Certifikatet och den angivna nyckeln stämmer inte överens." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Kunde inte förhandla fram en stödd komprimeringsmetod." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "En okänd publik nyckel-algoritm påträffades." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "En algoritm som inte är aktiverad blev förhandlad." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "Ett stort TLS-journalpaket togs emot." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "Ett journalpaket med otillåten version togs emot." - -# Stort? -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Diffie-Hellman-primtalet som skickades av servern är inte acceptabelt (inte tillräckligt långt)." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "Ett TLS-paket med oväntad längd togs emot." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "Angiven session har av någon anledning blivit ogiltigförklarad." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "Internt fel i GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "En otillåten TLS-utökning togs emot." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "Ett ödesdigert TLS-larm togs emot." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "Ett oväntat TLS-paket togs emot." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "En TLS-varning har tagits emot." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Ett fel påträffades vid beräkning av TLS Finished-paketet." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "Motparten skickade inget certifikat." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Det finns redan en krypteringsalgoritm med lägre prioritet." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Inga temporära RSA-parametrar hittades." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Inga temporära DH-parametrar hittades." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "Ett oväntat TLS-handskakningspaket togs emot." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "Avsökningen av ett stort heltal misslyckades." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Kunde inte exportera ett stort heltal." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Dekryptering misslyckades." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Kryptering misslyckades." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Dekryptering av publik nyckel misslyckades." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Kryptering av publik nyckel misslyckades." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Signering av publik nyckel misslyckades." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Validering av av publika nyckelns signatur misslyckades." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Dekomprimering av TLS-journalpaketet har misslyckades." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Komprimering av TLS-journalpaketet har misslyckades." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "Internt fel i minnesallokering." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "En icke implementerad eller inaktiverad funktion begärdes." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Otillräckliga rättigheter för begäran." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Fel i lösenordsfil." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Fel utfyllnad i PKCS1-paket." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "Den begärda sessionen har tagit slut." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "Hashning misslyckades." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Base64-avkodningsfel." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Oväntat fel i Base64-huvud." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Base64-kodningsfel." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Tolkningsfel i lösenordsfil." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "Begärt data var inte tillgängligt." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Fel i inhämtningsfunktionen." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Fel i utsändningsfunktionen." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Den övre gränsen för sekvensnummer för journalpaket har nåtts. Wow!" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Fel i certifikatet." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Okänt alternativt namn för innehavare i X.509-certifikat." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Icke stödd kritisk utökning i X.509-certifikat." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "Överträdelse av nyckelanvändning i certifikat har upptäckts." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Resursen är temporärt otillgänglig, försök igen." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "Funktionen avbröts." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "Upprepad handskakning begärdes av motparten." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "TLS-programdata togs emot när handskakningsdata förväntades." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Fel i databasbakänden." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Certifikattypen stöds inte." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Den angivna minnesbufferten är för liten för att lagra parametrar." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "Begäran är ogiltig." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "En otillåten parameter har tagits emot." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Fel vid läsning av fil." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "ASN1-tolkare: Elementet hittades inte." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "ASN1-tolkare: Identifieraren hittades inte" - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "ASN1-tolkare: Fel i DER-tolkning." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "ASN1-tolkare: Värdet hittades inte." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "ASN1-tolkare: Allmänt tolkningsfel." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "ASN1-tolkare: Värdet är inte giltigt." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "ASN1-tolkare: Fel i TAG." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "ASN1-tolkare: fel i implicit tag" - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "ASN1-tolkare: Fel i typen \"ANY\"." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "ASN1-tolkare: Syntaxfel." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "ASN1-tolkare: Överflöde i DER-tolkning." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "För många tom journalpaket har tagits emot." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Initieringen av GnuTLS-extra har misslyckats." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "Versionen av GnuTLS-biblioteket stämmer inte överens med versionen av GnuTLS-extra-biblioteket." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "Versionen av gcrypt-biblioteket är för gammal." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "Versionen av tasn1-biblioteket är för gammal." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "OpenPGP-användaridentiteten är spärrad." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Fel vid inläsning av nyckelringen." - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "Initiering av LZO misslyckades." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Inga stödda komprimeringsalgoritmer har hittats." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Inga stödda krypteringssviter har hittats." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Kunde inte hämta OpenPGP-nyckel." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Kunde inte hitta OpenPGP-undernyckel." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "Det angivna SRP-användarnamnet är inte tillåtet." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "OpenPGP-fingeravtrycket stöds inte." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Certifikatet har attribut som inte stöds." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "OID:n stöds inte." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "Hashalgoritmen är okänd." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "PKCS-strukturens innehållstyp är okänd." - -# Hjälp! -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "PKCS-strukturens väsktyp är okänd." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "Det angivna lösenordet innehåller ogiltiga tecken." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "Validering av meddelandeautentiseringskoden (MAC) misslyckades." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Vissa begränsningar nåddes." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Misslyckades med att få tag på slumpmässigt data." - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Tog emot ett TLS/IA Intermediate Phase Finished-meddelande" - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Tog emot ett TLS/IA Final Phase Finished-meddelande" - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Validering av kontrollsumma för TLS/IA-fas misslyckades" - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "Angivna algoritmen eller protokollet är okänt." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "Datastorleken för handskakningen är för stor (DoS?), kontrollera gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(okänd felkod)" - -# SSL_shutdown() shuts down an active TLS/SSL connection. It sends the ``close notify'' shutdown alert to the peer. -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Stängningsnotifiering" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Oväntat meddelande" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "Felaktig MAC-post" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Dekryptering misslyckades" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Överflöde i post" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Dekomprimering misslyckades" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Handskakning misslyckades" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Certifikatet är felaktigt" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Certifikatet stöds inte" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Certifikatet var spärrat" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Certifikatet har gått ut" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Okänt certifikat" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Otillåten parameter" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "Certifikatutfärdare är okänd" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Åtkomst nekades" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Avkodningsfel" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Dekrypteringsfel" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Exportbegränsning" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Fel i protokollversion" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Otillräcklig säkerhet" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Användaren avbröt" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "Internt fel" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Ingen återförhandling tillåts" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Kunde inte hämta angivet certifikat" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "En utökning skickades som inte stöds" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Servernamnet som skickades kändes inte igen" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "SRP/PSK-användarnamn saknas eller är inte känt" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Förhandling för inre program misslyckades" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Validering av inre program misslyckades" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tBegränsning för sökvägslängd: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tPolicyspråk: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tHexdump: " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tDigital signatur.\n" - -# Klassisk term inom digitala certifikat. -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tOförnekbarhet.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tNyckelkryptering.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tDatakryptering.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tNyckelförhandling.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tCertifikatsignering.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tCRL-signering.\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tEndast nyckelkryptering.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tEndast nyckeldekryptering.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "varning: distributionPoint innehåller en inbäddad NUL, ersätter med \"!\"\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tTLS WWW-server.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tTLS WWW-klient.\n" - -# Källkodssignering? -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tKodsignering.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tE-postskydd.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tTidsstämpling.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tOCSP-signering.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tValfritt syfte.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tCertifikatutfärdare (CA): FALSKT\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tCertifikatutfärdare (CA): SANT\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tBegränsning för sökvägslängd: %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "varning: SAN innehåller en inbäddad NUL, ersätter med \"!\"\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tXMPP-adress: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\totherName OID: %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\totherName DER: " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\totherName ASCII: " - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tTillägg:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tAllmänna begränsningar (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "kritisk" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "ej kritisk" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\t\tInnehavarens nyckelidentifierare (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tUtfärdarens nyckelidentifierare (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tNyckelanvändning (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tNyckelsyfte (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tInnehavarens alternativa namn (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tCRL-distributionspunkter (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tInformation om proxycertifikat (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tOkänt tillägg %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tHexdump: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tVersion: %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tSerienummer (hex): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tUtfärdare: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tGiltighet:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tInte före: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tInte efter: %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tInnehavare: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "okänd" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tAlgoritm för innehavarens publika nyckel: %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tModulus (bitar %d):\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tExponent (bitar %d):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tPublik nyckel (bitar %d):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tSignaturalgoritm: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "varning: signerad med en trasig signaturalgoritm som kan förfalskas.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tSignatur:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tMD5-fingeravtryck:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tSHA-1-fingeravtryck:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tPublik nyckel-identitet:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "signerat med %s (trasig!), " - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "signerat med %s, " - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Information om X.509-certifikat:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Övrig information:\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tVersion: 1 (standard)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tUppdateringsdatum:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tUtfärdat: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tNästa den: %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tTillägg:\n" - -# Nummer? Antal? -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tCRL-nummer (%s): " - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tUtfärdarens nyckelidentifierare (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tOkänt tillägg %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tHexdump: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tSpärrade certifikat (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tInga spärrade certifikat.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tSerienummer (hex): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tSpärrat den: %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Information om spärrlista för X.509-certifikat:\n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tExponent:\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tAttribut:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tMotsvarslösenord: %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tOkänt attribut %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Information om begäran av PKCS #10-certifikat:\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tNyckelanvändning:\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "fel: get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tDigitala signaturer.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tKommunikationskryptering.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tKryptering för datalagring.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tAutentisering.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tCertifikatsignering.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tIdentitet (hex): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tFingeravtryck (hex): " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tSpärrat: Sant\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tSpärrat: Falskt\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tTidsstämplar:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tSkapat den: %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tUtgångsdatum: Aldrig\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tUtgångsdatum: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tAlgoritm för publik nyckel: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tNamn[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tSpärrat namn[%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tUndernyckel[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "namn[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "spärrat namn[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "fingeravtryck: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "skapat: %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "går aldrig ut, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "går ut: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "nyckelalgoritm %s (%d bitar)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "okänd nyckelalgoritm (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Information om OpenPGP-certifikat:\n" - -#~ msgid "The specified GnuPG TrustDB version is not supported. TrustDB v4 is supported." -#~ msgstr "Den angivna GnuPG TrustDB-versionen stöds inte. TrustDB v4 stöds." - -#~ msgid "\t\t\tPolicy Language: %.*s\n" -#~ msgstr "\t\t\tPolicyspråk: %.*s\n" diff --git a/lib/po/vi.po.in b/lib/po/vi.po.in deleted file mode 100644 index 302653f73c..0000000000 --- a/lib/po/vi.po.in +++ /dev/null @@ -1,1111 +0,0 @@ -# Vietnamese translation for LibGnuTLS. -# Copyright © 2010 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Clytie Siddall <clytie@riverland.net.au>, 2008-2010. -# -msgid "" -msgstr "" -"Project-Id-Version: libgnutls 2.8.5\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-11-02 11:37+0100\n" -"PO-Revision-Date: 2010-02-11 21:58+0930\n" -"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" -"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: LocFactoryEditor 1.8\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "Thành công." - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "Không thể thỏa thuận một bộ ứng dụng mật mã được hỗ trợ." - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "Loại mật mã không được hỗ trợ." - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "Chứng nhận và khoá đã cho không tương ứng với nhau." - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "Không thể thỏa thuận một phương pháp nén được hỗ trợ." - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "Gặp một thuật toán khoá công không rõ." - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "Đã thỏa thuận một thuật toán chưa được hiệu lực." - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "Nhận được một gói tin mục ghi TLS lớn." - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "Nhận được một gói tin mục ghi có phiên bản cấm." - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "Máy phục vụ đã gửi một nguyên tố Diffie Hellman không thích hợp (quá ngắn)." - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "Nhận được một gói tin TLS có chiều dài bất thường." - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "Buổi hợp đã ghi rõ cũng bị tắt vì lý do nào." - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "Lỗi nội bộ GnuTLS." - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "Nhận được một phần mở rộng TLS cấm." - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "Nhận được một cảnh giác nghiêm trọng TLS." - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "Nhận được một gói tin TLS bất thường." - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "Nhận được một cảnh giác báo trước TLS." - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "Gặp lỗi trong phép tính gói tin đã kết thúc TLS." - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "Đồng đẳng chưa gửi chứng nhận." - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "Đã có một thuật toán mật mã có mức ưu tiên thấp hơn." - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "Không tìm thấy tham số RSA tạm thời." - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "Không tìm thấy tham số DH tạm thời." - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "Nhận được một gói tin thiết lập quan hệ TLS bất thường." - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "Lỗi quét một số nguyên lớn." - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "Không thể xuất một số nguyên lớn." - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "Lỗi giải mật mã." - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "Lỗi mật mã hoá." - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "Lỗi giải mật mã khoá công." - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "Lỗi mật mã hoá khoá công." - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "Lỗi ký khoá công." - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "Lỗi thẩm tra chữ ký khoá công." - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "Lỗi giải nén gói tin mục ghi TLS." - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "Lỗi nén gói tin mục ghi TLS." - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "Gặp lỗi nội bộ trong khi cấp phát bộ nhớ." - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "Đã yêu cầu một tính năng bị tắt hoặc chưa được thực hiện." - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "Không đủ thông tin xác thực cho yêu cầu đó." - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "Gặp lỗi trong tập tin mật khẩu." - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "Sai đệm gói tin PKCS1." - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "Đã yêu cầu một buổi hợp đã hết hạn." - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "Lỗi chuyển đổi chuỗi sang một mẫu duy nhất." - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Lỗi giải mã Base64." - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "Lỗi phần đầu bất thường Base64." - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Lỗi mã hoá Base64." - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "Lỗi phân tích ngữ pháp trong tập tin mật khẩu." - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "Đã yêu cầu dữ liệu không sẵn sàng." - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "Gặp lỗi trong hàm pull." - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "Gặp lỗi trong hàm push." - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "Mới tới giới hạn trên của số thứ tự gói tin mục ghi !" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "Gặp lỗi trong chứng nhận." - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "Không rõ tên Người dân Xen kẽ trong chứng nhận X.509." - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "Gặp phần mở rộng nghiêm trọng không được hỗ trợ trong chứng nhận X.509." - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "Đã phát hiện sự vi phạm cách sử dụng khoá trong chứng nhận." - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "Tài nguyên tạm thời không sẵn sàng, hãy thử lại." - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "Hàm đã bị gián đoạn." - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "Đồng đẳng đã yêu cầu thiết lập lại quan hệ." - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "Nhận được dữ liệu Ứng dụng TLS, còn đợi dữ liệu thiết lập quan hệ." - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "Gặp lỗi trong hậu phương cơ sở dữ liệu." - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "Loại chứng nhận không được hỗ trợ." - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "Đã đưa ra một vùng đệm bộ nhớ quá ngắn để chứa các tham số." - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "Yêu cầu không hợp lệ." - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "Nhận được một tham số cấm." - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "Gặp lỗi khi đọc tập tin." - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "Bộ phân tích ASN1: không tìm thấy phần tử." - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "Bộ phân tích ASN1: không tìm thấy đồ nhận diện." - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "Bộ phân tích ASN1: gặp lỗi khi phân tích ngữ cảnh DER." - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "Bộ phân tích ASN1: không tìm thấy giá trị." - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "Bộ phân tích ASN1: lỗi phân tích ngữ cảnh chung." - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "Bộ phân tích ASN1: giá trị không hợp lệ." - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "Bộ phân tích ASN1: gặp lỗi trong TAG (thẻ)." - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "Bộ phân tích ASN1: gặp lỗi trong thẻ dứt khoát." - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "Bộ phân tích ASN1: gặp lỗi trong loại « ANY » (bất kỳ)." - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "Bộ phân tích ASN1: lỗi cú pháp." - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "Bộ phân tích ASN1: tràn sự phân tích ngữ cảnh DER." - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "Nhận được quá nhiều gói tin mục ghi trống." - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "Lỗi sơ khởi GnuTLS-extra." - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "Phiên bản thư viện GnuTLS không tương ứng với phiên bản thư viện GnuTLS-extra." - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "Phiên bản thư viện gcrypt quá cũ." - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "Phiên bản thư viện tasn1 quá cũ." - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "Mã số người dùng OpenPGP bị thu hồi." - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "Gặp lỗi khi nạp vòng khoá." - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "Lỗi sơ khởi LZO." - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "Không tìm thấy thuật toán nén được hỗ trợ." - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "Không tìm thấy bộ ứng dụng mật mã được hỗ trợ." - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "Không thể lấy khoá OpenPGP." - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "Không tìm thấy khoá phụ OpenPGP." - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "Đã cung cấp một tên người dùng SRP cấm." - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "Dấu tay OpenPGP không phải được hỗ trợ." - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "Chứng nhận có thuộc tính không được hỗ trợ." - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "IOD không được hỗ trợ." - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "Không rõ thuật toán chuyển đổi chuỗi sang mẫu duy nhất (hash)." - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "Không rõ loại nội dung của cấu trúc PKCS." - -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "Không rõ loại bao của cấu trúc PKCS." - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "Đã đưa ra một mật khẩu chứa ký tự không hợp lệ." - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "Lỗi thẩm tra Mã Xác Thực Thông Điệp." - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "Đã tới một số giới hạn ràng buộc." - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "Lỗi lấy dữ liệu ngẫu nhiên. " - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "Nhận được một thông điệp Giải đoạn TLS/IA Trung gian đã Kết thúc." - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "Nhận được một thông điệp Giải đoạn TLS/IA Cuối cùng đã Kết thúc." - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "Lỗi thẩm tra tổng kiểm của giải đoạn TLS/IA." - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "Không rõ thuật toán hoặc giao thức đã ghi rõ." - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "Dữ liệu thiết lập quan hệ có kích cỡ quá lớn (DoS?), hãy kiểm tra lại gnutls_handshake_set_max_packet_length()." - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(không rõ mã lỗi)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "Đóng thông báo" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "Thông điệp bất thường" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "MAC mục ghi sai" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "Lỗi giải mật mã" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "Tràn mục ghi" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "Lỗi giải nén" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "Lỗi thiết lập quan hệ" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "Chứng nhận sai" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "Chứng nhận không được hỗ trợ" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "Chứng nhận bị thu hồi" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "Chứng nhận đã hết hạn" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "Không nhận ra chứng nhận" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "Tham số không được phép" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "Không nhận ra nhà cầm quyền cấp chứng nhận (CA)" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "Truy cập bị từ chối" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "Lỗi giải mã" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "Lỗi giải mật mã" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "Giới hạn xuất khẩu" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "Lỗi trong phiên bản giao thức" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "Không đủ bảo mật" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "Người dùng đã thôi" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "Lỗi nội bộ" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "Không cho phép thỏa thuận lại" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "Không thể lấy chứng nhận đã xác định" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "Đã gửi một phần mở rộng không được hỗ trợ" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "Đã gửi một tên máy phục vụ không được nhận ra" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "Tên người dùng SRP/PSK bị thiếu hay không được nhận ra" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "Lỗi thỏa thuận ứng dụng bên trong" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "Không thẩm tra được ứng dụng bên trong" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\tRàng buộc Chiều dài Đường dẫn: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\tNgôn ngữ Chính sách: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\tChính sách:\n" -"\t\t\t\tASCII: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\tĐổ thập lục: " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\tChữ ký dạng số.\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "%s\t\t\tKhông từ chối.\n" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "%s\t\t\tMật mã hoá khoá.\n" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "%s\t\t\tMật mã hoá dữ liệu.\n" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "%s\t\t\tChấp thuận khoá.\n" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\tKý chứng nhận.\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tKý CRL.\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "%s\t\t\tChỉ mật mã hoá khoá.\n" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "%s\t\t\tChỉ giải mật mã khoá.\n" - -#: x509/output.c:362 -msgid "warning: distributionPoint contains an embedded NUL, replacing with '!'\n" -msgstr "cảnh báo : distributionPoint (điểm phân phối) chứa một NUL nhúng thì thay thế bằng một dấu chấm than « ! »\n" - -#: x509/output.c:454 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tTrình phục vụ WWW TLS.\n" - -#: x509/output.c:456 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tỨng dụng khách WWW TLS.\n" - -#: x509/output.c:458 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "%s\t\t\tKý mã.\n" - -#: x509/output.c:460 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tBảo vệ thư điện tử.\n" - -#: x509/output.c:462 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\tGhi thời gian.\n" - -#: x509/output.c:464 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tKý OCSP.\n" - -#: x509/output.c:466 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "%s\t\t\tBất cứ mục đích nào.\n" - -#: x509/output.c:499 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "%s\t\t\tNhà cầm quyền chứng nhận (CA): SAI\n" - -#: x509/output.c:501 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "%s\t\t\tNhà cầm quyền chứng nhận (CA): ĐÚNG\n" - -#: x509/output.c:504 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\tRàng buộc Chiều dài Đường dẫn: %d\n" - -#: x509/output.c:571 x509/output.c:651 -msgid "warning: SAN contains an embedded NUL, replacing with '!'\n" -msgstr "cảnh báo : SAN chứa một NUL nhúng thì thay thế bằng một dấu chấm than « ! »\n" - -#: x509/output.c:657 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tĐịa chỉ XMPP: %.*s\n" - -#: x509/output.c:662 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "%s\t\t\tOID tên khác: %.*s\n" - -#: x509/output.c:664 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "%s\t\t\tDER tên khác: " - -#: x509/output.c:666 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" -"\n" -"%s\t\t\tASCII tên khác: " - -#: x509/output.c:728 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\tPhần mở rộng:\n" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\tRàng buộc Cơ bản (%s):\n" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "critical" -msgstr "tới hạn" - -#: x509/output.c:739 x509/output.c:754 x509/output.c:771 x509/output.c:787 -#: x509/output.c:802 x509/output.c:819 x509/output.c:834 x509/output.c:852 -#: x509/output.c:865 x509/output.c:1514 x509/output.c:1537 x509/output.c:1550 -msgid "not critical" -msgstr "không tới hạn" - -#: x509/output.c:753 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "%s\tĐồ nhận diện Khoá Người dân (%s):\n" - -#: x509/output.c:770 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "%s\t\tĐồ nhận diện Khoá Nhà cầm quyền (%s):\n" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "%s\t\tSử dụng Khoá (%s):\n" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "%s\t\tMục đích Khoá (%s):\n" - -#: x509/output.c:818 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "%s\t\tTên Xen kẽ Người dân (%s):\n" - -#: x509/output.c:833 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "%s\t\tĐiểm phân phối CRL (%s):\n" - -#: x509/output.c:851 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\tThông tin Chứng nhận Ủy nhiệm (%s):\n" - -#: x509/output.c:864 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\tPhần mở rộng không được nhận ra %s (%s):\n" - -#: x509/output.c:910 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:914 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "%s\t\t\tĐổ thập lục: " - -#: x509/output.c:932 x509/output.c:1417 x509/output.c:1730 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\tPhiên bản %d\n" - -#: x509/output.c:946 -msgid "\tSerial Number (hex): " -msgstr "\tSố sản xuất (thập lục): " - -#: x509/output.c:963 x509/output.c:1431 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\tNhà cấp: %s\n" - -#: x509/output.c:970 -msgid "\tValidity:\n" -msgstr "\tHợp lệ:\n" - -#: x509/output.c:983 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\tKhông phải trước: %s\n" - -#: x509/output.c:997 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\tKhông phải sau : %s\n" - -#: x509/output.c:1011 x509/output.c:1743 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\tNgười dân: %s\n" - -#: x509/output.c:1026 x509/output.c:1113 x509/output.c:1256 x509/output.c:1648 -#: x509/output.c:1758 openpgp/output.c:237 -msgid "unknown" -msgstr "không rõ" - -#: x509/output.c:1028 x509/output.c:1760 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\tThuật toán Khoá Công Người dân: %s\n" - -#: x509/output.c:1042 x509/output.c:1773 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\tGiá trị tuyệt đối (%d bit):\n" - -#: x509/output.c:1044 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "\t\tMũ (%d bit):\n" - -#: x509/output.c:1064 x509/output.c:1795 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\tKhoá công (%d bit):\n" - -#: x509/output.c:1066 x509/output.c:1797 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1068 x509/output.c:1799 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1070 x509/output.c:1801 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1114 x509/output.c:1649 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\tThuật toán Chữ ký: %s\n" - -#: x509/output.c:1118 x509/output.c:1653 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "cảnh báo : đã ký dùng một thuật toán chữ ký bị hỏng có thể bị giả mạo.\n" - -#: x509/output.c:1144 x509/output.c:1679 -msgid "\tSignature:\n" -msgstr "\tChữ ký:\n" - -#: x509/output.c:1167 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tDấu tay MD5:\n" -"\t\t" - -#: x509/output.c:1169 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tDấu tay SHA1:\n" -"\t\t" - -#: x509/output.c:1188 x509/output.c:1956 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\tMã số Khoá Công:\n" -"\t\t" - -#: x509/output.c:1258 -#, c-format -msgid "signed using %s (broken!), " -msgstr "đã ký dùng %s (bị hỏng !), " - -#: x509/output.c:1260 -#, c-format -msgid "signed using %s, " -msgstr "đã ký dùng %s, " - -#: x509/output.c:1373 -msgid "X.509 Certificate Information:\n" -msgstr "Thông tin Chứng nhận X.509:\n" - -#: x509/output.c:1377 x509/output.c:1993 -msgid "Other Information:\n" -msgstr "Thông tin khác:\n" - -#: x509/output.c:1413 -msgid "\tVersion: 1 (default)\n" -msgstr "\tPhiên bản: 1 (mặc định)\n" - -#: x509/output.c:1438 -msgid "\tUpdate dates:\n" -msgstr "\tNgày cập nhật:\n" - -#: x509/output.c:1451 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\tCấp: %s\n" - -#: x509/output.c:1467 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\tLần sau vào : %s\n" - -#: x509/output.c:1498 -msgid "\tExtensions:\n" -msgstr "\tPhần mở rộng:\n" - -#: x509/output.c:1513 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tSố CRL (%s): " - -#: x509/output.c:1536 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\tĐồ nhận diện Khoá Nhà cầm quyền (%s):\n" - -#: x509/output.c:1549 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\tPhần mở rộng không được nhận ra %s (%s):\n" - -#: x509/output.c:1578 x509/output.c:1913 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1582 x509/output.c:1917 -msgid "\t\t\tHexdump: " -msgstr "\t\t\tĐổ thập lục: " - -#: x509/output.c:1598 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\tChứng nhận bị thu hồi (%d):\n" - -#: x509/output.c:1600 -msgid "\tNo revoked certificates.\n" -msgstr "\tKhông có chứng nhận bị thu hồi.\n" - -#: x509/output.c:1619 -msgid "\t\tSerial Number (hex): " -msgstr "\t\tSố sản xuất (thập lục): " - -#: x509/output.c:1628 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\tThu hồi vào : %s\n" - -#: x509/output.c:1710 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "Danh sách Thu hồi Chứng nhận X.509:\n" - -#: x509/output.c:1775 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\tMũ :\n" - -#: x509/output.c:1842 -msgid "\tAttributes:\n" -msgstr "\tThuộc tính:\n" - -#: x509/output.c:1877 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "\t\tMật khẩu yêu cầu : %s\n" - -#: x509/output.c:1886 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "\t\tKhông nhận ra thuộc tính %s:\n" - -#: x509/output.c:1989 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "Thông tin Yêu cầu Chứng nhận PKCS #10:\n" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "\t\tSử dụng Khoá:\n" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "lỗi: get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\tChữ ký thuật số.\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "\t\t\tMật mã hoá giao thông.\n" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "\t\t\tMật mã hoá dữ liệu lưu trữ.\n" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\tXác thực.\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\tKý chứng nhận.\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tMã số (thập lục): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\tDấu tay (thập lục):" - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\tThu hồi: Đúng\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\tThu hồi: Sai\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\tNhãn thời gian.\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\tTạo : %s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\tHết hạn: Không bao giờ\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\tHết hạn: %s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\tThuật toán Khoá Công: %s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\tTên[%d]: %s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\tTên bị thu hồi [%d]: %s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" -"\n" -"\tKhoá phụ[%d]:\n" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "tên[%d]: %s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "tên bị thu hồi[%d]: %s, " - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "dấu tay: " - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "tạo : %s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "không bao giờ hết hạn, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "hết hạn: %s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "thuật toán khoá %s (%d bit)" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "không nhận ra thuật toán khoá (%d)" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "Thông tin chứng nhận OpenPGP:\n" diff --git a/lib/po/zh_CN.po.in b/lib/po/zh_CN.po.in deleted file mode 100644 index 6505039dc8..0000000000 --- a/lib/po/zh_CN.po.in +++ /dev/null @@ -1,1098 +0,0 @@ -# Simplified Chinese translation for libgnutls -# Copyright (C) 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the libgnutls package. -# Tao Wei <weitao1979@gmail.com>, 2008. -# Aron Xu <happyaron.xu@gmail.com>, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: libgnutls 2.8.1\n" -"Report-Msgid-Bugs-To: bug-gnutls@gnu.org\n" -"POT-Creation-Date: 2009-06-10 16:24+0200\n" -"PO-Revision-Date: 2009-11-09 19:16+0800\n" -"Last-Translator: Aron Xu <happyaron.xu@gmail.com>\n" -"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gnutls_errors.c:51 -msgid "Success." -msgstr "成功。" - -#: gnutls_errors.c:52 -msgid "Could not negotiate a supported cipher suite." -msgstr "无法协商受支持的密码算法。" - -#: gnutls_errors.c:54 -msgid "The cipher type is unsupported." -msgstr "密码类型不支持。" - -#: gnutls_errors.c:56 -msgid "The certificate and the given key do not match." -msgstr "证书与密钥不匹配。" - -#: gnutls_errors.c:58 -msgid "Could not negotiate a supported compression method." -msgstr "无法协商支持的压缩方法。" - -#: gnutls_errors.c:60 -msgid "An unknown public key algorithm was encountered." -msgstr "遇到未知的公钥算法。" - -#: gnutls_errors.c:63 -msgid "An algorithm that is not enabled was negotiated." -msgstr "协商的算法未启用。" - -#: gnutls_errors.c:65 -msgid "A large TLS record packet was received." -msgstr "收到大 TLS 记录数据包。" - -#: gnutls_errors.c:67 -msgid "A record packet with illegal version was received." -msgstr "收到的记录包版本非法。" - -#: gnutls_errors.c:70 -msgid "The Diffie-Hellman prime sent by the server is not acceptable (not long enough)." -msgstr "" - -#: gnutls_errors.c:72 -msgid "A TLS packet with unexpected length was received." -msgstr "收到了意外长度的 TLS 数据包。" - -#: gnutls_errors.c:75 -msgid "The specified session has been invalidated for some reason." -msgstr "指定的会话已因故失效。" - -#: gnutls_errors.c:78 -msgid "GnuTLS internal error." -msgstr "GnuTLS 内部错误。" - -#: gnutls_errors.c:79 -msgid "An illegal TLS extension was received." -msgstr "收到一个非法的 TLS 扩展包。" - -#: gnutls_errors.c:81 -msgid "A TLS fatal alert has been received." -msgstr "收到一个 TLS 致命错误警告。" - -#: gnutls_errors.c:83 -msgid "An unexpected TLS packet was received." -msgstr "收到一个意外的 TLS 数据包。" - -#: gnutls_errors.c:85 -msgid "A TLS warning alert has been received." -msgstr "收到一个 TLS 警告信息。" - -#: gnutls_errors.c:88 -msgid "An error was encountered at the TLS Finished packet calculation." -msgstr "在完成 TLS 数据包计算时出错。" - -#: gnutls_errors.c:90 -msgid "The peer did not send any certificate." -msgstr "对方未发送任何证书。" - -#: gnutls_errors.c:93 -msgid "There is already a crypto algorithm with lower priority." -msgstr "已经有一个低优先级的加密算法。" - -#: gnutls_errors.c:96 -msgid "No temporary RSA parameters were found." -msgstr "未发现 RSA 临时参数。" - -#: gnutls_errors.c:98 -msgid "No temporary DH parameters were found." -msgstr "未发现临时 DH 参数。" - -#: gnutls_errors.c:100 -msgid "An unexpected TLS handshake packet was received." -msgstr "收到意外的 TLS 握手数据包。" - -#: gnutls_errors.c:102 -msgid "The scanning of a large integer has failed." -msgstr "大整数扫描失败。" - -#: gnutls_errors.c:104 -msgid "Could not export a large integer." -msgstr "无法输出大整数。" - -#: gnutls_errors.c:106 -msgid "Decryption has failed." -msgstr "解密失败。" - -#: gnutls_errors.c:107 -msgid "Encryption has failed." -msgstr "加密失败。" - -#: gnutls_errors.c:108 -msgid "Public key decryption has failed." -msgstr "公钥解密失败。" - -#: gnutls_errors.c:110 -msgid "Public key encryption has failed." -msgstr "公钥加密失败。" - -#: gnutls_errors.c:112 -msgid "Public key signing has failed." -msgstr "公钥签名失败。" - -#: gnutls_errors.c:114 -msgid "Public key signature verification has failed." -msgstr "公钥签名验证失败。" - -#: gnutls_errors.c:116 -msgid "Decompression of the TLS record packet has failed." -msgstr "TLS 记录数据包解压缩失败。" - -#: gnutls_errors.c:118 -msgid "Compression of the TLS record packet has failed." -msgstr "TLS 记录数据包压缩失败。" - -#: gnutls_errors.c:121 -msgid "Internal error in memory allocation." -msgstr "在分配内存时发生内部错误。" - -#: gnutls_errors.c:123 -msgid "An unimplemented or disabled feature has been requested." -msgstr "所请求的特性尚未实现或已被禁用。" - -#: gnutls_errors.c:125 -msgid "Insufficient credentials for that request." -msgstr "此请求的信任凭证不足。" - -#: gnutls_errors.c:127 -msgid "Error in password file." -msgstr "密码文件错误。" - -#: gnutls_errors.c:128 -msgid "Wrong padding in PKCS1 packet." -msgstr "PKC51 数据包填充错误。" - -#: gnutls_errors.c:130 -msgid "The requested session has expired." -msgstr "请求的会话已过期。" - -#: gnutls_errors.c:131 -msgid "Hashing has failed." -msgstr "散列运算失败。" - -#: gnutls_errors.c:132 -msgid "Base64 decoding error." -msgstr "Base64 解码出错。" - -#: gnutls_errors.c:134 -msgid "Base64 unexpected header error." -msgstr "" - -#: gnutls_errors.c:137 -msgid "Base64 encoding error." -msgstr "Base64 编码出错。" - -#: gnutls_errors.c:139 -msgid "Parsing error in password file." -msgstr "密码文件解析出错。" - -#: gnutls_errors.c:141 -msgid "The requested data were not available." -msgstr "请求的数据不可用。" - -#: gnutls_errors.c:143 -msgid "Error in the pull function." -msgstr "在 pull 函数中出错。" - -#: gnutls_errors.c:144 -msgid "Error in the push function." -msgstr "在 push 函数中出错。" - -#: gnutls_errors.c:146 -msgid "The upper limit of record packet sequence numbers has been reached. Wow!" -msgstr "哦!记录数据包序列的上限值已到。" - -#: gnutls_errors.c:148 -msgid "Error in the certificate." -msgstr "证书出错。" - -#: gnutls_errors.c:150 -msgid "Unknown Subject Alternative name in X.509 certificate." -msgstr "X.509 证书中含有未知的主体代用名。" - -#: gnutls_errors.c:153 -msgid "Unsupported critical extension in X.509 certificate." -msgstr "X.509 证书中含有不支持的关键性扩展。" - -#: gnutls_errors.c:155 -msgid "Key usage violation in certificate has been detected." -msgstr "在证书中检测到违规的密钥用法。" - -#: gnutls_errors.c:157 -msgid "Resource temporarily unavailable, try again." -msgstr "资源临时不可用,请重试。" - -#: gnutls_errors.c:159 -msgid "Function was interrupted." -msgstr "函数被中断。" - -#: gnutls_errors.c:160 -msgid "Rehandshake was requested by the peer." -msgstr "按对方请求重新握手。" - -#: gnutls_errors.c:163 -msgid "TLS Application data were received, while expecting handshake data." -msgstr "在期望接收 TLS 握手数据时接收到应用数据。" - -#: gnutls_errors.c:165 -msgid "Error in Database backend." -msgstr "数据库后端出错。" - -#: gnutls_errors.c:166 -msgid "The certificate type is not supported." -msgstr "不支持的证书类型。" - -#: gnutls_errors.c:168 -msgid "The given memory buffer is too short to hold parameters." -msgstr "给待处理参数预留的内存缓冲区过短。" - -#: gnutls_errors.c:170 -msgid "The request is invalid." -msgstr "请求无效。" - -#: gnutls_errors.c:171 -msgid "An illegal parameter has been received." -msgstr "收到一个非法参数。" - -#: gnutls_errors.c:173 -msgid "Error while reading file." -msgstr "读取文件时出错。" - -#: gnutls_errors.c:175 -msgid "ASN1 parser: Element was not found." -msgstr "ASN1 解析器:找不到元素。" - -#: gnutls_errors.c:177 -msgid "ASN1 parser: Identifier was not found" -msgstr "ASN1 解析器:找不到标识。" - -#: gnutls_errors.c:179 -msgid "ASN1 parser: Error in DER parsing." -msgstr "ASN1 解析器:DER 解析时出错。" - -#: gnutls_errors.c:181 -msgid "ASN1 parser: Value was not found." -msgstr "ASN1 解析器:找不到值。" - -#: gnutls_errors.c:183 -msgid "ASN1 parser: Generic parsing error." -msgstr "ASN1 解析器:常规解析中出错。" - -#: gnutls_errors.c:185 -msgid "ASN1 parser: Value is not valid." -msgstr "ASN1 解析器:无效的值。" - -#: gnutls_errors.c:187 -msgid "ASN1 parser: Error in TAG." -msgstr "ASN1 解析器:标签中出错。" - -#: gnutls_errors.c:188 -msgid "ASN1 parser: error in implicit tag" -msgstr "ASN1 解析器:隐式标签中出错。" - -#: gnutls_errors.c:190 -msgid "ASN1 parser: Error in type 'ANY'." -msgstr "ASN1 解析器:‘ANY’类型中出错。" - -#: gnutls_errors.c:192 -msgid "ASN1 parser: Syntax error." -msgstr "ASN1 解析器:语法出错。" - -#: gnutls_errors.c:194 -msgid "ASN1 parser: Overflow in DER parsing." -msgstr "ASN1 解析器:DER 解析中出现溢出。" - -#: gnutls_errors.c:197 -msgid "Too many empty record packets have been received." -msgstr "收到了过多的空记录包。" - -#: gnutls_errors.c:199 -msgid "The initialization of GnuTLS-extra has failed." -msgstr "GnuTLS-extra 初始化失败。" - -#: gnutls_errors.c:202 -msgid "The GnuTLS library version does not match the GnuTLS-extra library version." -msgstr "GnuTLS 和 GnuTLS-extra 的库版本不相吻合。" - -#: gnutls_errors.c:204 -msgid "The gcrypt library version is too old." -msgstr "gcrypt 库的版本过旧。" - -#: gnutls_errors.c:207 -msgid "The tasn1 library version is too old." -msgstr "tasn1 库的版本过旧。" - -#: gnutls_errors.c:209 -msgid "The OpenPGP User ID is revoked." -msgstr "OpenPGP 用户 ID 已吊销。" - -#: gnutls_errors.c:211 -msgid "Error loading the keyring." -msgstr "载入密钥环时出错。" - -#: gnutls_errors.c:213 -msgid "The initialization of LZO has failed." -msgstr "LZO 算法初始化失败。" - -#: gnutls_errors.c:215 -msgid "No supported compression algorithms have been found." -msgstr "找不到支持的压缩算法。" - -#: gnutls_errors.c:217 -msgid "No supported cipher suites have been found." -msgstr "找不到支持的密码机制。" - -#: gnutls_errors.c:219 -msgid "Could not get OpenPGP key." -msgstr "无法获得 OpenPGP 密钥。" - -#: gnutls_errors.c:221 -msgid "Could not find OpenPGP subkey." -msgstr "" - -#: gnutls_errors.c:224 -msgid "The SRP username supplied is illegal." -msgstr "提供的 SRP 用户名非法。" - -#: gnutls_errors.c:227 -msgid "The OpenPGP fingerprint is not supported." -msgstr "不支持 OpenPGP 指纹。" - -#: gnutls_errors.c:229 -msgid "The certificate has unsupported attributes." -msgstr "证书中含有不支持的属性。" - -#: gnutls_errors.c:231 -msgid "The OID is not supported." -msgstr "不支持 OID。" - -#: gnutls_errors.c:233 -msgid "The hash algorithm is unknown." -msgstr "未知的散列算法。" - -#: gnutls_errors.c:235 -msgid "The PKCS structure's content type is unknown." -msgstr "未知的 PKCS 内容类型结构。" - -#: gnutls_errors.c:237 -msgid "The PKCS structure's bag type is unknown." -msgstr "未知的 PKCS 包类型结构。" - -#: gnutls_errors.c:239 -msgid "The given password contains invalid characters." -msgstr "给出的密码中包含无效字符。" - -#: gnutls_errors.c:241 -msgid "The Message Authentication Code verification failed." -msgstr "消息认证代码确认失败。" - -#: gnutls_errors.c:243 -msgid "Some constraint limits were reached." -msgstr "已达到某些约束限定。" - -#: gnutls_errors.c:245 -msgid "Failed to acquire random data." -msgstr "获取随机数据失败。" - -#: gnutls_errors.c:248 -msgid "Received a TLS/IA Intermediate Phase Finished message" -msgstr "收到 TLS/IA 中间相位完成信息。" - -#: gnutls_errors.c:250 -msgid "Received a TLS/IA Final Phase Finished message" -msgstr "收到 TLS/IA 末尾相位完成信息。" - -#: gnutls_errors.c:252 -msgid "Verifying TLS/IA phase checksum failed" -msgstr "校验 TLS/IA 相位和失败。" - -#: gnutls_errors.c:255 -msgid "The specified algorithm or protocol is unknown." -msgstr "指定的算法或协议未知。" - -#: gnutls_errors.c:258 -msgid "The handshake data size is too large (DoS?), check gnutls_handshake_set_max_packet_length()." -msgstr "" - -#: gnutls_errors.c:347 -msgid "(unknown error code)" -msgstr "(未知错误代码)" - -#: gnutls_alert.c:42 -msgid "Close notify" -msgstr "" - -#: gnutls_alert.c:43 -msgid "Unexpected message" -msgstr "未预料的消息" - -#: gnutls_alert.c:44 -msgid "Bad record MAC" -msgstr "" - -#: gnutls_alert.c:45 -msgid "Decryption failed" -msgstr "解密失败" - -#: gnutls_alert.c:46 -msgid "Record overflow" -msgstr "记录溢出" - -#: gnutls_alert.c:47 -msgid "Decompression failed" -msgstr "解压缩失败" - -#: gnutls_alert.c:48 -msgid "Handshake failed" -msgstr "握手失败" - -#: gnutls_alert.c:49 -msgid "Certificate is bad" -msgstr "证书无效" - -#: gnutls_alert.c:50 -msgid "Certificate is not supported" -msgstr "证书不被支持" - -#: gnutls_alert.c:51 -msgid "Certificate was revoked" -msgstr "证书已吊销" - -#: gnutls_alert.c:52 -msgid "Certificate is expired" -msgstr "证书过期" - -#: gnutls_alert.c:53 -msgid "Unknown certificate" -msgstr "未知证书" - -#: gnutls_alert.c:54 -msgid "Illegal parameter" -msgstr "非法参数" - -#: gnutls_alert.c:55 -msgid "CA is unknown" -msgstr "未知 CA" - -#: gnutls_alert.c:56 -msgid "Access was denied" -msgstr "访问被拒绝" - -#: gnutls_alert.c:57 -msgid "Decode error" -msgstr "解码错误" - -#: gnutls_alert.c:58 -msgid "Decrypt error" -msgstr "解密出错" - -#: gnutls_alert.c:59 -msgid "Export restriction" -msgstr "导出受限" - -#: gnutls_alert.c:60 -msgid "Error in protocol version" -msgstr "协议版本出错" - -#: gnutls_alert.c:61 -msgid "Insufficient security" -msgstr "不够安全" - -#: gnutls_alert.c:62 -msgid "User canceled" -msgstr "用户已取消" - -#: gnutls_alert.c:63 -msgid "Internal error" -msgstr "内部错误" - -#: gnutls_alert.c:64 -msgid "No renegotiation is allowed" -msgstr "" - -#: gnutls_alert.c:66 -msgid "Could not retrieve the specified certificate" -msgstr "" - -#: gnutls_alert.c:67 -msgid "An unsupported extension was sent" -msgstr "发送了一个不支持的扩展" - -#: gnutls_alert.c:69 -msgid "The server name sent was not recognized" -msgstr "发送的服务器名未被识别" - -#: gnutls_alert.c:71 -msgid "The SRP/PSK username is missing or not known" -msgstr "SRP/PSK 用户名丢失或未知" - -#: gnutls_alert.c:73 -msgid "Inner application negotiation failed" -msgstr "" - -#: gnutls_alert.c:75 -msgid "Inner application verification failed" -msgstr "内部应用程序验证失败" - -#: x509/output.c:156 -#, c-format -msgid "\t\t\tPath Length Constraint: %d\n" -msgstr "\t\t\t路径长度常数: %d\n" - -#: x509/output.c:157 -#, c-format -msgid "\t\t\tPolicy Language: %s" -msgstr "\t\t\t策略语言: %s" - -#: x509/output.c:166 -msgid "" -"\t\t\tPolicy:\n" -"\t\t\t\tASCII: " -msgstr "" -"\t\t\t策略:\n" -"\t\t\t\tASCII:: " - -#: x509/output.c:168 -msgid "" -"\n" -"\t\t\t\tHexdump: " -msgstr "" -"\n" -"\t\t\t\t十六进制输出 " - -#: x509/output.c:295 -#, c-format -msgid "%s\t\t\tDigital signature.\n" -msgstr "%s\t\t\t数字签名。\n" - -#: x509/output.c:297 -#, c-format -msgid "%s\t\t\tNon repudiation.\n" -msgstr "" - -#: x509/output.c:299 -#, c-format -msgid "%s\t\t\tKey encipherment.\n" -msgstr "" - -#: x509/output.c:301 -#, c-format -msgid "%s\t\t\tData encipherment.\n" -msgstr "" - -#: x509/output.c:303 -#, c-format -msgid "%s\t\t\tKey agreement.\n" -msgstr "" - -#: x509/output.c:305 -#, c-format -msgid "%s\t\t\tCertificate signing.\n" -msgstr "%s\t\t\t证书签名。\n" - -#: x509/output.c:307 -#, c-format -msgid "%s\t\t\tCRL signing.\n" -msgstr "%s\t\t\tCRL 签名。\n" - -#: x509/output.c:309 -#, c-format -msgid "%s\t\t\tKey encipher only.\n" -msgstr "" - -#: x509/output.c:311 -#, c-format -msgid "%s\t\t\tKey decipher only.\n" -msgstr "" - -#: x509/output.c:443 -#, c-format -msgid "%s\t\t\tTLS WWW Server.\n" -msgstr "%s\t\t\tTLS WWW 服务器。\n" - -#: x509/output.c:445 -#, c-format -msgid "%s\t\t\tTLS WWW Client.\n" -msgstr "%s\t\t\tTLS WWW 客户端。\n" - -#: x509/output.c:447 -#, c-format -msgid "%s\t\t\tCode signing.\n" -msgstr "" - -#: x509/output.c:449 -#, c-format -msgid "%s\t\t\tEmail protection.\n" -msgstr "%s\t\t\tEmail 保护。\n" - -#: x509/output.c:451 -#, c-format -msgid "%s\t\t\tTime stamping.\n" -msgstr "%s\t\t\t时间戳。\n" - -#: x509/output.c:453 -#, c-format -msgid "%s\t\t\tOCSP signing.\n" -msgstr "%s\t\t\tOCSP 签名。\n" - -#: x509/output.c:455 -#, c-format -msgid "%s\t\t\tAny purpose.\n" -msgstr "" - -#: x509/output.c:488 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): FALSE\n" -msgstr "" - -#: x509/output.c:490 -#, c-format -msgid "%s\t\t\tCertificate Authority (CA): TRUE\n" -msgstr "" - -#: x509/output.c:493 -#, c-format -msgid "%s\t\t\tPath Length Constraint: %d\n" -msgstr "%s\t\t\t路径长度限制: %d\n" - -#: x509/output.c:626 -#, c-format -msgid "%s\t\t\tXMPP Address: %.*s\n" -msgstr "%s\t\t\tXMPP 地址:%.*s\n" - -#: x509/output.c:630 -#, c-format -msgid "%s\t\t\totherName OID: %.*s\n" -msgstr "" - -#: x509/output.c:632 -#, c-format -msgid "%s\t\t\totherName DER: " -msgstr "" - -#: x509/output.c:634 -#, c-format -msgid "" -"\n" -"%s\t\t\totherName ASCII: " -msgstr "" - -#: x509/output.c:696 -#, c-format -msgid "%s\tExtensions:\n" -msgstr "%s\t扩展:\n" - -#: x509/output.c:706 -#, c-format -msgid "%s\t\tBasic Constraints (%s):\n" -msgstr "%s\t\t基本限制(%s):\n" - -#: x509/output.c:707 x509/output.c:722 x509/output.c:739 x509/output.c:755 -#: x509/output.c:770 x509/output.c:787 x509/output.c:802 x509/output.c:820 -#: x509/output.c:833 x509/output.c:1482 x509/output.c:1505 x509/output.c:1518 -msgid "critical" -msgstr "关键" - -#: x509/output.c:707 x509/output.c:722 x509/output.c:739 x509/output.c:755 -#: x509/output.c:770 x509/output.c:787 x509/output.c:802 x509/output.c:820 -#: x509/output.c:833 x509/output.c:1482 x509/output.c:1505 x509/output.c:1518 -msgid "not critical" -msgstr "非关键" - -#: x509/output.c:721 -#, c-format -msgid "%s\t\tSubject Key Identifier (%s):\n" -msgstr "" - -#: x509/output.c:738 -#, c-format -msgid "%s\t\tAuthority Key Identifier (%s):\n" -msgstr "" - -#: x509/output.c:754 -#, c-format -msgid "%s\t\tKey Usage (%s):\n" -msgstr "" - -#: x509/output.c:769 -#, c-format -msgid "%s\t\tKey Purpose (%s):\n" -msgstr "" - -#: x509/output.c:786 -#, c-format -msgid "%s\t\tSubject Alternative Name (%s):\n" -msgstr "" - -#: x509/output.c:801 -#, c-format -msgid "%s\t\tCRL Distribution points (%s):\n" -msgstr "" - -#: x509/output.c:819 -#, c-format -msgid "%s\t\tProxy Certificate Information (%s):\n" -msgstr "%s\t\t代理证书信息(%s):\n" - -#: x509/output.c:832 -#, c-format -msgid "%s\t\tUnknown extension %s (%s):\n" -msgstr "%s\t\t未知扩展 %s (%s):\n" - -#: x509/output.c:878 -#, c-format -msgid "%s\t\t\tASCII: " -msgstr "%s\t\t\tASCII: " - -#: x509/output.c:882 -#, c-format -msgid "%s\t\t\tHexdump: " -msgstr "" - -#: x509/output.c:900 x509/output.c:1385 x509/output.c:1698 -#: openpgp/output.c:323 -#, c-format -msgid "\tVersion: %d\n" -msgstr "\t版本:%d\n" - -#: x509/output.c:914 -msgid "\tSerial Number (hex): " -msgstr "\t序列号(16进制): " - -#: x509/output.c:931 x509/output.c:1399 -#, c-format -msgid "\tIssuer: %s\n" -msgstr "\t发行者:%s\n" - -#: x509/output.c:938 -msgid "\tValidity:\n" -msgstr "\t有效性:\n" - -#: x509/output.c:951 -#, c-format -msgid "\t\tNot Before: %s\n" -msgstr "\t\t不早于: %s\n" - -#: x509/output.c:965 -#, c-format -msgid "\t\tNot After: %s\n" -msgstr "\t\t不晚于: %s\n" - -#: x509/output.c:979 x509/output.c:1711 -#, c-format -msgid "\tSubject: %s\n" -msgstr "\t主题:%s\n" - -#: x509/output.c:994 x509/output.c:1081 x509/output.c:1224 x509/output.c:1616 -#: x509/output.c:1726 openpgp/output.c:237 -msgid "unknown" -msgstr "未知" - -#: x509/output.c:996 x509/output.c:1728 -#, c-format -msgid "\tSubject Public Key Algorithm: %s\n" -msgstr "\t主公钥算法: %s\n" - -#: x509/output.c:1010 x509/output.c:1741 openpgp/output.c:257 -#, c-format -msgid "\t\tModulus (bits %d):\n" -msgstr "\t\t模块(位 %d):\n" - -#: x509/output.c:1012 -#, c-format -msgid "\t\tExponent (bits %d):\n" -msgstr "" - -#: x509/output.c:1032 x509/output.c:1763 openpgp/output.c:284 -#, c-format -msgid "\t\tPublic key (bits %d):\n" -msgstr "\t\t公钥 (位 %d):\n" - -#: x509/output.c:1034 x509/output.c:1765 openpgp/output.c:286 -msgid "\t\tP:\n" -msgstr "\t\tP:\n" - -#: x509/output.c:1036 x509/output.c:1767 openpgp/output.c:288 -msgid "\t\tQ:\n" -msgstr "\t\tQ:\n" - -#: x509/output.c:1038 x509/output.c:1769 openpgp/output.c:290 -msgid "\t\tG:\n" -msgstr "\t\tG:\n" - -#: x509/output.c:1082 x509/output.c:1617 -#, c-format -msgid "\tSignature Algorithm: %s\n" -msgstr "\t签名算法:%s\n" - -#: x509/output.c:1086 x509/output.c:1621 -msgid "warning: signed using a broken signature algorithm that can be forged.\n" -msgstr "警告:使用可伪造的签名算法进行了签名。\n" - -#: x509/output.c:1112 x509/output.c:1647 -msgid "\tSignature:\n" -msgstr "\t签名:\n" - -#: x509/output.c:1135 -msgid "" -"\tMD5 fingerprint:\n" -"\t\t" -msgstr "" -"\tMD5 指纹:\n" -"\t\t" - -#: x509/output.c:1137 -msgid "" -"\tSHA-1 fingerprint:\n" -"\t\t" -msgstr "" -"\tSHA-1 指纹:\n" -"\t\t" - -#: x509/output.c:1156 x509/output.c:1924 -msgid "" -"\tPublic Key Id:\n" -"\t\t" -msgstr "" -"\t公钥 Id:\n" -"\t\t" - -#: x509/output.c:1226 -#, c-format -msgid "signed using %s (broken!), " -msgstr "" - -#: x509/output.c:1228 -#, c-format -msgid "signed using %s, " -msgstr "" - -#: x509/output.c:1341 -msgid "X.509 Certificate Information:\n" -msgstr "X.509 证书信息:\n" - -#: x509/output.c:1345 x509/output.c:1961 -msgid "Other Information:\n" -msgstr "其它信息:\n" - -#: x509/output.c:1381 -msgid "\tVersion: 1 (default)\n" -msgstr "\t版本:1 (默认)\n" - -#: x509/output.c:1406 -msgid "\tUpdate dates:\n" -msgstr "\t更新日期:\n" - -#: x509/output.c:1419 -#, c-format -msgid "\t\tIssued: %s\n" -msgstr "\t\t发行:%s\n" - -#: x509/output.c:1435 -#, c-format -msgid "\t\tNext at: %s\n" -msgstr "\t\t下一个位于:%s\n" - -#: x509/output.c:1466 -msgid "\tExtensions:\n" -msgstr "\t扩展:\n" - -#: x509/output.c:1481 -#, c-format -msgid "\t\tCRL Number (%s): " -msgstr "\t\tCRL 号(%s): " - -#: x509/output.c:1504 -#, c-format -msgid "\t\tAuthority Key Identifier (%s):\n" -msgstr "\t\t授权密钥识别器 (%s):\n" - -#: x509/output.c:1517 -#, c-format -msgid "\t\tUnknown extension %s (%s):\n" -msgstr "\t\t未知扩展 %s (%s):\n" - -#: x509/output.c:1546 x509/output.c:1881 -msgid "\t\t\tASCII: " -msgstr "\t\t\tASCII: " - -#: x509/output.c:1550 x509/output.c:1885 -msgid "\t\t\tHexdump: " -msgstr "\t\t\t十六进制转储: " - -#: x509/output.c:1566 -#, c-format -msgid "\tRevoked certificates (%d):\n" -msgstr "\t撤销的证书(%d):\n" - -#: x509/output.c:1568 -msgid "\tNo revoked certificates.\n" -msgstr "\t没有撤销的证书。\n" - -#: x509/output.c:1587 -msgid "\t\tSerial Number (hex): " -msgstr "\t\t序列号(hex): " - -#: x509/output.c:1596 -#, c-format -msgid "\t\tRevoked at: %s\n" -msgstr "\t\t撤销于:%s\n" - -#: x509/output.c:1678 -msgid "X.509 Certificate Revocation List Information:\n" -msgstr "X.509 证书撤销列表信息:\n" - -#: x509/output.c:1743 openpgp/output.c:259 -msgid "\t\tExponent:\n" -msgstr "\t\t说明:\n" - -#: x509/output.c:1810 -msgid "\tAttributes:\n" -msgstr "" - -#: x509/output.c:1845 -#, c-format -msgid "\t\tChallenge password: %s\n" -msgstr "" - -#: x509/output.c:1854 -#, c-format -msgid "\t\tUnknown attribute %s:\n" -msgstr "" - -#: x509/output.c:1957 -msgid "PKCS #10 Certificate Request Information:\n" -msgstr "" - -#: openpgp/output.c:84 -msgid "\t\tKey Usage:\n" -msgstr "" - -#: openpgp/output.c:93 -#, c-format -msgid "error: get_key_usage: %s\n" -msgstr "错误:get_key_usage: %s\n" - -#: openpgp/output.c:98 -msgid "\t\t\tDigital signatures.\n" -msgstr "\t\t\t数字签名。\n" - -#: openpgp/output.c:100 -msgid "\t\t\tCommunications encipherment.\n" -msgstr "" - -#: openpgp/output.c:102 -msgid "\t\t\tStorage data encipherment.\n" -msgstr "" - -#: openpgp/output.c:104 -msgid "\t\t\tAuthentication.\n" -msgstr "\t\t\t认证。\n" - -#: openpgp/output.c:106 -msgid "\t\t\tCertificate signing.\n" -msgstr "\t\t\t证书签名。\n" - -#: openpgp/output.c:127 -msgid "\tID (hex): " -msgstr "\tID (hex): " - -#: openpgp/output.c:148 -msgid "\tFingerprint (hex): " -msgstr "\t指纹(hex): " - -#: openpgp/output.c:165 -msgid "\tRevoked: True\n" -msgstr "\t是否被撤销:是\n" - -#: openpgp/output.c:167 -msgid "\tRevoked: False\n" -msgstr "\t是否被撤销:没有\n" - -#: openpgp/output.c:175 -msgid "\tTime stamps:\n" -msgstr "\t时间戳:\n" - -#: openpgp/output.c:192 -#, c-format -msgid "\t\tCreation: %s\n" -msgstr "\t\t创建于:%s\n" - -#: openpgp/output.c:206 -msgid "\t\tExpiration: Never\n" -msgstr "\t\t过期:永不过期\n" - -#: openpgp/output.c:215 -#, c-format -msgid "\t\tExpiration: %s\n" -msgstr "\t\t过期:%s\n" - -#: openpgp/output.c:239 -#, c-format -msgid "\tPublic Key Algorithm: %s\n" -msgstr "\t公钥算法:%s\n" - -#: openpgp/output.c:346 -#, c-format -msgid "\tName[%d]: %s\n" -msgstr "\t名字[%d]:%s\n" - -#: openpgp/output.c:349 -#, c-format -msgid "\tRevoked Name[%d]: %s\n" -msgstr "\t吊销名称[%d]:%s\n" - -#: openpgp/output.c:366 -#, c-format -msgid "" -"\n" -"\tSubkey[%d]:\n" -msgstr "" - -#: openpgp/output.c:399 -#, c-format -msgid "name[%d]: %s, " -msgstr "名称[%d]:%s, " - -#: openpgp/output.c:401 -#, c-format -msgid "revoked name[%d]: %s, " -msgstr "" - -#: openpgp/output.c:415 -msgid "fingerprint: " -msgstr "指纹:" - -#: openpgp/output.c:435 -#, c-format -msgid "created: %s, " -msgstr "已创建:%s, " - -#: openpgp/output.c:445 -msgid "never expires, " -msgstr "永不过期, " - -#: openpgp/output.c:453 -#, c-format -msgid "expires: %s, " -msgstr "过期:%s, " - -#: openpgp/output.c:465 -#, c-format -msgid "key algorithm %s (%d bits)" -msgstr "" - -#: openpgp/output.c:467 -#, c-format -msgid "unknown key algorithm (%d)" -msgstr "" - -#: openpgp/output.c:499 -msgid "OpenPGP Certificate Information:\n" -msgstr "OpenPGP 证书信息:\n" diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am index 983f32309f..7b022bf765 100644 --- a/lib/x509/Makefile.am +++ b/lib/x509/Makefile.am @@ -21,8 +21,7 @@ AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) AM_CPPFLAGS = \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ + -I$(srcdir)/../../gl \ -I$(srcdir)/../includes \ -I$(builddir)/../includes \ -I$(srcdir)/.. \ |