[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Minix support, part 4
From: |
Bruno Haible |
Subject: |
Minix support, part 4 |
Date: |
Sun, 31 Jul 2011 19:01:02 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
On Minix, I'm seeing this test error:
gcc -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1
-I. -I. -I.. -I./.. -I../gllib -I./../gllib -Wall -g -O2 -MT test-errno.o
-MD -MP -MF .deps/test-errno.Tpo -c -o test-errno.o test-errno.c
test-errno.c:87: error: 'ENETRESET' undeclared here (not in a function)
test-errno.c:88: error: 'ECONNABORTED' undeclared here (not in a function)
*** Error code 1
The workaround is to defined ENETRESET and ECONNABORTED in the 'errno' module.
2011-07-31 Bruno Haible <address@hidden>
errno: Port to Minix.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also whether ENETRESET and
ECONNABORTED are defined.
* lib/errno.in.h (ENETRESET, GNULIB_defined_ENETRESET, ECONNABORTED,
GNULIB_defined_ECONNABORTED): New macros.
* lib/strerror-override.h (strerror_override): Test also
GNULIB_defined_ENETRESET, GNULIB_defined_ECONNABORTED.
* lib/strerror-override.c (strerror_override): Handle also ENETRESET,
ECONNABORTED.
* doc/posix-headers/errno.texi: Mention the Minix problem.
--- doc/posix-headers/errno.texi.orig Sun Jul 31 18:55:42 2011
+++ doc/posix-headers/errno.texi Sun Jul 31 18:41:06 2011
@@ -25,14 +25,17 @@
The macro @code{EDQUOT} is not defined on some platforms:
NonStop Kernel, mingw.
@item
+The macros @code{ENETRESET}, @code{ECONNABORTED} are not defined on some
+platforms:
+Minix 3.1.8, mingw.
address@hidden
The macros @code{EWOULDBLOCK}, @code{ETXTBSY}, @code{ELOOP}, @code{ENOTSOCK},
@code{EDESTADDRREQ}, @code{EMSGSIZE}, @code{EPROTOTYPE}, @code{ENOPROTOOPT},
@code{EPROTONOSUPPORT}, @code{EOPNOTSUPP}, @code{EAFNOSUPPORT},
@code{EADDRINUSE}, @code{EADDRNOTAVAIL}, @code{ENETDOWN}, @code{ENETUNREACH},
address@hidden, @code{ECONNABORTED}, @code{ECONNRESET}, @code{ENOBUFS},
address@hidden, @code{ENOTCONN}, @code{ETIMEDOUT}, @code{ECONNREFUSED},
address@hidden, @code{EALREADY}, @code{EINPROGRESS} are not defined on
-some platforms:
address@hidden, @code{ENOBUFS}, @code{EISCONN}, @code{ENOTCONN},
address@hidden, @code{ECONNREFUSED}, @code{EHOSTUNREACH}, @code{EALREADY},
address@hidden are not defined on some platforms:
mingw.
@end itemize
--- lib/errno.in.h.orig Sun Jul 31 18:55:42 2011
+++ lib/errno.in.h Sun Jul 31 18:52:10 2011
@@ -147,6 +147,16 @@
# define GNULIB_defined_ENOTSUP 1
# endif
+# ifndef ENETRESET
+# define ENETRESET 2011
+# define GNULIB_defined_ENETRESET 1
+# endif
+
+# ifndef ECONNABORTED
+# define ECONNABORTED 2012
+# define GNULIB_defined_ECONNABORTED 1
+# endif
+
# ifndef ESTALE
# define ESTALE 2009
# define GNULIB_defined_ESTALE 1
--- lib/strerror-override.c.orig Sun Jul 31 18:55:42 2011
+++ lib/strerror-override.c Sun Jul 31 18:53:02 2011
@@ -248,6 +248,16 @@
return "Not supported";
#endif
+#if GNULIB_defined_ENETRESET
+ case ENETRESET:
+ return "Network dropped connection on reset";
+#endif
+
+#if GNULIB_defined_ECONNABORTED
+ case ECONNABORTED:
+ return "Software caused connection abort";
+#endif
+
#if GNULIB_defined_ESTALE
case ESTALE:
return "Stale NFS file handle";
--- lib/strerror-override.h.orig Sun Jul 31 18:55:42 2011
+++ lib/strerror-override.h Sun Jul 31 18:53:32 2011
@@ -39,6 +39,8 @@
|| GNULIB_defined_EBADMSG \
|| GNULIB_defined_EOVERFLOW \
|| GNULIB_defined_ENOTSUP \
+ || GNULIB_defined_ENETRESET \
+ || GNULIB_defined_ECONNABORTED \
|| GNULIB_defined_ESTALE \
|| GNULIB_defined_EDQUOT \
|| GNULIB_defined_ECANCELED
--- m4/errno_h.m4.orig Sun Jul 31 18:55:42 2011
+++ m4/errno_h.m4 Sun Jul 31 18:47:19 2011
@@ -1,4 +1,4 @@
-# errno_h.m4 serial 9
+# errno_h.m4 serial 10
dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,12 @@
#if !defined ENOTSUP
booboo
#endif
+#if !defined ENETRESET
+booboo
+#endif
+#if !defined ECONNABORTED
+booboo
+#endif
#if !defined ESTALE
booboo
#endif
--
In memoriam Jean Jaurès <http://en.wikipedia.org/wiki/Jean_Jaurès>
Minix support, part 2, Bruno Haible, 2011/07/31
Minix support, part 3, Bruno Haible, 2011/07/31
Minix support, part 4,
Bruno Haible <=
Minix support, part 5, Bruno Haible, 2011/07/31
Minix support, part 6, Bruno Haible, 2011/07/31
Minix support, part 7, Bruno Haible, 2011/07/31
Minix support, part 8, Bruno Haible, 2011/07/31
Minis support, rest, Bruno Haible, 2011/07/31