summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-08-23 17:35:19 +0200
committerSimon Josefsson <simon@josefsson.org>2007-08-23 17:35:19 +0200
commitab2bfb0023db46dfb157d46a75fa29a7ba161a7e (patch)
tree0856d0f09d1988998a0981e46bdf94a3bcdbd828
parent7ecdf920d7dcb35f5a647cc15a7f667b27a3e1e9 (diff)
downloadgnutls-ab2bfb0023db46dfb157d46a75fa29a7ba161a7e.tar.gz
Update gnulib files.
-rw-r--r--gl/fseeko.c (renamed from lgl/fseeko.c)12
-rw-r--r--gl/getpass.c (renamed from lgl/getpass.c)8
-rw-r--r--gl/getpass.h (renamed from lgl/getpass.h)8
-rw-r--r--gl/gnulib.mk122
-rw-r--r--gl/lseek.c (renamed from lgl/lseek.c)30
-rw-r--r--gl/m4/fseeko.m4 (renamed from lgl/m4/fseeko.m4)0
-rw-r--r--gl/m4/getpass.m4 (renamed from lgl/m4/getpass.m4)0
-rw-r--r--gl/m4/gnulib-cache.m44
-rw-r--r--gl/m4/gnulib-comp.m419
-rw-r--r--gl/m4/lseek.m4 (renamed from lgl/m4/lseek.m4)6
-rw-r--r--lgl/Makefile.am47
-rw-r--r--lgl/getdelim.c126
-rw-r--r--lgl/getdelim.h28
-rw-r--r--lgl/getline.c30
-rw-r--r--lgl/getline.h28
-rw-r--r--lgl/m4/getdelim.m429
-rw-r--r--lgl/m4/getline.m479
-rw-r--r--lgl/m4/gnulib-cache.m44
-rw-r--r--lgl/m4/gnulib-comp.m421
19 files changed, 186 insertions, 415 deletions
diff --git a/lgl/fseeko.c b/gl/fseeko.c
index 5397220816..209ce9c690 100644
--- a/lgl/fseeko.c
+++ b/gl/fseeko.c
@@ -2,16 +2,16 @@
Copyright (C) 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1, or (at your option)
+ 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 Lesser General Public License for more details.
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along
+ 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. */
@@ -71,11 +71,13 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
: 0)
&& fp_ub._base == NULL)
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw */
-# if defined __sun && defined __sparc && defined _LP64 /* Solaris/SPARC 64-bit */
+# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
# define fp_ ((struct { unsigned char *_ptr; \
unsigned char *_base; \
unsigned char *_end; \
long _cnt; \
+ int _file; \
+ unsigned int _flag; \
} *) fp)
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
diff --git a/lgl/getpass.c b/gl/getpass.c
index 395c8a52fc..4ae233305d 100644
--- a/lgl/getpass.c
+++ b/gl/getpass.c
@@ -4,16 +4,16 @@
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1, or (at your option)
+ 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 Lesser General Public License for more details.
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along
+ 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. */
diff --git a/lgl/getpass.h b/gl/getpass.h
index a8c392b30d..bdff8754d4 100644
--- a/lgl/getpass.h
+++ b/gl/getpass.h
@@ -3,16 +3,16 @@
Contributed by Simon Josefsson <jas@extundo.com>, 2004.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1, or (at your option)
+ 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 Lesser General Public License for more details.
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License
+ 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. */
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index 147965707b..55b8118a7c 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=snprintf --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline 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=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
MOSTLYCLEANFILES += core *.stackdump
@@ -49,6 +49,15 @@ EXTRA_libgnu_la_SOURCES += error.c
## end gnulib module error
+## begin gnulib module fseeko
+
+
+EXTRA_DIST += fseeko.c
+
+EXTRA_libgnu_la_SOURCES += fseeko.c
+
+## end gnulib module fseeko
+
## begin gnulib module gendocs
@@ -83,6 +92,15 @@ EXTRA_libgnu_la_SOURCES += getline.c
## end gnulib module getline
+## begin gnulib module getpass
+
+
+EXTRA_DIST += getpass.c getpass.h
+
+EXTRA_libgnu_la_SOURCES += getpass.c
+
+## end gnulib module getpass
+
## begin gnulib module gettext-h
libgnu_la_SOURCES += gettext.h
@@ -122,6 +140,15 @@ EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h
## end gnulib module link-warning
+## begin gnulib module lseek
+
+
+EXTRA_DIST += lseek.c
+
+EXTRA_libgnu_la_SOURCES += lseek.c
+
+## end gnulib module lseek
+
## begin gnulib module maintainer-makefile
EXTRA_DIST += $(top_srcdir)/build-aux/GNUmakefile $(top_srcdir)/build-aux/maint.mk
@@ -184,6 +211,58 @@ 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|@''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 '/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
@@ -281,6 +360,47 @@ 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/lgl/lseek.c b/gl/lseek.c
index 1fffab01f7..db8dbfb3e9 100644
--- a/lgl/lseek.c
+++ b/gl/lseek.c
@@ -2,16 +2,16 @@
Copyright (C) 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1, or (at your option)
+ 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 Lesser General Public License for more details.
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along
+ 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. */
@@ -20,9 +20,13 @@
/* Specification. */
#include <unistd.h>
-/* Get GetFileType. The replacement lseek is only used on mingw, so
- this include can be unconditional. */
-#include <windows.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Windows platforms. */
+/* Get GetFileType. */
+# include <windows.h>
+#else
+# include <sys/stat.h>
+#endif
#include <errno.h>
#undef lseek
@@ -30,6 +34,7 @@
off_t
rpl_lseek (int fd, off_t offset, int whence)
{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
if (h == INVALID_HANDLE_VALUE)
@@ -42,5 +47,16 @@ rpl_lseek (int fd, off_t offset, int whence)
errno = ESPIPE;
return -1;
}
+#else
+ /* BeOS lseek mistakenly succeeds on pipes... */
+ struct stat statbuf;
+ if (fstat (fd, &statbuf) < 0)
+ return -1;
+ if (!S_ISREG (statbuf.st_mode))
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#endif
return lseek (fd, offset, whence);
}
diff --git a/lgl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 40be63b4c2..40be63b4c2 100644
--- a/lgl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
diff --git a/lgl/m4/getpass.m4 b/gl/m4/getpass.m4
index 54348ce7c7..54348ce7c7 100644
--- a/lgl/m4/getpass.m4
+++ b/gl/m4/getpass.m4
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 5d0831b692..00da5468c4 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -15,11 +15,11 @@
# 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=snprintf --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline 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=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
# 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 gpl-2.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf])
+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([snprintf vasnprintf])
gl_SOURCE_BASE([gl])
gl_M4_BASE([gl/m4])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index e5689086b5..6aaf9bfa4d 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -27,6 +27,7 @@ AC_DEFUN([gl_EARLY],
AC_REQUIRE([AC_PROG_RANLIB])
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
@@ -47,24 +48,31 @@ AC_DEFUN([gl_INIT],
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
gl_ERROR
+ gl_FUNC_FSEEKO
+ gl_STDIO_MODULE_INDICATOR([fseeko])
gl_GETADDRINFO
gl_FUNC_GETDELIM
gl_FUNC_GETLINE
+ gl_FUNC_GETPASS
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_INET_NTOP
gl_INET_PTON
+ gl_FUNC_LSEEK
+ gl_UNISTD_MODULE_INDICATOR([lseek])
gl_HEADER_NETINET_IN
AC_PROG_MKDIR_P
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])
@@ -113,6 +121,7 @@ AC_DEFUN([gl_FILE_LIST], [
doc/lgpl-2.1.texi
lib/error.c
lib/error.h
+ lib/fseeko.c
lib/gai_strerror.c
lib/getaddrinfo.c
lib/getaddrinfo.h
@@ -120,29 +129,36 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getdelim.h
lib/getline.c
lib/getline.h
+ lib/getpass.c
+ lib/getpass.h
lib/gettext.h
lib/inet_ntop.c
lib/inet_ntop.h
lib/inet_pton.c
lib/inet_pton.h
+ lib/lseek.c
lib/netinet_in_.h
lib/progname.c
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
m4/arpa_inet_h.m4
m4/error.m4
m4/extensions.m4
+ m4/fseeko.m4
m4/getaddrinfo.m4
m4/getdelim.m4
m4/getline.m4
+ m4/getpass.m4
m4/gnulib-common.m4
m4/include_next.m4
m4/inet_ntop.m4
@@ -150,13 +166,16 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
+ m4/lseek.m4
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/lgl/m4/lseek.m4 b/gl/m4/lseek.m4
index 69e9ea755c..f336990709 100644
--- a/lgl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,4 +1,4 @@
-# lseek.m4 serial 3
+# lseek.m4 serial 4
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,
@@ -29,8 +29,8 @@ int main ()
[gl_cv_func_lseek_pipe=no])
else
AC_COMPILE_IFELSE([
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* mingw mistakenly returns 0 when trying to seek on pipes. */
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
Choke me.
#endif],
[gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
diff --git a/lgl/Makefile.am b/lgl/Makefile.am
index 5e848a0a79..1028b53291 100644
--- a/lgl/Makefile.am
+++ b/lgl/Makefile.am
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 getpass gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
AUTOMAKE_OPTIONS = 1.5 gnits
@@ -184,42 +184,6 @@ EXTRA_DIST += float_.h
## end gnulib module float
-## begin gnulib module fseeko
-
-
-EXTRA_DIST += fseeko.c
-
-EXTRA_liblgnu_la_SOURCES += fseeko.c
-
-## end gnulib module fseeko
-
-## begin gnulib module getdelim
-
-
-EXTRA_DIST += getdelim.c getdelim.h
-
-EXTRA_liblgnu_la_SOURCES += getdelim.c
-
-## end gnulib module getdelim
-
-## begin gnulib module getline
-
-
-EXTRA_DIST += getline.c getline.h
-
-EXTRA_liblgnu_la_SOURCES += getline.c
-
-## end gnulib module getline
-
-## begin gnulib module getpass
-
-
-EXTRA_DIST += getpass.c getpass.h
-
-EXTRA_liblgnu_la_SOURCES += getpass.c
-
-## end gnulib module getpass
-
## begin gnulib module gettext
# This is for those projects which use "gettextize --intl" to put a source-code
@@ -257,15 +221,6 @@ EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h
## end gnulib module link-warning
-## begin gnulib module lseek
-
-
-EXTRA_DIST += lseek.c
-
-EXTRA_liblgnu_la_SOURCES += lseek.c
-
-## end gnulib module lseek
-
## begin gnulib module memmem
diff --git a/lgl/getdelim.c b/lgl/getdelim.c
deleted file mode 100644
index f20d0a1649..0000000000
--- a/lgl/getdelim.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006 Free
- Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* Ported from glibc by Simon Josefsson. */
-
-#include <config.h>
-
-#include "getdelim.h"
-
-#include <limits.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-#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)
-{
- ssize_t result;
- size_t cur_len = 0;
-
- 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 (;;)
- {
- int i;
-
- i = getc (fp);
- if (i == EOF)
- {
- result = -1;
- break;
- }
-
- /* Make enough space for len+1 (for final NUL) bytes. */
- if (cur_len + 1 >= *n)
- {
- size_t needed_max =
- SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
- size_t needed = 2 * *n + 1; /* Be generous. */
- char *new_lineptr;
-
- if (needed_max < needed)
- needed = needed_max;
- if (cur_len + 1 >= needed)
- {
- 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 ? cur_len : result;
-
- unlock_return:
- funlockfile (fp);
- return result;
-}
diff --git a/lgl/getdelim.h b/lgl/getdelim.h
deleted file mode 100644
index 9e6c931295..0000000000
--- a/lgl/getdelim.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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 Lesser General Public License as
- published by the Free Software Foundation; either version 2.1, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* 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/lgl/getline.c b/lgl/getline.c
deleted file mode 100644
index 2185e96152..0000000000
--- a/lgl/getline.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* Written by Simon Josefsson. */
-
-#include <config.h>
-
-#include "getdelim.h"
-#include "getline.h"
-
-ssize_t
-getline (char **lineptr, size_t *n, FILE *stream)
-{
- return getdelim (lineptr, n, '\n', stream);
-}
diff --git a/lgl/getline.h b/lgl/getline.h
deleted file mode 100644
index d58df19457..0000000000
--- a/lgl/getline.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* getline.h --- Prototype for replacement getline 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 Lesser General Public License as
- published by the Free Software Foundation; either version 2.1, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* Written by Simon Josefsson. */
-
-/* Get size_t, FILE, ssize_t. And getline, if available. */
-# include <stddef.h>
-# include <stdio.h>
-# include <sys/types.h>
-
-#if !HAVE_DECL_GETLINE
-ssize_t getline (char **lineptr, size_t *n, FILE *stream);
-#endif /* !HAVE_GETLINE */
diff --git a/lgl/m4/getdelim.m4 b/lgl/m4/getdelim.m4
deleted file mode 100644
index 2a738f680a..0000000000
--- a/lgl/m4/getdelim.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-# getdelim.m4 serial 2
-
-dnl Copyright (C) 2005, 2006 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],
-[
-
- 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/lgl/m4/getline.m4 b/lgl/m4/getline.m4
deleted file mode 100644
index 5b55c3045b..0000000000
--- a/lgl/m4/getline.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-# getline.m4 serial 15
-
-dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 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)
-
-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([gl_FUNC_GETLINE],
-[
- dnl Persuade glibc <stdio.h> to declare getline().
- AC_REQUIRE([AC_GNU_SOURCE])
-
- 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.
- gl_getline_needs_run_time_check=yes,
- am_cv_func_working_getline=no)
- 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([
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
- int main ()
- { /* Based on a test program from Karl Heuer. */
- char *line = NULL;
- size_t siz = 0;
- int len;
- FILE *in = fopen ("./conftest.data", "r");
- if (!in)
- return 1;
- len = getline (&line, &siz, in);
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
- }
- ], am_cv_func_working_getline=yes dnl The library version works.
- , am_cv_func_working_getline=no dnl The library version does NOT work.
- , dnl We're cross compiling. Assume it works on glibc2 systems.
- [AC_EGREP_CPP([Lucky GNU user],
- [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
- Lucky GNU user
- #endif
-#endif
- ],
- [am_cv_func_working_getline=yes],
- [am_cv_func_working_getline=no])]
- )])
- fi
-
- if test $am_cv_func_working_getline = no; then
- dnl We must choose a different name for our function, since on ELF systems
- dnl a broken getline() in libc.so would override our getline() in
- dnl libgettextlib.so.
- AC_DEFINE([getline], [gnu_getline],
- [Define to a replacement function name for getline().])
- AC_LIBOBJ(getline)
-
- gl_PREREQ_GETLINE
- fi
-])
-
-# Prerequisites of lib/getline.c.
-AC_DEFUN([gl_PREREQ_GETLINE],
-[
- gl_FUNC_GETDELIM
-])
diff --git a/lgl/m4/gnulib-cache.m4 b/lgl/m4/gnulib-cache.m4
index 7b91411d1b..d81b2daf37 100644
--- a/lgl/m4/gnulib-cache.m4
+++ b/lgl/m4/gnulib-cache.m4
@@ -15,11 +15,11 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 getpass gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
-gl_MODULES([crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 getpass gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
+gl_MODULES([crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
gl_AVOID([])
gl_SOURCE_BASE([lgl])
gl_M4_BASE([lgl/m4])
diff --git a/lgl/m4/gnulib-comp.m4 b/lgl/m4/gnulib-comp.m4
index 50d301449b..b9078478e0 100644
--- a/lgl/m4/gnulib-comp.m4
+++ b/lgl/m4/gnulib-comp.m4
@@ -27,7 +27,6 @@ AC_DEFUN([lgl_EARLY],
AC_REQUIRE([AC_PROG_RANLIB])
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([AC_FUNC_FSEEKO])
])
# This macro should be invoked from ./configure.in, in the section
@@ -71,17 +70,10 @@ AC_DEFUN([lgl_INIT],
gl_MODULE_INDICATOR([gc-sha1])
gl_MD2
gl_FLOAT_H
- gl_FUNC_FSEEKO
- gl_STDIO_MODULE_INDICATOR([fseeko])
- gl_FUNC_GETDELIM
- gl_FUNC_GETLINE
- gl_FUNC_GETPASS
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
AM_GNU_GETTEXT_VERSION([0.16.1])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
- gl_FUNC_LSEEK
- gl_UNISTD_MODULE_INDICATOR([lseek])
gl_FUNC_MEMMEM
gl_STRING_MODULE_INDICATOR([memmem])
gl_FUNC_MEMMOVE
@@ -159,22 +151,14 @@ AC_DEFUN([lgl_FILE_LIST], [
lib/dummy.c
lib/float+.h
lib/float_.h
- lib/fseeko.c
lib/gc-gnulib.c
lib/gc-libgcrypt.c
lib/gc-pbkdf2-sha1.c
lib/gc.h
- lib/getdelim.c
- lib/getdelim.h
- lib/getline.c
- lib/getline.h
- lib/getpass.c
- lib/getpass.h
lib/gettext.h
lib/hmac-md5.c
lib/hmac-sha1.c
lib/hmac.h
- lib/lseek.c
lib/md2.c
lib/md2.h
lib/md4.c
@@ -224,7 +208,6 @@ AC_DEFUN([lgl_FILE_LIST], [
m4/eoverflow.m4
m4/extensions.m4
m4/float_h.m4
- m4/fseeko.m4
m4/gc-arcfour.m4
m4/gc-arctwo.m4
m4/gc-des.m4
@@ -238,9 +221,6 @@ AC_DEFUN([lgl_FILE_LIST], [
m4/gc-rijndael.m4
m4/gc-sha1.m4
m4/gc.m4
- m4/getdelim.m4
- m4/getline.m4
- m4/getpass.m4
m4/gettext.m4
m4/glibc2.m4
m4/glibc21.m4
@@ -263,7 +243,6 @@ AC_DEFUN([lgl_FILE_LIST], [
m4/lib-prefix.m4
m4/lock.m4
m4/longlong.m4
- m4/lseek.m4
m4/md2.m4
m4/md4.m4
m4/md5.m4