aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-12 09:57:31 +0100
committerThomas White <taw@physics.org>2018-03-12 10:17:49 +0100
commit95bb73d90fed58f61dddc0d1d3e8afeb9879daaa (patch)
tree98f8ae32c65a7af063ac448f401ef1b619c04950
parent77cf2edd09bb01ae331935f467064c751f6e338e (diff)
Remove autotools
-rw-r--r--.gitignore57
-rw-r--r--Makefile.am203
-rwxr-xr-xautogen.sh8
-rw-r--r--build-aux/snippet/_Noreturn.h10
-rw-r--r--build-aux/snippet/arg-nonnull.h26
-rw-r--r--build-aux/snippet/c++defs.h271
-rw-r--r--build-aux/snippet/warn-on-use.h109
-rw-r--r--configure.ac399
-rw-r--r--doc/reference/libcrystfel/Makefile.am102
-rw-r--r--lib/.gitignore18
-rw-r--r--lib/Makefile.am886
-rw-r--r--lib/errno.in.h279
-rw-r--r--lib/fcntl.in.h363
-rw-r--r--lib/fd-hook.c116
-rw-r--r--lib/fd-hook.h119
-rw-r--r--lib/forkpty.c73
-rw-r--r--lib/ioctl.c88
-rw-r--r--lib/login_tty.c75
-rw-r--r--lib/msvc-inval.c129
-rw-r--r--lib/msvc-inval.h222
-rw-r--r--lib/msvc-nothrow.c49
-rw-r--r--lib/msvc-nothrow.h43
-rw-r--r--lib/openpty.c136
-rw-r--r--lib/posix_openpt.c108
-rw-r--r--lib/pty.in.h131
-rw-r--r--lib/stdalign.in.h110
-rw-r--r--lib/stddef.in.h86
-rw-r--r--lib/stdlib.in.h954
-rw-r--r--lib/string.in.h1029
-rw-r--r--lib/strndup.c36
-rw-r--r--lib/strnlen.c30
-rw-r--r--lib/sys_ioctl.in.h78
-rw-r--r--lib/sys_socket.c3
-rw-r--r--lib/sys_socket.in.h692
-rw-r--r--lib/sys_types.in.h53
-rw-r--r--lib/sys_uio.in.h63
-rw-r--r--lib/unistd.c3
-rw-r--r--lib/unistd.in.h1557
-rw-r--r--lib/w32sock.h136
-rw-r--r--libcrystfel/Makefile.am41
-rw-r--r--m4/.gitignore7
-rw-r--r--m4/00gnulib.m446
-rw-r--r--m4/absolute-header.m4102
-rw-r--r--m4/ax_with_curses.m4518
-rw-r--r--m4/errno_h.m4137
-rw-r--r--m4/extensions.m4138
-rw-r--r--m4/extern-inline.m499
-rw-r--r--m4/fcntl-o.m4134
-rw-r--r--m4/fcntl_h.m450
-rw-r--r--m4/gnulib-cache.m450
-rw-r--r--m4/gnulib-common.m4447
-rw-r--r--m4/gnulib-comp.m4357
-rw-r--r--m4/gnulib-tool.m457
-rw-r--r--m4/include_next.m4223
-rw-r--r--m4/ioctl.m441
-rw-r--r--m4/lib-ignore.m4115
-rw-r--r--m4/msvc-inval.m419
-rw-r--r--m4/msvc-nothrow.m410
-rw-r--r--m4/off_t.m418
-rw-r--r--m4/onceonly.m4104
-rw-r--r--m4/posix_openpt.m419
-rw-r--r--m4/pty.m4148
-rw-r--r--m4/pty_h.m469
-rw-r--r--m4/socklen.m477
-rw-r--r--m4/sockpfaf.m487
-rw-r--r--m4/ssize_t.m423
-rw-r--r--m4/stdalign.m453
-rw-r--r--m4/stddef_h.m447
-rw-r--r--m4/stdlib_h.m4117
-rw-r--r--m4/string_h.m4120
-rw-r--r--m4/strndup.m455
-rw-r--r--m4/strnlen.m430
-rw-r--r--m4/sys_ioctl_h.m464
-rw-r--r--m4/sys_socket_h.m4176
-rw-r--r--m4/sys_types_h.m424
-rw-r--r--m4/sys_uio_h.m431
-rw-r--r--m4/unistd_h.m4187
-rw-r--r--m4/warn-on-use.m447
-rw-r--r--m4/wchar_t.m424
79 files changed, 0 insertions, 12961 deletions
diff --git a/.gitignore b/.gitignore
index 37c06428..0f4c95ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,60 +1,3 @@
-Makefile.in
-configure
-config.h.in
-lib/Makefile.in
-libtool
-INSTALL
-doc/reference/Makefile.in
-aclocal.m4
-Makefile
-autom4te.cache
-config.h
-config.log
-config.status
-stamp-h1
-libcrystfel/libcrystfel.la
-libcrystfel/src/*.o
-libcrystfel/src/*.lo
-libcrystfel/src/.dirstamp
-libcrystfel/src/*.deps
-libcrystfel/*.libs
-libcrystfel/src/*.libs
-tests/.libs
-src/*.o
-src/.deps
-src/.libs
-src/pattern_sim
-src/process_hkl
-src/get_hkl
-src/hdfsee
-src/indexamajig
-src/compare_hkl
-src/render_hkl
-src/partialator
-src/check_hkl
-src/partial_sim
-src/cell_explorer
-src/ambigator
-src/whirligig
-src/geoptimiser
-src/list_events
-src/.dirstamp
-*~
doc/reference/libcrystfel/*
-gtk-doc.make
-build-aux/compile
-build-aux/config.sub
-build-aux/install-sh
-build-aux/missing
-build-aux/config.guess
-build-aux/depcomp
-build-aux/ltmain.sh
-build-aux/test-driver
-/nbproject/private/
-lib/.libs/
-lib/dummy.lo
-lib/libgnu.la
libcrystfel/crystfel.pc
version.h
-tests/*.log
-tests/*.trs
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index c3072602..00000000
--- a/Makefile.am
+++ /dev/null
@@ -1,203 +0,0 @@
-docdir = ${datadir}/doc/${PACKAGE}
-EXTRA_DIST = configure m4/gnulib-cache.m4 version.sh version.h.in
-SUBDIRS = lib doc/reference/libcrystfel libcrystfel
-ACLOCAL_AMFLAGS = -I m4
-
-bin_PROGRAMS = src/pattern_sim src/process_hkl src/get_hkl src/indexamajig \
- src/compare_hkl src/partialator src/check_hkl src/partial_sim \
- src/ambigator src/geoptimiser src/whirligig src/list_events
-
-noinst_PROGRAMS = tests/list_check tests/integration_check \
- tests/pr_p_gradient_check tests/symmetry_check \
- tests/centering_check tests/transformation_check \
- tests/cell_check tests/ring_check \
- tests/prof2d_check tests/ambi_check \
- tests/prediction_gradient_check
-
-MERGE_CHECKS = tests/first_merge_check tests/second_merge_check \
- tests/third_merge_check tests/fourth_merge_check
-
-PARTIAL_CHECKS = tests/partialator_merge_check_1 \
- tests/partialator_merge_check_2 \
- tests/partialator_merge_check_3 \
- tests/pr_p_gradient_check
-
-TESTS = tests/list_check $(MERGE_CHECKS) $(PARTIAL_CHECKS) \
- tests/integration_check \
- tests/symmetry_check tests/centering_check tests/transformation_check \
- tests/cell_check tests/ring_check tests/prof2d_check tests/ambi_check \
- tests/prediction_gradient_check
-
-EXTRA_DIST += $(MERGE_CHECKS) $(PARTIAL_CHECKS)
-EXTRA_DIST += relnotes-0.6.3 announcement-0.6.3
-
-if BUILD_HDFSEE
-bin_PROGRAMS += src/hdfsee
-endif
-
-if BUILD_EXPLORER
-bin_PROGRAMS += src/cell_explorer
-endif
-
-if HAVE_CAIRO
-bin_PROGRAMS += src/render_hkl
-endif
-
-AM_CFLAGS = -Wall @MAIN_CFLAGS@
-AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib
-AM_CPPFLAGS += -I$(top_srcdir)/lib
-LDADD = $(top_builddir)/lib/libgnu.la @IGNORE_UNUSED_LIBRARIES_CFLAGS@
-LDADD += $(top_builddir)/libcrystfel/libcrystfel.la @MAIN_LIBS@
-
-tests_integration_check_LDADD = $(top_builddir)/lib/libgnu.la
-tests_integration_check_LDADD += $(top_builddir)/libcrystfel/libcrystfel.la
-tests_integration_check_LDADD += @LIBCRYSTFEL_LIBS@
-
-tests_prof2d_check_LDADD = $(top_builddir)/lib/libgnu.la
-tests_prof2d_check_LDADD += $(top_builddir)/libcrystfel/libcrystfel.la
-tests_prof2d_check_LDADD += @LIBCRYSTFEL_LIBS@
-
-src_partial_sim_SOURCES = src/partial_sim.c
-
-src_pattern_sim_SOURCES = src/pattern_sim.c src/diffraction.c
-
-if HAVE_OPENCL
-src_pattern_sim_SOURCES += src/cl-utils.c src/diffraction-gpu.c
-TESTS += tests/gpu_sim_check
-noinst_PROGRAMS += tests/gpu_sim_check
-tests_gpu_sim_check_SOURCES = tests/gpu_sim_check.c src/diffraction.c \
- src/diffraction-gpu.c src/cl-utils.c
-endif
-
-src_process_hkl_SOURCES = src/process_hkl.c
-
-src_list_events_SOURCES = src/list_events.c
-
-src_indexamajig_SOURCES = src/indexamajig.c src/im-sandbox.c \
- src/process_image.c src/time-accounts.c
-
-if BUILD_HDFSEE
-src_hdfsee_SOURCES = src/hdfsee.c src/dw-hdfsee.c src/hdfsee-render.c
-endif
-
-if BUILD_EXPLORER
-src_cell_explorer_SOURCES = src/cell_explorer.c src/multihistogram.c
-endif
-
-src_get_hkl_SOURCES = src/get_hkl.c
-
-src_compare_hkl_SOURCES = src/compare_hkl.c
-
-src_check_hkl_SOURCES = src/check_hkl.c
-
-if HAVE_CAIRO
-src_render_hkl_SOURCES = src/render_hkl.c
-endif
-
-src_partialator_SOURCES = src/partialator.c src/post-refinement.c \
- src/merge.c src/rejection.c src/scaling.c
-
-src_ambigator_SOURCES = src/ambigator.c
-
-src_geoptimiser_SOURCES = src/geoptimiser.c src/hdfsee-render.c
-
-src_whirligig_SOURCES = src/whirligig.c
-
-tests_list_check_SOURCES = tests/list_check.c
-
-tests_integration_check_SOURCES = tests/integration_check.c
-
-tests_prof2d_check_SOURCES = tests/prof2d_check.c
-
-tests_symmetry_check_SOURCES = tests/symmetry_check.c
-
-tests_ambi_check_SOURCES = tests/ambi_check.c
-
-tests_pr_p_gradient_check_SOURCES = tests/pr_p_gradient_check.c \
- src/post-refinement.c
-
-tests_prediction_gradient_check_SOURCES = tests/prediction_gradient_check.c
-
-tests_centering_check_SOURCES = tests/centering_check.c
-
-tests_transformation_check_SOURCES = tests/transformation_check.c
-
-tests_ring_check_SOURCES = tests/ring_check.c
-
-tests_cell_check_SOURCES = tests/cell_check.c
-
-INCLUDES = -I$(top_srcdir)/libcrystfel/src -I$(top_srcdir)/data
-
-EXTRA_DIST += src/dw-hdfsee.h src/hdfsee.h src/render_hkl.h \
- src/post-refinement.h src/merge.h \
- src/cl-utils.h src/hdfsee-render.h src/diffraction.h \
- src/diffraction-gpu.h src/pattern_sim.h src/list_tmp.h \
- src/im-sandbox.h src/process_image.h src/multihistogram.h \
- src/rejection.h src/scaling.h src/time-accounts.h
-
-crystfeldir = $(datadir)/crystfel
-crystfel_DATA = data/diffraction.cl data/hdfsee.ui
-
-EXTRA_DIST += $(crystfel_DATA)
-
-man_MANS = doc/man/crystfel.7 doc/man/check_hkl.1 doc/man/compare_hkl.1 \
- doc/man/crystfel_geometry.5 doc/man/get_hkl.1 doc/man/hdfsee.1 \
- doc/man/indexamajig.1 doc/man/partialator.1 doc/man/partial_sim.1 \
- doc/man/pattern_sim.1 doc/man/process_hkl.1 doc/man/render_hkl.1 \
- doc/man/cell_explorer.1 doc/man/ambigator.1 doc/man/geoptimiser.1 \
- doc/man/whirligig.1 doc/man/list_events.1
-
-
-EXTRA_DIST += $(man_MANS)
-
-crystfeldocdir = $(docdir)
-crystfeldoc_DATA = doc/twin-calculator.pdf doc/examples/lcls-dec.geom \
- doc/examples/lcls-june-r0013-r0128.geom \
- doc/examples/lcls-xpp-estimate.geom \
- doc/examples/simple.geom \
- doc/examples/cspad-single.geom \
- doc/examples/cspad-cxiformat.geom \
- doc/examples/pilatus.geom \
- doc/examples/cell-example.cell \
- doc/examples/Eiger16M-binning2-nativefiles.geom \
- doc/hitrate.html doc/hitrate.png
-
-EXTRA_DIST += $(crystfeldoc_DATA) doc/twin-calculator.odt \
- doc/reference/libcrystfel/xml/coding-standards.xml
-
-scriptdir = $(docdir)/scripts
-script_DATA = scripts/alternate-stream scripts/cell-please \
- scripts/check-hkl-completeness.gp scripts/check-hkl-quality.gp \
- scripts/check-near-bragg scripts/check-peak-detection \
- scripts/cif2hkl scripts/compare-hkl.gp scripts/create-mtz \
- scripts/create-xscale scripts/eV-to-A scripts/find-filename \
- scripts/gen-sfs scripts/gen-sfs-ano scripts/hkl2hkl \
- scripts/indexed-filenames scripts/mtz2hkl scripts/peak-intensity \
- scripts/random-image scripts/README scripts/sequence-image \
- scripts/split-indexed scripts/stream_grep scripts/zone-axes \
- scripts/Rsplit_surface scripts/Rsplit_surface.py \
- scripts/clean-stream.py scripts/fg-graph scripts/truncate-stream \
- scripts/gen-sfs-expand scripts/add-beam-params \
- scripts/find-pairs scripts/plot-cc-and-scale.R \
- scripts/ave-resolution scripts/crystal-frame-number \
- scripts/plot-radius-resolution \
- scripts/detector-shift scripts/turbo-index-lsf \
- scripts/gaincal-to-saturation-map scripts/move-entire-detector \
- scripts/split-by-mask scripts/turbo-index-slurm \
- scripts/sum-peaks scripts/peakogram-stream scripts/eiger-badmap \
- scripts/sum-hdf5-files
-
-EXTRA_DIST += $(script_DATA)
-
-
-DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
-mostlyclean-local: mostlyclean-version
-.PHONY: mostlyclean-version
-mostlyclean-version:
- rm -f $(top_builddir)/version.h
-
-all: update_version_header
-.PHONY: version_header
-update_version_header:
- $(top_srcdir)/version.sh $(top_srcdir)
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 19503607..00000000
--- a/autogen.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-libtoolize --force --copy \
-&& aclocal -I m4 --force \
-&& gtkdocize --copy \
-&& autoheader --force \
-&& automake --add-missing --copy --force \
-&& autoconf --force
diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h
deleted file mode 100644
index c44ad89b..00000000
--- a/build-aux/snippet/_Noreturn.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#if !defined _Noreturn && __STDC_VERSION__ < 201112
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
-# define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= _MSC_VER
-# define _Noreturn __declspec (noreturn)
-# else
-# define _Noreturn
-# endif
-#endif
diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h
deleted file mode 100644
index 9ee8b155..00000000
--- a/build-aux/snippet/arg-nonnull.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2014 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/>. */
-
-/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
- that the values passed as arguments n, ..., m must be non-NULL pointers.
- n = 1 stands for the first argument, n = 2 for the second argument etc. */
-#ifndef _GL_ARG_NONNULL
-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
-# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
-# else
-# define _GL_ARG_NONNULL(params)
-# endif
-#endif
diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h
deleted file mode 100644
index 67b12335..00000000
--- a/build-aux/snippet/c++defs.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/* C++ compatible function declaration macros.
- Copyright (C) 2010-2014 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 _GL_CXXDEFS_H
-#define _GL_CXXDEFS_H
-
-/* The three most frequent use cases of these macros are:
-
- * For providing a substitute for a function that is missing on some
- platforms, but is declared and works fine on the platforms on which
- it exists:
-
- #if @GNULIB_FOO@
- # if !@HAVE_FOO@
- _GL_FUNCDECL_SYS (foo, ...);
- # endif
- _GL_CXXALIAS_SYS (foo, ...);
- _GL_CXXALIASWARN (foo);
- #elif defined GNULIB_POSIXCHECK
- ...
- #endif
-
- * For providing a replacement for a function that exists on all platforms,
- but is broken/insufficient and needs to be replaced on some platforms:
-
- #if @GNULIB_FOO@
- # if @REPLACE_FOO@
- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
- # undef foo
- # define foo rpl_foo
- # endif
- _GL_FUNCDECL_RPL (foo, ...);
- _GL_CXXALIAS_RPL (foo, ...);
- # else
- _GL_CXXALIAS_SYS (foo, ...);
- # endif
- _GL_CXXALIASWARN (foo);
- #elif defined GNULIB_POSIXCHECK
- ...
- #endif
-
- * For providing a replacement for a function that exists on some platforms
- but is broken/insufficient and needs to be replaced on some of them and
- is additionally either missing or undeclared on some other platforms:
-
- #if @GNULIB_FOO@
- # if @REPLACE_FOO@
- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
- # undef foo
- # define foo rpl_foo
- # endif
- _GL_FUNCDECL_RPL (foo, ...);
- _GL_CXXALIAS_RPL (foo, ...);
- # else
- # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
- _GL_FUNCDECL_SYS (foo, ...);
- # endif
- _GL_CXXALIAS_SYS (foo, ...);
- # endif
- _GL_CXXALIASWARN (foo);
- #elif defined GNULIB_POSIXCHECK
- ...
- #endif
-*/
-
-/* _GL_EXTERN_C declaration;
- performs the declaration with C linkage. */
-#if defined __cplusplus
-# define _GL_EXTERN_C extern "C"
-#else
-# define _GL_EXTERN_C extern
-#endif
-
-/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
- declares a replacement function, named rpl_func, with the given prototype,
- consisting of return type, parameters, and attributes.
- Example:
- _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
- _GL_ARG_NONNULL ((1)));
- */
-#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
- _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
-#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
- _GL_EXTERN_C rettype rpl_func parameters_and_attributes
-
-/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
- declares the system function, named func, with the given prototype,
- consisting of return type, parameters, and attributes.
- Example:
- _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
- _GL_ARG_NONNULL ((1)));
- */
-#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
- _GL_EXTERN_C rettype func parameters_and_attributes
-
-/* _GL_CXXALIAS_RPL (func, rettype, parameters);
- declares a C++ alias called GNULIB_NAMESPACE::func
- that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
- Example:
- _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
- */
-#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
- _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
-#if defined __cplusplus && defined GNULIB_NAMESPACE
-# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
- namespace GNULIB_NAMESPACE \
- { \
- rettype (*const func) parameters = ::rpl_func; \
- } \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#else
-# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
- is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
- except that the C function rpl_func may have a slightly different
- declaration. A cast is used to silence the "invalid conversion" error
- that would otherwise occur. */
-#if defined __cplusplus && defined GNULIB_NAMESPACE
-# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
- namespace GNULIB_NAMESPACE \
- { \
- rettype (*const func) parameters = \
- reinterpret_cast<rettype(*)parameters>(::rpl_func); \
- } \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#else
-# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-/* _GL_CXXALIAS_SYS (func, rettype, parameters);
- declares a C++ alias called GNULIB_NAMESPACE::func
- that redirects to the system provided function func, if GNULIB_NAMESPACE
- is defined.
- Example:
- _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
- */
-#if defined __cplusplus && defined GNULIB_NAMESPACE
- /* If we were to write
- rettype (*const func) parameters = ::func;
- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
- better (remove an indirection through a 'static' pointer variable),
- but then the _GL_CXXALIASWARN macro below would cause a warning not only
- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
- namespace GNULIB_NAMESPACE \
- { \
- static rettype (*func) parameters = ::func; \
- } \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#else
-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
- except that the C function func may have a slightly different declaration.
- A cast is used to silence the "invalid conversion" error that would
- otherwise occur. */
-#if defined __cplusplus && defined GNULIB_NAMESPACE
-# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
- namespace GNULIB_NAMESPACE \
- { \
- static rettype (*func) parameters = \
- reinterpret_cast<rettype(*)parameters>(::func); \
- } \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#else
-# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
- except that the C function is picked among a set of overloaded functions,
- namely the one with rettype2 and parameters2. Two consecutive casts
- are used to silence the "cannot find a match" and "invalid conversion"
- errors that would otherwise occur. */
-#if defined __cplusplus && defined GNULIB_NAMESPACE
- /* The outer cast must be a reinterpret_cast.
- The inner cast: When the function is defined as a set of overloaded
- functions, it works as a static_cast<>, choosing the designated variant.
- When the function is defined as a single variant, it works as a
- reinterpret_cast<>. The parenthesized cast syntax works both ways. */
-# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
- namespace GNULIB_NAMESPACE \
- { \
- static rettype (*func) parameters = \
- reinterpret_cast<rettype(*)parameters>( \
- (rettype2(*)parameters2)(::func)); \
- } \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#else
-# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-/* _GL_CXXALIASWARN (func);
- causes a warning to be emitted when ::func is used but not when
- GNULIB_NAMESPACE::func is used. func must be defined without overloaded
- variants. */
-#if defined __cplusplus && defined GNULIB_NAMESPACE
-# define _GL_CXXALIASWARN(func) \
- _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
-# define _GL_CXXALIASWARN_1(func,namespace) \
- _GL_CXXALIASWARN_2 (func, namespace)
-/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
- we enable the warning only when not optimizing. */
-# if !__OPTIMIZE__
-# define _GL_CXXALIASWARN_2(func,namespace) \
- _GL_WARN_ON_USE (func, \
- "The symbol ::" #func " refers to the system function. " \
- "Use " #namespace "::" #func " instead.")
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-# define _GL_CXXALIASWARN_2(func,namespace) \
- extern __typeof__ (func) func
-# else
-# define _GL_CXXALIASWARN_2(func,namespace) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-# endif
-#else
-# define _GL_CXXALIASWARN(func) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
- causes a warning to be emitted when the given overloaded variant of ::func
- is used but not when GNULIB_NAMESPACE::func is used. */
-#if defined __cplusplus && defined GNULIB_NAMESPACE
-# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
- _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
- GNULIB_NAMESPACE)
-# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
- _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
-/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
- we enable the warning only when not optimizing. */
-# if !__OPTIMIZE__
-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
- _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
- "The symbol ::" #func " refers to the system function. " \
- "Use " #namespace "::" #func " instead.")
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
- extern __typeof__ (func) func
-# else
-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-# endif
-#else
-# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
- _GL_EXTERN_C int _gl_cxxalias_dummy
-#endif
-
-#endif /* _GL_CXXDEFS_H */
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
deleted file mode 100644
index 1c4d7bd4..00000000
--- a/build-aux/snippet/warn-on-use.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2014 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/>. */
-
-/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
- for FUNCTION which will then trigger a compiler warning containing
- the text of "literal string" anywhere that function is called, if
- supported by the compiler. If the compiler does not support this
- feature, the macro expands to an unused extern declaration.
-
- This macro is useful for marking a function as a potential
- portability trap, with the intent that "literal string" include
- instructions on the replacement function that should be used
- instead. However, one of the reasons that a function is a
- portability trap is if it has the wrong signature. Declaring
- FUNCTION with a different signature in C is a compilation error, so
- this macro must use the same type as any existing declaration so
- that programs that avoid the problematic FUNCTION do not fail to
- compile merely because they included a header that poisoned the
- function. But this implies that _GL_WARN_ON_USE is only safe to
- use if FUNCTION is known to already have a declaration. Use of
- this macro implies that there must not be any other macro hiding
- the declaration of FUNCTION; but undefining FUNCTION first is part
- of the poisoning process anyway (although for symbols that are
- provided only via a macro, the result is a compilation error rather
- than a warning containing "literal string"). Also note that in
- C++, it is only safe to use if FUNCTION has no overloads.
-
- For an example, it is possible to poison 'getline' by:
- - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
- [getline]) in configure.ac, which potentially defines
- HAVE_RAW_DECL_GETLINE
- - adding this code to a header that wraps the system <stdio.h>:
- #undef getline
- #if HAVE_RAW_DECL_GETLINE
- _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
- "not universally present; use the gnulib module getline");
- #endif
-
- It is not possible to directly poison global variables. But it is
- possible to write a wrapper accessor function, and poison that
- (less common usage, like &environ, will cause a compilation error
- rather than issue the nice warning, but the end result of informing
- the developer about their portability problem is still achieved):
- #if HAVE_RAW_DECL_ENVIRON
- static char ***rpl_environ (void) { return &environ; }
- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
- # undef environ
- # define environ (*rpl_environ ())
- #endif
- */
-#ifndef _GL_WARN_ON_USE
-
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-/* A compiler attribute is available in gcc versions 4.3.0 and later. */
-# define _GL_WARN_ON_USE(function, message) \
-extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-/* Verify the existence of the function. */
-# define _GL_WARN_ON_USE(function, message) \
-extern __typeof__ (function) function
-# else /* Unsupported. */
-# define _GL_WARN_ON_USE(function, message) \
-_GL_WARN_EXTERN_C int _gl_warn_on_use
-# endif
-#endif
-
-/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
- is like _GL_WARN_ON_USE (function, "string"), except that the function is
- declared with the given prototype, consisting of return type, parameters,
- and attributes.
- This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
- not work in this case. */
-#ifndef _GL_WARN_ON_USE_CXX
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes \
- __attribute__ ((__warning__ (msg)))
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-/* Verify the existence of the function. */
-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes
-# else /* Unsupported. */
-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-_GL_WARN_EXTERN_C int _gl_warn_on_use
-# endif
-#endif
-
-/* _GL_WARN_EXTERN_C declaration;
- performs the declaration with C linkage. */
-#ifndef _GL_WARN_EXTERN_C
-# if defined __cplusplus
-# define _GL_WARN_EXTERN_C extern "C"
-# else
-# define _GL_WARN_EXTERN_C extern
-# endif
-#endif
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 30e803f7..00000000
--- a/configure.ac
+++ /dev/null
@@ -1,399 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT([crystfel],[0.6.3],[taw@physics.org])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([subdir-objects])
-
-AC_PROG_CC
-gl_EARLY
-AM_PROG_CC_C_O
-AC_PROG_CC_C99
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_LIBTOOL
-AM_SILENT_RULES([yes])
-
-AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h stdlib.h unistd.h])
-AC_C_CONST
-AC_FUNC_MALLOC
-
-gl_INIT
-
-
-dnl Find HDF5
-AC_ARG_WITH(hdf5,
-[AS_HELP_STRING([--with-hdf5],
- [specify location of HDF5 (instead of trying pkg-config)])],
-[
- AC_MSG_NOTICE([Using your specified location for HDF5])
- HDF5_CFLAGS="-I$withval/include"
- HDF5_LIBS="-L$withval/lib -lhdf5"
-],
-[
- AC_MSG_NOTICE([checking for HDF5 using pkg-config])
- PKG_CHECK_MODULES([HDF5], [hdf5],
- [
- AC_MSG_NOTICE([Found HDF5 using pkg-config])
- ],
- [
- AC_MSG_NOTICE([Did not find HDF5 using pkg-config. Assuming default location.])
- HDF5_CFLAGS=""
- HDF5_LIBS="-lhdf5"
- ])
-])
-
-dnl Check that HDF5 *actually* works...
-LIBS_SAVE=$LIBS
-LIBS=$HDF5_LIBS
-AC_CHECK_LIB([hdf5], [H5Fcreate], [],
-[
- AC_MSG_ERROR([HDF5 not found!])
-])
-LIBS=$LIBS_SAVE
-
-
-AC_ARG_WITH(gsl,
-[AS_HELP_STRING([--with-gsl],
- [specify location of GSL (instead of using pkg-config)])],
-[GSL_CFLAGS="-I$withval/include"
- GSL_LIBS="-L$withval/lib -lgsl -lgslcblas -lm"],
-[PKG_CHECK_MODULES([GSL], [gsl])])
-
-AC_ARG_ENABLE(cbf, AS_HELP_STRING([--disable-cbf], [Disable CBF file support]))
-AC_ARG_WITH(cbflib,
- [Specify location of CBFlib headers and libraries])
-AC_MSG_CHECKING([whether to use CBFlib])
-AS_IF([test "x$enable_cbf" != "xno"],
-[
- AC_MSG_RESULT([yes])
- AS_IF([test "x$with_cbflib" != "x"],
- [
- dnl NB not ${with_cbflib}/include/cbflib, because cbflib installs
- dnl its own HDF5 headers which we do not want in the include path
- CBF_CFLAGS="-I${with_cbflib}/include"
- dnl Fortunately no libhdf5.so in this folder
- CBF_LIBS="-lcbf -L${with_cbflib}/lib"
- ], [
- AC_CHECK_LIB([cbf], [cbf_make_handle], [
- CBF_LIBS="-lcbf"
- ])
- ])
- SAVED_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $CBF_CFLAGS"
- AC_CHECK_HEADERS([cbflib/cbf.h cbf/cbf.h],
- [
- have_cbflib=true
- ])
- CPPFLAGS=$SAVE_CPPFLAGS
-], [
- AC_MSG_RESULT([no])
-])
-AS_IF([test x$have_cbflib = xtrue],
-[
- AC_DEFINE([HAVE_CBFLIB], [1], [Define to 1 if CBFlib is available])
- AC_MSG_NOTICE([CBFlib found.])
-])
-
-AC_ARG_WITH(opencl, AS_HELP_STRING([--with-opencl], [Use OpenCL]))
-AC_ARG_WITH(opencl_dir, AS_HELP_STRING([--with-opencl-dir],
- [Specify location of OpenCL headers and libraries]))
-AC_MSG_CHECKING([whether to use OpenCL])
-AS_IF([test "x$with_opencl_dir" != "x"], [with_opencl=yes])
-AS_IF([test "x$with_opencl" == "xyes"],
-[
- AC_MSG_RESULT([yes])
- AS_IF([test "x$with_opencl_dir" != "x"],
- [
- dnl Path manually given
- AC_MSG_CHECKING([cl.h])
- AS_IF([test -f ${with_opencl_dir}/include/CL/cl.h],
- [
- AC_MSG_RESULT([${with_opencl_dir}/include/CL/cl.h])
- OPENCL_CFLAGS="-I${with_opencl_dir}/include"
- OPENCL_LIBS="-lOpenCL -L${with_opencl_dir}/lib64 -L${with_opencl_dir}/lib"
- cl_cl_h=true
- have_opencl=true
- ], [
- AS_IF([test -f ${with_opencl_dir}/include/cl.h],
- [
- AC_MSG_RESULT([${with_opencl_dir}/include/cl.h])
- OPENCL_CFLAGS="-I${with_opencl_dir}/include/cl.h/include"
- OPENCL_LIBS="-lOpenCL -L${with_opencl_dir}/lib64 -L${with_opencl_dir}/lib"
- cl_cl_h=false
- have_opencl=true
- ], [
- AC_MSG_RESULT([not found.])
- AC_MSG_ERROR([Could not find cl.h])
- ])
- ])
-
- ], [
-
- dnl Attempt to automatically find the headers
- AC_MSG_CHECKING([cl.h])
- AS_IF([test -f /System/Library/Frameworks/OpenCL.framework/Headers/cl.h],
- [
- AC_MSG_RESULT([/System/Library/Frameworks/OpenCL.framework/Headers/cl.h])
- OPENCL_CFLAGS="-I/System/Library/Frameworks/OpenCL.framework/Headers"
- OPENCL_LIBS="-framework OpenCL"
- ], [
- AS_IF([test -f /opt/cuda/cuda/include/CL/cl.h],
- [
- AC_MSG_RESULT([/opt/cuda/cuda/include/CL/cl.h])
- OPENCL_CFLAGS="-I/opt/cuda/cuda/include"
- OPENCL_LIBS="-lOpenCL"
- cl_cl_h=true
- ], [
- AS_IF([test -f /opt/cuda/include/CL/cl.h],
- [
- AC_MSG_RESULT([/opt/cuda/include/CL/cl.h])
- OPENCL_CFLAGS="-I/opt/cuda/include"
- OPENCL_LIBS="-lOpenCL"
- cl_cl_h=true
- ], [
- AC_MSG_RESULT([not found, assuming /usr/include/CL/cl.h])
- OPENCL_CFLAGS=""
- OPENCL_LIBS="-lOpenCL"
- cl_cl_h=true
- ])
- ])
- ])
- have_opencl=true
- ])
-], [
- AC_MSG_RESULT([no])
-])
-AS_IF([test x$cl_cl_h = xtrue],
-[
- AC_DEFINE([HAVE_CL_CL_H], [1], [Define to 1 if CL/cl.h should be used])
-])
-AS_IF([test x$have_opencl = xtrue],
-[
- AC_DEFINE([HAVE_OPENCL], [1], [Define to 1 if OpenCL is available])
-])
-
-AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [Disable GTK+/GLib]))
-have_gtk=false
-AC_MSG_CHECKING([whether to use GTK])
-AS_IF([test "x$enable_gtk" != "xno"],
-[
- AC_MSG_RESULT([yes])
- AM_PATH_GTK_2_0(2.0.0,
- [
- have_gtk=true
- AC_DEFINE([HAVE_GTK], [1], [Define to 1 if GTK and GDK are available])
- ],
- [
- AC_MSG_WARN([GTK not found. hdfsee will not be built.])
- ])
-],
-[
- AC_MSG_RESULT([no])
-])
-
-
-AC_MSG_CHECKING([whether to use PNG])
-AC_ARG_ENABLE([png],
- AS_HELP_STRING([--disable-png], [Disable the use of libPNG]))
-AS_IF([test "x$enable_png" != "xno"],
-[
- AC_MSG_RESULT([yes])
- PKG_CHECK_MODULES([libPNG], [libpng >= 1.2.0],
- [
- AC_DEFINE([HAVE_LIBPNG], [1], [Define to 1 if libPNG is available])
- have_libpng=true
- ], [
- have_libpng=false
- ])
-],[
- AC_MSG_RESULT([no])
-])
-
-
-AC_MSG_CHECKING([whether to use TIFF])
-AC_ARG_ENABLE([tiff],
- AS_HELP_STRING([--disable-tiff], [Disable the use of libTIFF]))
-AS_IF([test "x$enable_tiff" != "xno"],
-[
- AC_MSG_RESULT([yes])
- AC_ARG_WITH(libtiff,
- [AS_HELP_STRING([--with-libtiff], [specify location of libTIFF library])],
- [
- LIBTIFF_CFLAGS="-I$withval/include"
- LIBTIFF_LIBS="-L$withval/lib -ltiff"
- have_libtiff=true
- ], [
- AC_CHECK_LIB([tiff], [TIFFOpen], [
- have_libtiff=true
- LIBTIFF_LIBS="-ltiff"
- ])
- ])
-], [
- AC_MSG_RESULT([no])
-])
-AS_IF([test x$have_libtiff = xtrue],
-[
- AC_DEFINE([HAVE_TIFF], [1], [Define to 1 if libTIFF is available])
-])
-
-
-AC_MSG_CHECKING([whether to use Cairo])
-AC_ARG_ENABLE([cairo],
- AS_HELP_STRING([--disable-cairo], [Disable the use of Cairo]))
-AS_IF([test "x$enable_cairo" != "xno"],
-[
- AC_MSG_RESULT([yes])
- PKG_CHECK_MODULES([Cairo], [cairo >= 1.2.0],
- [
- have_cairo=true
- AC_DEFINE([HAVE_CAIRO], [1], [Define to 1 if Cairo is available])
- ], [
- have_cairo=false
- ])
-], [
- AC_MSG_RESULT([no])
-])
-
-
-AC_MSG_CHECKING([whether to use Pango])
-AC_ARG_ENABLE([pango],
- AS_HELP_STRING([--disable-pango], [Disable the use of Pango]))
-AS_IF([test "x$enable_pango" != "xno"],
-[
- AC_MSG_RESULT([yes])
- PKG_CHECK_MODULES([Pango], [pango >= 1.0.0],
- [
- have_pango=true
- AC_DEFINE([HAVE_PANGO], [1], [Define to 1 if Pango is available])
- ], [
- have_pango=false
- ])
- PKG_CHECK_MODULES([PangoCairo], [pangocairo],
- [
- have_pangocairo=true
- AC_DEFINE([HAVE_PANGOCAIRO], [1],
- [Define to 1 if PangoCairo is available])
- ], [
- have_pangocairo=false
- ])
-], [
- AC_MSG_RESULT([no])
-])
-
-
-have_gdk_pixbuf=false
-AC_MSG_CHECKING([whether to use GDK-pixbuf])
-AC_ARG_ENABLE([gdk-pixbuf], AS_HELP_STRING([--disable-gdk-pixbuf],
- [Disable the use of gdk-pixbuf]))
-AS_IF([test "x$enable_gdk_pixbuf" != "xno"],
-[
- AC_MSG_RESULT([yes])
-
- PKG_CHECK_MODULES([GDK_pixbuf_2], [gdk-pixbuf-2.0],
- [
- have_gdk_pixbuf=true
- ], [
- PKG_CHECK_MODULES([GDK_pixbuf], [gdk-pixbuf], [],
- [
- have_gdk_pixbuf=true
- ])
- ])
-], [
- AC_MSG_RESULT([no])
-])
-
-AS_IF([test "$have_gdk_pixbuf" != "false"],
-[
- AC_DEFINE([HAVE_GDK_PIXBUF], [1], [Define to 1 if gdk-pixbuf is available])
-])
-
-
-AC_CHECK_LIB([pthread], [sched_setaffinity], [
- AC_DEFINE([HAVE_CPU_AFFINITY], [1],
- [Define to 1 if sched_setaffinity is available.])
-])
-
-
-AC_CHECK_LIB([rt], [clock_gettime],
-[
- AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
- [Define to 1 if clock_gettime is available.])
- TIMER_LIBS="-lrt"
-], [
- AC_MSG_WARN([Falling back on gettimeofday().])
- AC_MSG_WARN([Time intervals may not be correct in certain circumstances.])
-])
-
-AC_ARG_WITH(fftw,
-[AS_HELP_STRING([--with-ffftw],
- [specify location of FFTW (instead of using pkg-config)])],
-[FFTW_CFLAGS="-I$withflag/include"
- FFTW_LIBS="-L$withval/lib -L$withval/lib64 -lfftw3"
- have_fftw=true],
-[PKG_CHECK_MODULES([FFTW], [fftw3],
-[
- have_fftw=true
-], [
- AC_MSG_WARN([asdf indexing wil not be available.])
- have_fftw=false
-])])
-AS_IF([test x$have_fftw = xtrue],
-[
- AC_DEFINE([HAVE_FFTW], [1], [Define to 1 if FFTW is available])
-])
-
-AX_WITH_CURSES
-
-dnl Conditionals...
-AM_CONDITIONAL([HAVE_OPENCL], test x$have_opencl = xtrue)
-
-AM_CONDITIONAL([BUILD_HDFSEE], test x$have_gdk_pixbuf = xtrue \
- -a "x$have_gtk" = "xtrue" \
- -a "x$have_cairo" = "xtrue")
-
-AM_CONDITIONAL([BUILD_EXPLORER], test "x$have_gtk" = "xtrue" \
- -a "x$have_cairo" = "xtrue")
-
-AM_CONDITIONAL([HAVE_CAIRO], test x$have_cairo = xtrue)
-
-AM_CONDITIONAL([HAVE_PANGOCAIRO], test x$have_pangocairo = xtrue)
-
-AM_CONDITIONAL([HAVE_PANGO], test x$have_pango = xtrue)
-
-AM_CONDITIONAL([HAVE_FFTW], test x$have_fftw = xtrue)
-
-gl_IGNORE_UNUSED_LIBRARIES
-
-
-MAIN_CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread"
-MAIN_CFLAGS="$MAIN_CFLAGS $GTK_CFLAGS $LIBTIFF_CFLAGS -D_GNU_SOURCE "
-MAIN_CFLAGS="$MAIN_CFLAGS $libPNG_CFLAGS $Cairo_CFLAGS $GDK_pixbuf_CFLAGS"
-MAIN_CFLAGS="$MAIN_CFLAGS $GDK_pixbuf_2_CFLAGS $FFTW_CFLAGS $Pango_CFLAGS"
-MAIN_CFLAGS="$MAIN_CFLAGS $PangoCairo_CFLAGS"
-AC_SUBST([MAIN_CFLAGS])
-
-LIBCRYSTFEL_CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $FFTW_CFLAGS $CBF_CFLAGS"
-AC_SUBST([LIBCRYSTFEL_CFLAGS])
-
-MAIN_LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -pthread"
-MAIN_LIBS="$MAIN_LIBS $LIBTIFF_LIBS $libPNG_LIBS $Cairo_LIBS $GDK_pixbuf_LIBS"
-MAIN_LIBS="$MAIN_LIBS $GDK_pixbuf_2_LIBS $TIMER_LIBS $FFTW_LIBS"
-MAIN_LIBS="$MAIN_LIBS $Pango_LIBS $PangoCairo_LIBS $LDFLAGS"
-AC_SUBST([MAIN_LIBS])
-
-LIBCRYSTFEL_LIBS="$LIBS $HDF5_LIBS $GSL_LIBS $FFTW_LIBS $CURSES_LIB $LDFLAGS"
-LIBCRYSTFEL_LIBS="$LIBCRYSTFEL_LIBS -pthread $CBF_LIBS"
-AC_SUBST([LIBCRYSTFEL_LIBS])
-
-GTK_DOC_CHECK([1.9],[--flavour no-tmpl])
-AC_CONFIG_MACRO_DIR(m4)
-
-HTML_DIR=${docdir}/reference/libcrystfel
-
-
-AC_CONFIG_FILES(Makefile lib/Makefile doc/reference/libcrystfel/Makefile libcrystfel/Makefile)
-AC_CONFIG_FILES(libcrystfel/crystfel.pc)
-AC_OUTPUT
diff --git a/doc/reference/libcrystfel/Makefile.am b/doc/reference/libcrystfel/Makefile.am
deleted file mode 100644
index e4f49b03..00000000
--- a/doc/reference/libcrystfel/Makefile.am
+++ /dev/null
@@ -1,102 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# We require automake 1.6 at least.
-AUTOMAKE_OPTIONS = 1.6
-
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=CrystFEL
-
-# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
-
-
-# The top-level SGML file. You can change this if you want to.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
-
-# Directories containing the source code, relative to $(srcdir).
-# gtk-doc will search all .c and .h files beneath these paths
-# for inline comments documenting functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk ../../../gdk
-DOC_SOURCE_DIR=../../../libcrystfel/src
-
-# Extra options to pass to gtkdoc-scangobj. Not normally needed.
-SCANGOBJ_OPTIONS=
-
-# Extra options to supply to gtkdoc-scan.
-# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
-MKDB_OPTIONS=--sgml-mode --output-format=xml
-
-# Extra options to supply to gtkdoc-mktmpl
-# e.g. MKTMPL_OPTIONS=--only-section-tmpl
-MKTMPL_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref. Not normally needed.
-# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
-FIXXREF_OPTIONS=
-
-# Used for dependencies. The docs will be rebuilt if any of these change.
-# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
-# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=$(top_srcdir)/libcrystfel/src/*.h
-CFILE_GLOB=$(top_srcdir)/libcrystfel/src/*.c
-
-# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
-# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
-EXTRA_HFILES=
-
-# Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=
-
-# Images to copy into HTML directory.
-# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
-HTML_IMAGES=
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files=
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files=
-
-# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-# Only needed if you are using gtkdoc-scangobj to dynamically query widget
-# signals and properties.
-# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
-# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=
-GTKDOC_LIBS=
-
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
-include $(top_srcdir)/gtk-doc.make
-
-# Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST +=
-
-# Files not to distribute
-# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
-# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
-#DISTCLEANFILES +=
-
-# Comment this out if you want your docs-status tested during 'make check'
-#if ENABLE_GTK_DOC
-#TESTS_ENVIRONMENT = cd $(srcsrc) &&
-#TESTS = $(GTKDOC_CHECK)
-#endif
-
--include $(top_srcdir)/git.mk
diff --git a/lib/.gitignore b/lib/.gitignore
deleted file mode 100644
index 37032a8a..00000000
--- a/lib/.gitignore
+++ /dev/null
@@ -1,18 +0,0 @@
-stddef.h
-string.h
-arg-nonnull.h
-c++defs.h
-warn-on-use.h
-libgnu.a
-.deps
-*.o
-*.lo
-fcntl.h
-pty.h
-stdlib.h
-stdalign.h
-unistd.h
-sys/ioctl.h
-sys/socket.h
-sys/types.h
-sys/uio.h
diff --git a/lib/Makefile.am b/lib/Makefile.am
deleted file mode 100644
index c1c32864..00000000
--- a/lib/Makefile.am
+++ /dev/null
@@ -1,886 +0,0 @@
-## DO NOT EDIT! GENERATED AUTOMATICALLY!
-## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This file 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 file. If not, see <http://www.gnu.org/licenses/>.
-#
-# 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=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl forkpty lib-ignore strndup
-
-AUTOMAKE_OPTIONS = 1.9.6 gnits
-
-SUBDIRS =
-noinst_HEADERS =
-noinst_LIBRARIES =
-noinst_LTLIBRARIES =
-EXTRA_DIST =
-BUILT_SOURCES =
-SUFFIXES =
-MOSTLYCLEANFILES = core *.stackdump
-MOSTLYCLEANDIRS =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-
-AM_CPPFLAGS =
-AM_CFLAGS =
-
-noinst_LTLIBRARIES += libgnu.la
-
-libgnu_la_SOURCES =
-libgnu_la_LIBADD = $(gl_LTLIBOBJS)
-libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
-EXTRA_libgnu_la_SOURCES =
-libgnu_la_LDFLAGS = $(AM_LDFLAGS)
-libgnu_la_LDFLAGS += -no-undefined
-libgnu_la_LDFLAGS += $(PTY_LIB)
-
-## begin gnulib module absolute-header
-
-# Use this preprocessor expression to decide whether #include_next works.
-# Do not rely on a 'configure'-time test for this, since the expression
-# might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
-
-## end gnulib module absolute-header
-
-## 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.
-if GL_GENERATE_ERRNO_H
-errno.h: errno.in.h $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_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 $@
-else
-errno.h: $(top_builddir)/config.status
- rm -f $@
-endif
-MOSTLYCLEANFILES += errno.h errno.h-t
-
-EXTRA_DIST += errno.in.h
-
-## end gnulib module errno
-
-## begin gnulib module fcntl-h
-
-BUILT_SOURCES += fcntl.h
-
-# We need the following in order to create <fcntl.h> when the system
-# doesn't have one that works with the given compiler.
-fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
- -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
- -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
- -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
- -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
- -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|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)/fcntl.in.h; \
- } > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += fcntl.h fcntl.h-t
-
-EXTRA_DIST += fcntl.in.h
-
-## end gnulib module fcntl-h
-
-## begin gnulib module fd-hook
-
-libgnu_la_SOURCES += fd-hook.c
-
-EXTRA_DIST += fd-hook.h
-
-## end gnulib module fd-hook
-
-## begin gnulib module forkpty
-
-
-EXTRA_DIST += forkpty.c
-
-EXTRA_libgnu_la_SOURCES += forkpty.c
-
-## end gnulib module forkpty
-
-## begin gnulib module ioctl
-
-
-EXTRA_DIST += ioctl.c w32sock.h
-
-EXTRA_libgnu_la_SOURCES += ioctl.c
-
-## end gnulib module ioctl
-
-## begin gnulib module login_tty
-
-
-EXTRA_DIST += login_tty.c
-
-EXTRA_libgnu_la_SOURCES += login_tty.c
-
-## end gnulib module login_tty
-
-## begin gnulib module msvc-inval
-
-
-EXTRA_DIST += msvc-inval.c msvc-inval.h
-
-EXTRA_libgnu_la_SOURCES += msvc-inval.c
-
-## end gnulib module msvc-inval
-
-## begin gnulib module msvc-nothrow
-
-
-EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h
-
-EXTRA_libgnu_la_SOURCES += msvc-nothrow.c
-
-## end gnulib module msvc-nothrow
-
-## begin gnulib module openpty
-
-
-EXTRA_DIST += openpty.c
-
-EXTRA_libgnu_la_SOURCES += openpty.c
-
-## end gnulib module openpty
-
-## begin gnulib module posix_openpt
-
-
-EXTRA_DIST += posix_openpt.c
-
-EXTRA_libgnu_la_SOURCES += posix_openpt.c
-
-## end gnulib module posix_openpt
-
-## begin gnulib module pty
-
-BUILT_SOURCES += pty.h
-
-# We need the following in order to create <pty.h> when the system
-# doesn't have one that works with the given compiler.
-pty.h: pty.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''HAVE_PTY_H''@|$(HAVE_PTY_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_PTY_H''@|$(NEXT_PTY_H)|g' \
- -e 's/@''GNULIB_FORKPTY''@/$(GNULIB_FORKPTY)/g' \
- -e 's/@''GNULIB_OPENPTY''@/$(GNULIB_OPENPTY)/g' \
- -e 's|@''HAVE_UTIL_H''@|$(HAVE_UTIL_H)|g' \
- -e 's|@''HAVE_LIBUTIL_H''@|$(HAVE_LIBUTIL_H)|g' \
- -e 's|@''HAVE_FORKPTY''@|$(HAVE_FORKPTY)|g' \
- -e 's|@''HAVE_OPENPTY''@|$(HAVE_OPENPTY)|g' \
- -e 's|@''REPLACE_FORKPTY''@|$(REPLACE_FORKPTY)|g' \
- -e 's|@''REPLACE_OPENPTY''@|$(REPLACE_OPENPTY)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/pty.in.h; \
- } > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += pty.h pty.h-t
-
-EXTRA_DIST += pty.in.h
-
-## end gnulib module pty
-
-## begin gnulib module snippet/_Noreturn
-
-# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all Makefile.am that
-# need it. This is ensured by the applicability 'all' defined above.
-
-_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
-
-## end gnulib module snippet/_Noreturn
-
-## begin gnulib module snippet/arg-nonnull
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += arg-nonnull.h
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
-# off.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
-
-ARG_NONNULL_H=arg-nonnull.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
-
-## end gnulib module snippet/arg-nonnull
-
-## begin gnulib module snippet/c++defs
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += c++defs.h
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/snippet/c++defs.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
-
-CXXDEFS_H=c++defs.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
-
-## end gnulib module snippet/c++defs
-
-## begin gnulib module snippet/warn-on-use
-
-BUILT_SOURCES += warn-on-use.h
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
-# off.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
-
-WARN_ON_USE_H=warn-on-use.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
-
-## end gnulib module snippet/warn-on-use
-
-## begin gnulib module stdalign
-
-BUILT_SOURCES += $(STDALIGN_H)
-
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDALIGN_H
-stdalign.h: stdalign.in.h $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/stdalign.in.h; \
- } > $@-t && \
- mv $@-t $@
-else
-stdalign.h: $(top_builddir)/config.status
- rm -f $@
-endif
-MOSTLYCLEANFILES += stdalign.h stdalign.h-t
-
-EXTRA_DIST += stdalign.in.h
-
-## end gnulib module stdalign
-
-## 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.
-if GL_GENERATE_STDDEF_H
-stddef.h: stddef.in.h $(top_builddir)/config.status
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_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 $@
-else
-stddef.h: $(top_builddir)/config.status
- rm -f $@
-endif
-MOSTLYCLEANFILES += stddef.h stddef.h-t
-
-EXTRA_DIST += stddef.in.h
-
-## end gnulib module stddef
-
-## 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 $(top_builddir)/config.status $(CXXDEFS_H) \
- $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_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_MBTOWC''@/$(GNULIB_MBTOWC)/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_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
- -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
- -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
- -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/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_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/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/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
- < $(srcdir)/stdlib.in.h | \
- sed -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_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
- -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
- -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
- -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|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_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
- -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_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_DECL_UNSETENV''@|$(HAVE_DECL_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_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
- -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
- -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
- -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
- -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
- -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|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 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _Noreturn/r $(_NORETURN_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 += stdlib.h stdlib.h-t
-
-EXTRA_DIST += stdlib.in.h
-
-## end gnulib module stdlib
-
-## 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 $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/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_FFSL''@|$(HAVE_FFSL)|g' \
- -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
- -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_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|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 strndup
-
-
-EXTRA_DIST += strndup.c
-
-EXTRA_libgnu_la_SOURCES += strndup.c
-
-## end gnulib module strndup
-
-## begin gnulib module strnlen
-
-
-EXTRA_DIST += strnlen.c
-
-EXTRA_libgnu_la_SOURCES += strnlen.c
-
-## end gnulib module strnlen
-
-## begin gnulib module sys_ioctl
-
-BUILT_SOURCES += sys/ioctl.h
-
-# We need the following in order to create <sys/ioctl.h> when the system
-# does not have a complete one.
-sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_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|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_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_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \
- -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \
- -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \
- -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
- -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/sys_ioctl.in.h; \
- } > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t
-MOSTLYCLEANDIRS += sys
-
-EXTRA_DIST += sys_ioctl.in.h
-
-## end gnulib module sys_ioctl
-
-## begin gnulib module sys_socket
-
-BUILT_SOURCES += sys/socket.h
-libgnu_la_SOURCES += sys_socket.c
-
-# 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 $(top_builddir)/config.status $(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|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_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_types
-
-BUILT_SOURCES += sys/types.h
-
-# We need the following in order to create <sys/types.h> when the system
-# doesn't have one that works with the given compiler.
-sys/types.h: sys_types.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) sys
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
- -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
- < $(srcdir)/sys_types.in.h; \
- } > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += sys/types.h sys/types.h-t
-
-EXTRA_DIST += sys_types.in.h
-
-## end gnulib module sys_types
-
-## begin gnulib module sys_uio
-
-BUILT_SOURCES += sys/uio.h
-
-# We need the following in order to create <sys/uio.h> when the system
-# doesn't have one that works with the given compiler.
-sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) sys
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \
- -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \
- < $(srcdir)/sys_uio.in.h; \
- } > $@-t && \
- mv -f $@-t $@
-MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t
-MOSTLYCLEANDIRS += sys
-
-EXTRA_DIST += sys_uio.in.h
-
-## end gnulib module sys_uio
-
-## begin gnulib module unistd
-
-BUILT_SOURCES += unistd.h
-libgnu_la_SOURCES += unistd.c
-
-# 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 $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -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|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
- -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
- -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/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_FDATASYNC''@/$(GNULIB_FDATASYNC)/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_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
- -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/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_PIPE''@/$(GNULIB_PIPE)/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_READ''@/$(GNULIB_READ)/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_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/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''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
- -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/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_FDATASYNC''@|$(HAVE_FDATASYNC)|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_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|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_PIPE''@|$(HAVE_PIPE)|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_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|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_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
- -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
- -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
- -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
- -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
- -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
- -e 's|@''HAVE_DECL_GETLOGIN_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_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
- -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
- -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
- -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
- | \
- sed -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_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
- -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
- -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
- -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
- -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
- -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
- -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
- -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|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_READ''@|$(REPLACE_READ)|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
-
-
-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/errno.in.h b/lib/errno.in.h
deleted file mode 100644
index 832afc8f..00000000
--- a/lib/errno.in.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/* A POSIX-like <errno.h>.
-
- Copyright (C) 2008-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _@GUARD_PREFIX@_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 _@GUARD_PREFIX@_ERRNO_H
-#define _@GUARD_PREFIX@_ERRNO_H
-
-
-/* On native Windows platforms, many macros are not defined. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-
-/* These are the same values as defined by MSVC 10, for interoperability. */
-
-# ifndef ENOMSG
-# define ENOMSG 122
-# define GNULIB_defined_ENOMSG 1
-# endif
-
-# ifndef EIDRM
-# define EIDRM 111
-# define GNULIB_defined_EIDRM 1
-# endif
-
-# ifndef ENOLINK
-# define ENOLINK 121
-# define GNULIB_defined_ENOLINK 1
-# endif
-
-# ifndef EPROTO
-# define EPROTO 134
-# define GNULIB_defined_EPROTO 1
-# endif
-
-# ifndef EBADMSG
-# define EBADMSG 104
-# define GNULIB_defined_EBADMSG 1
-# endif
-
-# ifndef EOVERFLOW
-# define EOVERFLOW 132
-# define GNULIB_defined_EOVERFLOW 1
-# endif
-
-# ifndef ENOTSUP
-# define ENOTSUP 129
-# define GNULIB_defined_ENOTSUP 1
-# endif
-
-# ifndef ENETRESET
-# define ENETRESET 117
-# define GNULIB_defined_ENETRESET 1
-# endif
-
-# ifndef ECONNABORTED
-# define ECONNABORTED 106
-# define GNULIB_defined_ECONNABORTED 1
-# endif
-
-# ifndef ECANCELED
-# define ECANCELED 105
-# define GNULIB_defined_ECANCELED 1
-# endif
-
-# ifndef EOWNERDEAD
-# define EOWNERDEAD 133
-# define GNULIB_defined_EOWNERDEAD 1
-# endif
-
-# ifndef ENOTRECOVERABLE
-# define ENOTRECOVERABLE 127
-# define GNULIB_defined_ENOTRECOVERABLE 1
-# endif
-
-# ifndef EINPROGRESS
-# define EINPROGRESS 112
-# define EALREADY 103
-# define ENOTSOCK 128
-# define EDESTADDRREQ 109
-# define EMSGSIZE 115
-# define EPROTOTYPE 136
-# define ENOPROTOOPT 123
-# define EPROTONOSUPPORT 135
-# define EOPNOTSUPP 130
-# define EAFNOSUPPORT 102
-# define EADDRINUSE 100
-# define EADDRNOTAVAIL 101
-# define ENETDOWN 116
-# define ENETUNREACH 118
-# define ECONNRESET 108
-# define ENOBUFS 119
-# define EISCONN 113
-# define ENOTCONN 126
-# define ETIMEDOUT 138
-# define ECONNREFUSED 107
-# define ELOOP 114
-# define EHOSTUNREACH 110
-# define EWOULDBLOCK 140
-# define GNULIB_defined_ESOCK 1
-# endif
-
-# ifndef ETXTBSY
-# define ETXTBSY 139
-# define ENODATA 120 /* not required by POSIX */
-# define ENOSR 124 /* not required by POSIX */
-# define ENOSTR 125 /* not required by POSIX */
-# define ETIME 137 /* not required by POSIX */
-# define EOTHER 131 /* not required by POSIX */
-# define GNULIB_defined_ESTREAMS 1
-# endif
-
-/* These are intentionally the same values as the WSA* error numbers, defined
- in <winsock2.h>. */
-# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
-# define EPFNOSUPPORT 10046 /* not required by POSIX */
-# define ESHUTDOWN 10058 /* not required by POSIX */
-# define ETOOMANYREFS 10059 /* not required by POSIX */
-# define EHOSTDOWN 10064 /* not required by POSIX */
-# 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_EWINSOCK 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 ENETRESET
-# define ENETRESET 2011
-# define GNULIB_defined_ENETRESET 1
-# endif
-
-# ifndef ECONNABORTED
-# define ECONNABORTED 2012
-# define GNULIB_defined_ECONNABORTED 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
-
-/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
- defined. */
-
-# ifndef EOWNERDEAD
-# if defined __sun
- /* Use the same values as defined for Solaris >= 8, for
- interoperability. */
-# define EOWNERDEAD 58
-# define ENOTRECOVERABLE 59
-# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* We have a conflict here: pthreads-win32 defines these values
- differently than MSVC 10. It's hairy to decide which one to use. */
-# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
- /* Use the same values as defined by pthreads-win32, for
- interoperability. */
-# define EOWNERDEAD 43
-# define ENOTRECOVERABLE 44
-# else
- /* Use the same values as defined by MSVC 10, for
- interoperability. */
-# define EOWNERDEAD 133
-# define ENOTRECOVERABLE 127
-# endif
-# else
-# define EOWNERDEAD 2013
-# define ENOTRECOVERABLE 2014
-# endif
-# define GNULIB_defined_EOWNERDEAD 1
-# define GNULIB_defined_ENOTRECOVERABLE 1
-# endif
-
-# ifndef EILSEQ
-# define EILSEQ 2015
-# define GNULIB_defined_EILSEQ 1
-# endif
-
-#endif /* _@GUARD_PREFIX@_ERRNO_H */
-#endif /* _@GUARD_PREFIX@_ERRNO_H */
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
deleted file mode 100644
index e23b4b2b..00000000
--- a/lib/fcntl.in.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/* Like <fcntl.h>, but with non-working flags defined to 0.
-
- Copyright (C) 2006-2014 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 */
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-#if defined __need_system_fcntl_h
-/* Special invocation convention. */
-
-/* Needed before <sys/stat.h>.
- May also define off_t to a 64-bit type on native Windows. */
-#include <sys/types.h>
-/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
- <fcntl.h>. On glibc systems, we would like to avoid namespace pollution.
- But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an
- extern "C" { ... } block, which leads to errors in C++ mode with the
- overridden <sys/stat.h> from gnulib. These errors are known to be gone
- with g++ version >= 4.3. */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
-# include <sys/stat.h>
-#endif
-#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
-
-#else
-/* Normal invocation convention. */
-
-#ifndef _@GUARD_PREFIX@_FCNTL_H
-
-/* Needed before <sys/stat.h>.
- May also define off_t to a 64-bit type on native Windows. */
-#include <sys/types.h>
-/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
- <fcntl.h>. On glibc systems, we would like to avoid namespace pollution.
- But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an
- extern "C" { ... } block, which leads to errors in C++ mode with the
- overridden <sys/stat.h> from gnulib. These errors are known to be gone
- with g++ version >= 4.3. */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
-# include <sys/stat.h>
-#endif
-/* The include_next requires a split double-inclusion guard. */
-#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
-
-#ifndef _@GUARD_PREFIX@_FCNTL_H
-#define _@GUARD_PREFIX@_FCNTL_H
-
-#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
-# include <unistd.h>
-#endif
-
-/* Native Windows platforms declare open(), creat() in <io.h>. */
-#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-# include <io.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. */
-
-
-/* Declare overridden functions. */
-
-#if @GNULIB_FCNTL@
-# if @REPLACE_FCNTL@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef fcntl
-# define fcntl rpl_fcntl
-# endif
-_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
-_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
-# else
-# if !@HAVE_FCNTL@
-_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
-# endif
-_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
-# endif
-_GL_CXXALIASWARN (fcntl);
-#elif defined GNULIB_POSIXCHECK
-# undef fcntl
-# if HAVE_RAW_DECL_FCNTL
-_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
- "use gnulib module fcntl for portability");
-# endif
-#endif
-
-#if @GNULIB_OPEN@
-# if @REPLACE_OPEN@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef open
-# define open rpl_open
-# endif
-_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
- _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
-# else
-_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
-# endif
-/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a
- default argument. _GL_CXXALIASWARN does not work in this case. */
-# if !defined __hpux
-_GL_CXXALIASWARN (open);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef open
-/* Assume open is always declared. */
-_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
- "use gnulib module open for portability");
-#endif
-
-#if @GNULIB_OPENAT@
-# if @REPLACE_OPENAT@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef openat
-# define openat rpl_openat
-# endif
-_GL_FUNCDECL_RPL (openat, int,
- (int fd, char const *file, int flags, /* mode_t mode */ ...)
- _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (openat, int,
- (int fd, char const *file, int flags, /* mode_t mode */ ...));
-# else
-# if !@HAVE_OPENAT@
-_GL_FUNCDECL_SYS (openat, int,
- (int fd, char const *file, int flags, /* mode_t mode */ ...)
- _GL_ARG_NONNULL ((2)));
-# endif
-_GL_CXXALIAS_SYS (openat, int,
- (int fd, char const *file, int flags, /* mode_t mode */ ...));
-# endif
-_GL_CXXALIASWARN (openat);
-#elif defined GNULIB_POSIXCHECK
-# undef openat
-# if HAVE_RAW_DECL_OPENAT
-_GL_WARN_ON_USE (openat, "openat is not portable - "
- "use gnulib module openat for portability");
-# endif
-#endif
-
-
-/* Fix up the FD_* macros, only known to be missing on mingw. */
-
-#ifndef FD_CLOEXEC
-# define FD_CLOEXEC 1
-#endif
-
-/* Fix up the supported F_* macros. Intentionally leave other F_*
- macros undefined. Only known to be missing on mingw. */
-
-#ifndef F_DUPFD_CLOEXEC
-# define F_DUPFD_CLOEXEC 0x40000000
-/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */
-# define GNULIB_defined_F_DUPFD_CLOEXEC 1
-#else
-# define GNULIB_defined_F_DUPFD_CLOEXEC 0
-#endif
-
-#ifndef F_DUPFD
-# define F_DUPFD 1
-#endif
-
-#ifndef F_GETFD
-# define F_GETFD 2
-#endif
-
-/* Fix up the O_* macros. */
-
-/* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT
- to values outside 'int' range, so omit these misdefinitions.
- But avoid namespace pollution on non-AIX systems. */
-#ifdef _AIX
-# include <limits.h>
-# if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX)
-# undef O_CLOEXEC
-# endif
-# if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX)
-# undef O_NOFOLLOW
-# endif
-# if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX)
-# undef O_TTY_INIT
-# endif
-#endif
-
-#if !defined O_DIRECT && defined O_DIRECTIO
-/* Tru64 spells it 'O_DIRECTIO'. */
-# define O_DIRECT O_DIRECTIO
-#endif
-
-#if !defined O_CLOEXEC && defined O_NOINHERIT
-/* Mingw spells it 'O_NOINHERIT'. */
-# define O_CLOEXEC O_NOINHERIT
-#endif
-
-#ifndef O_CLOEXEC
-# define O_CLOEXEC 0
-#endif
-
-#ifndef O_DIRECT
-# define O_DIRECT 0
-#endif
-
-#ifndef O_DIRECTORY
-# define O_DIRECTORY 0
-#endif
-
-#ifndef O_DSYNC
-# define O_DSYNC 0
-#endif
-
-#ifndef O_EXEC
-# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
-#endif
-
-#ifndef O_IGNORE_CTTY
-# define O_IGNORE_CTTY 0
-#endif
-
-#ifndef O_NDELAY
-# define O_NDELAY 0
-#endif
-
-#ifndef O_NOATIME
-# define O_NOATIME 0
-#endif
-
-#ifndef O_NONBLOCK
-# define O_NONBLOCK O_NDELAY
-#endif
-
-/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero
- value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY
- or to 0 as fallback. */
-#if @GNULIB_NONBLOCKING@
-# if O_NONBLOCK
-# define GNULIB_defined_O_NONBLOCK 0
-# else
-# define GNULIB_defined_O_NONBLOCK 1
-# undef O_NONBLOCK
-# define O_NONBLOCK 0x40000000
-# endif
-#endif
-
-#ifndef O_NOCTTY
-# define O_NOCTTY 0
-#endif
-
-#ifndef O_NOFOLLOW
-# define O_NOFOLLOW 0
-#endif
-
-#ifndef O_NOLINK
-# define O_NOLINK 0
-#endif
-
-#ifndef O_NOLINKS
-# define O_NOLINKS 0
-#endif
-
-#ifndef O_NOTRANS
-# define O_NOTRANS 0
-#endif
-
-#ifndef O_RSYNC
-# define O_RSYNC 0
-#endif
-
-#ifndef O_SEARCH
-# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */
-#endif
-
-#ifndef O_SYNC
-# define O_SYNC 0
-#endif
-
-#ifndef O_TTY_INIT
-# define O_TTY_INIT 0
-#endif
-
-#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
-# undef O_ACCMODE
-# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
-#endif
-
-/* For systems that distinguish between text and binary I/O.
- O_BINARY is usually declared in fcntl.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
-
-#ifndef O_BINARY
-# define O_BINARY 0
-# define O_TEXT 0
-#endif
-
-/* Fix up the AT_* macros. */
-
-/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its
- value exceeds INT_MAX, so its use as an int doesn't conform to the
- C standard, and GCC and Sun C complain in some cases. If the bug
- is present, undef AT_FDCWD here, so it can be redefined below. */
-#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
-# undef AT_FDCWD
-#endif
-
-/* Use the same bit pattern as Solaris 9, but with the proper
- signedness. The bit pattern is important, in case this actually is
- Solaris with the above workaround. */
-#ifndef AT_FDCWD
-# define AT_FDCWD (-3041965)
-#endif
-
-/* Use the same values as Solaris 9. This shouldn't matter, but
- there's no real reason to differ. */
-#ifndef AT_SYMLINK_NOFOLLOW
-# define AT_SYMLINK_NOFOLLOW 4096
-#endif
-
-#ifndef AT_REMOVEDIR
-# define AT_REMOVEDIR 1
-#endif
-
-/* Solaris 9 lacks these two, so just pick unique values. */
-#ifndef AT_SYMLINK_FOLLOW
-# define AT_SYMLINK_FOLLOW 2
-#endif
-
-#ifndef AT_EACCESS
-# define AT_EACCESS 4
-#endif
-
-
-#endif /* _@GUARD_PREFIX@_FCNTL_H */
-#endif /* _@GUARD_PREFIX@_FCNTL_H */
-#endif
diff --git a/lib/fd-hook.c b/lib/fd-hook.c
deleted file mode 100644
index 0171cc60..00000000
--- a/lib/fd-hook.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2014 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 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>
-
-/* Specification. */
-#include "fd-hook.h"
-
-#include <stdlib.h>
-
-/* 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 fd_hook anchor = { &anchor, &anchor, NULL, NULL };
-
-int
-execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary,
- int fd)
-{
- if (remaining_list == &anchor)
- /* End of list reached. */
- return primary (fd);
- else
- return remaining_list->private_close_fn (remaining_list->private_next,
- primary, fd);
-}
-
-int
-execute_all_close_hooks (gl_close_fn primary, int fd)
-{
- return execute_close_hooks (anchor.private_next, primary, fd);
-}
-
-int
-execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary,
- int fd, int request, void *arg)
-{
- if (remaining_list == &anchor)
- /* End of list reached. */
- return primary (fd, request, arg);
- else
- return remaining_list->private_ioctl_fn (remaining_list->private_next,
- primary, fd, request, arg);
-}
-
-int
-execute_all_ioctl_hooks (gl_ioctl_fn primary,
- int fd, int request, void *arg)
-{
- return execute_ioctl_hooks (anchor.private_next, primary, fd, request, arg);
-}
-
-void
-register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link)
-{
- if (close_hook == NULL)
- close_hook = execute_close_hooks;
- if (ioctl_hook == NULL)
- ioctl_hook = execute_ioctl_hooks;
-
- 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_close_fn = close_hook;
- link->private_ioctl_fn = ioctl_hook;
- anchor.private_next->private_prev = link;
- anchor.private_next = link;
- }
- else
- {
- /* The link is already in use. */
- if (link->private_close_fn != close_hook
- || link->private_ioctl_fn != ioctl_hook)
- abort ();
- }
-}
-
-void
-unregister_fd_hook (struct fd_hook *link)
-{
- struct fd_hook *next = link->private_next;
- struct fd_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_close_fn = NULL;
- link->private_ioctl_fn = NULL;
- }
-}
-
-#endif
diff --git a/lib/fd-hook.h b/lib/fd-hook.h
deleted file mode 100644
index 1aa264eb..00000000
--- a/lib/fd-hook.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2014 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 FD_HOOK_H
-#define FD_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
-
-
-/* Type of function that closes FD. */
-typedef int (*gl_close_fn) (int fd);
-
-/* Type of function that applies a control request to FD. */
-typedef int (*gl_ioctl_fn) (int fd, int request, void *arg);
-
-/* An element of the list of file descriptor hooks.
- In CLOS (Common Lisp Object System) speak, it consists of an "around"
- method for the close() function and an "around" method for the ioctl()
- function.
- The fields of this structure are considered private. */
-struct fd_hook
-{
- /* Doubly linked list. */
- struct fd_hook *private_next;
- struct fd_hook *private_prev;
- /* Function that treats the types of FD that it knows about and calls
- execute_close_hooks (REMAINING_LIST, PRIMARY, FD) as a fallback. */
- int (*private_close_fn) (const struct fd_hook *remaining_list,
- gl_close_fn primary,
- int fd);
- /* Function that treats the types of FD that it knows about and calls
- execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) as a
- fallback. */
- int (*private_ioctl_fn) (const struct fd_hook *remaining_list,
- gl_ioctl_fn primary,
- int fd, int request, void *arg);
-};
-
-/* This type of function closes FD, applying special knowledge for the FD
- types it knows about, and calls
- execute_close_hooks (REMAINING_LIST, PRIMARY, FD)
- for the other FD types.
- In CLOS speak, REMAINING_LIST is the remaining list of "around" methods,
- and PRIMARY is the "primary" method for close(). */
-typedef int (*close_hook_fn) (const struct fd_hook *remaining_list,
- gl_close_fn primary,
- int fd);
-
-/* Execute the close hooks in REMAINING_LIST, with PRIMARY as "primary" method.
- Return 0 or -1, like close() would do. */
-extern int execute_close_hooks (const struct fd_hook *remaining_list,
- gl_close_fn primary,
- int fd);
-
-/* Execute all close hooks, with PRIMARY as "primary" method.
- Return 0 or -1, like close() would do. */
-extern int execute_all_close_hooks (gl_close_fn primary, int fd);
-
-/* This type of function applies a control request to FD, applying special
- knowledge for the FD types it knows about, and calls
- execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG)
- for the other FD types.
- In CLOS speak, REMAINING_LIST is the remaining list of "around" methods,
- and PRIMARY is the "primary" method for ioctl(). */
-typedef int (*ioctl_hook_fn) (const struct fd_hook *remaining_list,
- gl_ioctl_fn primary,
- int fd, int request, void *arg);
-
-/* Execute the ioctl hooks in REMAINING_LIST, with PRIMARY as "primary" method.
- Return 0 or -1, like ioctl() would do. */
-extern int execute_ioctl_hooks (const struct fd_hook *remaining_list,
- gl_ioctl_fn primary,
- int fd, int request, void *arg);
-
-/* Execute all ioctl hooks, with PRIMARY as "primary" method.
- Return 0 or -1, like ioctl() would do. */
-extern int execute_all_ioctl_hooks (gl_ioctl_fn primary,
- int fd, int request, void *arg);
-
-/* Add a function pair to the list of file descriptor hooks.
- CLOSE_HOOK and IOCTL_HOOK may be NULL, indicating no change.
- The LINK variable points to a piece of memory which is guaranteed to be
- accessible until the corresponding call to unregister_fd_hook. */
-extern void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook,
- struct fd_hook *link);
-
-/* Removes a hook from the list of file descriptor hooks. */
-extern void unregister_fd_hook (struct fd_hook *link);
-
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* FD_HOOK_H */
diff --git a/lib/forkpty.c b/lib/forkpty.c
deleted file mode 100644
index e8fe80e5..00000000
--- a/lib/forkpty.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Fork a child process attached to the slave of a pseudo-terminal.
- Copyright (C) 2010-2014 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>
-
-/* Specification. */
-#include <pty.h>
-
-#if HAVE_FORKPTY
-
-/* Provide a wrapper with the prototype of glibc-2.8 and newer. */
-# undef forkpty
-int
-rpl_forkpty (int *amaster, char *name, struct termios const *termp,
- struct winsize const *winp)
-{
- /* Cast away const, for implementations with weaker prototypes. */
- return forkpty (amaster, name, (struct termios *) termp,
- (struct winsize *) winp);
-}
-
-#else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, mingw */
-
-# include <pty.h>
-# include <unistd.h>
-
-extern int login_tty (int slave_fd);
-
-int
-forkpty (int *amaster, char *name,
- const struct termios *termp, const struct winsize *winp)
-{
- int master, slave, pid;
-
- if (openpty (&master, &slave, name, termp, winp) == -1)
- return -1;
-
- switch (pid = fork ())
- {
- case -1:
- close (master);
- close (slave);
- return -1;
-
- case 0:
- /* Child. */
- close (master);
- if (login_tty (slave))
- _exit (1);
- return 0;
-
- default:
- /* Parent. */
- *amaster = master;
- close (slave);
- return pid;
- }
-}
-
-#endif
diff --git a/lib/ioctl.c b/lib/ioctl.c
deleted file mode 100644
index 89afb4ea..00000000
--- a/lib/ioctl.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ioctl.c --- wrappers for Windows ioctl function
-
- Copyright (C) 2008-2014 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 Paolo Bonzini */
-
-#include <config.h>
-
-#include <sys/ioctl.h>
-
-#include <stdarg.h>
-
-#if HAVE_IOCTL
-
-/* Provide a wrapper with the POSIX prototype. */
-# undef ioctl
-int
-rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
-{
- void *buf;
- va_list args;
-
- va_start (args, request);
- buf = va_arg (args, void *);
- va_end (args);
-
- /* Cast 'request' so that when the system's ioctl function takes a 64-bit
- request argument, the value gets zero-extended, not sign-extended. */
- return ioctl (fd, (unsigned int) request, buf);
-}
-
-#else /* mingw */
-
-# include <errno.h>
-
-/* Get HANDLE. */
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-
-# include "fd-hook.h"
-/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
-
-static int
-primary_ioctl (int fd, int request, void *arg)
-{
- /* We don't support FIONBIO on pipes here. If you want to make pipe
- fds non-blocking, use the gnulib 'nonblocking' module, until
- gnulib implements fcntl F_GETFL / F_SETFL with O_NONBLOCK. */
-
- if ((HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE)
- errno = ENOSYS;
- else
- errno = EBADF;
- return -1;
-}
-
-int
-ioctl (int fd, int request, ... /* {void *,char *} arg */)
-{
- void *arg;
- va_list args;
-
- va_start (args, request);
- arg = va_arg (args, void *);
- va_end (args);
-
-# if WINDOWS_SOCKETS
- return execute_all_ioctl_hooks (primary_ioctl, fd, request, arg);
-# else
- return primary_ioctl (fd, request, arg);
-# endif
-}
-
-#endif
diff --git a/lib/login_tty.c b/lib/login_tty.c
deleted file mode 100644
index e07f1607..00000000
--- a/lib/login_tty.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Assign a given terminal as controlling terminal and as standard input,
- standard output, standard error of the current process.
- Copyright (C) 2010-2014 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>
-
-/* Currently no specification header. */
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-int
-login_tty (int slave_fd)
-{
- int i;
-
- /* Create a new session. */
- setsid ();
-
- /* Make fd the controlling terminal for the current process.
- On BSD and OSF/1: There is ioctl TIOCSCTTY for this purpose.
- On Solaris:
- A terminal becomes the controlling terminal of a session
- if it is being open()ed, at a moment when
- 1. it is not already the controlling terminal of some session, and
- 2. the process that open()s it is a session leader that does not have
- a controlling terminal.
- We assume condition 1, try to ensure condition 2, and then open() it.
- */
- for (i = 0; i < 3; i++)
- if (i != slave_fd)
- close (i);
-#ifdef TIOCSCTTY
- if (ioctl (slave_fd, TIOCSCTTY, NULL) < 0)
- return -1;
-#else
- {
- char *slave_name;
- int dummy_fd;
-
- slave_name = ttyname (slave_fd);
- if (slave_name == NULL)
- return -1;
- dummy_fd = open (slave_name, O_RDWR);
- if (dummy_fd < 0)
- return -1;
- close (dummy_fd);
- }
-#endif
-
- /* Assign fd to the standard input, standard output, and standard error of
- the current process. */
- for (i = 0; i < 3; i++)
- if (slave_fd != i)
- if (dup2 (slave_fd, i) < 0)
- return -1;
- if (slave_fd >= 3)
- close (slave_fd);
-
- return 0;
-}
diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c
deleted file mode 100644
index f83827fb..00000000
--- a/lib/msvc-inval.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-/* Specification. */
-#include "msvc-inval.h"
-
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
- && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING)
-
-/* Get _invalid_parameter_handler type and _set_invalid_parameter_handler
- declaration. */
-# include <stdlib.h>
-
-# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
-
-static void __cdecl
-gl_msvc_invalid_parameter_handler (const wchar_t *expression,
- const wchar_t *function,
- const wchar_t *file,
- unsigned int line,
- uintptr_t dummy)
-{
-}
-
-# else
-
-/* Get declarations of the native Windows API functions. */
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-
-# if defined _MSC_VER
-
-static void __cdecl
-gl_msvc_invalid_parameter_handler (const wchar_t *expression,
- const wchar_t *function,
- const wchar_t *file,
- unsigned int line,
- uintptr_t dummy)
-{
- RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
-}
-
-# else
-
-/* An index to thread-local storage. */
-static DWORD tls_index;
-static int tls_initialized /* = 0 */;
-
-/* Used as a fallback only. */
-static struct gl_msvc_inval_per_thread not_per_thread;
-
-struct gl_msvc_inval_per_thread *
-gl_msvc_inval_current (void)
-{
- if (!tls_initialized)
- {
- tls_index = TlsAlloc ();
- tls_initialized = 1;
- }
- if (tls_index == TLS_OUT_OF_INDEXES)
- /* TlsAlloc had failed. */
- return &not_per_thread;
- else
- {
- struct gl_msvc_inval_per_thread *pointer =
- (struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index);
- if (pointer == NULL)
- {
- /* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */
- pointer =
- (struct gl_msvc_inval_per_thread *)
- malloc (sizeof (struct gl_msvc_inval_per_thread));
- if (pointer == NULL)
- /* Could not allocate memory. Use the global storage. */
- pointer = &not_per_thread;
- TlsSetValue (tls_index, pointer);
- }
- return pointer;
- }
-}
-
-static void __cdecl
-gl_msvc_invalid_parameter_handler (const wchar_t *expression,
- const wchar_t *function,
- const wchar_t *file,
- unsigned int line,
- uintptr_t dummy)
-{
- struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current ();
- if (current->restart_valid)
- longjmp (current->restart, 1);
- else
- /* An invalid parameter notification from outside the gnulib code.
- Give the caller a chance to intervene. */
- RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
-}
-
-# endif
-
-# endif
-
-static int gl_msvc_inval_initialized /* = 0 */;
-
-void
-gl_msvc_inval_ensure_handler (void)
-{
- if (gl_msvc_inval_initialized == 0)
- {
- _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler);
- gl_msvc_inval_initialized = 1;
- }
-}
-
-#endif
diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h
deleted file mode 100644
index a0ef540f..00000000
--- a/lib/msvc-inval.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _MSVC_INVAL_H
-#define _MSVC_INVAL_H
-
-/* With MSVC runtime libraries with the "invalid parameter handler" concept,
- functions like fprintf(), dup2(), or close() crash when the caller passes
- an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF)
- instead.
- This file defines macros that turn such an invalid parameter notification
- into a non-local exit. An error code can then be produced at the target
- of this exit. You can thus write code like
-
- TRY_MSVC_INVAL
- {
- <Code that can trigger an invalid parameter notification
- but does not do 'return', 'break', 'continue', nor 'goto'.>
- }
- CATCH_MSVC_INVAL
- {
- <Code that handles an invalid parameter notification
- but does not do 'return', 'break', 'continue', nor 'goto'.>
- }
- DONE_MSVC_INVAL;
-
- This entire block expands to a single statement.
-
- The handling of invalid parameters can be done in three ways:
-
- * The default way, which is reasonable for programs (not libraries):
- AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING])
-
- * The way for libraries that make "hairy" calls (like close(-1), or
- fclose(fp) where fileno(fp) is closed, or simply getdtablesize()):
- AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING])
-
- * The way for libraries that make no "hairy" calls:
- AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING])
- */
-
-#define DEFAULT_HANDLING 0
-#define HAIRY_LIBRARY_HANDLING 1
-#define SANE_LIBRARY_HANDLING 2
-
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
- && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING)
-/* A native Windows platform with the "invalid parameter handler" concept,
- and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */
-
-# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
-/* Default handling. */
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/* Ensure that the invalid parameter handler in installed that just returns.
- Because we assume no other part of the program installs a different
- invalid parameter handler, this solution is multithread-safe. */
-extern void gl_msvc_inval_ensure_handler (void);
-
-# ifdef __cplusplus
-}
-# endif
-
-# define TRY_MSVC_INVAL \
- do \
- { \
- gl_msvc_inval_ensure_handler (); \
- if (1)
-# define CATCH_MSVC_INVAL \
- else
-# define DONE_MSVC_INVAL \
- } \
- while (0)
-
-# else
-/* Handling for hairy libraries. */
-
-# include <excpt.h>
-
-/* Gnulib can define its own status codes, as described in the page
- "Raising Software Exceptions" on microsoft.com
- <http://msdn.microsoft.com/en-us/library/het71c37.aspx>.
- Our status codes are composed of
- - 0xE0000000, mandatory for all user-defined status codes,
- - 0x474E550, a API identifier ("GNU"),
- - 0, 1, 2, ..., used to distinguish different status codes from the
- same API. */
-# define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0)
-
-# if defined _MSC_VER
-/* A compiler that supports __try/__except, as described in the page
- "try-except statement" on microsoft.com
- <http://msdn.microsoft.com/en-us/library/s58ftw19.aspx>.
- With __try/__except, we can use the multithread-safe exception handling. */
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/* Ensure that the invalid parameter handler in installed that raises a
- software exception with code STATUS_GNULIB_INVALID_PARAMETER.
- Because we assume no other part of the program installs a different
- invalid parameter handler, this solution is multithread-safe. */
-extern void gl_msvc_inval_ensure_handler (void);
-
-# ifdef __cplusplus
-}
-# endif
-
-# define TRY_MSVC_INVAL \
- do \
- { \
- gl_msvc_inval_ensure_handler (); \
- __try
-# define CATCH_MSVC_INVAL \
- __except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \
- ? EXCEPTION_EXECUTE_HANDLER \
- : EXCEPTION_CONTINUE_SEARCH)
-# define DONE_MSVC_INVAL \
- } \
- while (0)
-
-# else
-/* Any compiler.
- We can only use setjmp/longjmp. */
-
-# include <setjmp.h>
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-struct gl_msvc_inval_per_thread
-{
- /* The restart that will resume execution at the code between
- CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between
- TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */
- jmp_buf restart;
-
- /* Tells whether the contents of restart is valid. */
- int restart_valid;
-};
-
-/* Ensure that the invalid parameter handler in installed that passes
- control to the gl_msvc_inval_restart if it is valid, or raises a
- software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise.
- Because we assume no other part of the program installs a different
- invalid parameter handler, this solution is multithread-safe. */
-extern void gl_msvc_inval_ensure_handler (void);
-
-/* Return a pointer to the per-thread data for the current thread. */
-extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void);
-
-# ifdef __cplusplus
-}
-# endif
-
-# define TRY_MSVC_INVAL \
- do \
- { \
- struct gl_msvc_inval_per_thread *msvc_inval_current; \
- gl_msvc_inval_ensure_handler (); \
- msvc_inval_current = gl_msvc_inval_current (); \
- /* First, initialize gl_msvc_inval_restart. */ \
- if (setjmp (msvc_inval_current->restart) == 0) \
- { \
- /* Then, mark it as valid. */ \
- msvc_inval_current->restart_valid = 1;
-# define CATCH_MSVC_INVAL \
- /* Execution completed. \
- Mark gl_msvc_inval_restart as invalid. */ \
- msvc_inval_current->restart_valid = 0; \
- } \
- else \
- { \
- /* Execution triggered an invalid parameter notification. \
- Mark gl_msvc_inval_restart as invalid. */ \
- msvc_inval_current->restart_valid = 0;
-# define DONE_MSVC_INVAL \
- } \
- } \
- while (0)
-
-# endif
-
-# endif
-
-#else
-/* A platform that does not need to the invalid parameter handler,
- or when SANE_LIBRARY_HANDLING is desired. */
-
-/* The braces here avoid GCC warnings like
- "warning: suggest explicit braces to avoid ambiguous 'else'". */
-# define TRY_MSVC_INVAL \
- do \
- { \
- if (1)
-# define CATCH_MSVC_INVAL \
- else
-# define DONE_MSVC_INVAL \
- } \
- while (0)
-
-#endif
-
-#endif /* _MSVC_INVAL_H */
diff --git a/lib/msvc-nothrow.c b/lib/msvc-nothrow.c
deleted file mode 100644
index b1e5f0c9..00000000
--- a/lib/msvc-nothrow.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Wrappers that don't throw invalid parameter notifications
- with MSVC runtime libraries.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-/* Specification. */
-#include "msvc-nothrow.h"
-
-/* Get declarations of the native Windows API functions. */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include "msvc-inval.h"
-
-#undef _get_osfhandle
-
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-intptr_t
-_gl_nothrow_get_osfhandle (int fd)
-{
- intptr_t result;
-
- TRY_MSVC_INVAL
- {
- result = _get_osfhandle (fd);
- }
- CATCH_MSVC_INVAL
- {
- result = (intptr_t) INVALID_HANDLE_VALUE;
- }
- DONE_MSVC_INVAL;
-
- return result;
-}
-#endif
diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h
deleted file mode 100644
index 0d4dea58..00000000
--- a/lib/msvc-nothrow.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Wrappers that don't throw invalid parameter notifications
- with MSVC runtime libraries.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _MSVC_NOTHROW_H
-#define _MSVC_NOTHROW_H
-
-/* With MSVC runtime libraries with the "invalid parameter handler" concept,
- functions like fprintf(), dup2(), or close() crash when the caller passes
- an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF)
- instead.
- This file defines wrappers that turn such an invalid parameter notification
- into an error code. */
-
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-
-/* Get original declaration of _get_osfhandle. */
-# include <io.h>
-
-# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-
-/* Override _get_osfhandle. */
-extern intptr_t _gl_nothrow_get_osfhandle (int fd);
-# define _get_osfhandle _gl_nothrow_get_osfhandle
-
-# endif
-
-#endif
-
-#endif /* _MSVC_NOTHROW_H */
diff --git a/lib/openpty.c b/lib/openpty.c
deleted file mode 100644
index 63301428..00000000
--- a/lib/openpty.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Open a pseudo-terminal.
- Copyright (C) 2010-2014 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>
-
-/* Specification. */
-#include <pty.h>
-
-#if HAVE_OPENPTY
-
-/* Provide a wrapper with the prototype of glibc-2.8 and newer. */
-# undef openpty
-int
-rpl_openpty (int *amaster, int *aslave, char *name,
- struct termios const *termp, struct winsize const *winp)
-{
- /* Cast away const, for implementations with weaker prototypes. */
- return openpty (amaster, aslave, name, (struct termios *) termp,
- (struct winsize *) winp);
-}
-
-#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
-
-# include <errno.h>
-
-int
-openpty (int *amaster _GL_UNUSED, int *aslave _GL_UNUSED,
- char *name _GL_UNUSED,
- struct termios const *termp _GL_UNUSED,
- struct winsize const *winp _GL_UNUSED)
-{
- /* Mingw lacks pseudo-terminals altogether. */
- errno = ENOSYS;
- return -1;
-}
-
-#else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10 */
-
-# include <fcntl.h>
-# include <stdlib.h>
-# include <string.h>
-# include <sys/ioctl.h>
-# include <termios.h>
-# include <unistd.h>
-# if defined __sun || defined __hpux /* Solaris, HP-UX */
-# include <stropts.h>
-# endif
-
-int
-openpty (int *amaster, int *aslave, char *name,
- struct termios const *termp, struct winsize const *winp)
-{
- int master;
- char *slave_name;
- int slave;
-
-# if HAVE__GETPTY /* IRIX */
-
- slave_name = _getpty (&master, O_RDWR, 0622, 0);
- if (slave_name == NULL)
- return -1;
-
-# else /* AIX 5.1, HP-UX 11, Solaris 10, mingw */
-
- /* This call uses the 'posix_openpt' module. */
- master = posix_openpt (O_RDWR | O_NOCTTY);
- if (master < 0)
- return -1;
-
-# endif
-
- /* This call does not require a dependency to the 'grantpt' module,
- because AIX, HP-UX, IRIX, Solaris all have the grantpt() function. */
- if (grantpt (master))
- goto fail;
-
- /* This call does not require a dependency to the 'unlockpt' module,
- because AIX, HP-UX, IRIX, Solaris all have the unlockpt() function. */
- if (unlockpt (master))
- goto fail;
-
-# if !HAVE__GETPTY /* !IRIX */
- slave_name = ptsname (master);
- if (slave_name == NULL)
- goto fail;
-# endif
-
- slave = open (slave_name, O_RDWR | O_NOCTTY);
- if (slave == -1)
- goto fail;
-
-# if defined __sun || defined __hpux /* Solaris, HP-UX */
- if (ioctl (slave, I_PUSH, "ptem") < 0
- || ioctl (slave, I_PUSH, "ldterm") < 0
-# if defined __sun
- || ioctl (slave, I_PUSH, "ttcompat") < 0
-# endif
- )
- {
- close (slave);
- goto fail;
- }
-# endif
-
- /* XXX Should we ignore errors here? */
- if (termp)
- tcsetattr (slave, TCSAFLUSH, termp);
- if (winp)
- ioctl (slave, TIOCSWINSZ, winp);
-
- *amaster = master;
- *aslave = slave;
- if (name != NULL)
- strcpy (name, slave_name);
-
- return 0;
-
- fail:
- close (master);
- return -1;
-}
-
-#endif
diff --git a/lib/posix_openpt.c b/lib/posix_openpt.c
deleted file mode 100644
index 92eec2e9..00000000
--- a/lib/posix_openpt.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Open the master side of a pseudo-terminal.
- Copyright (C) 2010-2014 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>
-
-/* Specification. */
-#include <stdlib.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#if defined __OpenBSD__
-# include <sys/ioctl.h>
-# include <sys/tty.h>
-#endif
-
-/* posix_openpt() is already provided on
- glibc >= 2.2.1 (but is a stub on GNU/Hurd),
- Mac OS X >= 10.4,
- FreeBSD >= 5.1 (lived in src/lib/libc/stdlib/grantpt.c before 8.0),
- NetBSD >= 3.0,
- AIX >= 5.2, HP-UX >= 11.31, Solaris >= 10, Cygwin >= 1.7.
- Thus, this replacement function is compiled on
- Mac OS X 10.3, OpenBSD 4.9, Minix 3.1.8,
- AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9,
- Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
- Among these:
- - AIX has /dev/ptc.
- - HP-UX 10..11, IRIX 6.5, OSF/1 5.1, Solaris 2.6..9, Cygwin 1.5
- have /dev/ptmx.
- - HP-UX 10..11 also has /dev/ptym/clone, but this should not be needed.
- - OpenBSD 4.9 has /dev/ptm and the PTMGET ioctl.
- - Minix 3.1.8 have a list of pseudo-terminal devices in /dev.
- - On native Windows, there are no ttys at all. */
-
-int
-posix_openpt (int flags)
-{
- int master;
-
-#ifdef _AIX /* AIX */
-
- master = open ("/dev/ptc", flags);
-
-#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
-
- /* Mingw lacks pseudo-terminals altogether. */
- master = -1;
- errno = ENOSYS;
-
-#elif defined __OpenBSD__
-
- /* On OpenBSD, master and slave of a pseudo-terminal are allocated together,
- by opening /dev/ptm and applying the PTMGET ioctl to it. */
- int fd;
- struct ptmget data;
-
- fd = open (PATH_PTMDEV, O_RDWR);
- if (fd >= 0)
- {
- if (ioctl (fd, PTMGET, &data) >= 0)
- {
- master = data.cfd;
- close (data.sfd);
- close (fd);
- }
- else
- {
- int saved_errno = errno;
- close (fd);
- errno = saved_errno;
- master = -1;
- }
- }
- else
- master = -1;
-
-#else /* Mac OS X, Minix, HP-UX, IRIX, OSF/1, Solaris 9, Cygwin 1.5 */
-
- /* Most systems that lack posix_openpt() have /dev/ptmx. */
- master = open ("/dev/ptmx", flags);
-
- /* If all this does not work, we could try to open, one by one:
- - On Mac OS X: /dev/pty[p-w][0-9a-f]
- - On *BSD: /dev/pty[p-sP-S][0-9a-v]
- - On Minix: /dev/pty[p-q][0-9a-f]
- - On AIX: /dev/ptyp[0-9a-f]
- - On HP-UX: /dev/pty[p-r][0-9a-f]
- - On OSF/1: /dev/pty[p-q][0-9a-f]
- - On Solaris: /dev/pty[p-r][0-9a-f]
- */
-
-#endif
-
- return master;
-}
diff --git a/lib/pty.in.h b/lib/pty.in.h
deleted file mode 100644
index 35a2274f..00000000
--- a/lib/pty.in.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Substitute for and wrapper around <pty.h>.
- Copyright (C) 2010-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _@GUARD_PREFIX@_PTY_H
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_PTY_H@
-# @INCLUDE_NEXT@ @NEXT_PTY_H@
-#endif
-
-#ifndef _@GUARD_PREFIX@_PTY_H
-#define _@GUARD_PREFIX@_PTY_H
-
-/* Some platforms declare this in a different header than glibc. */
-#if @HAVE_UTIL_H@
-# include <util.h>
-#endif
-#if @HAVE_LIBUTIL_H@
-/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
-# include <sys/types.h>
-# include <libutil.h>
-#endif
-
-/* Get 'struct termios' and 'struct winsize'. */
-#include <termios.h>
-#if defined _AIX
-# include <sys/ioctl.h>
-#endif
-/* Mingw lacks 'struct termios' and 'struct winsize', but a forward
- declaration of an opaque type is sufficient to allow compilation of
- a stub openpty(). */
-struct termios;
-struct winsize;
-
-/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
-
-/* The definition of _GL_WARN_ON_USE is copied here. */
-
-
-/* Declare overridden functions. */
-
-#if @GNULIB_FORKPTY@
-/* Create pseudo tty master slave pair and set terminal attributes
- according to TERMP and WINP. Fork a child process attached to the
- slave end. Return a handle for the master end in *AMASTER, and
- return the name of the slave end in NAME. */
-# if @REPLACE_FORKPTY@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef forkpty
-# define forkpty rpl_forkpty
-# endif
-_GL_FUNCDECL_RPL (forkpty, int,
- (int *amaster, char *name,
- struct termios const *termp, struct winsize const *winp));
-_GL_CXXALIAS_RPL (forkpty, int,
- (int *amaster, char *name,
- struct termios const *termp, struct winsize const *winp));
-# else
-# if !@HAVE_FORKPTY@
-_GL_FUNCDECL_SYS (forkpty, int,
- (int *amaster, char *name,
- struct termios const *termp, struct winsize const *winp));
-# endif
-_GL_CXXALIAS_SYS (forkpty, int,
- (int *amaster, char *name,
- struct termios const *termp, struct winsize const *winp));
-# endif
-_GL_CXXALIASWARN (forkpty);
-#elif defined GNULIB_POSIXCHECK
-# undef forkpty
-# if HAVE_RAW_DECL_FORKPTY
-_GL_WARN_ON_USE (forkpty, "forkpty is not declared consistently - "
- "use gnulib module forkpty for portability");
-# endif
-#endif
-
-#if @GNULIB_OPENPTY@
-/* Create pseudo tty master slave pair and set terminal attributes
- according to TERMP and WINP. Return handles for both ends in
- *AMASTER and *ASLAVE, and return the name of the slave end in NAME. */
-# if @REPLACE_OPENPTY@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef openpty
-# define openpty rpl_openpty
-# endif
-_GL_FUNCDECL_RPL (openpty, int,
- (int *amaster, int *aslave, char *name,
- struct termios const *termp, struct winsize const *winp));
-_GL_CXXALIAS_RPL (openpty, int,
- (int *amaster, int *aslave, char *name,
- struct termios const *termp, struct winsize const *winp));
-# else
-# if !@HAVE_OPENPTY@
-_GL_FUNCDECL_SYS (openpty, int,
- (int *amaster, int *aslave, char *name,
- struct termios const *termp, struct winsize const *winp));
-# endif
-_GL_CXXALIAS_SYS (openpty, int,
- (int *amaster, int *aslave, char *name,
- struct termios const *termp, struct winsize const *winp));
-# endif
-_GL_CXXALIASWARN (openpty);
-#elif defined GNULIB_POSIXCHECK
-# undef openpty
-# if HAVE_RAW_DECL_OPENPTY
-_GL_WARN_ON_USE (openpty, "openpty is not declared consistently - "
- "use gnulib module openpty for portability");
-# endif
-#endif
-
-
-#endif /* _@GUARD_PREFIX@_PTY_H */
-#endif /* _@GUARD_PREFIX@_PTY_H */
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
deleted file mode 100644
index dcaab55b..00000000
--- a/lib/stdalign.in.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* A substitute for ISO C11 <stdalign.h>.
-
- Copyright 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-/* Written by Paul Eggert and Bruno Haible. */
-
-#ifndef _GL_STDALIGN_H
-#define _GL_STDALIGN_H
-
-/* ISO C11 <stdalign.h> for platforms that lack it.
-
- References:
- ISO C11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
- sections 6.5.3.4, 6.7.5, 7.15.
- C++11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
- section 18.10. */
-
-/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
- requirement of a structure member (i.e., slot or field) that is of
- type TYPE, as an integer constant expression.
-
- This differs from GCC's __alignof__ operator, which can yield a
- better-performing alignment for an object of that type. For
- example, on x86 with GCC, __alignof__ (double) and __alignof__
- (long long) are 8, whereas alignof (double) and alignof (long long)
- are 4 unless the option '-malign-double' is used.
-
- The result cannot be used as a value for an 'enum' constant, if you
- want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
-
- Include <stddef.h> for offsetof. */
-#include <stddef.h>
-
-/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
- standard headers, defines conflicting implementations of _Alignas
- and _Alignof that are no better than ours; override them. */
-#undef _Alignas
-#undef _Alignof
-
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# ifdef __cplusplus
-# if 201103 <= __cplusplus
-# define _Alignof(type) alignof (type)
-# else
- template <class __t> struct __alignof_helper { char __a; __t __b; };
-# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
-# endif
-# else
-# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
-# endif
-#endif
-#define alignof _Alignof
-#define __alignof_is_defined 1
-
-/* alignas (A), also known as _Alignas (A), aligns a variable or type
- to the alignment A, where A is an integer constant expression. For
- example:
-
- int alignas (8) foo;
- struct s { int a; int alignas (8) bar; };
-
- aligns the address of FOO and the offset of BAR to be multiples of 8.
-
- A should be a power of two that is at least the type's alignment
- and at most the implementation's alignment limit. This limit is
- 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable
- to MSVC through at least version 10.0, A should be an integer
- constant, as MSVC does not support expressions such as 1 << 3.
- To be portable to Sun C 5.11, do not align auto variables to
- anything stricter than their default alignment.
-
- The following C11 requirements are not supported here:
-
- - If A is zero, alignas has no effect.
- - alignas can be used multiple times; the strictest one wins.
- - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
-
- */
-
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# if defined __cplusplus && 201103 <= __cplusplus
-# define _Alignas(a) alignas (a)
-# elif (__GNUC__ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
- || __ICC || 0x5110 <= __SUNPRO_C)
-# define _Alignas(a) __attribute__ ((__aligned__ (a)))
-# elif 1300 <= _MSC_VER
-# define _Alignas(a) __declspec (align (a))
-# endif
-#endif
-#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__)
-# define alignas _Alignas
-# define __alignas_is_defined 1
-#endif
-
-#endif /* _GL_STDALIGN_H */
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
deleted file mode 100644
index f5c0e056..00000000
--- a/lib/stddef.in.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
-
- Copyright (C) 2009-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-/* Written by 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 _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
-# ifdef __need_wint_t
-# undef _@GUARD_PREFIX@_STDDEF_H
-# define _GL_STDDEF_WINT_T
-# endif
-# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-# endif
-
-#else
-/* Normal invocation convention. */
-
-# ifndef _@GUARD_PREFIX@_STDDEF_H
-
-/* The include_next requires a split double-inclusion guard. */
-
-# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-
-# ifndef _@GUARD_PREFIX@_STDDEF_H
-# define _@GUARD_PREFIX@_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 /* _@GUARD_PREFIX@_STDDEF_H */
-# endif /* _@GUARD_PREFIX@_STDDEF_H */
-#endif /* __need_XXX */
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
deleted file mode 100644
index 46e10dba..00000000
--- a/lib/stdlib.in.h
+++ /dev/null
@@ -1,954 +0,0 @@
-/* A GNU-like <stdlib.h>.
-
- Copyright (C) 1995, 2001-2004, 2006-2014 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/>. */
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
-/* Special invocation conventions inside some gnulib header files,
- and inside some glibc header files, respectively. */
-
-#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
-
-#else
-/* Normal invocation convention. */
-
-#ifndef _@GUARD_PREFIX@_STDLIB_H
-
-/* The include_next requires a split double-inclusion guard. */
-#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
-
-#ifndef _@GUARD_PREFIX@_STDLIB_H
-#define _@GUARD_PREFIX@_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
-
-/* Native Windows platforms declare mktemp() in <io.h>. */
-#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-# include <io.h>
-#endif
-
-#if @GNULIB_RANDOM_R@
-
-/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
- from <stdlib.h> if _REENTRANT is defined. Include it whenever we need
- 'struct random_data'. */
-# if @HAVE_RANDOM_H@
-# include <random.h>
-# endif
-
-# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
-# 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
-#endif
-
-#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
-/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
-/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
-/* But avoid namespace pollution on glibc systems and native Windows. */
-# include <unistd.h>
-#endif
-
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
- 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
-
-/* The definition of _Noreturn is copied here. */
-
-/* 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, _Noreturn void, (int status));
-# 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_ATTRIBUTE_PURE
- _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 (grantpt, "grantpt is not portable - "
- "use gnulib module grantpt for portability");
-# endif
-#endif
-
-/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
- rely on GNU or POSIX semantics for malloc and realloc (for example,
- by never specifying a zero size), so it does not need malloc or
- realloc to be redefined. */
-#if @GNULIB_MALLOC_POSIX@
-# if @REPLACE_MALLOC@
-# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
- || _GL_USE_STDLIB_ALLOC)
-# 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 && !_GL_USE_STDLIB_ALLOC
-# 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
-
-/* Convert a multibyte character to a wide character. */
-#if @GNULIB_MBTOWC@
-# if @REPLACE_MBTOWC@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef mbtowc
-# define mbtowc rpl_mbtowc
-# endif
-_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
-_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
-# else
-_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
-# endif
-_GL_CXXALIASWARN (mbtowc);
-#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_POSIX_OPENPT@
-/* Return an FD open to the master side of a pseudo-terminal. Flags should
- include O_RDWR, and may also include O_NOCTTY. */
-# if !@HAVE_POSIX_OPENPT@
-_GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
-# endif
-_GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
-_GL_CXXALIASWARN (posix_openpt);
-#elif defined GNULIB_POSIXCHECK
-# undef posix_openpt
-# if HAVE_RAW_DECL_POSIX_OPENPT
-_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
- "use gnulib module posix_openpt 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 @REPLACE_PTSNAME@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef ptsname
-# define ptsname rpl_ptsname
-# endif
-_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
-_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
-# else
-# if !@HAVE_PTSNAME@
-_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
-# endif
-_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
-# endif
-_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_PTSNAME_R@
-/* Set the pathname of the pseudo-terminal slave associated with
- the master FD is open on and return 0, or set errno and return
- non-zero on errors. */
-# if @REPLACE_PTSNAME_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef ptsname_r
-# define ptsname_r rpl_ptsname_r
-# endif
-_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
-_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
-# else
-# if !@HAVE_PTSNAME_R@
-_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
-# endif
-_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
-# endif
-_GL_CXXALIASWARN (ptsname_r);
-#elif defined GNULIB_POSIXCHECK
-# undef ptsname_r
-# if HAVE_RAW_DECL_PTSNAME_R
-_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
- "use gnulib module ptsname_r 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@
-# if !@HAVE_RANDOM@
-_GL_FUNCDECL_SYS (random, long, (void));
-# endif
-_GL_CXXALIAS_SYS (random, long, (void));
-_GL_CXXALIASWARN (random);
-#elif defined GNULIB_POSIXCHECK
-# undef random
-# if HAVE_RAW_DECL_RANDOM
-_GL_WARN_ON_USE (random, "random is unportable - "
- "use gnulib module random for portability");
-# endif
-#endif
-
-#if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
-_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
-# endif
-_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
-_GL_CXXALIASWARN (srandom);
-#elif defined GNULIB_POSIXCHECK
-# undef srandom
-# if HAVE_RAW_DECL_SRANDOM
-_GL_WARN_ON_USE (srandom, "srandom is unportable - "
- "use gnulib module random for portability");
-# endif
-#endif
-
-#if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
-_GL_FUNCDECL_SYS (initstate, char *,
- (unsigned int seed, char *buf, size_t buf_size)
- _GL_ARG_NONNULL ((2)));
-# endif
-_GL_CXXALIAS_SYS (initstate, char *,
- (unsigned int seed, char *buf, size_t buf_size));
-_GL_CXXALIASWARN (initstate);
-#elif defined GNULIB_POSIXCHECK
-# undef initstate
-# if HAVE_RAW_DECL_INITSTATE_R
-_GL_WARN_ON_USE (initstate, "initstate is unportable - "
- "use gnulib module random for portability");
-# endif
-#endif
-
-#if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
-_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
-# endif
-_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
-_GL_CXXALIASWARN (setstate);
-#elif defined GNULIB_POSIXCHECK
-# undef setstate
-# if HAVE_RAW_DECL_SETSTATE_R
-_GL_WARN_ON_USE (setstate, "setstate is unportable - "
- "use gnulib module random for portability");
-# endif
-#endif
-
-
-#if @GNULIB_RANDOM_R@
-# if @REPLACE_RANDOM_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef random_r
-# define random_r rpl_random_r
-# endif
-_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
- _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
-# else
-# 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));
-# endif
-_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 @REPLACE_RANDOM_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef srandom_r
-# define srandom_r rpl_srandom_r
-# endif
-_GL_FUNCDECL_RPL (srandom_r, int,
- (unsigned int seed, struct random_data *rand_state)
- _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (srandom_r, int,
- (unsigned int seed, struct random_data *rand_state));
-# else
-# 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));
-# endif
-_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 @REPLACE_RANDOM_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef initstate_r
-# define initstate_r rpl_initstate_r
-# endif
-_GL_FUNCDECL_RPL (initstate_r, int,
- (unsigned int seed, char *buf, size_t buf_size,
- struct random_data *rand_state)
- _GL_ARG_NONNULL ((2, 4)));
-_GL_CXXALIAS_RPL (initstate_r, int,
- (unsigned int seed, char *buf, size_t buf_size,
- struct random_data *rand_state));
-# else
-# 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));
-# endif
-_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 @REPLACE_RANDOM_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef setstate_r
-# define setstate_r rpl_setstate_r
-# endif
-_GL_FUNCDECL_RPL (setstate_r, int,
- (char *arg_state, struct random_data *rand_state)
- _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (setstate_r, int,
- (char *arg_state, struct random_data *rand_state));
-# else
-# 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));
-# endif
-_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) \
- || _GL_USE_STDLIB_ALLOC)
-# 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 && !_GL_USE_STDLIB_ALLOC
-# 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_SECURE_GETENV@
-/* Look up NAME in the environment, returning 0 in insecure situations. */
-# if !@HAVE_SECURE_GETENV@
-_GL_FUNCDECL_SYS (secure_getenv, char *,
- (char const *name) _GL_ARG_NONNULL ((1)));
-# endif
-_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
-_GL_CXXALIASWARN (secure_getenv);
-#elif defined GNULIB_POSIXCHECK
-# undef secure_getenv
-# if HAVE_RAW_DECL_SECURE_GETENV
-_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
- "use gnulib module secure_getenv 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_DECL_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
-# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
-_GL_CXXALIASWARN (setenv);
-# endif
-#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_DECL_UNSETENV@
-_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
-# endif
-_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
-# endif
-# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
-_GL_CXXALIASWARN (unsetenv);
-# endif
-#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
-
-/* Convert a wide character to a multibyte character. */
-#if @GNULIB_WCTOMB@
-# if @REPLACE_WCTOMB@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef wctomb
-# define wctomb rpl_wctomb
-# endif
-_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
-_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
-# else
-_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
-# endif
-_GL_CXXALIASWARN (wctomb);
-#endif
-
-
-#endif /* _@GUARD_PREFIX@_STDLIB_H */
-#endif /* _@GUARD_PREFIX@_STDLIB_H */
-#endif
diff --git a/lib/string.in.h b/lib/string.in.h
deleted file mode 100644
index 90621420..00000000
--- a/lib/string.in.h
+++ /dev/null
@@ -1,1029 +0,0 @@
-/* A GNU-like <string.h>.
-
- Copyright (C) 1995-1996, 2001-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _@GUARD_PREFIX@_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 _@GUARD_PREFIX@_STRING_H
-#define _@GUARD_PREFIX@_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
-
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
- 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. */
-
-
-/* Find the index of the least-significant set bit. */
-#if @GNULIB_FFSL@
-# if !@HAVE_FFSL@
-_GL_FUNCDECL_SYS (ffsl, int, (long int i));
-# endif
-_GL_CXXALIAS_SYS (ffsl, int, (long int i));
-_GL_CXXALIASWARN (ffsl);
-#elif defined GNULIB_POSIXCHECK
-# undef ffsl
-# if HAVE_RAW_DECL_FFSL
-_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
-# endif
-#endif
-
-
-/* Find the index of the least-significant set bit. */
-#if @GNULIB_FFSLL@
-# if !@HAVE_FFSLL@
-_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
-# endif
-_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
-_GL_CXXALIASWARN (ffsll);
-#elif defined GNULIB_POSIXCHECK
-# undef ffsll
-# if HAVE_RAW_DECL_FFSLL
-_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
-# endif
-#endif
-
-
-/* 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 @REPLACE_STRCHRNUL@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define strchrnul rpl_strchrnul
-# endif
-_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in)
- _GL_ATTRIBUTE_PURE
- _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strchrnul, char *,
- (const char *str, int ch));
-# else
-# 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));
-# endif
-# 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_ATTRIBUTE_PURE
- _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
-# else
-_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
- _GL_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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 || defined __INTERIX
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define mbsrchr rpl_mbsrchr /* avoid collision with system function */
-# endif
-_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
- _GL_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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_ATTRIBUTE_PURE
- _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 /* _@GUARD_PREFIX@_STRING_H */
-#endif /* _@GUARD_PREFIX@_STRING_H */
diff --git a/lib/strndup.c b/lib/strndup.c
deleted file mode 100644
index cc1a4843..00000000
--- a/lib/strndup.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* A replacement function, for systems that lack strndup.
-
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2014 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <stdlib.h>
-
-char *
-strndup (char const *s, size_t n)
-{
- size_t len = strnlen (s, n);
- char *new = malloc (len + 1);
-
- if (new == NULL)
- return NULL;
-
- new[len] = '\0';
- return memcpy (new, s, len);
-}
diff --git a/lib/strnlen.c b/lib/strnlen.c
deleted file mode 100644
index ddccebc6..00000000
--- a/lib/strnlen.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2014 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, 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>
-
-/* Find the length of STRING, but scan at most MAXLEN characters.
- If no '\0' terminator is found in that many characters, return MAXLEN. */
-
-size_t
-strnlen (const char *string, size_t maxlen)
-{
- const char *end = memchr (string, '\0', maxlen);
- return end ? (size_t) (end - string) : maxlen;
-}
diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h
deleted file mode 100644
index c13e3172..00000000
--- a/lib/sys_ioctl.in.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Substitute for and wrapper around <sys/ioctl.h>.
- Copyright (C) 2008-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_SYS_IOCTL_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@
-#endif
-
-#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
-#define _@GUARD_PREFIX@_SYS_IOCTL_H
-
-/* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
- but not in <sys/ioctl.h>.
- But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
-# include <unistd.h>
-#endif
-
-/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
-
-/* The definition of _GL_WARN_ON_USE is copied here. */
-
-
-/* Declare overridden functions. */
-
-#if @GNULIB_IOCTL@
-# if @REPLACE_IOCTL@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef ioctl
-# define ioctl rpl_ioctl
-# endif
-_GL_FUNCDECL_RPL (ioctl, int,
- (int fd, int request, ... /* {void *,char *} arg */));
-_GL_CXXALIAS_RPL (ioctl, int,
- (int fd, int request, ... /* {void *,char *} arg */));
-# else
-# if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1
-_GL_FUNCDECL_SYS (ioctl, int,
- (int fd, int request, ... /* {void *,char *} arg */));
-# endif
-_GL_CXXALIAS_SYS (ioctl, int,
- (int fd, int request, ... /* {void *,char *} arg */));
-# endif
-_GL_CXXALIASWARN (ioctl);
-#elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-# undef ioctl
-# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl
-#elif defined GNULIB_POSIXCHECK
-# undef ioctl
-# if HAVE_RAW_DECL_IOCTL
-_GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - "
- "use gnulib module ioctl for portability");
-# endif
-#endif
-
-
-#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */
-#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */
diff --git a/lib/sys_socket.c b/lib/sys_socket.c
deleted file mode 100644
index 3f017f8f..00000000
--- a/lib/sys_socket.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <config.h>
-#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE
-#include "sys/socket.h"
diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h
deleted file mode 100644
index 3cdc0d11..00000000
--- a/lib/sys_socket.in.h
+++ /dev/null
@@ -1,692 +0,0 @@
-/* Provide a sys/socket header file for systems lacking it (read: MinGW)
- and for systems where it is incomplete.
- Copyright (C) 2005-2014 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, 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 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 _@GUARD_PREFIX@_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>
-
-/* On FreeBSD 6.4, <sys/socket.h> defines some macros that assume that NULL
- is defined. */
-# include <stddef.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 _@GUARD_PREFIX@_SYS_SOCKET_H
-#define _@GUARD_PREFIX@_SYS_SOCKET_H
-
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
-_GL_INLINE_HEADER_BEGIN
-#ifndef _GL_SYS_SOCKET_INLINE
-# define _GL_SYS_SOCKET_INLINE _GL_INLINE
-#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 !@HAVE_SA_FAMILY_T@
-# if !GNULIB_defined_sa_family_t
-typedef unsigned short sa_family_t;
-# define GNULIB_defined_sa_family_t 1
-# endif
-#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 <stdalign.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)))
-
-# if !GNULIB_defined_struct_sockaddr_storage
-struct sockaddr_storage
-{
- sa_family_t ss_family; /* Address family, etc. */
- __ss_aligntype __ss_align; /* Force desired alignment. */
- char __ss_padding[_SS_PADSIZE];
-};
-# define GNULIB_defined_struct_sockaddr_storage 1
-# endif
-
-#endif
-
-/* Get struct iovec. */
-/* But avoid namespace pollution on glibc systems. */
-#if ! defined __GLIBC__
-# include <sys/uio.h>
-#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 indirectly 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>
-
-# if !GNULIB_defined_socklen_t
-typedef int socklen_t;
-# define GNULIB_defined_socklen_t 1
-# endif
-
-# endif
-
-/* Rudimentary 'struct msghdr'; this works as long as you don't try to
- access msg_control or msg_controllen. */
-struct msghdr {
- void *msg_name;
- socklen_t msg_namelen;
- struct iovec *msg_iov;
- int msg_iovlen;
- int msg_flags;
-};
-
-#endif
-
-/* Fix some definitions from <winsock2.h>. */
-
-#if @HAVE_WINSOCK2_H@
-
-# if !GNULIB_defined_rpl_fd_isset
-
-/* Re-define FD_ISSET to avoid a WSA call while we are not using
- network sockets. */
-_GL_SYS_SOCKET_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;
-}
-
-# define GNULIB_defined_rpl_fd_isset 1
-# endif
-
-# undef FD_ISSET
-# define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
-
-#endif
-
-/* Hide some function declarations from <winsock2.h>. */
-
-#if @HAVE_WINSOCK2_H@
-# if !defined _@GUARD_PREFIX@_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
-# 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 !defined _@GUARD_PREFIX@_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
-
-/* Wrap everything else to use libc file descriptors for sockets. */
-
-#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
-/* Need to cast, because on NonStop Kernel, the third parameter is
- size_t addrlen. */
-_GL_CXXALIAS_SYS_CAST (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
-/* Need to cast, because on NonStop Kernel, the third parameter is
- size_t addrlen. */
-_GL_CXXALIAS_SYS_CAST (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
-/* Need to cast, because on NonStop Kernel, the sixth parameter is
- size_t tolen. */
-_GL_CXXALIAS_SYS_CAST (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
-/* Need to cast, because on NonStop Kernel, the fifth parameter is
- size_t optlen. */
-_GL_CXXALIAS_SYS_CAST (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 @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
-
-_GL_INLINE_HEADER_END
-
-#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
-#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
-#endif
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
deleted file mode 100644
index deb5d67d..00000000
--- a/lib/sys_types.in.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Provide a more complete sys/types.h.
-
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
-
-/* The include_next requires a split double-inclusion guard. */
-# define _GL_INCLUDING_SYS_TYPES_H
-#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
-# undef _GL_INCLUDING_SYS_TYPES_H
-
-#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
-#define _@GUARD_PREFIX@_SYS_TYPES_H
-
-/* Override off_t if Large File Support is requested on native Windows. */
-#if @WINDOWS_64_BIT_OFF_T@
-/* Same as int64_t in <stdint.h>. */
-# if defined _MSC_VER
-# define off_t __int64
-# else
-# define off_t long long int
-# endif
-/* Indicator, for gnulib internal purposes. */
-# define _GL_WINDOWS_64_BIT_OFF_T 1
-#endif
-
-/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
-/* But avoid namespace pollution on glibc systems. */
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
- && ! defined __GLIBC__
-# include <stddef.h>
-#endif
-
-#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
-#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
diff --git a/lib/sys_uio.in.h b/lib/sys_uio.in.h
deleted file mode 100644
index 0b403bc1..00000000
--- a/lib/sys_uio.in.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Substitute for <sys/uio.h>.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-# if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-# endif
-@PRAGMA_COLUMNS@
-
-#ifndef _@GUARD_PREFIX@_SYS_UIO_H
-
-#if @HAVE_SYS_UIO_H@
-
-/* On OpenBSD 4.4, <sys/uio.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_UIO_H@
-
-#endif
-
-#ifndef _@GUARD_PREFIX@_SYS_UIO_H
-#define _@GUARD_PREFIX@_SYS_UIO_H
-
-#if !@HAVE_SYS_UIO_H@
-/* A platform that lacks <sys/uio.h>. */
-/* Get 'size_t' and 'ssize_t'. */
-# include <sys/types.h>
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-# if !GNULIB_defined_struct_iovec
-/* All known platforms that lack <sys/uio.h> also lack any declaration
- of struct iovec in any other header. */
-struct iovec {
- void *iov_base;
- size_t iov_len;
-};
-# define GNULIB_defined_struct_iovec 1
-# endif
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
-
-#endif /* _@GUARD_PREFIX@_SYS_UIO_H */
-#endif /* _@GUARD_PREFIX@_SYS_UIO_H */
diff --git a/lib/unistd.c b/lib/unistd.c
deleted file mode 100644
index 6c6a8e26..00000000
--- a/lib/unistd.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <config.h>
-#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
-#include "unistd.h"
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
deleted file mode 100644
index 622b2287..00000000
--- a/lib/unistd.in.h
+++ /dev/null
@@ -1,1557 +0,0 @@
-/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2014 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _@GUARD_PREFIX@_UNISTD_H
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-#ifdef _GL_INCLUDING_UNISTD_H
-/* Special invocation convention:
- - On Mac OS X 10.3.9 we have a sequence of nested includes
- <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
- In this situation, the functions are not yet declared, therefore we cannot
- provide the C++ aliases. */
-
-#@INCLUDE_NEXT@ @NEXT_UNISTD_H@
-
-#else
-/* Normal invocation convention. */
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_UNISTD_H@
-# define _GL_INCLUDING_UNISTD_H
-# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-# undef _GL_INCLUDING_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 _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
-#define _@GUARD_PREFIX@_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, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
- <unistd.h>. */
-/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
-/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
- included here. */
-/* But avoid namespace pollution on glibc systems. */
-#if !defined __GLIBC__ && !defined __osf__
-# define __need_system_stdlib_h
-# include <stdlib.h>
-# undef __need_system_stdlib_h
-#endif
-
-/* Native Windows platforms declare chdir, getcwd, rmdir in
- <io.h> and/or <direct.h>, not in <unistd.h>.
- They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
- lseek(), read(), unlink(), write() in <io.h>. */
-#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
- || defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
-# include <io.h> /* mingw32, mingw64 */
-# include <direct.h> /* mingw64, MSVC 9 */
-#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
- || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
- || 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>.
- NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */
-/* But avoid namespace pollution on glibc systems. */
-#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
- || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
- && !defined __GLIBC__
-# include <netdb.h>
-#endif
-
-/* MSVC defines off_t in <sys/types.h>.
- May also define off_t to a 64-bit type on native Windows. */
-#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
-/* Get off_t. */
-# include <sys/types.h>
-#endif
-
-#if (@GNULIB_READ@ || @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
-# define __need_getopt
-# include <getopt.h>
-#endif
-
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
-_GL_INLINE_HEADER_BEGIN
-#ifndef _GL_UNISTD_INLINE
-# define _GL_UNISTD_INLINE _GL_INLINE
-#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. */
-
-
-/* Hide some function declarations from <winsock2.h>. */
-
-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
-# if !defined _@GUARD_PREFIX@_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 _@GUARD_PREFIX@_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
-
-
-/* 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_CHDIR@
-_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIASWARN (chdir);
-#elif defined GNULIB_POSIXCHECK
-# undef chdir
-# if HAVE_RAW_DECL_CHDIR
-_GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
- "use gnulib module chdir for portability");
-# endif
-#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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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 @GNULIB_DUP@
-# 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);
-#elif defined GNULIB_POSIXCHECK
-# undef dup
-# if HAVE_RAW_DECL_DUP
-_GL_WARN_ON_USE (dup, "dup is unportable - "
- "use gnulib module dup for portability");
-# endif
-#endif
-
-
-#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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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
-_GL_UNISTD_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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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);
-
-# else
-# if !@HAVE_DECL_FCHDIR@
-_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
-# endif
-# 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_FDATASYNC@
-/* Synchronize changes to a file.
- Return 0 if successful, otherwise -1 and errno set.
- See POSIX:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
-# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
-_GL_FUNCDECL_SYS (fdatasync, int, (int fd));
-# endif
-_GL_CXXALIAS_SYS (fdatasync, int, (int fd));
-_GL_CXXALIASWARN (fdatasync);
-#elif defined GNULIB_POSIXCHECK
-# undef fdatasync
-# if HAVE_RAW_DECL_FDATASYNC
-_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
- "use gnulib module fdatasync for portability");
-# endif
-#endif
-
-
-#if @GNULIB_FSYNC@
-/* Synchronize changes, including metadata, to a file.
- Return 0 if successful, otherwise -1 and errno set.
- See POSIX:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
-# if @REPLACE_FTRUNCATE@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef ftruncate
-# define ftruncate rpl_ftruncate
-# endif
-_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
-_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
-# else
-# if !@HAVE_FTRUNCATE@
-_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
-# endif
-_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
-# endif
-_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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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 @REPLACE_GETDTABLESIZE@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef getdtablesize
-# define getdtablesize rpl_getdtablesize
-# endif
-_GL_FUNCDECL_RPL (getdtablesize, int, (void));
-_GL_CXXALIAS_RPL (getdtablesize, int, (void));
-# else
-# if !@HAVE_GETDTABLESIZE@
-_GL_FUNCDECL_SYS (getdtablesize, int, (void));
-# endif
-_GL_CXXALIAS_SYS (getdtablesize, int, (void));
-# endif
-_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 and OSF/1 5.1 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 @REPLACE_GETLOGIN_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define getlogin_r rpl_getlogin_r
-# endif
-_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size)
- _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size));
-# else
-# 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));
-# endif
-_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
-# if !GNULIB_defined_getpagesize_function
-_GL_UNISTD_INLINE int
-getpagesize ()
-{
- return _gl_getpagesize ();
-}
-# define GNULIB_defined_getpagesize_function 1
-# endif
-# 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_GROUP_MEMBER@
-/* Determine whether group id is in calling user's group list. */
-# if !@HAVE_GROUP_MEMBER@
-_GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
-# endif
-_GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
-_GL_CXXALIASWARN (group_member);
-#elif defined GNULIB_POSIXCHECK
-# undef group_member
-# if HAVE_RAW_DECL_GROUP_MEMBER
-_GL_WARN_ON_USE (group_member, "group_member is unportable - "
- "use gnulib module group-member for portability");
-# endif
-#endif
-
-
-#if @GNULIB_ISATTY@
-# if @REPLACE_ISATTY@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef isatty
-# define isatty rpl_isatty
-# endif
-_GL_FUNCDECL_RPL (isatty, int, (int fd));
-_GL_CXXALIAS_RPL (isatty, int, (int fd));
-# else
-_GL_CXXALIAS_SYS (isatty, int, (int fd));
-# endif
-_GL_CXXALIASWARN (isatty);
-#elif defined GNULIB_POSIXCHECK
-# undef isatty
-# if HAVE_RAW_DECL_ISATTY
-_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
- "use gnulib module isatty 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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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_PIPE@
-/* Create a pipe, defaulting to O_BINARY mode.
- 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. */
-# if !@HAVE_PIPE@
-_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1)));
-# endif
-_GL_CXXALIAS_SYS (pipe, int, (int fd[2]));
-_GL_CXXALIASWARN (pipe);
-#elif defined GNULIB_POSIXCHECK
-# undef pipe
-# if HAVE_RAW_DECL_PIPE
-_GL_WARN_ON_USE (pipe, "pipe is unportable - "
- "use gnulib module pipe-posix 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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
-# if @REPLACE_PREAD@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef pread
-# 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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
-# if @REPLACE_PWRITE@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef pwrite
-# 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_READ@
-/* Read up to COUNT bytes from file descriptor FD into the buffer starting
- at BUF. See the POSIX:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
-# if @REPLACE_READ@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef read
-# define read rpl_read
-# endif
-_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
- _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (read, ssize_t, (int fd, 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 (read, ssize_t, (int fd, void *buf, size_t count));
-# endif
-_GL_CXXALIASWARN (read);
-#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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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_SETHOSTNAME@
-/* Set the host name of the machine.
- The host name may or may not be fully qualified.
-
- Put LEN bytes of NAME into the host name.
- Return 0 if successful, otherwise, set errno and return -1.
-
- Platforms with no ability to set the hostname return -1 and set
- errno = ENOSYS. */
-# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
-_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
- _GL_ARG_NONNULL ((1)));
-# endif
-/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
- and FreeBSD 6.4 the second parameter is int. On Solaris 11
- 2011-10, the first parameter is not const. */
-_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
-_GL_CXXALIASWARN (sethostname);
-#elif defined GNULIB_POSIXCHECK
-# undef sethostname
-# if HAVE_RAW_DECL_SETHOSTNAME
-_GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
- "use gnulib module sethostname 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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/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_DECL_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/usleep.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:2008 specification
- <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
-# if @REPLACE_WRITE@
-# 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
-
-_GL_INLINE_HEADER_END
-
-#endif /* _@GUARD_PREFIX@_UNISTD_H */
-#endif /* _GL_INCLUDING_UNISTD_H */
-#endif /* _@GUARD_PREFIX@_UNISTD_H */
diff --git a/lib/w32sock.h b/lib/w32sock.h
deleted file mode 100644
index b921b1bc..00000000
--- a/lib/w32sock.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* w32sock.h --- internal auxiliary functions for Windows socket functions
-
- Copyright (C) 2008-2014 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 Paolo Bonzini */
-
-#include <errno.h>
-
-/* Get O_RDWR and O_BINARY. */
-#include <fcntl.h>
-
-/* Get _open_osfhandle(). */
-#include <io.h>
-
-/* Get _get_osfhandle(). */
-#include "msvc-nothrow.h"
-
-#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd)))
-#define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (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 WSAENAMETOOLONG:
- errno = ENAMETOOLONG;
- break;
- case WSAENOTEMPTY:
- errno = ENOTEMPTY;
- break;
- case WSAEWOULDBLOCK:
- errno = EWOULDBLOCK;
- break;
- case WSAEINPROGRESS:
- errno = EINPROGRESS;
- break;
- case WSAEALREADY:
- errno = EALREADY;
- break;
- case WSAENOTSOCK:
- errno = ENOTSOCK;
- break;
- case WSAEDESTADDRREQ:
- errno = EDESTADDRREQ;
- break;
- case WSAEMSGSIZE:
- errno = EMSGSIZE;
- break;
- case WSAEPROTOTYPE:
- errno = EPROTOTYPE;
- break;
- case WSAENOPROTOOPT:
- errno = ENOPROTOOPT;
- break;
- case WSAEPROTONOSUPPORT:
- errno = EPROTONOSUPPORT;
- break;
- case WSAEOPNOTSUPP:
- errno = EOPNOTSUPP;
- break;
- case WSAEAFNOSUPPORT:
- errno = EAFNOSUPPORT;
- break;
- case WSAEADDRINUSE:
- errno = EADDRINUSE;
- break;
- case WSAEADDRNOTAVAIL:
- errno = EADDRNOTAVAIL;
- break;
- case WSAENETDOWN:
- errno = ENETDOWN;
- break;
- case WSAENETUNREACH:
- errno = ENETUNREACH;
- break;
- case WSAENETRESET:
- errno = ENETRESET;
- break;
- case WSAECONNABORTED:
- errno = ECONNABORTED;
- break;
- case WSAECONNRESET:
- errno = ECONNRESET;
- break;
- case WSAENOBUFS:
- errno = ENOBUFS;
- break;
- case WSAEISCONN:
- errno = EISCONN;
- break;
- case WSAENOTCONN:
- errno = ENOTCONN;
- break;
- case WSAETIMEDOUT:
- errno = ETIMEDOUT;
- break;
- case WSAECONNREFUSED:
- errno = ECONNREFUSED;
- break;
- case WSAELOOP:
- errno = ELOOP;
- break;
- case WSAEHOSTUNREACH:
- errno = EHOSTUNREACH;
- break;
- default:
- errno = (err > 10000 && err < 10025) ? err - 10000 : err;
- break;
- }
-}
diff --git a/libcrystfel/Makefile.am b/libcrystfel/Makefile.am
deleted file mode 100644
index 24cb7358..00000000
--- a/libcrystfel/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-lib_LTLIBRARIES = libcrystfel.la
-libcrystfel_la_LIBADD = ../lib/libgnu.la @LIBCRYSTFEL_LIBS@ $(PTY_LIB)
-libcrystfel_la_LDFLAGS = -version-info 9:0:0
-
-libcrystfel_la_SOURCES = src/reflist.c src/utils.c src/cell.c src/detector.c \
- src/thread-pool.c src/image.c src/hdf5-file.c \
- src/geometry.c src/statistics.c \
- src/symmetry.c src/stream.c src/peaks.c \
- src/reflist-utils.c src/filters.c \
- src/render.c src/index.c src/dirax.c src/mosflm.c \
- src/cell-utils.c src/integer_matrix.c src/crystal.c \
- src/xds.c src/integration.c src/predict-refine.c \
- src/histogram.c src/events.c src/felix.c \
- src/taketwo.c src/peakfinder8.c
-
-if HAVE_FFTW
-libcrystfel_la_SOURCES += src/asdf.c
-endif
-
-libcrystfel_la_includedir=$(includedir)/crystfel/
-
-libcrystfel_la_include_HEADERS = ${top_srcdir}/version.h \
- src/hdf5-file.h src/reflist.h src/symmetry.h \
- src/cell.h src/reflist-utils.h \
- src/thread-pool.h src/statistics.h \
- src/utils.h src/detector.h \
- src/geometry.h src/peaks.h src/stream.h \
- src/render.h src/index.h src/image.h \
- src/filters.h src/dirax.h src/mosflm.h \
- src/cell-utils.h \
- src/integer_matrix.h src/crystal.h \
- src/xds.h src/predict-refine.h \
- src/integration.h src/histogram.h \
- src/events.h src/asdf.h src/felix.h \
- src/taketwo.h src/peakfinder8.h
-
-AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib -Wall
-AM_CPPFLAGS += -I$(top_srcdir)/lib @LIBCRYSTFEL_CFLAGS@
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = crystfel.pc
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index be71f496..00000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-gnulib-comp.m4
-gtk-doc.m4
-libtool.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
-lt~obsolete.m4
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
deleted file mode 100644
index 8eca5518..00000000
--- a/m4/00gnulib.m4
+++ /dev/null
@@ -1,46 +0,0 @@
-# 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2014 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This file must be named something that sorts before all other
-dnl gnulib-provided .m4 files. It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
-dnl m4_divert semantics.
-
-# Until autoconf 2.63, handling of the diversion stack required m4_init
-# to be called first; but this does not happen with aclocal. Wrapping
-# the entire execution in another layer of the diversion stack fixes this.
-# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
-# for whether it was FIFO or LIFO; in order to properly balance with
-# m4_init, we need to undo our push just before anything wrapped within
-# the m4_init body. The way to ensure this is to wrap both sides of
-# m4_init with a one-shot macro that does the pop at the right time.
-m4_ifndef([_m4_divert_diversion],
-[m4_divert_push([KILL])
-m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
-m4_define([m4_init],
- [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
-
-
-# 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/m4/absolute-header.m4 b/m4/absolute-header.m4
deleted file mode 100644
index ce3e39e9..00000000
--- a/m4/absolute-header.m4
+++ /dev/null
@@ -1,102 +0,0 @@
-# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2014 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Derek Price.
-
-# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
-# ---------------------------------------
-# Find the absolute name of a header file, testing first if the header exists.
-# If the header were sys/inttypes.h, this macro would define
-# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h
-# in config.h
-# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
-# 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_ABSOLUTE_HEADER],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_PREPROC_REQUIRE()dnl
-dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
-dnl until we can assume autoconf 2.64 or newer.
-m4_foreach_w([gl_HEADER_NAME], [$1],
- [AS_VAR_PUSHDEF([gl_absolute_header],
- [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
- AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
- m4_defn([gl_absolute_header]),
- [AS_VAR_PUSHDEF([ac_header_exists],
- [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
- AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
- if test AS_VAR_GET(ac_header_exists) = yes; then
- gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
- fi
- AS_VAR_POPDEF([ac_header_exists])dnl
- ])dnl
- AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
- ["AS_VAR_GET(gl_absolute_header)"],
- [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
- AS_VAR_POPDEF([gl_absolute_header])dnl
-])dnl
-])# gl_ABSOLUTE_HEADER
-
-# gl_ABSOLUTE_HEADER_ONE(HEADER)
-# ------------------------------
-# Like gl_ABSOLUTE_HEADER, except that:
-# - it assumes that the header exists,
-# - it uses the current CPPFLAGS,
-# - it does not cache the result,
-# - it is silent.
-AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])])
- 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
-changequote(,)
- case "$host_os" in
- mingw*)
- dnl For the sake of native Windows compilers (excluding gcc),
- dnl treat backslash as a directory separator, like /.
- dnl Actually, these compilers use a double-backslash as
- dnl directory separator, inside the
- dnl # line "filename"
- dnl directives.
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- dnl A sed expression that turns a string into a basic regular
- dnl expression, for use within "/.../".
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
- gl_header_literal_regex=`echo '$1' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
-changequote([,])
- 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_cv_absolute_]AS_TR_SH([[$1]]),
-[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n "$gl_absolute_header_sed"`])
-])
diff --git a/m4/ax_with_curses.m4 b/m4/ax_with_curses.m4
deleted file mode 100644
index 33a37ac9..00000000
--- a/m4/ax_with_curses.m4
+++ /dev/null
@@ -1,518 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_with_curses.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_WITH_CURSES
-#
-# DESCRIPTION
-#
-# This macro checks whether a SysV or X/Open-compatible Curses library is
-# present, along with the associated header file. The NcursesW
-# (wide-character) library is searched for first, followed by Ncurses,
-# then the system-default plain Curses. The first library found is the
-# one returned.
-#
-# The following options are understood: --with-ncursesw, --with-ncurses,
-# --without-ncursesw, --without-ncurses. The "--with" options force the
-# macro to use that particular library, terminating with an error if not
-# found. The "--without" options simply skip the check for that library.
-# The effect on the search pattern is:
-#
-# (no options) - NcursesW, Ncurses, Curses
-# --with-ncurses --with-ncursesw - NcursesW only [*]
-# --without-ncurses --with-ncursesw - NcursesW only [*]
-# --with-ncursesw - NcursesW only [*]
-# --with-ncurses --without-ncursesw - Ncurses only [*]
-# --with-ncurses - NcursesW, Ncurses [**]
-# --without-ncurses --without-ncursesw - Curses only
-# --without-ncursesw - Ncurses, Curses
-# --without-ncurses - NcursesW, Curses
-#
-# [*] If the library is not found, abort the configure script.
-#
-# [**] If the second library (Ncurses) is not found, abort configure.
-#
-# The following preprocessor symbols may be defined by this macro if the
-# appropriate conditions are met:
-#
-# HAVE_CURSES - if any SysV or X/Open Curses library found
-# HAVE_CURSES_ENHANCED - if library supports X/Open Enhanced functions
-# HAVE_CURSES_COLOR - if library supports color (enhanced functions)
-# HAVE_CURSES_OBSOLETE - if library supports certain obsolete features
-# HAVE_NCURSESW - if NcursesW (wide char) library is to be used
-# HAVE_NCURSES - if the Ncurses library is to be used
-#
-# HAVE_CURSES_H - if <curses.h> is present and should be used
-# HAVE_NCURSESW_H - if <ncursesw.h> should be used
-# HAVE_NCURSES_H - if <ncurses.h> should be used
-# HAVE_NCURSESW_CURSES_H - if <ncursesw/curses.h> should be used
-# HAVE_NCURSES_CURSES_H - if <ncurses/curses.h> should be used
-#
-# (These preprocessor symbols are discussed later in this document.)
-#
-# The following output variable is defined by this macro; it is precious
-# and may be overridden on the ./configure command line:
-#
-# CURSES_LIB - library to add to xxx_LDADD
-#
-# The library listed in CURSES_LIB is NOT added to LIBS by default. You
-# need to add CURSES_LIB to the appropriate xxx_LDADD line in your
-# Makefile.am. For example:
-#
-# prog_LDADD = @CURSES_LIB@
-#
-# If CURSES_LIB is set on the configure command line (such as by running
-# "./configure CURSES_LIB=-lmycurses"), then the only header searched for
-# is <curses.h>. The user may use the CPPFLAGS precious variable to
-# override the standard #include search path. If the user needs to
-# specify an alternative path for a library (such as for a non-standard
-# NcurseW), the user should use the LDFLAGS variable.
-#
-# The following shell variables may be defined by this macro:
-#
-# ax_cv_curses - set to "yes" if any Curses library found
-# ax_cv_curses_enhanced - set to "yes" if Enhanced functions present
-# ax_cv_curses_color - set to "yes" if color functions present
-# ax_cv_curses_obsolete - set to "yes" if obsolete features present
-#
-# ax_cv_ncursesw - set to "yes" if NcursesW library found
-# ax_cv_ncurses - set to "yes" if Ncurses library found
-# ax_cv_plaincurses - set to "yes" if plain Curses library found
-# ax_cv_curses_which - set to "ncursesw", "ncurses", "plaincurses" or "no"
-#
-# These variables can be used in your configure.ac to determine the level
-# of support you need from the Curses library. For example, if you must
-# have either Ncurses or NcursesW, you could include:
-#
-# AX_WITH_CURSES
-# if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
-# AX_MSG_ERROR([requires either NcursesW or Ncurses library])
-# fi
-#
-# If any Curses library will do (but one must be present and must support
-# color), you could use:
-#
-# AX_WITH_CURSES
-# if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then
-# AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
-# fi
-#
-# Certain preprocessor symbols and shell variables defined by this macro
-# can be used to determine various features of the Curses library. In
-# particular, HAVE_CURSES and ax_cv_curses are defined if the Curses
-# library found conforms to the traditional SysV and/or X/Open Base Curses
-# definition. Any working Curses library conforms to this level.
-#
-# HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the
-# library supports the X/Open Enhanced Curses definition. In particular,
-# the wide-character types attr_t, cchar_t and wint_t, the functions
-# wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES
-# are checked. The Ncurses library does NOT conform to this definition,
-# although NcursesW does.
-#
-# HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library
-# supports color functions and macros such as COLOR_PAIR, A_COLOR,
-# COLOR_WHITE, COLOR_RED and init_pair(). These are NOT part of the
-# X/Open Base Curses definition, but are part of the Enhanced set of
-# functions. The Ncurses library DOES support these functions, as does
-# NcursesW.
-#
-# HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the
-# library supports certain features present in SysV and BSD Curses but not
-# defined in the X/Open definition. In particular, the functions
-# getattrs(), getcurx() and getmaxx() are checked.
-#
-# To use the HAVE_xxx_H preprocessor symbols, insert the following into
-# your system.h (or equivalent) header file:
-#
-# #if defined HAVE_NCURSESW_CURSES_H
-# # include <ncursesw/curses.h>
-# #elif defined HAVE_NCURSESW_H
-# # include <ncursesw.h>
-# #elif defined HAVE_NCURSES_CURSES_H
-# # include <ncurses/curses.h>
-# #elif defined HAVE_NCURSES_H
-# # include <ncurses.h>
-# #elif defined HAVE_CURSES_H
-# # include <curses.h>
-# #else
-# # error "SysV or X/Open-compatible Curses header file required"
-# #endif
-#
-# For previous users of this macro: you should not need to change anything
-# in your configure.ac or Makefile.am, as the previous (serial 10)
-# semantics are still valid. However, you should update your system.h (or
-# equivalent) header file to the fragment shown above. You are encouraged
-# also to make use of the extended functionality provided by this version
-# of AX_WITH_CURSES, as well as in the additional macros
-# AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM.
-#
-# LICENSE
-#
-# Copyright (c) 2009 Mark Pulford <mark@kyne.com.au>
-# Copyright (c) 2009 Damian Pietras <daper@daper.net>
-# Copyright (c) 2012 Reuben Thomas <rrt@sc3d.org>
-# Copyright (c) 2011 John Zaitseff <J.Zaitseff@zap.org.au>
-#
-# 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/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 13
-
-AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
-AC_DEFUN([AX_WITH_CURSES], [
- AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])
- AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses],
- [force the use of Ncurses or NcursesW])],
- [], [with_ncurses=check])
- AC_ARG_WITH([ncursesw], [AS_HELP_STRING([--without-ncursesw],
- [do not use NcursesW (wide character support)])],
- [], [with_ncursesw=check])
-
- ax_saved_LIBS=$LIBS
- AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes],
- [ax_with_plaincurses=no], [ax_with_plaincurses=check])
-
- ax_cv_curses_which=no
-
- # Test for NcursesW
-
- AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [
- LIBS="$ax_saved_LIBS -lncursesw"
-
- AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [
- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
- [ax_cv_ncursesw=yes], [ax_cv_ncursesw=no])
- ])
- AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [
- AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library])
- ])
-
- AS_IF([test "x$ax_cv_ncursesw" = xyes], [
- ax_cv_curses=yes
- ax_cv_curses_which=ncursesw
- CURSES_LIB="-lncursesw"
- AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present])
- AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
-
- AC_CACHE_CHECK([for working ncursesw/curses.h], [ax_cv_header_ncursesw_curses_h], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@define _XOPEN_SOURCE_EXTENDED 1
- @%:@include <ncursesw/curses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- attr_t d = WA_NORMAL;
- cchar_t e;
- wint_t f;
- int g = getattrs(stdscr);
- int h = getcurx(stdscr) + getmaxx(stdscr);
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- wattr_set(stdscr, d, 0, NULL);
- wget_wch(stdscr, &f);
- ]])],
- [ax_cv_header_ncursesw_curses_h=yes],
- [ax_cv_header_ncursesw_curses_h=no])
- ])
- AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xyes], [
- ax_cv_curses_enhanced=yes
- ax_cv_curses_color=yes
- ax_cv_curses_obsolete=yes
- AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
- AC_DEFINE([HAVE_NCURSESW_CURSES_H], [1], [Define to 1 if <ncursesw/curses.h> is present])
- ])
-
- AC_CACHE_CHECK([for working ncursesw.h], [ax_cv_header_ncursesw_h], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@define _XOPEN_SOURCE_EXTENDED 1
- @%:@include <ncursesw.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- attr_t d = WA_NORMAL;
- cchar_t e;
- wint_t f;
- int g = getattrs(stdscr);
- int h = getcurx(stdscr) + getmaxx(stdscr);
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- wattr_set(stdscr, d, 0, NULL);
- wget_wch(stdscr, &f);
- ]])],
- [ax_cv_header_ncursesw_h=yes],
- [ax_cv_header_ncursesw_h=no])
- ])
- AS_IF([test "x$ax_cv_header_ncursesw_h" = xyes], [
- ax_cv_curses_enhanced=yes
- ax_cv_curses_color=yes
- ax_cv_curses_obsolete=yes
- AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
- AC_DEFINE([HAVE_NCURSESW_H], [1], [Define to 1 if <ncursesw.h> is present])
- ])
-
- AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h_with_ncursesw], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@define _XOPEN_SOURCE_EXTENDED 1
- @%:@include <ncurses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- attr_t d = WA_NORMAL;
- cchar_t e;
- wint_t f;
- int g = getattrs(stdscr);
- int h = getcurx(stdscr) + getmaxx(stdscr);
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- wattr_set(stdscr, d, 0, NULL);
- wget_wch(stdscr, &f);
- ]])],
- [ax_cv_header_ncurses_h_with_ncursesw=yes],
- [ax_cv_header_ncurses_h_with_ncursesw=no])
- ])
- AS_IF([test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes], [
- ax_cv_curses_enhanced=yes
- ax_cv_curses_color=yes
- ax_cv_curses_obsolete=yes
- AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
- AC_DEFINE([HAVE_NCURSES_H], [1], [Define to 1 if <ncurses.h> is present])
- ])
-
- AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno], [
- AC_MSG_WARN([could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h])
- ])
- ])
- ])
-
- # Test for Ncurses
-
- AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
- LIBS="$ax_saved_LIBS -lncurses"
-
- AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [
- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
- [ax_cv_ncurses=yes], [ax_cv_ncurses=no])
- ])
- AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [
- AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library])
- ])
-
- AS_IF([test "x$ax_cv_ncurses" = xyes], [
- ax_cv_curses=yes
- ax_cv_curses_which=ncurses
- CURSES_LIB="-lncurses"
- AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present])
- AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
-
- AC_CACHE_CHECK([for working ncurses/curses.h], [ax_cv_header_ncurses_curses_h], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@include <ncurses/curses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- int g = getattrs(stdscr);
- int h = getcurx(stdscr) + getmaxx(stdscr);
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- ]])],
- [ax_cv_header_ncurses_curses_h=yes],
- [ax_cv_header_ncurses_curses_h=no])
- ])
- AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xyes], [
- ax_cv_curses_color=yes
- ax_cv_curses_obsolete=yes
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
- AC_DEFINE([HAVE_NCURSES_CURSES_H], [1], [Define to 1 if <ncurses/curses.h> is present])
- ])
-
- AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@include <ncurses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- int g = getattrs(stdscr);
- int h = getcurx(stdscr) + getmaxx(stdscr);
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- ]])],
- [ax_cv_header_ncurses_h=yes],
- [ax_cv_header_ncurses_h=no])
- ])
- AS_IF([test "x$ax_cv_header_ncurses_h" = xyes], [
- ax_cv_curses_color=yes
- ax_cv_curses_obsolete=yes
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
- AC_DEFINE([HAVE_NCURSES_H], [1], [Define to 1 if <ncurses.h> is present])
- ])
-
- AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno], [
- AC_MSG_WARN([could not find a working ncurses/curses.h or ncurses.h])
- ])
- ])
- ])
-
- # Test for plain Curses (or if CURSES_LIB was set by user)
-
- AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [
- AS_IF([test "x$CURSES_LIB" != x], [
- LIBS="$ax_saved_LIBS $CURSES_LIB"
- ], [
- LIBS="$ax_saved_LIBS -lcurses"
- ])
-
- AC_CACHE_CHECK([for Curses library], [ax_cv_plaincurses], [
- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
- [ax_cv_plaincurses=yes], [ax_cv_plaincurses=no])
- ])
-
- AS_IF([test "x$ax_cv_plaincurses" = xyes], [
- ax_cv_curses=yes
- ax_cv_curses_which=plaincurses
- AS_IF([test "x$CURSES_LIB" = x], [
- CURSES_LIB="-lcurses"
- ])
- AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
-
- # Check for base conformance (and header file)
-
- AC_CACHE_CHECK([for working curses.h], [ax_cv_header_curses_h], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@include <curses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- initscr();
- ]])],
- [ax_cv_header_curses_h=yes],
- [ax_cv_header_curses_h=no])
- ])
- AS_IF([test "x$ax_cv_header_curses_h" = xyes], [
- AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])
-
- # Check for X/Open Enhanced conformance
-
- AC_CACHE_CHECK([for X/Open Enhanced Curses conformance], [ax_cv_plaincurses_enhanced], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@define _XOPEN_SOURCE_EXTENDED 1
- @%:@include <curses.h>
- @%:@ifndef _XOPEN_CURSES
- @%:@error "this Curses library is not enhanced"
- "this Curses library is not enhanced"
- @%:@endif
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- attr_t d = WA_NORMAL;
- cchar_t e;
- wint_t f;
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- wattr_set(stdscr, d, 0, NULL);
- wget_wch(stdscr, &f);
- ]])],
- [ax_cv_plaincurses_enhanced=yes],
- [ax_cv_plaincurses_enhanced=no])
- ])
- AS_IF([test "x$ax_cv_plaincurses_enhanced" = xyes], [
- ax_cv_curses_enhanced=yes
- ax_cv_curses_color=yes
- AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- ])
-
- # Check for color functions
-
- AC_CACHE_CHECK([for Curses color functions], [ax_cv_plaincurses_color], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@define _XOPEN_SOURCE_EXTENDED 1
- @%:@include <curses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- chtype c = COLOR_PAIR(1) & A_COLOR;
- initscr();
- init_pair(1, COLOR_WHITE, COLOR_RED);
- ]])],
- [ax_cv_plaincurses_color=yes],
- [ax_cv_plaincurses_color=no])
- ])
- AS_IF([test "x$ax_cv_plaincurses_color" = xyes], [
- ax_cv_curses_color=yes
- AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
- ])
-
- # Check for obsolete functions
-
- AC_CACHE_CHECK([for obsolete Curses functions], [ax_cv_plaincurses_obsolete], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- @%:@include <curses.h>
- ]], [[
- chtype a = A_BOLD;
- int b = KEY_LEFT;
- int g = getattrs(stdscr);
- int h = getcurx(stdscr) + getmaxx(stdscr);
- initscr();
- ]])],
- [ax_cv_plaincurses_obsolete=yes],
- [ax_cv_plaincurses_obsolete=no])
- ])
- AS_IF([test "x$ax_cv_plaincurses_obsolete" = xyes], [
- ax_cv_curses_obsolete=yes
- AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
- ])
- ])
-
- AS_IF([test "x$ax_cv_header_curses_h" = xno], [
- AC_MSG_WARN([could not find a working curses.h])
- ])
- ])
- ])
-
- AS_IF([test "x$ax_cv_curses" != xyes], [ax_cv_curses=no])
- AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [ax_cv_curses_enhanced=no])
- AS_IF([test "x$ax_cv_curses_color" != xyes], [ax_cv_curses_color=no])
- AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no])
-
- LIBS=$ax_saved_LIBS
-])dnl
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
deleted file mode 100644
index 4ee9e6a1..00000000
--- a/m4/errno_h.m4
+++ /dev/null
@@ -1,137 +0,0 @@
-# errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2014 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 ETXTBSY
-booboo
-#endif
-#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 ENETRESET
-booboo
-#endif
-#if !defined ECONNABORTED
-booboo
-#endif
-#if !defined ESTALE
-booboo
-#endif
-#if !defined EDQUOT
-booboo
-#endif
-#if !defined ECANCELED
-booboo
-#endif
-#if !defined EOWNERDEAD
-booboo
-#endif
-#if !defined ENOTRECOVERABLE
-booboo
-#endif
-#if !defined EILSEQ
-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_NEXT_HEADERS([errno.h])
- ERRNO_H='errno.h'
- fi
- AC_SUBST([ERRNO_H])
- AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$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/m4/extensions.m4 b/m4/extensions.m4
deleted file mode 100644
index 37f55ca3..00000000
--- a/m4/extensions.m4
+++ /dev/null
@@ -1,138 +0,0 @@
-# serial 13 -*- Autoconf -*-
-# Enable extensions on systems that normally disable them.
-
-# Copyright (C) 2003, 2006-2014 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 git
-# Autoconf. Perhaps we can remove this once we can assume Autoconf
-# 2.70 or later everywhere, but since 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_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.])
- AC_DEFINE([_NETBSD_SOURCE], [1],
- [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
- fi
-
-dnl Use a different key than __EXTENSIONS__, as that name broke existing
-dnl configure.ac when using autoheader 2.62.
- AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
-[/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable general extensions on OS X. */
-#ifndef _DARWIN_C_SOURCE
-# undef _DARWIN_C_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 X/Open extensions if necessary. HP-UX 11.11 defines
- mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
- whether compiling with -Ae or -D_HPUX_SOURCE=1. */
-#ifndef _XOPEN_SOURCE
-# undef _XOPEN_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([_DARWIN_C_SOURCE])
- AC_DEFINE([_GNU_SOURCE])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
- AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
- [ac_cv_should_define__xopen_source],
- [ac_cv_should_define__xopen_source=no
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- #include <wchar.h>
- mbstate_t x;]])],
- [],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- #define _XOPEN_SOURCE 500
- #include <wchar.h>
- mbstate_t x;]])],
- [ac_cv_should_define__xopen_source=yes])])])
- test $ac_cv_should_define__xopen_source = yes &&
- AC_DEFINE([_XOPEN_SOURCE], [500])
-])# 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/m4/extern-inline.m4 b/m4/extern-inline.m4
deleted file mode 100644
index 7f1bb397..00000000
--- a/m4/extern-inline.m4
+++ /dev/null
@@ -1,99 +0,0 @@
-dnl 'extern inline' a la ISO C99.
-
-dnl Copyright 2012-2014 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_EXTERN_INLINE],
-[
- AH_VERBATIM([extern_inline],
-[/* Please see the Gnulib manual for how to use these macros.
-
- Suppress extern inline with HP-UX cc, as it appears to be broken; see
- <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
-
- Suppress extern inline with Sun C in standards-conformance mode, as it
- mishandles inline functions that call each other. E.g., for 'inline void f
- (void) { } inline void g (void) { f (); }', c99 incorrectly complains
- 'reference to static identifier "f" in extern inline function'.
- This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
-
- Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
- on configurations that mistakenly use 'static inline' to implement
- functions or macros in standard C headers like <ctype.h>. For example,
- if isdigit is mistakenly implemented via a static inline function,
- a program containing an extern inline function that calls isdigit
- may not work since the C standard prohibits extern inline functions
- from calling static functions. This bug is known to occur on:
-
- OS X 10.8 and earlier; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
-
- DragonFly; see
- http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
-
- FreeBSD; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
-
- OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
- for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
- Assume DragonFly and FreeBSD will be similar. */
-#if (((defined __APPLE__ && defined __MACH__) \
- || defined __DragonFly__ || defined __FreeBSD__) \
- && (defined __header_inline \
- ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
- && ! defined __clang__) \
- : ((! defined _DONT_USE_CTYPE_INLINE_ \
- && (defined __GNUC__ || defined __cplusplus)) \
- || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
- && defined __GNUC__ && ! defined __cplusplus))))
-# define _GL_EXTERN_INLINE_STDHEADER_BUG
-#endif
-#if ((__GNUC__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : (199901L <= __STDC_VERSION__ \
- && !defined __HP_cc \
- && !(defined __SUNPRO_C && __STDC__))) \
- && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
-# define _GL_INLINE inline
-# define _GL_EXTERN_INLINE extern inline
-# define _GL_EXTERN_INLINE_IN_USE
-#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
- && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
-# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
- /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
-# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
-# else
-# define _GL_INLINE extern inline
-# endif
-# define _GL_EXTERN_INLINE extern
-# define _GL_EXTERN_INLINE_IN_USE
-#else
-# define _GL_INLINE static _GL_UNUSED
-# define _GL_EXTERN_INLINE static _GL_UNUSED
-#endif
-
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
-# define _GL_INLINE_HEADER_CONST_PRAGMA
-# else
-# define _GL_INLINE_HEADER_CONST_PRAGMA \
- _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
-# endif
- /* Suppress GCC's bogus "no previous prototype for 'FOO'"
- and "no previous declaration for 'FOO'" diagnostics,
- when FOO is an inline function in the header; see
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
-# define _GL_INLINE_HEADER_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
- _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
- _GL_INLINE_HEADER_CONST_PRAGMA
-# define _GL_INLINE_HEADER_END \
- _Pragma ("GCC diagnostic pop")
-#else
-# define _GL_INLINE_HEADER_BEGIN
-# define _GL_INLINE_HEADER_END
-#endif])
-])
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
deleted file mode 100644
index 43c93124..00000000
--- a/m4/fcntl-o.m4
+++ /dev/null
@@ -1,134 +0,0 @@
-# fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2014 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_CHECK_HEADERS_ONCE([unistd.h])
- AC_CHECK_FUNCS_ONCE([symlink])
- 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>
- #if HAVE_UNISTD_H
- # include <unistd.h>
- #else /* on Windows with MSVC */
- # include <io.h>
- # include <stdlib.h>
- # defined sleep(n) _sleep ((n) * 1000)
- #endif
- #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;
- #if HAVE_SYMLINK
- {
- static char const sym[] = "conftest.sym";
- if (symlink ("/dev/null", sym) != 0)
- result |= 2;
- else
- {
- int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
- if (fd >= 0)
- {
- close (fd);
- result |= 4;
- }
- }
- if (unlink (sym) != 0 || symlink (".", sym) != 0)
- result |= 2;
- else
- {
- int fd = open (sym, O_RDONLY | O_NOFOLLOW);
- if (fd >= 0)
- {
- close (fd);
- result |= 4;
- }
- }
- unlink (sym);
- }
- #endif
- {
- 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/m4/fcntl_h.m4 b/m4/fcntl_h.m4
deleted file mode 100644
index fb2556d3..00000000
--- a/m4/fcntl_h.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# serial 15
-# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2014 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_FCNTL_H],
-[
- AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
- AC_REQUIRE([gl_FCNTL_O_FLAGS])
- gl_NEXT_HEADERS([fcntl.h])
-
- dnl Ensure the type pid_t gets defined.
- AC_REQUIRE([AC_TYPE_PID_T])
-
- dnl Ensure the type mode_t gets defined.
- AC_REQUIRE([AC_TYPE_MODE_T])
-
- dnl Check for declarations of anything we want to poison if the
- dnl corresponding gnulib module is not in use, if it is not common
- dnl enough to be declared everywhere.
- gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
- ]], [fcntl openat])
-])
-
-AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_FCNTL_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_FCNTL_H_DEFAULTS],
-[
- GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
- GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
- GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
- GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
- HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
- REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
- REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
- REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
-])
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
deleted file mode 100644
index d4eafa67..00000000
--- a/m4/gnulib-cache.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This file 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 file. If not, see <http://www.gnu.org/licenses/>.
-#
-# 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=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl forkpty lib-ignore strndup
-
-# Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_LOCAL_DIR([])
-gl_MODULES([
- forkpty
- lib-ignore
- strndup
-])
-gl_AVOID([])
-gl_SOURCE_BASE([lib])
-gl_M4_BASE([m4])
-gl_PO_BASE([])
-gl_DOC_BASE([doc])
-gl_TESTS_BASE([tests])
-gl_LIB([libgnu])
-gl_MAKEFILE_NAME([])
-gl_LIBTOOL
-gl_MACRO_PREFIX([gl])
-gl_PO_DOMAIN([])
-gl_WITNESS_C_MACRO([])
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
deleted file mode 100644
index 35f61952..00000000
--- a/m4/gnulib-common.m4
+++ /dev/null
@@ -1,447 +0,0 @@
-# gnulib-common.m4 serial 35
-dnl Copyright (C) 2007-2014 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([_Noreturn],
-[/* The _Noreturn keyword of C11. */
-#if ! (defined _Noreturn \
- || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
-# define _Noreturn __attribute__ ((__noreturn__))
-# elif defined _MSC_VER && 1200 <= _MSC_VER
-# define _Noreturn __declspec (noreturn)
-# else
-# define _Noreturn
-# endif
-#endif
-])
- 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 Mac OS 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
-
-/* gcc supports the "unused" attribute on possibly unused labels, and
- g++ has since version 4.5. Note to support C++ as well as C,
- _GL_UNUSED_LABEL should be used with a trailing ; */
-#if !defined __cplusplus || __GNUC__ > 4 \
- || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-# define _GL_UNUSED_LABEL _GL_UNUSED
-#else
-# define _GL_UNUSED_LABEL
-#endif
-
-/* The __pure__ attribute 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
-
-/* The __const__ attribute was added in gcc 2.95. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-#else
-# define _GL_ATTRIBUTE_CONST /* empty */
-#endif
-])
- 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.
-m4_define([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],
-[
- gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
- [GNULIB_[]m4_translit([[$1]],
- [abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
- [gl_MODULE_INDICATOR_CONDITION])
-])
-
-# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
-# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
-# The shell variable's value is a C preprocessor expression that evaluates
-# to 0 or 1.
-AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
-[
- m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
- [
- dnl Simplify the expression VALUE || 1 to 1.
- $1=1
- ],
- [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
- [gl_MODULE_INDICATOR_CONDITION])])
-])
-
-# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
-# modifies the shell variable to include the given condition. The shell
-# variable's value is a C preprocessor expression that evaluates to 0 or 1.
-AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
-[
- dnl Simplify the expression 1 || CONDITION to 1.
- if test "$[]$1" != 1; then
- dnl Simplify the expression 0 || CONDITION to CONDITION.
- if test "$[]$1" = 0; then
- $1=$2
- else
- $1="($[]$1 || $2)"
- fi
- fi
-])
-
-# 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.])
-])
-
-# gl_ASSERT_NO_GNULIB_POSIXCHECK
-# asserts that there will never be a need to #define GNULIB_POSIXCHECK.
-# and thereby enables an optimization of configure and config.h.
-# Used by Emacs.
-AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK],
-[
- dnl Override gl_WARN_ON_USE_PREPARE.
- dnl But hide this definition from 'aclocal'.
- AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], [])
-])
-
-# gl_ASSERT_NO_GNULIB_TESTS
-# asserts that there will be no gnulib tests in the scope of the configure.ac
-# and thereby enables an optimization of config.h.
-# Used by Emacs.
-AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS],
-[
- dnl Override gl_MODULE_INDICATOR_FOR_TESTS.
- AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [])
-])
-
-# 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])])])
-
-# gl_PROG_CC_C99
-# Modifies the value of the shell variable CC in an attempt to make $CC
-# understand ISO C99 source code.
-# This is like AC_PROG_CC_C99, except that
-# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
-# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
-# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
-# Remaining problems:
-# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
-# to CC twice
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
-# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
-AC_DEFUN([gl_PROG_CC_C99],
-[
- dnl Change that version number to the minimum Autoconf version that supports
- dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
- m4_version_prereq([9.0],
- [AC_REQUIRE([AC_PROG_CC_C99])],
- [AC_REQUIRE([AC_PROG_CC_STDC])])
-])
-
-# gl_PROG_AR_RANLIB
-# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
-# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override
-# the values.
-AC_DEFUN([gl_PROG_AR_RANLIB],
-[
- dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
- dnl as "cc", and GCC as "gcc". They have different object file formats and
- dnl library formats. In particular, the GNU binutils programs ar, ranlib
- dnl produce libraries that work only with gcc, not with cc.
- AC_REQUIRE([AC_PROG_CC])
- AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
- [
- AC_EGREP_CPP([Amsterdam],
- [
-#ifdef __ACK__
-Amsterdam
-#endif
- ],
- [gl_cv_c_amsterdam_compiler=yes],
- [gl_cv_c_amsterdam_compiler=no])
- ])
- if test -z "$AR"; then
- if test $gl_cv_c_amsterdam_compiler = yes; then
- AR='cc -c.a'
- if test -z "$ARFLAGS"; then
- ARFLAGS='-o'
- fi
- else
- dnl Use the Automake-documented default values for AR and ARFLAGS,
- dnl but prefer ${host}-ar over ar (useful for cross-compiling).
- AC_CHECK_TOOL([AR], [ar], [ar])
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
- fi
- else
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
- fi
- AC_SUBST([AR])
- AC_SUBST([ARFLAGS])
- if test -z "$RANLIB"; then
- if test $gl_cv_c_amsterdam_compiler = yes; then
- RANLIB=':'
- else
- dnl Use the ranlib program if it is available.
- AC_PROG_RANLIB
- fi
- fi
- AC_SUBST([RANLIB])
-])
-
-# 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.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
-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.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
-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"
-])
-
-# AS_VAR_COPY was added in autoconf 2.63b
-m4_define_default([AS_VAR_COPY],
-[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
-
-# AC_PROG_SED was added in autoconf 2.59b
-m4_ifndef([AC_PROG_SED],
-[AC_DEFUN([AC_PROG_SED],
-[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
- [dnl ac_script should not contain more than 99 commands (for HP-UX sed),
- dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed.
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- AS_UNSET([ac_script])
- if test -z "$SED"; then
- ac_path_SED_found=false
- _AS_PATH_WALK([], [
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- AS_EXECUTABLE_P(["$ac_path_SED"]) || continue
- case `"$ac_path_SED" --version 2>&1` in
- *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;;
- *)
- ac_count=0
- _AS_ECHO_N([0123456789]) >conftest.in
- while :
- do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >> conftest.nl
- "$ac_path_SED" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
- diff conftest.out conftest.nl >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best so far, but keep looking for better
- ac_cv_path_SED=$ac_path_SED
- ac_path_SED_max=$ac_count
- fi
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
- esac
- $ac_path_SED_found && break 3
- done
- done])
- if test -z "$ac_cv_path_SED"; then
- AC_ERROR([no acceptable sed could be found in \$PATH])
- fi
- else
- ac_cv_path_SED=$SED
- fi
- SED="$ac_cv_path_SED"
- AC_SUBST([SED])dnl
- rm -f conftest.sed
-])])])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
deleted file mode 100644
index ddbf6574..00000000
--- a/m4/gnulib-comp.m4
+++ /dev/null
@@ -1,357 +0,0 @@
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This file 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 file. If not, see <http://www.gnu.org/licenses/>.
-#
-# 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([gl_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([gl_PROG_AR_RANLIB])
- # Code from module absolute-header:
- # Code from module errno:
- # Code from module extensions:
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- # Code from module extern-inline:
- # Code from module fcntl-h:
- # Code from module fd-hook:
- # Code from module forkpty:
- # Code from module include_next:
- # Code from module ioctl:
- # Code from module lib-ignore:
- # Code from module login_tty:
- # Code from module msvc-inval:
- # Code from module msvc-nothrow:
- # Code from module openpty:
- # Code from module posix_openpt:
- # Code from module pty:
- # Code from module snippet/_Noreturn:
- # Code from module snippet/arg-nonnull:
- # Code from module snippet/c++defs:
- # Code from module snippet/warn-on-use:
- # Code from module socklen:
- # Code from module ssize_t:
- # Code from module stdalign:
- # Code from module stddef:
- # Code from module stdlib:
- # Code from module string:
- # Code from module strndup:
- # Code from module strnlen:
- # Code from module sys_ioctl:
- # Code from module sys_socket:
- # Code from module sys_types:
- # Code from module sys_uio:
- # Code from module unistd:
-])
-
-# This macro should be invoked from ./configure.ac, in the section
-# "Check for header files, types and library functions".
-AC_DEFUN([gl_INIT],
-[
- AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
- gl_cond_libtool=true
- gl_m4_base='m4'
- m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
- m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
- m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
- m4_pushdef([gl_LIBSOURCES_LIST], [])
- m4_pushdef([gl_LIBSOURCES_DIR], [])
- gl_COMMON
- gl_source_base='lib'
- gl_HEADER_ERRNO_H
- AC_REQUIRE([gl_EXTERN_INLINE])
- gl_FCNTL_H
- gl_FUNC_FORKPTY
- if test $HAVE_FORKPTY = 0 || test $REPLACE_FORKPTY = 1; then
- AC_LIBOBJ([forkpty])
- fi
- gl_PTY_MODULE_INDICATOR([forkpty])
- gl_FUNC_IOCTL
- if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
- AC_LIBOBJ([ioctl])
- fi
- gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
- gl_IGNORE_UNUSED_LIBRARIES
- gl_FUNC_LOGIN_TTY
- if test $ac_cv_func_login_tty = no; then
- AC_LIBOBJ([login_tty])
- fi
- gl_PTY_MODULE_INDICATOR([login_tty])
- gl_MSVC_INVAL
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- AC_LIBOBJ([msvc-inval])
- fi
- gl_MSVC_NOTHROW
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- AC_LIBOBJ([msvc-nothrow])
- fi
- gl_FUNC_OPENPTY
- if test $HAVE_OPENPTY = 0 || test $REPLACE_OPENPTY = 1; then
- AC_LIBOBJ([openpty])
- fi
- gl_PTY_MODULE_INDICATOR([openpty])
- gl_FUNC_POSIX_OPENPT
- if test $HAVE_POSIX_OPENPT = 0; then
- AC_LIBOBJ([posix_openpt])
- fi
- gl_STDLIB_MODULE_INDICATOR([posix_openpt])
- gl_PTY_H
- gl_TYPE_SOCKLEN_T
- gt_TYPE_SSIZE_T
- gl_STDALIGN_H
- gl_STDDEF_H
- gl_STDLIB_H
- gl_HEADER_STRING_H
- gl_FUNC_STRNDUP
- if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
- AC_LIBOBJ([strndup])
- fi
- gl_STRING_MODULE_INDICATOR([strndup])
- gl_FUNC_STRNLEN
- if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
- AC_LIBOBJ([strnlen])
- gl_PREREQ_STRNLEN
- fi
- gl_STRING_MODULE_INDICATOR([strnlen])
- gl_SYS_IOCTL_H
- AC_PROG_MKDIR_P
- gl_HEADER_SYS_SOCKET
- AC_PROG_MKDIR_P
- gl_SYS_TYPES_H
- AC_PROG_MKDIR_P
- gl_HEADER_SYS_UIO
- AC_PROG_MKDIR_P
- gl_UNISTD_H
- # End of code from modules
- m4_ifval(gl_LIBSOURCES_LIST, [
- m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
- for gl_file in ]gl_LIBSOURCES_LIST[ ; do
- if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
- echo "missing file ]m4_defn([gl_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([gl_LIBSOURCES_DIR])
- m4_popdef([gl_LIBSOURCES_LIST])
- m4_popdef([AC_LIBSOURCES])
- m4_popdef([AC_REPLACE_FUNCS])
- m4_popdef([AC_LIBOBJ])
- AC_CONFIG_COMMANDS_PRE([
- gl_libobjs=
- gl_ltlibobjs=
- if test -n "$gl_LIBOBJS"; then
- # Remove the extension.
- sed_drop_objext='s/\.o$//;s/\.obj$//'
- for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
- gl_libobjs="$gl_libobjs $i.$ac_objext"
- gl_ltlibobjs="$gl_ltlibobjs $i.lo"
- done
- fi
- AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
- AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
- ])
- gltests_libdeps=
- gltests_ltlibdeps=
- m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
- m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
- m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
- m4_pushdef([gltests_LIBSOURCES_LIST], [])
- m4_pushdef([gltests_LIBSOURCES_DIR], [])
- gl_COMMON
- gl_source_base='tests'
-changequote(,)dnl
- gltests_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([gltests_WITNESS])
- gl_module_indicator_condition=$gltests_WITNESS
- m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
- m4_popdef([gl_MODULE_INDICATOR_CONDITION])
- m4_ifval(gltests_LIBSOURCES_LIST, [
- m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
- for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
- if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
- echo "missing file ]m4_defn([gltests_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([gltests_LIBSOURCES_DIR])
- m4_popdef([gltests_LIBSOURCES_LIST])
- m4_popdef([AC_LIBSOURCES])
- m4_popdef([AC_REPLACE_FUNCS])
- m4_popdef([AC_LIBOBJ])
- AC_CONFIG_COMMANDS_PRE([
- gltests_libobjs=
- gltests_ltlibobjs=
- if test -n "$gltests_LIBOBJS"; then
- # Remove the extension.
- sed_drop_objext='s/\.o$//;s/\.obj$//'
- for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
- gltests_libobjs="$gltests_libobjs $i.$ac_objext"
- gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
- done
- fi
- AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
- AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
- ])
-])
-
-# Like AC_LIBOBJ, except that the module name goes
-# into gl_LIBOBJS instead of into LIBOBJS.
-AC_DEFUN([gl_LIBOBJ], [
- AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
- gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
-])
-
-# Like AC_REPLACE_FUNCS, except that the module name goes
-# into gl_LIBOBJS instead of into LIBOBJS.
-AC_DEFUN([gl_REPLACE_FUNCS], [
- m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
- AC_CHECK_FUNCS([$1], , [gl_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([gl_LIBSOURCES], [
- m4_foreach([_gl_NAME], [$1], [
- m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([gl_LIBSOURCES_DIR], [lib])
- m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
- ])
- ])
-])
-
-# Like AC_LIBOBJ, except that the module name goes
-# into gltests_LIBOBJS instead of into LIBOBJS.
-AC_DEFUN([gltests_LIBOBJ], [
- AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
- gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
-])
-
-# Like AC_REPLACE_FUNCS, except that the module name goes
-# into gltests_LIBOBJS instead of into LIBOBJS.
-AC_DEFUN([gltests_REPLACE_FUNCS], [
- m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
- AC_CHECK_FUNCS([$1], , [gltests_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([gltests_LIBSOURCES], [
- m4_foreach([_gl_NAME], [$1], [
- m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([gltests_LIBSOURCES_DIR], [tests])
- m4_append([gltests_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([gl_FILE_LIST], [
- build-aux/snippet/_Noreturn.h
- build-aux/snippet/arg-nonnull.h
- build-aux/snippet/c++defs.h
- build-aux/snippet/warn-on-use.h
- lib/errno.in.h
- lib/fcntl.in.h
- lib/fd-hook.c
- lib/fd-hook.h
- lib/forkpty.c
- lib/ioctl.c
- lib/login_tty.c
- lib/msvc-inval.c
- lib/msvc-inval.h
- lib/msvc-nothrow.c
- lib/msvc-nothrow.h
- lib/openpty.c
- lib/posix_openpt.c
- lib/pty.in.h
- lib/stdalign.in.h
- lib/stddef.in.h
- lib/stdlib.in.h
- lib/string.in.h
- lib/strndup.c
- lib/strnlen.c
- lib/sys_ioctl.in.h
- lib/sys_socket.c
- lib/sys_socket.in.h
- lib/sys_types.in.h
- lib/sys_uio.in.h
- lib/unistd.c
- lib/unistd.in.h
- lib/w32sock.h
- m4/00gnulib.m4
- m4/absolute-header.m4
- m4/errno_h.m4
- m4/extensions.m4
- m4/extern-inline.m4
- m4/fcntl-o.m4
- m4/fcntl_h.m4
- m4/gnulib-common.m4
- m4/include_next.m4
- m4/ioctl.m4
- m4/lib-ignore.m4
- m4/msvc-inval.m4
- m4/msvc-nothrow.m4
- m4/off_t.m4
- m4/onceonly.m4
- m4/posix_openpt.m4
- m4/pty.m4
- m4/pty_h.m4
- m4/socklen.m4
- m4/sockpfaf.m4
- m4/ssize_t.m4
- m4/stdalign.m4
- m4/stddef_h.m4
- m4/stdlib_h.m4
- m4/string_h.m4
- m4/strndup.m4
- m4/strnlen.m4
- m4/sys_ioctl_h.m4
- m4/sys_socket_h.m4
- m4/sys_types_h.m4
- m4/sys_uio_h.m4
- m4/unistd_h.m4
- m4/warn-on-use.m4
- m4/wchar_t.m4
-])
diff --git a/m4/gnulib-tool.m4 b/m4/gnulib-tool.m4
deleted file mode 100644
index a588e151..00000000
--- a/m4/gnulib-tool.m4
+++ /dev/null
@@ -1,57 +0,0 @@
-# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2014 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/m4/include_next.m4 b/m4/include_next.m4
deleted file mode 100644
index 69ad3dbb..00000000
--- a/m4/include_next.m4
+++ /dev/null
@@ -1,223 +0,0 @@
-# include_next.m4 serial 23
-dnl Copyright (C) 2006-2014 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.
-#
-# This macro also checks whether each header exists, by invoking
-# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument.
-AC_DEFUN([gl_CHECK_NEXT_HEADERS],
-[
- gl_NEXT_HEADERS_INTERNAL([$1], [check])
-])
-
-# gl_NEXT_HEADERS(HEADER1 HEADER2 ...)
-# ------------------------------------
-# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist.
-# This is suitable for headers like <stddef.h> that are standardized by C89
-# and therefore can be assumed to exist.
-AC_DEFUN([gl_NEXT_HEADERS],
-[
- gl_NEXT_HEADERS_INTERNAL([$1], [assume])
-])
-
-# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS.
-AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
-[
- AC_REQUIRE([gl_INCLUDE_NEXT])
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- m4_if([$2], [check],
- [AC_CHECK_HEADERS_ONCE([$1])
- ])
-
-dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
-dnl until we can assume autoconf 2.64 or newer.
- 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]),
- [m4_if([$2], [check],
- [AS_VAR_PUSHDEF([gl_header_exists],
- [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
- if test AS_VAR_GET(gl_header_exists) = yes; then
- AS_VAR_POPDEF([gl_header_exists])
- ])
- gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
- AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
- AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
- m4_if([$2], [check],
- [else
- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
- fi
- ])
- ])
- 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/m4/ioctl.m4 b/m4/ioctl.m4
deleted file mode 100644
index 5a31a396..00000000
--- a/m4/ioctl.m4
+++ /dev/null
@@ -1,41 +0,0 @@
-# ioctl.m4 serial 4
-dnl Copyright (C) 2008-2014 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_IOCTL],
-[
- AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
- AC_REQUIRE([gl_HEADER_SYS_SOCKET])
- HAVE_IOCTL=1
- if test "$ac_cv_header_winsock2_h" = yes; then
- dnl Even if the 'socket' module is not used here, another part of the
- dnl application may use it and pass file descriptors that refer to
- dnl sockets to the ioctl() function. So enable the support for sockets.
- HAVE_IOCTL=0
- else
- AC_CHECK_FUNCS([ioctl])
- dnl On glibc systems, the second parameter is 'unsigned long int request',
- dnl not 'int request'. We cannot simply cast the function pointer, but
- dnl instead need a wrapper.
- AC_CACHE_CHECK([for ioctl with POSIX signature],
- [gl_cv_func_ioctl_posix_signature],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/ioctl.h>]],
- [[extern
- #ifdef __cplusplus
- "C"
- #endif
- int ioctl (int, int, ...);
- ]])
- ],
- [gl_cv_func_ioctl_posix_signature=yes],
- [gl_cv_func_ioctl_posix_signature=no])
- ])
- if test $gl_cv_func_ioctl_posix_signature != yes; then
- REPLACE_IOCTL=1
- fi
- fi
-])
diff --git a/m4/lib-ignore.m4 b/m4/lib-ignore.m4
deleted file mode 100644
index 7baa5283..00000000
--- a/m4/lib-ignore.m4
+++ /dev/null
@@ -1,115 +0,0 @@
-# If possible, ignore libraries that are not depended on.
-
-dnl Copyright (C) 2006, 2009-2014 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.
-
-# gl_IGNORE_UNUSED_LIBRARIES
-# --------------------------
-# Determines the option to be passed to the C/C++/Fortran compiler, so that it
-# omits unused libraries.
-# Example (on Solaris):
-# $ cc foo.c -lnsl; ldd ./a.out
-# libnsl.so.1 => /lib/libnsl.so.1
-# libc.so.1 => /lib/libc.so.1
-# libmp.so.2 => /lib/libmp.so.2
-# libmd.so.1 => /lib/libmd.so.1
-# libscf.so.1 => /lib/libscf.so.1
-# libdoor.so.1 => /lib/libdoor.so.1
-# libuutil.so.1 => /lib/libuutil.so.1
-# libgen.so.1 => /lib/libgen.so.1
-# libm.so.2 => /lib/libm.so.2
-# $ cc foo.c -lnsl -Wl,-z,ignore; ldd ./a.out
-# libc.so.1 => /lib/libc.so.1
-# libm.so.2 => /lib/libm.so.2
-#
-# Note that the option works only for the C compiler, not for the C++
-# compiler:
-# - Sun C likes '-Wl,-z,ignore'.
-# '-Qoption ld -z,ignore' is not accepted.
-# '-z ignore' is accepted but has no effect.
-# - Sun C++ and Sun Fortran like '-Qoption ld -z,ignore'.
-# '-Wl,-z,ignore' is not accepted.
-# '-z ignore' is accepted but has no effect.
-#
-# Sets and substitutes a variable that depends on the current language:
-# - IGNORE_UNUSED_LIBRARIES_CFLAGS for C
-# - IGNORE_UNUSED_LIBRARIES_CXXFLAGS for C++
-# - IGNORE_UNUSED_LIBRARIES_FFLAGS for Fortran
-#
-# Note that the option works only for direct invocation of the compiler, not
-# through libtool: When libtool is used to create a shared library, it will
-# honor and translate '-Wl,-z,ignore' to '-Qoption ld -z -Qoption ld ignore'
-# if needed, but it will drop a '-Qoption ld -z,ignore' on the command line.
-#
-AC_DEFUN([gl_IGNORE_UNUSED_LIBRARIES],
-[
- AC_CACHE_CHECK([for []_AC_LANG[] compiler flag to ignore unused libraries],
- [gl_cv_prog_[]_AC_LANG_ABBREV[]_ignore_unused_libraries],
- [gl_cv_prog_[]_AC_LANG_ABBREV[]_ignore_unused_libraries=none
- gl_saved_ldflags=$LDFLAGS
- gl_saved_libs=$LIBS
- # Link with -lm to detect binutils 2.16 bug with --as-needed; see
- # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
- LIBS="$LIBS -lm"
- # Use long option sequences like '-z ignore' to test for the feature,
- # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
- # GCC + binutils likes '-Wl,--as-needed'.
- # GCC + Solaris ld likes '-Wl,-z,ignore'.
- # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
- # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
- # native cc issues annoying warnings and then ignores it,
- # which would cause us to incorrectly conclude that it worked.
- for gl_flags in _gl_IGNORE_UNUSED_LIBRARIES_OPTIONS
- do
- LDFLAGS="$gl_flags $LDFLAGS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM()],
- [gl_cv_prog_[]_AC_LANG_ABBREV[]_ignore_unused_libraries=$gl_flags])
- LDFLAGS=$gl_saved_ldflags
- test "$gl_cv_prog_[]_AC_LANG_ABBREV[]_ignore_unused_libraries" != none &&
- break
- done
- LIBS=$gl_saved_libs
- ])
- IGNORE_UNUSED_LIBRARIES_[]_AC_LANG_PREFIX[]FLAGS=
- if test "$gl_cv_prog_[]_AC_LANG_ABBREV[]_ignore_unused_libraries" != none; then
- IGNORE_UNUSED_LIBRARIES_[]_AC_LANG_PREFIX[]FLAGS="$gl_cv_prog_[]_AC_LANG_ABBREV[]_ignore_unused_libraries"
- fi
- AC_SUBST([IGNORE_UNUSED_LIBRARIES_]_AC_LANG_PREFIX[FLAGS])
-])
-
-# _gl_IGNORE_UNUSED_LIBRARIES_OPTIONS
-# -----------------------------------
-# Expands to the language dependent options to be tried.
-AC_DEFUN([_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS],
-[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
-
-# _gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(C)
-# --------------------------------------
-m4_define([_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(C)],
-[ '-Wl,--as-needed' \
- '-Wl,-z,ignore' \
- '-z ignore'
-])
-
-# _gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(C++)
-# ----------------------------------------
-m4_define([_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(C++)],
-[ '-Wl,--as-needed' \
- '-Qoption ld -z,ignore' \
- '-Wl,-z,ignore' \
- '-z ignore'
-])
-
-# _gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(Fortran 77)
-# -----------------------------------------------
-m4_copy([_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(C++)],
- [_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(Fortran 77)])
-
-# _gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(Fortran)
-# --------------------------------------------
-m4_copy([_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(Fortran 77)],
- [_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS(Fortran)])
diff --git a/m4/msvc-inval.m4 b/m4/msvc-inval.m4
deleted file mode 100644
index 7f26087e..00000000
--- a/m4/msvc-inval.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2014 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_MSVC_INVAL],
-[
- AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler])
- if test $ac_cv_func__set_invalid_parameter_handler = yes; then
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
- AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1],
- [Define to 1 on MSVC platforms that have the "invalid parameter handler"
- concept.])
- else
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
- fi
- AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER])
-])
diff --git a/m4/msvc-nothrow.m4 b/m4/msvc-nothrow.m4
deleted file mode 100644
index 9e32c171..00000000
--- a/m4/msvc-nothrow.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2014 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_MSVC_NOTHROW],
-[
- AC_REQUIRE([gl_MSVC_INVAL])
-])
diff --git a/m4/off_t.m4 b/m4/off_t.m4
deleted file mode 100644
index f5885b34..00000000
--- a/m4/off_t.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-# off_t.m4 serial 1
-dnl Copyright (C) 2012-2014 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 Check whether to override the 'off_t' type.
-dnl Set WINDOWS_64_BIT_OFF_T.
-
-AC_DEFUN([gl_TYPE_OFF_T],
-[
- m4_ifdef([gl_LARGEFILE], [
- AC_REQUIRE([gl_LARGEFILE])
- ], [
- WINDOWS_64_BIT_OFF_T=0
- ])
- AC_SUBST([WINDOWS_64_BIT_OFF_T])
-])
diff --git a/m4/onceonly.m4 b/m4/onceonly.m4
deleted file mode 100644
index 15f94cef..00000000
--- a/m4/onceonly.m4
+++ /dev/null
@@ -1,104 +0,0 @@
-# onceonly.m4 serial 9
-dnl Copyright (C) 2002-2003, 2005-2006, 2008-2014 Free Software Foundation,
-dnl Inc.
-dnl
-dnl This file is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This file is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this file. If not, see <http://www.gnu.org/licenses/>.
-dnl
-dnl As a special exception to the GNU General Public License,
-dnl this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl This file defines some "once only" variants of standard autoconf macros.
-dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
-dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
-dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
-dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL
-dnl The advantage is that the check for each of the headers/functions/decls
-dnl will be put only once into the 'configure' file. It keeps the size of
-dnl the 'configure' file down, and avoids redundant output when 'configure'
-dnl is run.
-dnl The drawback is that the checks cannot be conditionalized. If you write
-dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
-dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
-dnl empty, and the check will be inserted before the body of the AC_DEFUNed
-dnl function.
-
-dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE
-dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to
-dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested
-dnl headers at once, thus reducing the size of 'configure'. It is known to work
-dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%.
-
-dnl Autoconf version 2.59 plus gnulib is required; this file is not needed
-dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of
-dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first
-dnl argument!
-AC_PREREQ([2.59])
-
-# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
-# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
-AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
- :
- m4_foreach_w([gl_HEADER_NAME], [$1], [
- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME,
- [./-], [___])), [
- m4_divert_text([INIT_PREPARE],
- [gl_header_list="$gl_header_list gl_HEADER_NAME"])
- gl_HEADERS_EXPANSION
- AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
- [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
- ])
- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME,
- [./-], [___])))
- ])
-])
-m4_define([gl_HEADERS_EXPANSION], [
- m4_divert_text([DEFAULTS], [gl_header_list=])
- AC_CHECK_HEADERS([$gl_header_list])
- m4_define([gl_HEADERS_EXPANSION], [])
-])
-
-# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
-# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
-AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
- :
- m4_foreach_w([gl_FUNC_NAME], [$1], [
- AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
- m4_divert_text([INIT_PREPARE],
- [gl_func_list="$gl_func_list gl_FUNC_NAME"])
- gl_FUNCS_EXPANSION
- AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
- [Define to 1 if you have the ']m4_defn([gl_FUNC_NAME])[' function.])
- ])
- AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
- ])
-])
-m4_define([gl_FUNCS_EXPANSION], [
- m4_divert_text([DEFAULTS], [gl_func_list=])
- AC_CHECK_FUNCS([$gl_func_list])
- m4_define([gl_FUNCS_EXPANSION], [])
-])
-
-# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
-# AC_CHECK_DECLS(DECL1, DECL2, ...).
-AC_DEFUN([AC_CHECK_DECLS_ONCE], [
- :
- m4_foreach_w([gl_DECL_NAME], [$1], [
- AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
- AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
- ])
- AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
- ])
-])
diff --git a/m4/posix_openpt.m4 b/m4/posix_openpt.m4
deleted file mode 100644
index 252a074d..00000000
--- a/m4/posix_openpt.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-# posix_openpt.m4 serial 2
-dnl Copyright (C) 2011-2014 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_POSIX_OPENPT],
-[
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
-
- dnl Persuade Solaris <stdlib.h> to declare posix_openpt().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_CHECK_FUNCS_ONCE([posix_openpt])
- if test $ac_cv_func_posix_openpt != yes; then
- dnl The system does not have posix_openpt.
- HAVE_POSIX_OPENPT=0
- fi
-])
diff --git a/m4/pty.m4 b/m4/pty.m4
deleted file mode 100644
index c68cca75..00000000
--- a/m4/pty.m4
+++ /dev/null
@@ -1,148 +0,0 @@
-# pty.m4 serial 13
-dnl Copyright (C) 2010-2014 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_PTY_LIB
-# ----------
-# Define automake variable PTY_LIB to the library needed (if any).
-AC_DEFUN([gl_PTY_LIB],
-[
- # Check for the library required for forkpty.
- PTY_LIB=
- save_LIBS="$LIBS"
- AC_SEARCH_LIBS([forkpty], [util],
- [if test "$ac_cv_search_forkpty" != "none required"; then
- PTY_LIB="$ac_cv_search_forkpty"
- fi])
- LIBS="$save_LIBS"
- AC_SUBST([PTY_LIB])
-])
-
-AC_DEFUN([gl_FUNC_FORKPTY],
-[
- AC_REQUIRE([gl_PTY_LIB])
- AC_REQUIRE([gl_PTY_H])
-
- dnl We assume that forkpty exists (possibly in libc, possibly in libutil)
- dnl if and only if it is declared.
- AC_CHECK_DECLS([forkpty],,, [[
-/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
-#include <sys/types.h>
-#if HAVE_PTY_H
-# include <pty.h>
-#endif
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
-]])
- if test $ac_cv_have_decl_forkpty = yes; then
- dnl The system has forkpty.
- dnl Prefer glibc's const-safe prototype, if available.
- AC_CACHE_CHECK([for const-safe forkpty signature],
- [gl_cv_func_forkpty_const],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
-/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
-#include <sys/types.h>
-#if HAVE_PTY_H
-# include <pty.h>
-#endif
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
- ]], [[
- int forkpty (int *, char *, struct termios const *,
- struct winsize const *);
- ]])
- ],
- [gl_cv_func_forkpty_const=yes], [gl_cv_func_forkpty_const=no])
- ])
- if test $gl_cv_func_forkpty_const != yes; then
- REPLACE_FORKPTY=1
- fi
- else
- dnl The system does not have forkpty.
- HAVE_FORKPTY=0
- fi
- AC_DEFINE_UNQUOTED([HAVE_FORKPTY], [$HAVE_FORKPTY],
- [Define to 1 if the system has the 'forkpty' function.])
-])
-
-AC_DEFUN([gl_FUNC_OPENPTY],
-[
- AC_REQUIRE([gl_PTY_LIB])
- AC_REQUIRE([gl_PTY_H])
-
- dnl Persuade Solaris <stdlib.h> to declare posix_openpt().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- dnl We assume that openpty exists (possibly in libc, possibly in libutil)
- dnl if and only if it is declared.
- AC_CHECK_DECLS([openpty],,, [[
-/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
-#include <sys/types.h>
-#if HAVE_PTY_H
-# include <pty.h>
-#endif
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
-]])
- if test $ac_cv_have_decl_openpty = yes; then
- AC_DEFINE([HAVE_OPENPTY], [1],
- [Define to 1 if the system has the 'openpty' function.])
- dnl The system has openpty.
- dnl Prefer glibc's const-safe prototype, if available.
- AC_CACHE_CHECK([for const-safe openpty signature],
- [gl_cv_func_openpty_const],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
-/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
-#include <sys/types.h>
-#if HAVE_PTY_H
-# include <pty.h>
-#endif
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
- ]], [[
- int openpty (int *, int *, char *, struct termios const *,
- struct winsize const *);
- ]])
- ],
- [gl_cv_func_openpty_const=yes], [gl_cv_func_openpty_const=no])
- ])
- if test $gl_cv_func_openpty_const != yes; then
- REPLACE_OPENPTY=1
- fi
- else
- dnl The system does not have openpty.
- HAVE_OPENPTY=0
- dnl Prerequisites of lib/openpty.c in this case.
- AC_CHECK_FUNCS([_getpty posix_openpt])
- fi
-])
-
-AC_DEFUN([gl_FUNC_LOGIN_TTY],
-[
- AC_REQUIRE([gl_PTY_LIB])
-
- gl_saved_libs="$LIBS"
- LIBS="$LIBS $PTY_LIB"
- AC_CHECK_FUNCS([login_tty])
- LIBS="$gl_saved_LIBS"
-])
diff --git a/m4/pty_h.m4 b/m4/pty_h.m4
deleted file mode 100644
index d3cc2e7e..00000000
--- a/m4/pty_h.m4
+++ /dev/null
@@ -1,69 +0,0 @@
-# pty_h.m4 serial 10
-dnl Copyright (C) 2009-2014 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_PTY_H
-# --------
-# Set up the GNU-like <pty.h> replacement header.
-AC_DEFUN_ONCE([gl_PTY_H],
-[
- AC_REQUIRE([gl_PTY_H_DEFAULTS])
-
- # Make sure that pty.h provides forkpty, or setup the replacement.
- AC_CHECK_HEADERS_ONCE([pty.h])
- if test $ac_cv_header_pty_h != yes; then
- HAVE_PTY_H=0
- AC_CHECK_HEADERS([util.h libutil.h])
- if test $ac_cv_header_util_h = yes; then
- HAVE_UTIL_H=1
- fi
- if test $ac_cv_header_libutil_h = yes; then
- HAVE_LIBUTIL_H=1
- fi
- else # Have <pty.h>, assume forkpty is declared there.
- HAVE_PTY_H=1
- fi
- AC_SUBST([HAVE_PTY_H])
- dnl <pty.h> is always overridden, because of GNULIB_POSIXCHECK.
- gl_CHECK_NEXT_HEADERS([pty.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([[
-/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
-#include <sys/types.h>
-#if HAVE_PTY_H
-# include <pty.h>
-#endif
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
- ]], [forkpty openpty])
-])
-
-AC_DEFUN([gl_PTY_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_PTY_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_PTY_H_DEFAULTS],
-[
- GNULIB_FORKPTY=0; AC_SUBST([GNULIB_FORKPTY])
- GNULIB_OPENPTY=0; AC_SUBST([GNULIB_OPENPTY])
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_UTIL_H=0; AC_SUBST([HAVE_UTIL_H])
- HAVE_LIBUTIL_H=0; AC_SUBST([HAVE_LIBUTIL_H])
- HAVE_FORKPTY=1; AC_SUBST([HAVE_FORKPTY])
- HAVE_OPENPTY=1; AC_SUBST([HAVE_OPENPTY])
- REPLACE_FORKPTY=0; AC_SUBST([REPLACE_FORKPTY])
- REPLACE_OPENPTY=0; AC_SUBST([REPLACE_OPENPTY])
-])
diff --git a/m4/socklen.m4 b/m4/socklen.m4
deleted file mode 100644
index 4c07f864..00000000
--- a/m4/socklen.m4
+++ /dev/null
@@ -1,77 +0,0 @@
-# socklen.m4 serial 10
-dnl Copyright (C) 2005-2007, 2009-2014 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, OSF/1 4.0, Interix 3.5, BeOS.
-dnl So we have to test to find something that will work.
-
-AC_DEFUN([gl_TYPE_SOCKLEN_T],
- [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])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])],
- [gl_SOCKET_HEADERS])])
-
-dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
-dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users
-dnl of this module should use the same include pattern as gl_SOCKET_HEADERS.
-dnl When you change this macro, keep also in sync:
-dnl - gl_CHECK_SOCKET_HEADERS,
-dnl - the Include section of modules/socklen.
-AC_DEFUN([gl_SOCKET_HEADERS],
-[
-/* <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>
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#elif HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
-#endif
-])
-
-dnl Tests for the existence of the header for socket facilities.
-dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H.
-dnl This macro must match gl_SOCKET_HEADERS.
-AC_DEFUN([gl_CHECK_SOCKET_HEADERS],
- [AC_CHECK_HEADERS_ONCE([sys/socket.h])
- if test $ac_cv_header_sys_socket_h = no; 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([ws2tcpip.h])
- fi
- ])
diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4
deleted file mode 100644
index 31d436f0..00000000
--- a/m4/sockpfaf.m4
+++ /dev/null
@@ -1,87 +0,0 @@
-# sockpfaf.m4 serial 8
-dnl Copyright (C) 2004, 2006, 2009-2014 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
-])
-
-AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
-[
- AC_REQUIRE([gl_HEADER_SYS_SOCKET])
- AC_CHECK_HEADERS_ONCE([sys/un.h])
-
- AC_MSG_CHECKING([for UNIX domain sockets])
- AC_CACHE_VAL([gl_cv_socket_unix],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif]],
-[[int x = AF_UNIX; struct sockaddr_un y;
- if (&x && &y) return 0;]])],
- gl_cv_socket_unix=yes, gl_cv_socket_unix=no)])
- AC_MSG_RESULT([$gl_cv_socket_unix])
- if test $gl_cv_socket_unix = yes; then
- AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.])
- fi
-])
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
deleted file mode 100644
index fbe1d068..00000000
--- a/m4/ssize_t.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2014 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 ssize_t is defined.
-
-AC_DEFUN([gt_TYPE_SSIZE_T],
-[
- AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/types.h>]],
- [[int x = sizeof (ssize_t *) + sizeof (ssize_t);
- return !x;]])],
- [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
- if test $gt_cv_ssize_t = no; then
- AC_DEFINE([ssize_t], [int],
- [Define as a signed type of the same size as size_t.])
- fi
-])
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
deleted file mode 100644
index 9efafe5c..00000000
--- a/m4/stdalign.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-# Check for stdalign.h that conforms to C11.
-
-dnl Copyright 2011-2014 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.
-
-# Prepare for substituting <stdalign.h> if it is not supported.
-
-AC_DEFUN([gl_STDALIGN_H],
-[
- AC_CACHE_CHECK([for working stdalign.h],
- [gl_cv_header_working_stdalign_h],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdalign.h>
- #include <stddef.h>
-
- /* Test that alignof yields a result consistent with offsetof.
- This catches GCC bug 52023
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
- #ifdef __cplusplus
- template <class t> struct alignof_helper { char a; t b; };
- # define ao(type) offsetof (alignof_helper<type>, b)
- #else
- # define ao(type) offsetof (struct { char a; type b; }, b)
- #endif
- char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
- char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
- char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
-
- /* Test _Alignas only on platforms where gnulib can help. */
- #if \
- ((defined __cplusplus && 201103 <= __cplusplus) \
- || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
- || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
- struct alignas_test { char c; char alignas (8) alignas_8; };
- char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
- ? 1 : -1];
- #endif
- ]])],
- [gl_cv_header_working_stdalign_h=yes],
- [gl_cv_header_working_stdalign_h=no])])
-
- if test $gl_cv_header_working_stdalign_h = yes; then
- STDALIGN_H=''
- else
- STDALIGN_H='stdalign.h'
- fi
-
- AC_SUBST([STDALIGN_H])
- AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
-])
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
deleted file mode 100644
index c555e295..00000000
--- a/m4/stddef_h.m4
+++ /dev/null
@@ -1,47 +0,0 @@
-dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2014 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])
- STDDEF_H=
- 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
- AC_SUBST([STDDEF_H])
- AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
- if test -n "$STDDEF_H"; then
- gl_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])
-])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
deleted file mode 100644
index 03b448b9..00000000
--- a/m4/stdlib_h.m4
+++ /dev/null
@@ -1,117 +0,0 @@
-# stdlib_h.m4 serial 42
-dnl Copyright (C) 2007-2014 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_NEXT_HEADERS([stdlib.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 <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
- initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_openpt ptsname ptsname_r random random_r realpath rpmatch
- secure_getenv setenv setstate setstate_r srandom srandom_r
- 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_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC])
- 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_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT])
- GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
- GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
- GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
- GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
- 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_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
- 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])
- GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB])
- 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_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
- HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
- HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
- HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
- HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
- HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
- HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
- HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
- HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
- HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
- HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_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_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_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_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
- REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
- REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
- REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
- REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
- REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
- 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])
- REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB])
-])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
deleted file mode 100644
index 64e683f9..00000000
--- a/m4/string_h.m4
+++ /dev/null
@@ -1,120 +0,0 @@
-# Configure a GNU-like replacement for <string.h>.
-
-# Copyright (C) 2007-2014 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 21
-
-# 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_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>
- ]],
- [ffsl ffsll 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_FFSL=0; AC_SUBST([GNULIB_FFSL])
- GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
- 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_FFSL=1; AC_SUBST([HAVE_FFSL])
- HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
- 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_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
- 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/m4/strndup.m4 b/m4/strndup.m4
deleted file mode 100644
index 55df0399..00000000
--- a/m4/strndup.m4
+++ /dev/null
@@ -1,55 +0,0 @@
-# strndup.m4 serial 21
-dnl Copyright (C) 2002-2003, 2005-2014 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_STRNDUP],
-[
- dnl Persuade glibc <string.h> to declare strndup().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_CHECK_DECLS_ONCE([strndup])
- AC_CHECK_FUNCS_ONCE([strndup])
- if test $ac_cv_have_decl_strndup = no; then
- HAVE_DECL_STRNDUP=0
- fi
-
- if test $ac_cv_func_strndup = yes; then
- HAVE_STRNDUP=1
- # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
- AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
- [AC_RUN_IFELSE([
- AC_LANG_PROGRAM([[#include <string.h>
- #include <stdlib.h>]], [[
-#if !HAVE_DECL_STRNDUP
- extern
- #ifdef __cplusplus
- "C"
- #endif
- char *strndup (const char *, size_t);
-#endif
- char *s;
- s = strndup ("some longer string", 15);
- free (s);
- s = strndup ("shorter string", 13);
- return s[13] != '\0';]])],
- [gl_cv_func_strndup_works=yes],
- [gl_cv_func_strndup_works=no],
- [
-changequote(,)dnl
- case $host_os in
- aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
- *) gl_cv_func_strndup_works="guessing yes";;
- esac
-changequote([,])dnl
- ])])
- case $gl_cv_func_strndup_works in
- *no) REPLACE_STRNDUP=1 ;;
- esac
- else
- HAVE_STRNDUP=0
- fi
-])
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
deleted file mode 100644
index 94317f8a..00000000
--- a/m4/strnlen.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-# strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2014 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_STRNLEN],
-[
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-
- dnl Persuade glibc <string.h> to declare strnlen().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_CHECK_DECLS_ONCE([strnlen])
- if test $ac_cv_have_decl_strnlen = no; then
- HAVE_DECL_STRNLEN=0
- else
- m4_pushdef([AC_LIBOBJ], [:])
- dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]).
- AC_FUNC_STRNLEN
- m4_popdef([AC_LIBOBJ])
- if test $ac_cv_func_strnlen_working = no; then
- REPLACE_STRNLEN=1
- fi
- fi
-])
-
-# Prerequisites of lib/strnlen.c.
-AC_DEFUN([gl_PREREQ_STRNLEN], [:])
diff --git a/m4/sys_ioctl_h.m4 b/m4/sys_ioctl_h.m4
deleted file mode 100644
index 16542319..00000000
--- a/m4/sys_ioctl_h.m4
+++ /dev/null
@@ -1,64 +0,0 @@
-# sys_ioctl_h.m4 serial 10
-dnl Copyright (C) 2008-2014 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 Bruno Haible.
-
-AC_DEFUN([gl_SYS_IOCTL_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_SYS_IOCTL_H_DEFAULTS])
-
- AC_CHECK_HEADERS_ONCE([sys/ioctl.h])
- if test $ac_cv_header_sys_ioctl_h = yes; then
- HAVE_SYS_IOCTL_H=1
- dnl Test whether <sys/ioctl.h> declares ioctl(), or whether some other
- dnl header file, such as <unistd.h> or <stropts.h>, is needed for that.
- AC_CACHE_CHECK([whether <sys/ioctl.h> declares ioctl],
- [gl_cv_decl_ioctl_in_sys_ioctl_h],
- [dnl We cannot use AC_CHECK_DECL because it produces its own messages.
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT([#include <sys/ioctl.h>])],
- [(void) ioctl;])],
- [gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
- [gl_cv_decl_ioctl_in_sys_ioctl_h=no])
- ])
- else
- HAVE_SYS_IOCTL_H=0
- fi
- AC_SUBST([HAVE_SYS_IOCTL_H])
- dnl <sys/ioctl.h> is always overridden, because of GNULIB_POSIXCHECK.
- gl_CHECK_NEXT_HEADERS([sys/ioctl.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/ioctl.h>
-/* Some platforms declare ioctl in the wrong header. */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <unistd.h>
-#endif
- ]], [ioctl])
-])
-
-AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_SYS_IOCTL_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_IOCTL_H_DEFAULTS],
-[
- GNULIB_IOCTL=0; AC_SUBST([GNULIB_IOCTL])
- dnl Assume proper GNU behavior unless another module says otherwise.
- SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H])
- SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
- AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
- REPLACE_IOCTL=0; AC_SUBST([REPLACE_IOCTL])
-])
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
deleted file mode 100644
index 114d8281..00000000
--- a/m4/sys_socket_h.m4
+++ /dev/null
@@ -1,176 +0,0 @@
-# sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2014 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_CANONICAL_HOST])
-
- dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
- dnl old-style declarations (with return type 'int' instead of 'ssize_t')
- dnl unless _POSIX_PII_SOCKET is defined.
- case "$host_os" in
- osf*)
- AC_DEFINE([_POSIX_PII_SOCKET], [1],
- [Define to 1 in order to get the POSIX compatible declarations
- of socket functions.])
- ;;
- esac
-
- 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.
- AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
- 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
- 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/m4/sys_types_h.m4 b/m4/sys_types_h.m4
deleted file mode 100644
index 9748905b..00000000
--- a/m4/sys_types_h.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-# sys_types_h.m4 serial 5
-dnl Copyright (C) 2011-2014 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_SYS_TYPES_H],
-[
- AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
- gl_NEXT_HEADERS([sys/types.h])
-
- dnl Ensure the type pid_t gets defined.
- AC_REQUIRE([AC_TYPE_PID_T])
-
- dnl Ensure the type mode_t gets defined.
- AC_REQUIRE([AC_TYPE_MODE_T])
-
- dnl Whether to override the 'off_t' type.
- AC_REQUIRE([gl_TYPE_OFF_T])
-])
-
-AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
-[
-])
diff --git a/m4/sys_uio_h.m4 b/m4/sys_uio_h.m4
deleted file mode 100644
index ba6b4b5e..00000000
--- a/m4/sys_uio_h.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-# sys_uio_h.m4 serial 1
-dnl Copyright (C) 2011-2014 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_SYS_UIO],
-[
- AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
- dnl <sys/uio.h> is always overridden, because of GNULIB_POSIXCHECK.
- gl_CHECK_NEXT_HEADERS([sys/uio.h])
- if test $ac_cv_header_sys_uio_h = yes; then
- HAVE_SYS_UIO_H=1
- else
- HAVE_SYS_UIO_H=0
- fi
- AC_SUBST([HAVE_SYS_UIO_H])
-])
-
-AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_SYS_UIO_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_UIO_H_DEFAULTS],
-[
-])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
deleted file mode 100644
index 1fa197e6..00000000
--- a/m4/unistd_h.m4
+++ /dev/null
@@ -1,187 +0,0 @@
-# unistd_h.m4 serial 67
-dnl Copyright (C) 2006-2014 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])
-
- gl_CHECK_NEXT_HEADERS([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 Ensure the type pid_t gets defined.
- AC_REQUIRE([AC_TYPE_PID_T])
-
- dnl Determine WINDOWS_64_BIT_OFF_T.
- AC_REQUIRE([gl_TYPE_OFF_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([[
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-/* 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
- ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
- fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
- gethostname getlogin getlogin_r getpagesize
- getusershell setusershell endusershell
- group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
- readlink readlinkat rmdir sethostname 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_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
- GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
- GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
- GNULIB_DUP=0; AC_SUBST([GNULIB_DUP])
- 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_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC])
- 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_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER])
- GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY])
- 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_PIPE=0; AC_SUBST([GNULIB_PIPE])
- GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
- GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
- GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE])
- GNULIB_READ=0; AC_SUBST([GNULIB_READ])
- GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
- GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
- GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
- GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME])
- 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_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
- 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_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC])
- 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_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER])
- HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
- HAVE_LINK=1; AC_SUBST([HAVE_LINK])
- HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
- HAVE_PIPE=1; AC_SUBST([HAVE_PIPE])
- 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_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME])
- HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
- HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
- HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
- 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_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
- HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
- 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_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
- HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
- 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_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
- REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
- REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
- REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
- REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
- REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
- REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
- REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
- 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_READ=0; AC_SUBST([REPLACE_READ])
- 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/m4/warn-on-use.m4 b/m4/warn-on-use.m4
deleted file mode 100644
index cc690f8e..00000000
--- a/m4/warn-on-use.m4
+++ /dev/null
@@ -1,47 +0,0 @@
-# warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2014 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.
-#
-# It is generally safe to assume declarations for functions declared
-# in the intersection of C89 and C11 (such as printf) 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
-dnl FIXME: gl_Symbol must be used unquoted until we can assume
-dnl autoconf 2.64 or newer.
- 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/m4/wchar_t.m4 b/m4/wchar_t.m4
deleted file mode 100644
index 839a04c1..00000000
--- a/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-2014 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
-])