summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-08-12 09:57:27 +0000
committerSimon Josefsson <simon@josefsson.org>2005-08-12 09:57:27 +0000
commit3132c8be52a21a4dce04a5ef33a2c473093655c3 (patch)
tree8b1fa9442161e0efebbd600580cec6eb4f533026
parent900cfee3472370e2113418b5057af38b06820b66 (diff)
downloadgnutls-3132c8be52a21a4dce04a5ef33a2c473093655c3.tar.gz
Update.
-rw-r--r--gl/Makefile.am14
-rw-r--r--gl/getdelim.c116
-rw-r--r--gl/getdelim.h28
-rw-r--r--gl/getline.c46
-rw-r--r--gl/getline.h49
-rw-r--r--gl/getndelim2.c155
-rw-r--r--gl/getndelim2.h43
-rw-r--r--gl/m4/getdelim.m430
-rw-r--r--gl/m4/getline.m424
-rw-r--r--gl/m4/getndelim2.m425
-rw-r--r--gl/m4/gnulib.m48
-rw-r--r--gl/m4/onceonly_2_57.m44
-rw-r--r--gl/m4/ssize_t.m420
13 files changed, 230 insertions, 332 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index db4ef85191..733466db40 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -9,7 +9,7 @@
#
# Generated by gnulib-tool.
# Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool alloca-opt error getline getpass-gnu minmax progname size_max snprintf stdbool vasnprintf xsize
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool alloca-opt error getdelim getline getpass-gnu minmax progname size_max snprintf stdbool vasnprintf xsize
AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
@@ -30,9 +30,8 @@ MAINTAINERCLEANFILES =
BUILT_SOURCES += $(ALLOCA_H)
EXTRA_DIST += alloca_.h
-# We need the following in order to create an <alloca.h> when the system
+# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
-all-local $(libgnu_la_OBJECTS): $(ALLOCA_H)
alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@-t
mv $@-t $@
@@ -40,12 +39,6 @@ MOSTLYCLEANFILES += alloca.h alloca.h-t
## end gnulib module alloca-opt
-## begin gnulib module getline
-
-EXTRA_DIST += getndelim2.h getndelim2.c
-
-## end gnulib module getline
-
## begin gnulib module minmax
libgnu_la_SOURCES += minmax.h
@@ -69,9 +62,8 @@ libgnu_la_SOURCES += snprintf.h
BUILT_SOURCES += $(STDBOOL_H)
EXTRA_DIST += stdbool_.h
-# We need the following in order to create an <stdbool.h> when the system
+# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
-all-local $(libgnu_la_OBJECTS): $(STDBOOL_H)
stdbool.h: stdbool_.h
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
mv $@-t $@
diff --git a/gl/getdelim.c b/gl/getdelim.c
new file mode 100644
index 0000000000..02bb9a4976
--- /dev/null
+++ b/gl/getdelim.c
@@ -0,0 +1,116 @@
+/* getdelim.c --- Implementation of replacement getdelim function.
+ Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005 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. */
+
+/* Ported from glibc by Simon Josefsson. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <errno.h>
+
+#include "getdelim.h"
+
+#if !HAVE_FLOCKFILE
+# undef flockfile
+# define flockfile(x) ((void) 0)
+#endif
+#if !HAVE_FUNLOCKFILE
+# undef funlockfile
+# define funlockfile(x) ((void) 0)
+#endif
+
+/* 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. */
+
+ssize_t
+getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
+{
+ int result;
+ ssize_t cur_len = 0;
+ ssize_t len;
+
+ if (lineptr == NULL || n == NULL || fp == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ flockfile (fp);
+
+ if (*lineptr == NULL || *n == 0)
+ {
+ *n = 120;
+ *lineptr = (char *) malloc (*n);
+ if (*lineptr == NULL)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+ }
+
+ for (;;)
+ {
+ char *t;
+ int i;
+
+ i = getc (fp);
+ if (i == EOF)
+ break;
+
+ /* Make enough space for len+1 (for final NUL) bytes. */
+ if (cur_len + 1 >= *n)
+ {
+ size_t needed = 2 * (cur_len + 1) + 1; /* Be generous. */
+ char *new_lineptr;
+
+ if (needed < cur_len)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+
+ new_lineptr = (char *) realloc (*lineptr, needed);
+ if (new_lineptr == NULL)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+
+ *lineptr = new_lineptr;
+ *n = needed;
+ }
+
+ (*lineptr)[cur_len] = i;
+ cur_len++;
+
+ if (i == delimiter)
+ break;
+ }
+ (*lineptr)[cur_len] = '\0';
+ result = cur_len;
+
+ unlock_return:
+ funlockfile (fp);
+ return result;
+}
diff --git a/gl/getdelim.h b/gl/getdelim.h
new file mode 100644
index 0000000000..8bc61307e5
--- /dev/null
+++ b/gl/getdelim.h
@@ -0,0 +1,28 @@
+/* getdelim.h --- Prototype for replacement getdelim function.
+ Copyright (C) 2005 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. */
+
+/* Written by Simon Josefsson. */
+
+/* Get size_t, FILE, ssize_t. And getdelim, if available. */
+# include <stddef.h>
+# include <stdio.h>
+# include <sys/types.h>
+
+#if !HAVE_DECL_GETDELIM
+ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream);
+#endif /* !HAVE_GETDELIM */
diff --git a/gl/getline.c b/gl/getline.c
index 5a7980ec9d..00f02f4aea 100644
--- a/gl/getline.c
+++ b/gl/getline.c
@@ -1,44 +1,32 @@
-/* getline.c -- Replacement for GNU C library function getline
+/* getline.c --- Implementation of replacement getline function.
+ Copyright (C) 2005 Free Software Foundation, Inc.
- Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004 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 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.
+ 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. */
+ 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 Jan Brittenson, bson@gnu.ai.mit.edu. */
+/* Written by Simon Josefsson. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
+#include "getdelim.h"
#include "getline.h"
-#if ! (defined __GNU_LIBRARY__ && HAVE_GETDELIM)
-
-# include "getndelim2.h"
-
-ssize_t
-getdelim (char **lineptr, size_t *linesize, int delimiter, FILE *stream)
-{
- return getndelim2 (lineptr, linesize, 0, GETNLINE_NO_LIMIT, delimiter, EOF,
- stream);
-}
-#endif
-
ssize_t
-getline (char **lineptr, size_t *linesize, FILE *stream)
+getline (char **lineptr, size_t *n, FILE *stream)
{
- return getdelim (lineptr, linesize, '\n', stream);
+ return getdelim (lineptr, n, '\n', stream);
}
diff --git a/gl/getline.h b/gl/getline.h
index b58e93f4f3..f0f61c4b2e 100644
--- a/gl/getline.h
+++ b/gl/getline.h
@@ -1,39 +1,28 @@
-/* Replacement for GNU C library function getline
+/* getline.h --- Prototype for replacement getline function.
+ Copyright (C) 2005 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1999, 2000, 2001, 2002, 2003 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 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.
-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. */
-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 GETLINE_H_
-# define GETLINE_H_ 1
+/* Written by Simon Josefsson. */
+/* Get size_t, FILE, ssize_t. And getline, if available. */
# include <stddef.h>
# include <stdio.h>
-
-/* Get ssize_t. */
# include <sys/types.h>
-/* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
-# if __GLIBC__ < 2
-
-extern ssize_t getline (char **_lineptr, size_t *_linesize, FILE *_stream);
-
-extern ssize_t getdelim (char **_lineptr, size_t *_linesize, int _delimiter,
- FILE *_stream);
-
-# endif
-
-#endif /* not GETLINE_H_ */
+#if !HAVE_DECL_GETLINE
+ssize_t getline (char **lineptr, size_t *n, FILE *stream);
+#endif /* !HAVE_GETLINE */
diff --git a/gl/getndelim2.c b/gl/getndelim2.c
deleted file mode 100644
index e9f8cb9c53..0000000000
--- a/gl/getndelim2.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* getndelim2 - Read a line from a stream, stopping at one of 2 delimiters,
- with bounded memory allocation.
-
- Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004 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. */
-
-/* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "getndelim2.h"
-
-#include <stdlib.h>
-#include <stddef.h>
-
-#if USE_UNLOCKED_IO
-# include "unlocked-io.h"
-#endif
-
-#include <limits.h>
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#if HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifndef PTRDIFF_MAX
-# define PTRDIFF_MAX ((ptrdiff_t) (SIZE_MAX / 2))
-#endif
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-
-/* The maximum value that getndelim2 can return without suffering from
- overflow problems, either internally (because of pointer
- subtraction overflow) or due to the API (because of ssize_t). */
-#define GETNDELIM2_MAXIMUM (PTRDIFF_MAX < SSIZE_MAX ? PTRDIFF_MAX : SSIZE_MAX)
-
-/* Try to add at least this many bytes when extending the buffer.
- MIN_CHUNK must be no greater than GETNDELIM2_MAXIMUM. */
-#define MIN_CHUNK 64
-
-ssize_t
-getndelim2 (char **lineptr, size_t *linesize, size_t offset, size_t nmax,
- int delim1, int delim2, FILE *stream)
-{
- size_t nbytes_avail; /* Allocated but unused bytes in *LINEPTR. */
- char *read_pos; /* Where we're reading into *LINEPTR. */
- ssize_t bytes_stored = -1;
- char *ptr = *lineptr;
- size_t size = *linesize;
-
- if (!ptr)
- {
- size = nmax < MIN_CHUNK ? nmax : MIN_CHUNK;
- ptr = malloc (size);
- if (!ptr)
- return -1;
- }
-
- if (size < offset)
- goto done;
-
- nbytes_avail = size - offset;
- read_pos = ptr + offset;
-
- if (nbytes_avail == 0 && nmax <= size)
- goto done;
-
- for (;;)
- {
- /* Here always ptr + size == read_pos + nbytes_avail. */
-
- int c;
-
- /* We always want at least one byte left in the buffer, since we
- always (unless we get an error while reading the first byte)
- NUL-terminate the line buffer. */
-
- if (nbytes_avail < 2 && size < nmax)
- {
- size_t newsize = size < MIN_CHUNK ? size + MIN_CHUNK : 2 * size;
- char *newptr;
-
- if (! (size < newsize && newsize <= nmax))
- newsize = nmax;
-
- if (GETNDELIM2_MAXIMUM < newsize - offset)
- {
- size_t newsizemax = offset + GETNDELIM2_MAXIMUM + 1;
- if (size == newsizemax)
- goto done;
- newsize = newsizemax;
- }
-
- nbytes_avail = newsize - (read_pos - ptr);
- newptr = realloc (ptr, newsize);
- if (!newptr)
- goto done;
- ptr = newptr;
- size = newsize;
- read_pos = size - nbytes_avail + ptr;
- }
-
- c = getc (stream);
- if (c == EOF)
- {
- /* Return partial line, if any. */
- if (read_pos == ptr)
- goto done;
- else
- break;
- }
-
- if (nbytes_avail >= 2)
- {
- *read_pos++ = c;
- nbytes_avail--;
- }
-
- if (c == delim1 || c == delim2)
- /* Return the line. */
- break;
- }
-
- /* Done - NUL terminate and return the number of bytes read.
- At this point we know that nbytes_avail >= 1. */
- *read_pos = '\0';
-
- bytes_stored = read_pos - (ptr + offset);
-
- done:
- *lineptr = ptr;
- *linesize = size;
- return bytes_stored;
-}
diff --git a/gl/getndelim2.h b/gl/getndelim2.h
deleted file mode 100644
index fb0a8c3e89..0000000000
--- a/gl/getndelim2.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* getndelim2 - Read a line from a stream, stopping at one of 2 delimiters,
- with bounded memory allocation.
-
- Copyright (C) 2003, 2004 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 GETNDELIM2_H
-#define GETNDELIM2_H 1
-
-#include <stdio.h>
-#include <sys/types.h>
-
-#define GETNLINE_NO_LIMIT ((size_t) -1)
-
-/* Read into a buffer *LINEPTR returned from malloc (or NULL),
- pointing to *LINESIZE bytes of space. Store the input bytes
- starting at *LINEPTR + OFFSET, and null-terminate them. Reallocate
- the buffer as necessary, but if NMAX is not GETNLINE_NO_LIMIT
- then do not allocate more than NMAX bytes; if the line is longer
- than that, read and discard the extra bytes. Stop reading after
- after the first occurrence of DELIM1 or DELIM2, whichever comes
- first; a delimiter equal to EOF stands for no delimiter. Read the
- input bytes from STREAM.
- Return the number of bytes read and stored at *LINEPTR + OFFSET (not
- including the NUL terminator), or -1 on error or EOF. */
-extern ssize_t getndelim2 (char **lineptr, size_t *linesize, size_t offset,
- size_t nmax, int delim1, int delim2,
- FILE *stream);
-
-#endif /* GETNDELIM2_H */
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
new file mode 100644
index 0000000000..340bb7126d
--- /dev/null
+++ b/gl/m4/getdelim.m4
@@ -0,0 +1,30 @@
+# getdelim.m4 serial 1
+
+dnl Copyright (C) 2005 Free Software dnl Foundation, Inc.
+dnl
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ(2.52)
+
+AC_DEFUN([gl_FUNC_GETDELIM],
+[
+ AC_LIBSOURCES([getdelim.c, getdelim.h])
+
+ dnl Persuade glibc <stdio.h> to declare getdelim().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REPLACE_FUNCS(getdelim)
+ AC_CHECK_DECLS_ONCE(getdelim)
+
+ if test $ac_cv_func_getdelim = no; then
+ gl_PREREQ_GETDELIM
+ fi
+])
+
+# Prerequisites of lib/getdelim.c.
+AC_DEFUN([gl_PREREQ_GETDELIM],
+[
+ AC_CHECK_FUNCS([flockfile funlockfile])
+])
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 983f261463..ff255a3664 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 12
+# getline.m4 serial 13
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software
dnl Foundation, Inc.
@@ -13,19 +13,21 @@ dnl See if there's a working, system-supplied version of the getline function.
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
dnl have a function by that name in -linet that doesn't have anything
dnl to do with the function we need.
-AC_DEFUN([AM_FUNC_GETLINE],
+AC_DEFUN([gl_FUNC_GETLINE],
[
AC_LIBSOURCES([getline.c, getline.h])
- dnl Persuade glibc <stdio.h> to declare getline() and getdelim().
+ dnl Persuade glibc <stdio.h> to declare getline().
AC_REQUIRE([AC_GNU_SOURCE])
- am_getline_needs_run_time_check=no
+ AC_CHECK_DECLS([getline])
+
+ gl_getline_needs_run_time_check=no
AC_CHECK_FUNC(getline,
dnl Found it in some library. Verify that it works.
- am_getline_needs_run_time_check=yes,
+ gl_getline_needs_run_time_check=yes,
am_cv_func_working_getline=no)
- if test $am_getline_needs_run_time_check = yes; then
+ if test $gl_getline_needs_run_time_check = yes; then
AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
[echo fooN |tr -d '\012'|tr N '\012' > conftest.data
AC_TRY_RUN([
@@ -57,20 +59,12 @@ AC_DEFUN([AM_FUNC_GETLINE],
[Define to a replacement function name for getline().])
AC_LIBOBJ(getline)
- # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
- # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
- case " $LIB@&t@OBJS " in
- *" getndelim2.$ac_objext "* ) ;;
- *) AC_LIBOBJ(getndelim2);;
- esac
-
gl_PREREQ_GETLINE
- gl_PREREQ_GETNDELIM2
fi
])
# Prerequisites of lib/getline.c.
AC_DEFUN([gl_PREREQ_GETLINE],
[
- AC_CHECK_FUNCS(getdelim)
+ gl_FUNC_GETDELIM
])
diff --git a/gl/m4/getndelim2.m4 b/gl/m4/getndelim2.m4
deleted file mode 100644
index 404b36d4f9..0000000000
--- a/gl/m4/getndelim2.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-# getndelim2.m4 serial 4
-dnl Copyright (C) 2003 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_GETNDELIM2],
-[
- # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
- # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
- case " $LIB@&t@OBJS " in
- *" getndelim2.$ac_objext "* ) ;;
- *) AC_LIBOBJ(getndelim2);;
- esac
-
- gl_PREREQ_GETNDELIM2
-])
-
-# Prerequisites of lib/getndelim2.h and lib/getndelim2.c.
-AC_DEFUN([gl_PREREQ_GETNDELIM2],
-[
- dnl Prerequisites of lib/getndelim2.h.
- AC_REQUIRE([gt_TYPE_SSIZE_T])
- dnl No prerequisites of lib/getndelim2.c.
-])
diff --git a/gl/m4/gnulib.m4 b/gl/m4/gnulib.m4
index 965983d39a..758d377ca5 100644
--- a/gl/m4/gnulib.m4
+++ b/gl/m4/gnulib.m4
@@ -8,7 +8,7 @@
# Generated by gnulib-tool.
#
# Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool alloca-opt error getline getpass-gnu minmax progname size_max snprintf stdbool vasnprintf xsize
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool alloca-opt error getdelim getline getpass-gnu minmax progname size_max snprintf stdbool vasnprintf xsize
AC_DEFUN([gl_EARLY],
[
@@ -19,7 +19,8 @@ AC_DEFUN([gl_INIT],
[
gl_FUNC_ALLOCA
gl_ERROR
- AM_FUNC_GETLINE
+ gl_FUNC_GETDELIM
+ gl_FUNC_GETLINE
gl_FUNC_GETPASS_GNU
gl_MINMAX
gl_SIZE_MAX
@@ -32,6 +33,9 @@ AC_DEFUN([gl_INIT],
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], [])
diff --git a/gl/m4/onceonly_2_57.m4 b/gl/m4/onceonly_2_57.m4
index 9fc510e06e..14d3c0b2a4 100644
--- a/gl/m4/onceonly_2_57.m4
+++ b/gl/m4/onceonly_2_57.m4
@@ -1,5 +1,5 @@
# onceonly_2_57.m4 serial 3
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
@@ -27,7 +27,7 @@ dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
dnl size reduction is ca. 9%.
dnl Autoconf version 2.57 or newer is recommended.
-AC_PREREQ(2.54)
+AC_PREREQ(2.57)
# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
deleted file mode 100644
index 19b379fee4..0000000000
--- a/gl/m4/ssize_t.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-# ssize_t.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 2001-2003 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_TRY_COMPILE([#include <sys/types.h>],
- [int x = sizeof (ssize_t *) + sizeof (ssize_t);],
- 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
-])