summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-09-16 00:41:48 +0200
committerSimon Josefsson <simon@josefsson.org>2008-09-16 00:41:48 +0200
commit709c5e24dcaa4e1e66c220d18b0aee56370538c1 (patch)
tree2d5679d9113b82ba84993522e894d513a97dc8eb /gl
parenta805e411ae5fb188f66af12ef9c2a9c5b4154f57 (diff)
downloadgnutls-709c5e24dcaa4e1e66c220d18b0aee56370538c1.tar.gz
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r--gl/gnulib.mk2
-rw-r--r--gl/m4/eoverflow.m470
-rw-r--r--gl/m4/gnulib-cache.m44
-rw-r--r--gl/m4/gnulib-comp.m43
-rw-r--r--gl/m4/strerror.m461
-rw-r--r--gl/strerror.c243
-rw-r--r--gl/tests/gnulib.mk8
-rw-r--r--gl/tests/test-EOVERFLOW.c32
-rw-r--r--gl/tests/test-strerror.c9
9 files changed, 287 insertions, 145 deletions
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index d8a8f00de9..4f3bb9664d 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 --with-tests --avoid=fseeko --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl --no-vc-files arpa_inet autobuild error fdl gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.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 --with-tests --avoid=errno --avoid=fseeko --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl --no-vc-files arpa_inet autobuild error fdl gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
MOSTLYCLEANFILES += core *.stackdump
diff --git a/gl/m4/eoverflow.m4 b/gl/m4/eoverflow.m4
deleted file mode 100644
index 3bffd10ed1..0000000000
--- a/gl/m4/eoverflow.m4
+++ /dev/null
@@ -1,70 +0,0 @@
-# eoverflow.m4 serial 2
-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 From Bruno Haible.
-
-# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
-# POSIX. But some systems (like AIX 3) don't define it, and some systems
-# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
-
-# Define EOVERFLOW as a C macro and as a substituted macro in such a way that
-# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable,
-# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric
-# value.
-
-AC_DEFUN([gl_EOVERFLOW],
-[
- AC_REQUIRE([AC_PROG_CC])dnl
-
- AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [
- AC_EGREP_CPP(yes,[
-#include <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
- ], have_eoverflow=1)
- if test -n "$have_eoverflow"; then
- dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves.
- ac_cv_decl_EOVERFLOW=yes
- else
- AC_EGREP_CPP(yes,[
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
- ], have_eoverflow=1)
- if test -n "$have_eoverflow"; then
- dnl EOVERFLOW exists but is hidden.
- dnl Define it to the same value.
- AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug. */
-#include <stdio.h>
-#include <stdlib.h>
-])
- else
- dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but
- dnl don't define it as EINVAL, because snprintf() callers want to
- dnl distinguish EINVAL and EOVERFLOW.
- ac_cv_decl_EOVERFLOW=E2BIG
- fi
- fi
- ])
- if test "$ac_cv_decl_EOVERFLOW" != yes; then
- AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW],
- [Define as good substitute value for EOVERFLOW.])
- EOVERFLOW="$ac_cv_decl_EOVERFLOW"
- AC_SUBST(EOVERFLOW)
- fi
-])
-
-dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
-dnl Remove this when we can assume autoconf >= 2.61.
-m4_ifdef([AC_COMPUTE_INT], [], [
- AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
-])
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 182a4cf8e3..66b1092bbd 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 --with-tests --avoid=fseeko --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl --no-vc-files arpa_inet autobuild error fdl gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.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 --with-tests --avoid=errno --avoid=fseeko --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl --no-vc-files arpa_inet autobuild error fdl gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.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])
@@ -38,7 +38,7 @@ gl_MODULES([
readline
version-etc-fsf
])
-gl_AVOID([fseeko gettext-h malloc-posix realloc-posix snprintf stdbool stdio string sys_socket unistd vasnprintf])
+gl_AVOID([errno fseeko gettext-h malloc-posix realloc-posix snprintf stdbool stdio string 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 2fd3e9f0c1..384a942f39 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -48,7 +48,6 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='gl'
- gl_EOVERFLOW
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
gl_ERROR
@@ -247,7 +246,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/version-etc.h
m4/arpa_inet_h.m4
m4/autobuild.m4
- m4/eoverflow.m4
m4/error.m4
m4/extensions.m4
m4/getaddrinfo.m4
@@ -267,7 +265,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdarg.m4
m4/strdup.m4
m4/strerror.m4
- tests/test-EOVERFLOW.c
tests/test-arpa_inet.c
tests/test-c-ctype.c
tests/test-getaddrinfo.c
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 75d54621b1..8c16ca9a87 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,4 +1,4 @@
-# strerror.m4 serial 8
+# strerror.m4 serial 9
dnl Copyright (C) 2002, 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,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRERROR],
[
AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
- if test $gl_cv_func_working_strerror = no; then
+ if test $REPLACE_STRERROR = 1; then
AC_LIBOBJ([strerror])
AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
[Define this to 1 if strerror is broken.])
@@ -18,25 +18,38 @@ AC_DEFUN([gl_FUNC_STRERROR],
AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_CACHE_CHECK([for working strerror function],
- [gl_cv_func_working_strerror],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <string.h>
- ]],
- [[return !*strerror (-2);]])],
- [gl_cv_func_working_strerror=yes],
- [gl_cv_func_working_strerror=no],
- [dnl Assume crossbuild works if it compiles.
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <string.h>
- ]],
- [[return !*strerror (-2);]])],
- [gl_cv_func_working_strerror=yes],
- [gl_cv_func_working_strerror=no])])])
- if test $gl_cv_func_working_strerror = no ; then
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ if test -z "$ERRNO_H"; then
+ AC_CACHE_CHECK([for working strerror function],
+ [gl_cv_func_working_strerror],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no],
+ [dnl Assume crossbuild works if it compiles.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no])
+ ])
+ ])
+ if test $gl_cv_func_working_strerror = no; then
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ else
+ dnl The system's strerror() cannot know about the new errno values we add
+ dnl to <errno.h>. Replace it.
REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
gl_PREREQ_STRERROR
fi
])
@@ -44,4 +57,12 @@ AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
# Prerequisites of lib/strerror.c.
AC_DEFUN([gl_PREREQ_STRERROR], [
AC_CHECK_DECLS([strerror])
+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
+ if test $ac_cv_header_sys_socket_h != yes; then
+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+ dnl the check for those headers unconditional; yet cygwin reports
+ dnl that the headers are present but cannot be compiled (since on
+ dnl cygwin, all socket information should come from sys/socket.h).
+ AC_CHECK_HEADERS([winsock2.h])
+ fi
])
diff --git a/gl/strerror.c b/gl/strerror.c
index 9fe437db78..2393c67d3a 100644
--- a/gl/strerror.c
+++ b/gl/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 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
@@ -21,8 +21,15 @@
#if REPLACE_STRERROR
+# include <errno.h>
# include <stdio.h>
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+# include <winsock2.h>
+# endif
+# endif
+
# include "intprops.h"
# undef strerror
@@ -33,17 +40,235 @@
char *
rpl_strerror (int n)
{
- char *result = strerror (n);
-
- if (result == NULL || result[0] == '\0')
+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
+ switch (n)
{
- static char const fmt[] = "Unknown error (%d)";
- static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];
- sprintf (mesg, fmt, n);
- return mesg;
+# if GNULIB_defined_ETXTBSY
+ case ETXTBSY:
+ return "Text file busy";
+# endif
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+ case EWOULDBLOCK:
+ return "Operation would block";
+ case EINPROGRESS:
+ return "Operation now in progress";
+ case EALREADY:
+ return "Operation already in progress";
+ case ENOTSOCK:
+ return "Socket operation on non-socket";
+ case EDESTADDRREQ:
+ return "Destination address required";
+ case EMSGSIZE:
+ return "Message too long";
+ case EPROTOTYPE:
+ return "Protocol wrong type for socket";
+ case ENOPROTOOPT:
+ return "Protocol not available";
+ case EPROTONOSUPPORT:
+ return "Protocol not supported";
+ case ESOCKTNOSUPPORT:
+ return "Socket type not supported";
+ case EOPNOTSUPP:
+ return "Operation not supported";
+ case EPFNOSUPPORT:
+ return "Protocol family not supported";
+ case EAFNOSUPPORT:
+ return "Address family not supported by protocol";
+ case EADDRINUSE:
+ return "Address already in use";
+ case EADDRNOTAVAIL:
+ return "Cannot assign requested address";
+ case ENETDOWN:
+ return "Network is down";
+ case ENETUNREACH:
+ return "Network is unreachable";
+ case ENETRESET:
+ return "Network dropped connection on reset";
+ case ECONNABORTED:
+ return "Software caused connection abort";
+ case ECONNRESET:
+ return "Connection reset by peer";
+ case ENOBUFS:
+ return "No buffer space available";
+ case EISCONN:
+ return "Transport endpoint is already connected";
+ case ENOTCONN:
+ return "Transport endpoint is not connected";
+ case ESHUTDOWN:
+ return "Cannot send after transport endpoint shutdown";
+ case ETOOMANYREFS:
+ return "Too many references: cannot splice";
+ case ETIMEDOUT:
+ return "Connection timed out";
+ case ECONNREFUSED:
+ return "Connection refused";
+ case ELOOP:
+ return "Too many levels of symbolic links";
+ case EHOSTDOWN:
+ return "Host is down";
+ case EHOSTUNREACH:
+ return "No route to host";
+ case EPROCLIM:
+ return "Too many processes";
+ case EUSERS:
+ return "Too many users";
+ case EDQUOT:
+ return "Disk quota exceeded";
+ case ESTALE:
+ return "Stale NFS file handle";
+ case EREMOTE:
+ return "Object is remote";
+# if HAVE_WINSOCK2_H
+ /* WSA_INVALID_HANDLE maps to EBADF */
+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+ /* WSA_INVALID_PARAMETER maps to EINVAL */
+ case WSA_OPERATION_ABORTED:
+ return "Overlapped operation aborted";
+ case WSA_IO_INCOMPLETE:
+ return "Overlapped I/O event object not in signaled state";
+ case WSA_IO_PENDING:
+ return "Overlapped operations will complete later";
+ /* WSAEINTR maps to EINTR */
+ /* WSAEBADF maps to EBADF */
+ /* WSAEACCES maps to EACCES */
+ /* WSAEFAULT maps to EFAULT */
+ /* WSAEINVAL maps to EINVAL */
+ /* WSAEMFILE maos to EMFILE */
+ /* WSAEWOULDBLOCK is EWOULDBLOCK */
+ /* WSAEINPROGRESS is EINPROGRESS */
+ /* WSAEALREADY is EALREADY */
+ /* WSAENOTSOCK is ENOTSOCK */
+ /* WSAEDESTADDRREQ is EDESTADDRREQ */
+ /* WSAEMSGSIZE is EMSGSIZE */
+ /* WSAEPROTOTYPE is EPROTOTYPE */
+ /* WSAENOPROTOOPT is ENOPROTOOPT */
+ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+ /* WSAEOPNOTSUPP is EOPNOTSUPP */
+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+ /* WSAEADDRINUSE is EADDRINUSE */
+ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+ /* WSAENETDOWN is ENETDOWN */
+ /* WSAENETUNREACH is ENETUNREACH */
+ /* WSAENETRESET is ENETRESET */
+ /* WSAECONNABORTED is ECONNABORTED */
+ /* WSAECONNRESET is ECONNRESET */
+ /* WSAENOBUFS is ENOBUFS */
+ /* WSAEISCONN is EISCONN */
+ /* WSAENOTCONN is ENOTCONN */
+ /* WSAESHUTDOWN is ESHUTDOWN */
+ /* WSAETOOMANYREFS is ETOOMANYREFS */
+ /* WSAETIMEDOUT is ETIMEDOUT */
+ /* WSAECONNREFUSED is ECONNREFUSED */
+ /* WSAELOOP is ELOOP */
+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+ /* WSAEHOSTDOWN is EHOSTDOWN */
+ /* WSAEHOSTUNREACH is EHOSTUNREACH */
+ /* WSAENOTEMPTY maps to ENOTEMPTY */
+ /* WSAEPROCLIM is EPROCLIM */
+ /* WSAEUSERS is EUSERS */
+ /* WSAEDQUOT is EDQUOT */
+ /* WSAESTALE is ESTALE */
+ /* WSAEREMOTE is EREMOTE */
+ case WSASYSNOTREADY:
+ return "Network subsystem is unavailable";
+ case WSAVERNOTSUPPORTED:
+ return "Winsock.dll version out of range";
+ case WSANOTINITIALISED:
+ return "Successful WSAStartup not yet performed";
+ case WSAEDISCON:
+ return "Graceful shutdown in progress";
+ case WSAENOMORE: case WSA_E_NO_MORE:
+ return "No more results";
+ case WSAECANCELLED: case WSA_E_CANCELLED:
+ return "Call was canceled";
+ case WSAEINVALIDPROCTABLE:
+ return "Procedure call table is invalid";
+ case WSAEINVALIDPROVIDER:
+ return "Service provider is invalid";
+ case WSAEPROVIDERFAILEDINIT:
+ return "Service provider failed to initialize";
+ case WSASYSCALLFAILURE:
+ return "System call failure";
+ case WSASERVICE_NOT_FOUND:
+ return "Service not found";
+ case WSATYPE_NOT_FOUND:
+ return "Class type not found";
+ case WSAEREFUSED:
+ return "Database query was refused";
+ case WSAHOST_NOT_FOUND:
+ return "Host not found";
+ case WSATRY_AGAIN:
+ return "Nonauthoritative host not found";
+ case WSANO_RECOVERY:
+ return "Nonrecoverable error";
+ case WSANO_DATA:
+ return "Valid name, no data record of requested type";
+ /* WSA_QOS_* omitted */
+# endif
+# endif
+
+# if GNULIB_defined_ENOMSG
+ case ENOMSG:
+ return "No message of desired type";
+# endif
+
+# if GNULIB_defined_EIDRM
+ case EIDRM:
+ return "Identifier removed";
+# endif
+
+# if GNULIB_defined_ENOLINK
+ case ENOLINK:
+ return "Link has been severed";
+# endif
+
+# if GNULIB_defined_EPROTO
+ case EPROTO:
+ return "Protocol error";
+# endif
+
+# if GNULIB_defined_EMULTIHOP
+ case EMULTIHOP:
+ return "Multihop attempted";
+# endif
+
+# if GNULIB_defined_EBADMSG
+ case EBADMSG:
+ return "Bad message";
+# endif
+
+# if GNULIB_defined_EOVERFLOW
+ case EOVERFLOW:
+ return "Value too large for defined data type";
+# endif
+
+# if GNULIB_defined_ENOTSUP
+ case ENOTSUP:
+ return "Not supported";
+# endif
+
+# if GNULIB_defined_
+ case ECANCELED:
+ return "Operation canceled";
+# endif
}
- return result;
+ {
+ char *result = strerror (n);
+
+ if (result == NULL || result[0] == '\0')
+ {
+ static char const fmt[] = "Unknown error (%d)";
+ static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];
+ sprintf (mesg, fmt, n);
+ return mesg;
+ }
+
+ return result;
+ }
}
#endif
diff --git a/gl/tests/gnulib.mk b/gl/tests/gnulib.mk
index 2a3d5041ef..37daafa13d 100644
--- a/gl/tests/gnulib.mk
+++ b/gl/tests/gnulib.mk
@@ -35,14 +35,6 @@ AM_CPPFLAGS = \
LDADD = ../../gl/libgnu.la
-## begin gnulib module EOVERFLOW-tests
-
-TESTS += test-EOVERFLOW
-check_PROGRAMS += test-EOVERFLOW
-EXTRA_DIST += test-EOVERFLOW.c
-
-## end gnulib module EOVERFLOW-tests
-
## begin gnulib module arpa_inet-tests
TESTS += test-arpa_inet
diff --git a/gl/tests/test-EOVERFLOW.c b/gl/tests/test-EOVERFLOW.c
deleted file mode 100644
index 0e5cc09c91..0000000000
--- a/gl/tests/test-EOVERFLOW.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Test of EOVERFLOW macro.
- Copyright (C) 2008 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <errno.h>
-
-/* Check that it can be used as an initializer outside of a function. */
-static int err = EOVERFLOW;
-
-int
-main ()
-{
- /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */
- if (err == EINVAL)
- return 1;
-
- return 0;
-}
diff --git a/gl/tests/test-strerror.c b/gl/tests/test-strerror.c
index 752afe27e0..3d9814d5d4 100644
--- a/gl/tests/test-strerror.c
+++ b/gl/tests/test-strerror.c
@@ -40,10 +40,19 @@ int
main (int argc, char **argv)
{
char *str;
+
str = strerror (EACCES);
ASSERT (str);
ASSERT (*str);
+ str = strerror (ETIMEDOUT);
+ ASSERT (str);
+ ASSERT (*str);
+
+ str = strerror (EOVERFLOW);
+ ASSERT (str);
+ ASSERT (*str);
+
str = strerror (0);
ASSERT (str);
ASSERT (*str);