summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-08 13:41:12 +0200
committerSimon Josefsson <simon@josefsson.org>2008-10-08 13:41:12 +0200
commitabb7c6713d455ad9f785bbbe3f482779c824bffa (patch)
tree779592382bc3488f7a05bc4402dbf8b132c02bb3 /gl
parent4bcd479c96ccd4ee7994ca81cb28b2fc41a80d28 (diff)
downloadlibtasn1-abb7c6713d455ad9f785bbbe3f482779c824bffa.tar.gz
libtasn1-abb7c6713d455ad9f785bbbe3f482779c824bffa.tar.bz2
libtasn1-abb7c6713d455ad9f785bbbe3f482779c824bffa.zip
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am23
-rw-r--r--gl/m4/gnulib-cache.m42
-rw-r--r--gl/m4/gnulib-comp.m44
-rw-r--r--gl/m4/strdup.m422
-rw-r--r--gl/m4/string_h.m49
-rw-r--r--gl/m4/unistd_h.m433
-rw-r--r--gl/m4/wchar.m425
-rw-r--r--gl/m4/wint_t.m428
-rw-r--r--gl/malloc.c57
-rw-r--r--gl/string.in.h6
-rw-r--r--gl/unistd.in.h46
-rw-r--r--gl/wchar.in.h6
12 files changed, 164 insertions, 97 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index faa6079..b953421 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -9,10 +9,11 @@
# 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 --libtool --macro-prefix=gl --no-vc-files autobuild fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup 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 --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf
AUTOMAKE_OPTIONS = 1.5 gnits
+SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
@@ -24,6 +25,7 @@ MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
+EXTRA_DIST += m4/gnulib-cache.m4
AM_CPPFLAGS =
@@ -91,15 +93,6 @@ EXTRA_DIST += $(top_srcdir)/maint.mk
## end gnulib module maintainer-makefile
-## begin gnulib module malloc-posix
-
-
-EXTRA_DIST += malloc.c
-
-EXTRA_libgnu_la_SOURCES += malloc.c
-
-## end gnulib module malloc-posix
-
## begin gnulib module progname
libgnu_la_SOURCES += progname.h progname.c
@@ -305,6 +298,7 @@ string.h: string.in.h
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
@@ -335,16 +329,22 @@ unistd.h: unistd.in.h
-e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
-e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|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_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|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|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|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_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
@@ -358,6 +358,8 @@ unistd.h: unistd.in.h
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/unistd.in.h; \
} > $@-t
mv $@-t $@
@@ -393,6 +395,7 @@ wchar.h: wchar.in.h
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 4cd1b46..9ff3ed7 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# 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 --libtool --macro-prefix=gl --no-vc-files autobuild fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index a4c1f92..c636875 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -61,8 +61,6 @@ AC_DEFUN([gl_INIT],
m4_defn([m4_PACKAGE_VERSION])), [1], [],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
- gl_FUNC_MALLOC_POSIX
- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_FUNC_READ_FILE
gl_FUNC_REALLOC_POSIX
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
@@ -213,7 +211,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getopt1.c
lib/getopt_int.h
lib/gettext.h
- lib/malloc.c
lib/progname.c
lib/progname.h
lib/read-file.c
@@ -245,6 +242,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/string_h.m4
m4/unistd_h.m4
m4/wchar.m4
+ m4/wint_t.m4
top/GNUmakefile
top/maint.mk
])
diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4
index 8796e9e..0537def 100644
--- a/gl/m4/strdup.m4
+++ b/gl/m4/strdup.m4
@@ -1,7 +1,6 @@
-# strdup.m4 serial 9
+# strdup.m4 serial 10
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -18,5 +17,22 @@ AC_DEFUN([gl_FUNC_STRDUP],
gl_PREREQ_STRDUP
])
+AC_DEFUN([gl_FUNC_STRDUP_POSIX],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+ AC_LIBOBJ([strdup])
+ else
+ AC_REPLACE_FUNCS(strdup)
+ fi
+ AC_CHECK_DECLS_ONCE(strdup)
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ gl_PREREQ_STRDUP
+])
+
# Prerequisites of lib/strdup.c.
AC_DEFUN([gl_PREREQ_STRDUP], [:])
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index b37f843..2d5553c 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# Written by Paul Eggert.
@@ -83,9 +83,10 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
- REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
- REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
- REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
+ REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index e8ccab1..e6eb045 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 11
+# unistd_h.m4 serial 13
dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -32,21 +32,27 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
[
- GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
- GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
- GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
- 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_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
- 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])
+ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
+ GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
+ GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
+ GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
+ GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
+ GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
+ GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
+ GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
+ 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])
+ GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+ GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
+ HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
+ HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
@@ -60,4 +66,5 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
])
diff --git a/gl/m4/wchar.m4 b/gl/m4/wchar.m4
index 70b1248..5c923fa 100644
--- a/gl/m4/wchar.m4
+++ b/gl/m4/wchar.m4
@@ -1,13 +1,13 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar.m4 serial 4
+# wchar.m4 serial 6
AC_DEFUN([gl_WCHAR_H],
[
@@ -18,7 +18,16 @@ AC_DEFUN([gl_WCHAR_H],
wchar_t w;]],
[gl_cv_header_wchar_h_standalone=yes],
[gl_cv_header_wchar_h_standalone=no])])
- if test $gl_cv_header_wchar_h_standalone != yes; then
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then
WCHAR_H=wchar.h
fi
@@ -36,6 +45,13 @@ wchar_t w;]],
gl_CHECK_NEXT_HEADERS([wchar.h])
])
+dnl Unconditionally enables the replacement of <wchar.h>.
+AC_DEFUN([gl_REPLACE_WCHAR_H],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ WCHAR_H=wchar.h
+])
+
AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
@@ -49,6 +65,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
- WCHAR_H=
- AC_SUBST([WCHAR_H])
+ WCHAR_H=''; AC_SUBST([WCHAR_H])
])
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
new file mode 100644
index 0000000..af5ed93
--- /dev/null
+++ b/gl/m4/wint_t.m4
@@ -0,0 +1,28 @@
+# wint_t.m4 serial 2 (gettext-0.17)
+dnl Copyright (C) 2003, 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 Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+ [AC_TRY_COMPILE([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';], ,
+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+ fi
+])
diff --git a/gl/malloc.c b/gl/malloc.c
deleted file mode 100644
index f2f6663..0000000
--- a/gl/malloc.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* malloc() function that is glibc compatible.
-
- Copyright (C) 1997, 1998, 2006, 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 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* written by Jim Meyering and Bruno Haible */
-
-#include <config.h>
-/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
-#ifdef malloc
-# define NEED_MALLOC_GNU
-# undef malloc
-#endif
-
-/* Specification. */
-#include <stdlib.h>
-
-#include <errno.h>
-
-/* Call the system's malloc below. */
-#undef malloc
-
-/* Allocate an N-byte block of memory from the heap.
- If N is zero, allocate a 1-byte block. */
-
-void *
-rpl_malloc (size_t n)
-{
- void *result;
-
-#ifdef NEED_MALLOC_GNU
- if (n == 0)
- n = 1;
-#endif
-
- result = malloc (n);
-
-#if !HAVE_MALLOC_POSIX
- if (result == NULL)
- errno = ENOMEM;
-#endif
-
- return result;
-}
diff --git a/gl/string.in.h b/gl/string.in.h
index f53381b..f443006 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -167,7 +167,11 @@ extern char *strchrnul (char const *__s, int __c_in)
/* Duplicate S, returning an identical malloc'd string. */
#if @GNULIB_STRDUP@
-# if ! @HAVE_DECL_STRDUP@ && ! defined strdup
+# if @REPLACE_STRDUP@
+# undef strdup
+# define strdup rpl_strdup
+# endif
+# if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
extern char *strdup (char const *__s);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 8f0acf6..d2fdc21 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -35,6 +35,11 @@
/* mingw fails to declare _exit in <unistd.h>. */
#include <stdlib.h>
+#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+/* Get ssize_t. */
+# include <sys/types.h>
+#endif
+
/* The definition of GL_LINK_WARNING is copied here. */
@@ -135,6 +140,23 @@ extern int dup2 (int, int);
#endif
+#if @GNULIB_FSYNC@
+/* Synchronize changes to a file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fsync.html>. */
+# if !@HAVE_FSYNC@
+extern int fsync (int fd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fsync
+# define fsync(fd) \
+ (GL_LINK_WARNING ("fsync is unportable - " \
+ "use gnulib module fsync for portability"), \
+ fsync (fd))
+#endif
+
+
#if @GNULIB_FTRUNCATE@
# if !@HAVE_FTRUNCATE@
/* Change the size of the file to which FD is opened to become equal to LENGTH.
@@ -179,6 +201,20 @@ extern char * getcwd (char *buf, size_t size);
#endif
+#if @GNULIB_GETDTABLESIZE@
+# if !@HAVE_GETDTABLESIZE@
+/* Return the maximum number of file descriptors in the current process. */
+extern int getdtablesize (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdtablesize
+# define getdtablesize() \
+ (GL_LINK_WARNING ("getdtablesize is unportable - " \
+ "use gnulib module getdtablesize for portability"), \
+ getdtablesize ())
+#endif
+
+
#if @GNULIB_GETLOGIN_R@
/* Copies the user's login name to NAME.
The array pointed to by NAME has room for SIZE bytes.
@@ -333,6 +369,16 @@ extern unsigned int sleep (unsigned int n);
#endif
+#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+/* Write up to COUNT bytes starting at BUF to file descriptor FD.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/write.html>. */
+# undef write
+# define write rpl_write
+extern ssize_t write (int fd, const void *buf, size_t count);
+#endif
+
+
#ifdef __cplusplus
}
#endif
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index 874bbf4..c0530dc 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -63,6 +63,12 @@ extern "C" {
#endif
+/* Define wint_t. (Also done in wctype.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+#endif
+
+
/* Return the number of screen columns needed for WC. */
#if @GNULIB_WCWIDTH@
# if @REPLACE_WCWIDTH@