[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Fwd: sed porting trouble
From: |
Schmitz, Joachim |
Subject: |
RE: Fwd: sed porting trouble |
Date: |
Sat, 2 Oct 2010 17:12:25 +0000 |
Yep, POSIX:2008 is definitely to new for NonStop, unfortunately. When I get
round it, I'll report it as a bug to our development though.
The highest errno on NonStop is 4220. In general they have the usual UNIX value
+ 4000, to not collide with Guardian File System Errors.
2010 seems to be otherwise unused though.
Bye, Jojo
-----Original Message-----
From: Bruno Haible [mailto:address@hidden
Sent: Saturday, October 02, 2010 7:02 PM
To: Schmitz, Joachim
Cc: 'Paul Eggert'; 'Paolo Bonzini'; 'bug-gnulib'
Subject: Re: Fwd: sed porting trouble
Hello Joachim,
> we don't have facl() nor EDQUOT ...
>
> Short Google search on EDQUOT indicates that it belongs to quotas. NonStop
> doesn't have those. Should it then be #define'd to ENOSPC? Seems the closest
> match to me. Or ENOTSUP?
The definitive reference for EDQUOT is POSIX:2008
<http://www.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html>
<http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_03>.
This spec says that EDQUOT needs to be defined. It doesn't say for what
("Reserved"). But it says "All values listed in this section shall be unique",
which means that EDQUOT must not be the same as ENOSPC or ENOTSUP. And because
it's a differerent number, strerror must be extended by gnulib.
I'm applying this fix (similar to what we did for the missing ESTALE on
Interix):
2010-10-02 Bruno Haible <address@hidden>
Define missing EDQUOT on NonStop Kernel.
* lib/errno.in.h (EDQUOT): Assign a value if missing.
* lib/strerror.c (rpl_strerror): Handle missing EDQUOT.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether EDQUOT is
missing.
* doc/posix-headers/errno.texi: Mention the NSK bug.
* doc/posix-functions/strerror.texi: Mention the workaround on NSK.
Reported by Joachim Schmitz <address@hidden>.
--- doc/posix-functions/strerror.texi.orig Sat Oct 2 18:51:13 2010
+++ doc/posix-functions/strerror.texi Sat Oct 2 18:41:08 2010
@@ -11,7 +11,7 @@
@item
This function does not support the error values that are specified by POSIX
but not defined by the system, on some platforms:
-OpenBSD 4.0, OSF/1 5.1, Cygwin 1.5.x, mingw.
+OpenBSD 4.0, OSF/1 5.1, NonStop Kernel, Cygwin 1.5.x, mingw.
@item
This function fails to return a string for out-of-range integers on
some platforms:
--- doc/posix-headers/errno.texi.orig Sat Oct 2 18:51:13 2010
+++ doc/posix-headers/errno.texi Sat Oct 2 18:40:50 2010
@@ -22,14 +22,17 @@
The macro @code{ESTALE} is not defined on some platforms:
mingw, Interix 3.5.
@item
+The macro @code{EDQUOT} is not defined on some platforms:
+NonStop Kernel, 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},
@code{ENETRESET}, @code{ECONNABORTED}, @code{ECONNRESET}, @code{ENOBUFS},
@code{EISCONN}, @code{ENOTCONN}, @code{ETIMEDOUT}, @code{ECONNREFUSED},
address@hidden, @code{EALREADY}, @code{EINPROGRESS}, @code{EDQUOT} are
-not defined on some platforms:
address@hidden, @code{EALREADY}, @code{EINPROGRESS} are not defined on
+some platforms:
mingw.
@end itemize
--- lib/errno.in.h.orig Sat Oct 2 18:51:13 2010
+++ lib/errno.in.h Sat Oct 2 18:45:42 2010
@@ -98,6 +98,7 @@
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+ Likewise, on NonStop Kernel, EDQUOT is not defined.
Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
@@ -150,6 +151,11 @@
# define GNULIB_defined_ESTALE 1
# endif
+# ifndef EDQUOT
+# define EDQUOT 2010
+# define GNULIB_defined_EDQUOT 1
+# endif
+
# ifndef ECANCELED
# define ECANCELED 2008
# define GNULIB_defined_ECANCELED 1
--- lib/strerror.c.orig Sat Oct 2 18:51:13 2010
+++ lib/strerror.c Sat Oct 2 18:48:39 2010
@@ -322,6 +322,12 @@
break;
# endif
+# if GNULIB_defined_EDQUOT
+ case EDQUOT:
+ msg = "Disk quota exceeded";
+ break;
+# endif
+
# if GNULIB_defined_ECANCELED
case ECANCELED:
msg = "Operation canceled";
--- m4/errno_h.m4.orig Sat Oct 2 18:51:13 2010
+++ m4/errno_h.m4 Sat Oct 2 18:51:05 2010
@@ -1,5 +1,5 @@
-# errno_h.m4 serial 6
-dnl Copyright (C) 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
+# errno_h.m4 serial 7
+dnl Copyright (C) 2004, 2006, 2008-2010 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.
@@ -37,6 +37,9 @@
#if !defined ESTALE
booboo
#endif
+#if !defined EDQUOT
+booboo
+#endif
#if !defined ECANCELED
booboo
#endif
- Re: Fwd: sed porting trouble, (continued)
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/02
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/02
- Re: libfloss on HP NonStop, Bruno Haible, 2010/10/02
- RE: libfloss on HP NonStop, Schmitz, Joachim, 2010/10/02
- Re: libfloss on HP NonStop, Bruno Haible, 2010/10/02
- RE: libfloss on HP NonStop, Schmitz, Joachim, 2010/10/04
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/02
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble,
Schmitz, Joachim <=
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/02
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/03
- RE: Fwd: sed porting trouble, Karl Berry, 2010/10/03
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/03
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/04
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/04
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/03