summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-09-11 15:36:08 +0200
committerSimon Josefsson <simon@josefsson.org>2007-09-11 15:36:08 +0200
commit28b3a40bd108bf926c2f94fceae38b5529b39f77 (patch)
tree07ddacbc44d656ee6c02db28a7cd0762a58c8a64
parenta96a21d4c16fc331b3a7e9311a968c25fc7a29dc (diff)
downloadgnutls-28b3a40bd108bf926c2f94fceae38b5529b39f77.tar.gz
Remove duplicate gnulib modules.
-rw-r--r--gl/gettext.h270
-rw-r--r--gl/gnulib.mk148
-rw-r--r--gl/m4/gnulib-cache.m44
-rw-r--r--gl/m4/gnulib-comp.m417
-rw-r--r--gl/m4/sockpfaf.m458
-rw-r--r--gl/m4/stdbool.m4115
-rw-r--r--gl/m4/stdio_h.m482
-rw-r--r--gl/m4/sys_socket_h.m451
-rw-r--r--gl/m4/unistd_h.m456
-rw-r--r--gl/stdbool_.h118
-rw-r--r--gl/stdio_.h353
-rw-r--r--gl/sys_socket_.h91
-rw-r--r--gl/unistd_.h262
13 files changed, 3 insertions, 1622 deletions
diff --git a/gl/gettext.h b/gl/gettext.h
deleted file mode 100644
index 9d76ec9afc..0000000000
--- a/gl/gettext.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006 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 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
-
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
-
-/* Get declarations of GNU message catalog functions. */
-# include <libintl.h>
-
-/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
- the gettext() and ngettext() macros. This is an alternative to calling
- textdomain(), and is useful for libraries. */
-# ifdef DEFAULT_TEXT_DOMAIN
-# undef gettext
-# define gettext(Msgid) \
- dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
-# undef ngettext
-# define ngettext(Msgid1, Msgid2, N) \
- dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
-# endif
-
-#else
-
-/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
- chokes if dcgettext is defined as a macro. So include it now, to make
- later inclusions of <locale.h> a NOP. We don't include <libintl.h>
- as well because people using "gettext.h" will not include <libintl.h>,
- and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
- is OK. */
-#if defined(__sun)
-# include <locale.h>
-#endif
-
-/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
- <libintl.h>, which chokes if dcgettext is defined as a macro. So include
- it now, to make later inclusions of <libintl.h> a NOP. */
-#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
-# include <cstdlib>
-# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
-# include <libintl.h>
-# endif
-#endif
-
-/* Disabled NLS.
- The casts to 'const char *' serve the purpose of producing warnings
- for invalid uses of the value returned from these functions.
- On pre-ANSI systems without 'const', the config.h file is supposed to
- contain "#define const". */
-# define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
-# define dcgettext(Domainname, Msgid, Category) \
- ((void) (Category), dgettext (Domainname, Msgid))
-# define ngettext(Msgid1, Msgid2, N) \
- ((N) == 1 \
- ? ((void) (Msgid2), (const char *) (Msgid1)) \
- : ((void) (Msgid1), (const char *) (Msgid2)))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
- ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
- ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
-# define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) \
- ((void) (Domainname), (const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) \
- ((void) (Domainname), (const char *) (Codeset))
-
-#endif
-
-/* A pseudo function call that serves as a marker for the automated
- extraction of messages, but does not call gettext(). The run-time
- translation is done at a different place in the code.
- The argument, String, should be a literal string. Concatenated strings
- and other string expressions won't work.
- The macro's expansion is not parenthesized, so that it is suitable as
- initializer for static 'char[]' or 'const char[]' variables. */
-#define gettext_noop(String) String
-
-/* The separator between msgctxt and msgid in a .mo file. */
-#define GETTEXT_CONTEXT_GLUE "\004"
-
-/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
- MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
- short and rarely need to change.
- The letter 'p' stands for 'particular' or 'special'. */
-#ifdef DEFAULT_TEXT_DOMAIN
-# define pgettext(Msgctxt, Msgid) \
- pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
-#else
-# define pgettext(Msgctxt, Msgid) \
- pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
-#endif
-#define dpgettext(Domainname, Msgctxt, Msgid) \
- pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
-#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
- pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
-#ifdef DEFAULT_TEXT_DOMAIN
-# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
- npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
-#else
-# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
- npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
-#endif
-#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
- npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
-#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
- npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-pgettext_aux (const char *domain,
- const char *msg_ctxt_id, const char *msgid,
- int category)
-{
- const char *translation = dcgettext (domain, msg_ctxt_id, category);
- if (translation == msg_ctxt_id)
- return msgid;
- else
- return translation;
-}
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-npgettext_aux (const char *domain,
- const char *msg_ctxt_id, const char *msgid,
- const char *msgid_plural, unsigned long int n,
- int category)
-{
- const char *translation =
- dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
- if (translation == msg_ctxt_id || translation == msgid_plural)
- return (n == 1 ? msgid : msgid_plural);
- else
- return translation;
-}
-
-/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
- can be arbitrary expressions. But for string literals these macros are
- less efficient than those above. */
-
-#include <string.h>
-
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
- (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
-
-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
-#include <stdlib.h>
-#endif
-
-#define pgettext_expr(Msgctxt, Msgid) \
- dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
-#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
- dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-dcpgettext_expr (const char *domain,
- const char *msgctxt, const char *msgid,
- int category)
-{
- size_t msgctxt_len = strlen (msgctxt) + 1;
- size_t msgid_len = strlen (msgid) + 1;
- const char *translation;
-#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- char msg_ctxt_id[msgctxt_len + msgid_len];
-#else
- char buf[1024];
- char *msg_ctxt_id =
- (msgctxt_len + msgid_len <= sizeof (buf)
- ? buf
- : (char *) malloc (msgctxt_len + msgid_len));
- if (msg_ctxt_id != NULL)
-#endif
- {
- memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
- msg_ctxt_id[msgctxt_len - 1] = '\004';
- memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
- translation = dcgettext (domain, msg_ctxt_id, category);
-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- if (msg_ctxt_id != buf)
- free (msg_ctxt_id);
-#endif
- if (translation != msg_ctxt_id)
- return translation;
- }
- return msgid;
-}
-
-#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
- dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
-#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
- dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-dcnpgettext_expr (const char *domain,
- const char *msgctxt, const char *msgid,
- const char *msgid_plural, unsigned long int n,
- int category)
-{
- size_t msgctxt_len = strlen (msgctxt) + 1;
- size_t msgid_len = strlen (msgid) + 1;
- const char *translation;
-#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- char msg_ctxt_id[msgctxt_len + msgid_len];
-#else
- char buf[1024];
- char *msg_ctxt_id =
- (msgctxt_len + msgid_len <= sizeof (buf)
- ? buf
- : (char *) malloc (msgctxt_len + msgid_len));
- if (msg_ctxt_id != NULL)
-#endif
- {
- memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
- msg_ctxt_id[msgctxt_len - 1] = '\004';
- memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
- translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- if (msg_ctxt_id != buf)
- free (msg_ctxt_id);
-#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
- return translation;
- }
- return (n == 1 ? msgid : msgid_plural);
-}
-
-#endif /* _LIBGETTEXT_H */
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index 8afc347d8a..f858275033 100644
--- a/gl/gnulib.mk
+++ b/gl/gnulib.mk
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline getpass gpl-2.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline getpass gpl-2.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
MOSTLYCLEANFILES += core *.stackdump
@@ -101,12 +101,6 @@ EXTRA_libgnu_la_SOURCES += getpass.c
## end gnulib module getpass
-## begin gnulib module gettext-h
-
-libgnu_la_SOURCES += gettext.h
-
-## end gnulib module gettext-h
-
## begin gnulib module havelib
@@ -193,81 +187,6 @@ EXTRA_libgnu_la_SOURCES += readline.c
## end gnulib module readline
-## begin gnulib module stdbool
-
-BUILT_SOURCES += $(STDBOOL_H)
-
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-stdbool.h: stdbool_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
-
-EXTRA_DIST += stdbool_.h
-
-## end gnulib module stdbool
-
-## begin gnulib module stdio
-
-BUILT_SOURCES += stdio.h
-
-# We need the following in order to create <stdio.h> when the system
-# doesn't have one that works with the given compiler.
-stdio.h: stdio_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
- -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
- -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
- -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
- -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
- -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
- -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
- -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
- -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
- -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
- -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
- -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
- -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
- -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
- -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
- -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
- -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
- -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
- -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
- -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
- -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
- -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
- -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
- -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
- -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
- -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
- -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
- -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
- -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
- -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
- -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
- -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/stdio_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += stdio.h stdio.h-t
-
-EXTRA_DIST += stdio_.h
-
-## end gnulib module stdio
-
## begin gnulib module strdup
@@ -341,71 +260,6 @@ EXTRA_DIST += string_.h
## end gnulib module string
-## begin gnulib module sys_socket
-
-BUILT_SOURCES += $(SYS_SOCKET_H)
-
-# We need the following in order to create <sys/socket.h> when the system
-# doesn't have one that works with the given compiler.
-sys/socket.h: sys_socket_.h
- @MKDIR_P@ sys
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/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|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
- -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
- < $(srcdir)/sys_socket_.h; \
- } > $@-t
- mv -f $@-t $@
-MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
-MOSTLYCLEANDIRS += sys
-
-EXTRA_DIST += sys_socket_.h
-
-## end gnulib module sys_socket
-
-## begin gnulib module unistd
-
-BUILT_SOURCES += unistd.h
-
-# We need the following in order to create an empty placeholder for
-# <unistd.h> when the system doesn't have one.
-unistd.h: unistd_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
- -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
- -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
- -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
- -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
- -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
- -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
- -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
- -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
- -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
- -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
- -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
- -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
- -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
- -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
- -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
- -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
- -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
- -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
- -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
- -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
- -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
- -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
- < $(srcdir)/unistd_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
-
-EXTRA_DIST += unistd_.h
-
-## end gnulib module unistd
-
## begin gnulib module version-etc
libgnu_la_SOURCES += version-etc.h version-etc.c
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 7a32349ea3..e99f2982ef 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -15,12 +15,12 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline getpass gpl-2.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline getpass gpl-2.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
gl_MODULES([arpa_inet error fdl gendocs getaddrinfo getline getpass gpl-2.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf])
-gl_AVOID([malloc-posix realloc-posix snprintf vasnprintf])
+gl_AVOID([gettext-h malloc-posix realloc-posix snprintf stdbool stdio sys_socket unistd vasnprintf])
gl_SOURCE_BASE([gl])
gl_M4_BASE([gl/m4])
gl_PO_BASE([])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index bbe54c1758..7bd1e8e157 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -56,8 +56,6 @@ AC_DEFUN([gl_INIT],
gl_FUNC_GETLINE
gl_STDIO_MODULE_INDICATOR([getline])
gl_FUNC_GETPASS
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
gl_INET_NTOP
gl_INET_PTON
gl_FUNC_LSEEK
@@ -67,14 +65,9 @@ AC_DEFUN([gl_INIT],
gl_FUNC_READLINE
gl_TYPE_SOCKLEN_T
gl_STDARG_H
- AM_STDBOOL_H
- gl_STDIO_H
gl_FUNC_STRDUP
gl_STRING_MODULE_INDICATOR([strdup])
gl_HEADER_STRING_H
- gl_HEADER_SYS_SOCKET
- AC_PROG_MKDIR_P
- gl_UNISTD_H
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
@@ -131,7 +124,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getline.c
lib/getpass.c
lib/getpass.h
- lib/gettext.h
lib/inet_ntop.c
lib/inet_ntop.h
lib/inet_pton.c
@@ -142,12 +134,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/progname.h
lib/readline.c
lib/readline.h
- lib/stdbool_.h
- lib/stdio_.h
lib/strdup.c
lib/string_.h
- lib/sys_socket_.h
- lib/unistd_.h
lib/version-etc-fsf.c
lib/version-etc.c
lib/version-etc.h
@@ -170,12 +158,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/netinet_in_h.m4
m4/readline.m4
m4/socklen.m4
- m4/sockpfaf.m4
m4/stdarg.m4
- m4/stdbool.m4
- m4/stdio_h.m4
m4/strdup.m4
m4/string_h.m4
- m4/sys_socket_h.m4
- m4/unistd_h.m4
])
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
deleted file mode 100644
index 25d9755c5e..0000000000
--- a/gl/m4/sockpfaf.m4
+++ /dev/null
@@ -1,58 +0,0 @@
-# sockpfaf.m4 serial 5
-dnl Copyright (C) 2004, 2006 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_TRY_COMPILE([#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_TRY_COMPILE([#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_INET6; struct in6_addr y; struct sockaddr_in6 z;
- if (&x && &y && &z) return 0;],
- gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
- AC_MSG_RESULT($gl_cv_socket_ipv6)
- if test $gl_cv_socket_ipv6 = yes; then
- AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if <sys/socket.h> defines AF_INET6.])
- fi
-])
diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
deleted file mode 100644
index 2204ecd984..0000000000
--- a/gl/m4/stdbool.m4
+++ /dev/null
@@ -1,115 +0,0 @@
-# Check for stdbool.h that conforms to C99.
-
-dnl Copyright (C) 2002-2006 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 <stdbool.h> if it is not supported.
-
-AC_DEFUN([AM_STDBOOL_H],
-[
- AC_REQUIRE([AC_HEADER_STDBOOL])
-
- # Define two additional variables used in the Makefile substitution.
-
- if test "$ac_cv_header_stdbool_h" = yes; then
- STDBOOL_H=''
- else
- STDBOOL_H='stdbool.h'
- fi
- AC_SUBST([STDBOOL_H])
-
- if test "$ac_cv_type__Bool" = yes; then
- HAVE__BOOL=1
- else
- HAVE__BOOL=0
- fi
- AC_SUBST([HAVE__BOOL])
-])
-
-# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
-AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
-
-# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
-# have this macro built-in.
-
-AC_DEFUN([AC_HEADER_STDBOOL],
- [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
- [ac_cv_header_stdbool_h],
- [AC_TRY_COMPILE(
- [
- #include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
- #endif
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
- #endif
-
- struct s { _Bool s: 1; _Bool t; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- bool e = &s;
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
- #if defined __xlc__ || defined __GNUC__
- /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
- reported by James Lemley on 2005-10-05; see
- http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
- This test is not quite right, since xlc is allowed to
- reject this program, as the initializer for xlcbug is
- not one of the forms that C requires support for.
- However, doing the test right would require a run-time
- test, and that would make cross-compilation harder.
- Let us hope that IBM fixes the xlc bug, and also adds
- support for this kind of constant expression. In the
- meantime, this test will reject xlc, which is OK, since
- our stdbool.h substitute should suffice. We also test
- this with GCC, where it should work, to detect more
- quickly whether someone messes up the test in the
- future. */
- char digs[] = "0123456789";
- int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
- #endif
- /* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- */
- _Bool q = true;
- _Bool *pq = &q;
- ],
- [
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
- ],
- [ac_cv_header_stdbool_h=yes],
- [ac_cv_header_stdbool_h=no])])
- AC_CHECK_TYPES([_Bool])
- if test $ac_cv_header_stdbool_h = yes; then
- AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
- fi])
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
deleted file mode 100644
index b9a69984f6..0000000000
--- a/gl/m4/stdio_h.m4
+++ /dev/null
@@ -1,82 +0,0 @@
-# stdio_h.m4 serial 7
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_STDIO_H],
-[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- gl_CHECK_NEXT_HEADERS([stdio.h])
-])
-
-AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
-])
-
-AC_DEFUN([gl_STDIO_H_DEFAULTS],
-[
- GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
- GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
- GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
- GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
- GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
- GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
- GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
- GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
- GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
- GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
- GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
- GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
- GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
- GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
- GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
- GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
- dnl Assume proper GNU behavior unless another module says otherwise.
- REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
- REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
- REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
- REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF])
- REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
- HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
- REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF])
- HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
- REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
- REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
- HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
- REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
- HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
- REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO])
- REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK])
- HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO])
- REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO])
- REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL])
- REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
- HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
- HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
- REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE])
-])
-
-dnl Code shared by fseeko and ftello. Determine if large files are supported,
-dnl but stdin does not start as a large file by default.
-AC_DEFUN([gl_STDIN_LARGE_OFFSET],
- [
- AC_CACHE_CHECK([whether stdin defaults to large file offsets],
- [gl_cv_var_stdin_large_offset],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
-[#if defined __SL64 && defined __SCLE /* cygwin */
- /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
- fseeko/ftello needlessly fail. This bug was fixed at the same time
- that cygwin started exporting asnprintf (cygwin 1.7.0), so we use
- that as a link-time test for cross-compiles rather than building
- a runtime test. */
- size_t s;
- if (asnprintf (NULL, &s, ""))
- return 0;
-#endif])],
- [gl_cv_var_stdin_large_offset=yes],
- [gl_cv_var_stdin_large_offset=no])])
-])
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
deleted file mode 100644
index d9659c2d75..0000000000
--- a/gl/m4/sys_socket_h.m4
+++ /dev/null
@@ -1,51 +0,0 @@
-# sys_socket_h.m4 serial 4
-dnl Copyright (C) 2005, 2006, 2007 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_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
- SYS_SOCKET_H=''
- else
- SYS_SOCKET_H='sys/socket.h'
-
- gl_CHECK_NEXT_HEADERS([sys/socket.h])
- if test $ac_cv_header_sys_socket_h = yes; then
- HAVE_SYS_SOCKET_H=1
- HAVE_WINSOCK2_H=0
- HAVE_WS2TCPIP_H=0
- else
- HAVE_SYS_SOCKET_H=0
- dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
- dnl the check for those headers unconditional; yet cygwin reports
- dnl that the headers are present but cannot be compiled (since on
- dnl cygwin, all socket information should come from sys/socket.h).
- AC_CHECK_HEADERS([winsock2.h ws2tcpip.h])
- if test $ac_cv_header_winsock2_h = yes; then
- HAVE_WINSOCK2_H=1
- else
- HAVE_WINSOCK2_H=0
- fi
- 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_WINSOCK2_H])
- AC_SUBST([HAVE_WS2TCPIP_H])
- fi
- AC_SUBST([SYS_SOCKET_H])
-])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
deleted file mode 100644
index b12f84e8ec..0000000000
--- a/gl/m4/unistd_h.m4
+++ /dev/null
@@ -1,56 +0,0 @@
-# unistd_h.m4 serial 9
-dnl Copyright (C) 2006-2007 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])
-
- AC_CHECK_HEADERS_ONCE([unistd.h])
- if test $ac_cv_header_unistd_h = yes; then
- HAVE_UNISTD_H=1
- else
- HAVE_UNISTD_H=0
- fi
- AC_SUBST([HAVE_UNISTD_H])
-])
-
-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])
- GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
-])
-
-AC_DEFUN([gl_UNISTD_H_DEFAULTS],
-[
- GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
- GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
- GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
- GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
- GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
- GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
- GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
- GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
- GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
- GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
- HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
- HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
- HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
- HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
- REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
- REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
- REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
- REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
- REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
-])
diff --git a/gl/stdbool_.h b/gl/stdbool_.h
deleted file mode 100644
index 150a0102e1..0000000000
--- a/gl/stdbool_.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Copyright (C) 2001, 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _GL_STDBOOL_H
-#define _GL_STDBOOL_H
-
-/* ISO C 99 <stdbool.h> for platforms that lack it. */
-
-/* Usage suggestions:
-
- Programs that use <stdbool.h> should be aware of some limitations
- and standards compliance issues.
-
- Standards compliance:
-
- - <stdbool.h> must be #included before 'bool', 'false', 'true'
- can be used.
-
- - You cannot assume that sizeof (bool) == 1.
-
- - Programs should not undefine the macros bool, true, and false,
- as C99 lists that as an "obsolescent feature".
-
- Limitations of this substitute, when used in a C89 environment:
-
- - <stdbool.h> must be #included before the '_Bool' type can be used.
-
- - You cannot assume that _Bool is a typedef; it might be a macro.
-
- - Bit-fields of type 'bool' are not supported. Portable code
- should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
-
- - In C99, casts and automatic conversions to '_Bool' or 'bool' are
- performed in such a way that every nonzero value gets converted
- to 'true', and zero gets converted to 'false'. This doesn't work
- with this substitute. With this substitute, only the values 0 and 1
- give the expected result when converted to _Bool' or 'bool'.
-
- Also, it is suggested that programs use 'bool' rather than '_Bool';
- this isn't required, but 'bool' is more common. */
-
-
-/* 7.16. Boolean type and values */
-
-/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
- definitions below, but temporarily we have to #undef them. */
-#ifdef __BEOS__
-# include <OS.h> /* defines bool but not _Bool */
-# undef false
-# undef true
-#endif
-
-/* For the sake of symbolic names in gdb, we define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But if we do
- this, values of type '_Bool' may promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-#if defined __cplusplus || defined __BEOS__
- /* A compiler known to have 'bool'. */
- /* If the compiler already has both 'bool' and '_Bool', we can assume they
- are the same types. */
-# if !@HAVE__BOOL@
-typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
- /* If @HAVE__BOOL@:
- Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
- the built-in _Bool type is used. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
- Similar bugs are likely with other compilers as well; this file
- wouldn't be used if <stdbool.h> was working.
- So we override the _Bool type.
- If !@HAVE__BOOL@:
- Need to define _Bool ourselves. As 'signed char' or as an enum type?
- Use of a typedef, with SunPRO C, leads to a stupid
- "warning: _Bool is a keyword in ISO C99".
- Use of an enum type, with IRIX cc, leads to a stupid
- "warning(1185): enumerated type mixed with another type".
- The only benefit of the enum type, debuggability, is not important
- with these compilers. So use 'signed char' and no typedef. */
-# define _Bool signed char
-enum { false = 0, true = 1 };
-# else
- /* With this compiler, trust the _Bool type if the compiler has it. */
-# if !@HAVE__BOOL@
-typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
-# endif
-# endif
-#endif
-#define bool _Bool
-
-/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
-#define __bool_true_false_are_defined 1
-
-#endif /* _GL_STDBOOL_H */
diff --git a/gl/stdio_.h b/gl/stdio_.h
deleted file mode 100644
index 76d9856377..0000000000
--- a/gl/stdio_.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/* A GNU-like <stdio.h>.
-
- Copyright (C) 2004, 2007 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 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if defined __need_FILE || defined __need___FILE
-/* Special invocation convention inside glibc header files. */
-
-#@INCLUDE_NEXT@ @NEXT_STDIO_H@
-
-#else
-/* Normal invocation convention. */
-
-#ifndef _GL_STDIO_H
-
-/* The include_next requires a split double-inclusion guard. */
-#@INCLUDE_NEXT@ @NEXT_STDIO_H@
-
-#ifndef _GL_STDIO_H
-#define _GL_STDIO_H
-
-#include <stdarg.h>
-#include <stddef.h>
-
-#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
- || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
- || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
- || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
-/* Get off_t and ssize_t. */
-# include <sys/types.h>
-#endif
-
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
-# define __attribute__(Spec) /* empty */
-# endif
-/* The __-protected variants of `format' and `printf' attributes
- are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-# define __format__ format
-# define __printf__ printf
-# endif
-#endif
-
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if @GNULIB_FPRINTF_POSIX@
-# if @REPLACE_FPRINTF@
-# define fprintf rpl_fprintf
-extern int fprintf (FILE *fp, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fprintf
-# define fprintf \
- (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
- "use gnulib module fprintf-posix for portable " \
- "POSIX compliance"), \
- fprintf)
-#endif
-
-#if @GNULIB_VFPRINTF_POSIX@
-# if @REPLACE_VFPRINTF@
-# define vfprintf rpl_vfprintf
-extern int vfprintf (FILE *fp, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vfprintf
-# define vfprintf(s,f,a) \
- (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
- "use gnulib module vfprintf-posix for portable " \
- "POSIX compliance"), \
- vfprintf (s, f, a))
-#endif
-
-#if @GNULIB_PRINTF_POSIX@
-# if @REPLACE_PRINTF@
-/* Don't break __attribute__((format(printf,M,N))). */
-# define printf __printf__
-extern int printf (const char *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef printf
-# define printf \
- (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
- "use gnulib module printf-posix for portable " \
- "POSIX compliance"), \
- printf)
-/* Don't break __attribute__((format(printf,M,N))). */
-# define format(kind,m,n) format (__##kind##__, m, n)
-# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
-# define ____printf____ __printf__
-# define ____scanf____ __scanf__
-# define ____strftime____ __strftime__
-# define ____strfmon____ __strfmon__
-#endif
-
-#if @GNULIB_VPRINTF_POSIX@
-# if @REPLACE_VPRINTF@
-# define vprintf rpl_vprintf
-extern int vprintf (const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 1, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vprintf
-# define vprintf(f,a) \
- (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
- "use gnulib module vprintf-posix for portable " \
- "POSIX compliance"), \
- vprintf (f, a))
-#endif
-
-#if @GNULIB_SNPRINTF@
-# if @REPLACE_SNPRINTF@
-# define snprintf rpl_snprintf
-# endif
-# if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
-extern int snprintf (char *str, size_t size, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef snprintf
-# define snprintf \
- (GL_LINK_WARNING ("snprintf is unportable - " \
- "use gnulib module snprintf for portability"), \
- snprintf)
-#endif
-
-#if @GNULIB_VSNPRINTF@
-# if @REPLACE_VSNPRINTF@
-# define vsnprintf rpl_vsnprintf
-# endif
-# if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
-extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 3, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsnprintf
-# define vsnprintf(b,s,f,a) \
- (GL_LINK_WARNING ("vsnprintf is unportable - " \
- "use gnulib module vsnprintf for portability"), \
- vsnprintf (b, s, f, a))
-#endif
-
-#if @GNULIB_SPRINTF_POSIX@
-# if @REPLACE_SPRINTF@
-# define sprintf rpl_sprintf
-extern int sprintf (char *str, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef sprintf
-# define sprintf \
- (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
- "use gnulib module sprintf-posix for portable " \
- "POSIX compliance"), \
- sprintf)
-#endif
-
-#if @GNULIB_VSPRINTF_POSIX@
-# if @REPLACE_VSPRINTF@
-# define vsprintf rpl_vsprintf
-extern int vsprintf (char *str, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsprintf
-# define vsprintf(b,f,a) \
- (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
- "use gnulib module vsprintf-posix for portable " \
- "POSIX compliance"), \
- vsprintf (b, f, a))
-#endif
-
-#if @GNULIB_VASPRINTF@
-# if @REPLACE_VASPRINTF@
-# define asprintf rpl_asprintf
-# define vasprintf rpl_vasprintf
-# endif
-# if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
- /* Write formatted output to a string dynamically allocated with malloc().
- If the memory allocation succeeds, store the address of the string in
- *RESULT and return the number of resulting bytes, excluding the trailing
- NUL. Upon memory allocation error, or some other error, return -1. */
- extern int asprintf (char **result, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
- extern int vasprintf (char **result, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#endif
-
-#if @GNULIB_FSEEKO@
-# if @REPLACE_FSEEKO@
-/* Provide fseek, fseeko functions that are aware of a preceding
- fflush(), and which detect pipes. */
-# define fseeko rpl_fseeko
-extern int fseeko (FILE *fp, off_t offset, int whence);
-# define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fseeko
-# define fseeko(f,o,w) \
- (GL_LINK_WARNING ("fseeko is unportable - " \
- "use gnulib module fseeko for portability"), \
- fseeko (f, o, w))
-#endif
-
-#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
-extern int rpl_fseek (FILE *fp, long offset, int whence);
-# undef fseek
-# if defined GNULIB_POSIXCHECK
-# define fseek(f,o,w) \
- (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use fseeko function for handling of large files"), \
- rpl_fseek (f, o, w))
-# else
-# define fseek rpl_fseek
-# endif
-#elif defined GNULIB_POSIXCHECK
-# ifndef fseek
-# define fseek(f,o,w) \
- (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use fseeko function for handling of large files"), \
- fseek (f, o, w))
-# endif
-#endif
-
-#if @GNULIB_FTELLO@
-# if @REPLACE_FTELLO@
-# define ftello rpl_ftello
-extern off_t ftello (FILE *fp);
-# define ftell(fp) ftello (fp)
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef ftello
-# define ftello(f) \
- (GL_LINK_WARNING ("ftello is unportable - " \
- "use gnulib module ftello for portability"), \
- ftello (f))
-#endif
-
-#if @GNULIB_FTELL@ && @REPLACE_FTELL@
-extern long rpl_ftell (FILE *fp);
-# undef ftell
-# if GNULIB_POSIXCHECK
-# define ftell(f) \
- (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use ftello function for handling of large files"), \
- rpl_ftell (f))
-# else
-# define ftell rpl_ftell
-# endif
-#elif defined GNULIB_POSIXCHECK
-# ifndef ftell
-# define ftell(f) \
- (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use ftello function for handling of large files"), \
- ftell (f))
-# endif
-#endif
-
-#if @GNULIB_FFLUSH@
-# if @REPLACE_FFLUSH@
-# define fflush rpl_fflush
- /* Flush all pending data on STREAM according to POSIX rules. Both
- output and seekable input streams are supported.
- Note! LOSS OF DATA can occur if fflush is applied on an input stream
- that is _not_seekable_ or on an update stream that is _not_seekable_
- and in which the most recent operation was input. Seekability can
- be tested with lseek(fileno(fp),0,SEEK_CUR). */
- extern int fflush (FILE *gl_stream);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fflush
-# define fflush(f) \
- (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
- "use gnulib module fflush for portable " \
- "POSIX compliance"), \
- fflush (f))
-#endif
-
-#if @GNULIB_GETDELIM@
-# if !@HAVE_DECL_GETDELIM@
- /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
- NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
- NULL), pointing to *N characters of space. It is realloc'ed as
- necessary. Returns the number of characters read (not including
- the null terminator), or -1 on error or EOF. */
- extern ssize_t getdelim (char **, size_t *, int delim, FILE *);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getdelim
-# define getdelim(l, s, d, f) \
- (GL_LINK_WARNING ("getdelim is unportable - " \
- "use gnulib module getdelim for portability"), \
- getdelim (l, s, d, f))
-#endif
-
-#if @GNULIB_GETLINE@
-# if @REPLACE_GETLINE@
-# undef getline
-# define getline rpl_getline
-# endif
-# if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@
- /* Read up to (and including) a newline from FP into *LINEPTR (and
- NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
- NULL), pointing to *N characters of space. It is realloc'ed as
- necessary. Returns the number of characters read (not including
- the null terminator), or -1 on error or EOF. */
- extern ssize_t getline (char **, size_t *, FILE *);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getline
-# define getline(l, s, f) \
- (GL_LINK_WARNING ("getline is unportable - " \
- "use gnulib module getline for portability"), \
- getline (l, s, f))
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GL_STDIO_H */
-#endif /* _GL_STDIO_H */
-#endif
diff --git a/gl/sys_socket_.h b/gl/sys_socket_.h
deleted file mode 100644
index c25b6ab842..0000000000
--- a/gl/sys_socket_.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Provide a sys/socket header file for systems lacking it (read: MinGW).
- Copyright (C) 2005, 2006, 2007 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 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file is supposed to be used on platforms that lack <sys/socket.h>
- and on platforms where <sys/socket.h> cannot be included standalone.
- It is intended to provide definitions and prototypes needed by an
- application. */
-
-#ifndef _GL_SYS_SOCKET_H
-
-#if @HAVE_SYS_SOCKET_H@
-
-/* On many platforms, <sys/socket.h> assumes prior inclusion of
- <sys/types.h>. */
-# include <sys/types.h>
-
-/* The include_next requires a split double-inclusion guard. */
-# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
-
-#endif
-
-#ifndef _GL_SYS_SOCKET_H
-#define _GL_SYS_SOCKET_H
-
-#if !@HAVE_SYS_SOCKET_H@
-
-/* A platform that lacks <sys/socket.h>.
-
- Currently only MinGW is supported. See the gnulib manual regarding
- Windows sockets. MinGW has the header files winsock2.h and
- ws2tcpip.h that declare the sys/socket.h definitions we need. Note
- that you can influence which definitions you get by setting the
- WINVER symbol before including these two files. For example,
- getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that
- symbol is set indiriectly through WINVER). You can set this by
- adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your
- code may not run on older Windows releases then. My Windows 2000
- box was not able to run the code, for example. The situation is
- slightly confusing because:
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp
- 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 defined _WIN32 || defined __WIN32__
-# define ENOTSOCK WSAENOTSOCK
-# define EADDRINUSE WSAEADDRINUSE
-# define ENETRESET WSAENETRESET
-# define ECONNABORTED WSAECONNABORTED
-# define ECONNRESET WSAECONNRESET
-# define ENOTCONN WSAENOTCONN
-# define ESHUTDOWN WSAESHUTDOWN
-# endif
-
-#endif /* HAVE_SYS_SOCKET_H */
-
-#endif /* _GL_SYS_SOCKET_H */
-#endif /* _GL_SYS_SOCKET_H */
diff --git a/gl/unistd_.h b/gl/unistd_.h
deleted file mode 100644
index 07c4877836..0000000000
--- a/gl/unistd_.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2004-2007 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 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _GL_UNISTD_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_UNISTD_H@
-# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-#endif
-
-#ifndef _GL_UNISTD_H
-#define _GL_UNISTD_H
-
-/* mingw doesn't define the SEEK_* macros in <unistd.h>. */
-#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
-# include <stdio.h>
-#endif
-
-/* mingw fails to declare _exit in <unistd.h>. */
-#include <stdlib.h>
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-
-/* Declare overridden functions. */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if @GNULIB_CHOWN@
-# if @REPLACE_CHOWN@
-# ifndef REPLACE_CHOWN
-# define REPLACE_CHOWN 1
-# endif
-# if REPLACE_CHOWN
-/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
- to GID (if GID is not -1). Follow symbolic links.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/chown.html>. */
-# define chown rpl_chown
-extern int chown (const char *file, uid_t uid, gid_t gid);
-# endif
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef chown
-# define chown(f,u,g) \
- (GL_LINK_WARNING ("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"), \
- chown (f, u, g))
-#endif
-
-
-#if @GNULIB_DUP2@
-# if !@HAVE_DUP2@
-/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
- NEWFD = OLDFD, otherwise close NEWFD first if it is open.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/dup2.html>. */
-extern int dup2 (int oldfd, int newfd);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef dup2
-# define dup2(o,n) \
- (GL_LINK_WARNING ("dup2 is unportable - " \
- "use gnulib module dup2 for portability"), \
- dup2 (o, n))
-#endif
-
-
-#if @GNULIB_FCHDIR@
-# if @REPLACE_FCHDIR@
-
-/* Change the process' current working directory to the directory on which
- the given file descriptor is open.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/fchdir.html>. */
-extern int fchdir (int /*fd*/);
-
-# define close rpl_close
-extern int close (int);
-# define dup rpl_dup
-extern int dup (int);
-# define dup2 rpl_dup2
-extern int dup2 (int, int);
-
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fchdir
-# define fchdir(f) \
- (GL_LINK_WARNING ("fchdir is unportable - " \
- "use gnulib module fchdir for portability"), \
- fchdir (f))
-#endif
-
-
-#if @GNULIB_FTRUNCATE@
-# if !@HAVE_FTRUNCATE@
-/* Change the size of the file to which FD is opened to become equal to LENGTH.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
-extern int ftruncate (int fd, off_t length);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef ftruncate
-# define ftruncate(f,l) \
- (GL_LINK_WARNING ("ftruncate is unportable - " \
- "use gnulib module ftruncate for portability"), \
- ftruncate (f, l))
-#endif
-
-
-#if @GNULIB_GETCWD@
-/* Include the headers that might declare getcwd so that they will not
- cause confusion if included after this file. */
-# include <stdlib.h>
-# if @REPLACE_GETCWD@
-/* Get the name of the current working directory, and put it in SIZE bytes
- of BUF.
- Return BUF if successful, or NULL if the directory couldn't be determined
- or SIZE was too small.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/getcwd.html>.
- Additionally, the gnulib module 'getcwd' guarantees the following GNU
- extension: If BUF is NULL, an array is allocated with 'malloc'; the array
- is SIZE bytes long, unless SIZE == 0, in which case it is as big as
- necessary. */
-# define getcwd rpl_getcwd
-extern char * getcwd (char *buf, size_t size);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getcwd
-# define getcwd(b,s) \
- (GL_LINK_WARNING ("getcwd is unportable - " \
- "use gnulib module getcwd for portability"), \
- getcwd (b, s))
-#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>.
- */
-# if !@HAVE_DECL_GETLOGIN_R@
-# include <stddef.h>
-extern int getlogin_r (char *name, size_t size);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getlogin_r
-# define getlogin_r(n,s) \
- (GL_LINK_WARNING ("getlogin_r is unportable - " \
- "use gnulib module getlogin_r for portability"), \
- getlogin_r (n, s))
-#endif
-
-
-#if @GNULIB_LCHOWN@
-# if @REPLACE_LCHOWN@
-/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
- to GID (if GID is not -1). Do not follow symbolic links.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/lchown.html>. */
-# define lchown rpl_lchown
-extern int lchown (char const *file, uid_t owner, gid_t group);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef lchown
-# define lchown(f,u,g) \
- (GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \
- "systems - use gnulib module lchown for portability"), \
- lchown (f, u, g))
-#endif
-
-
-#if @GNULIB_LSEEK@
-# if @REPLACE_LSEEK@
-/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
- Return the new offset if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/lseek.html>. */
-# define lseek rpl_lseek
- extern off_t lseek (int fd, off_t offset, int whence);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef lseek
-# define lseek(f,o,w) \
- (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \
- "systems - use gnulib module lseek for portability"), \
- lseek (f, o, w))
-#endif
-
-
-#if @GNULIB_READLINK@
-/* Read the contents of the symbolic link FILE and place the first BUFSIZE
- bytes of it into BUF. Return the number of bytes placed into BUF if
- successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/readlink.html>. */
-# if !@HAVE_READLINK@
-# include <stddef.h>
-extern int readlink (const char *file, char *buf, size_t bufsize);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef readlink
-# define readlink(f,b,s) \
- (GL_LINK_WARNING ("readlink is unportable - " \
- "use gnulib module readlink for portability"), \
- readlink (f, b, s))
-#endif
-
-
-#if @GNULIB_SLEEP@
-/* Pause the execution of the current thread for N seconds.
- Returns the number of seconds left to sleep.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/sleep.html>. */
-# if !@HAVE_SLEEP@
-extern unsigned int sleep (unsigned int n);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef sleep
-# define sleep(n) \
- (GL_LINK_WARNING ("sleep is unportable - " \
- "use gnulib module sleep for portability"), \
- sleep (n))
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _GL_UNISTD_H */
-#endif /* _GL_UNISTD_H */