[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'errno'
From: |
Bruno Haible |
Subject: |
Re: new module 'errno' |
Date: |
Mon, 15 Sep 2008 12:27:34 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> > # ifndef ECANCELED
> > # define ECANCELED 136
> > # define GNULIB_defined_ECANCELED 1
> > # endif
>
> Using this value is inappropriate, as well. Cygwin currently has errors
> up through EOVERFLOW 139.
Oops, right. And on Solaris, ESTALE is 151. And on HP-UX, EWOULDBLOCK is 246.
And on IRIX, EDQUOT is 1133. If POSIX ever specifies new error numbers that
these systems lack, we better avoid numbers < 2000.
> Cygwin currently fails this because it lacks ECANCELED.
This should fix it.
2008-09-15 Bruno Haible <address@hidden>
* doc/posix-headers/errno.texi: Mention the Cygwin problem.
* doc/posix-functions/strerror.texi: Mention also Cygwin.
* doc/posix-functions/perror.texi: Likewise.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test also whether ECANCELED
is missing.
Reported by Eric Blake.
* lib/errno.in.h: Use replacement values >= 2000.
Reported by Eric Blake.
*** doc/posix-functions/perror.texi.orig 2008-09-15 12:21:34.000000000
+0200
--- doc/posix-functions/perror.texi 2008-09-15 12:08:03.000000000 +0200
***************
*** 11,17 ****
@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, mingw.
@end itemize
Portability problems not fixed by Gnulib:
--- 11,17 ----
@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, mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/strerror.texi.orig 2008-09-15 12:21:34.000000000
+0200
--- doc/posix-functions/strerror.texi 2008-09-15 12:07:54.000000000 +0200
***************
*** 13,19 ****
@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, mingw.
@item
This function fails to return a string for out-of-range integers on
some platforms:
--- 13,19 ----
@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, mingw.
@item
This function fails to return a string for out-of-range integers on
some platforms:
*** doc/posix-headers/errno.texi.orig 2008-09-15 12:21:34.000000000 +0200
--- doc/posix-headers/errno.texi 2008-09-15 12:07:43.000000000 +0200
***************
*** 10,19 ****
@item
The macros @code{EOVERFLOW}, @code{ENOLINK}, @code{EMULTIHOP} are not defined
on some platforms:
! OpenBSD 4.0, OSF/1 4.0, mingw.
@item
The macros @code{ENOMSG}, @code{EIDRM}, @code{EPROTO}, @code{EBADMSG},
! @code{ENOTSUP}, @code{ECANCELED} are not defined on some platforms:
OpenBSD 4.0, mingw.
@item
The macros @code{EWOULDBLOCK}, @code{ETXTBSY}, @code{ELOOP}, @code{ENOTSOCK},
--- 10,22 ----
@item
The macros @code{EOVERFLOW}, @code{ENOLINK}, @code{EMULTIHOP} are not defined
on some platforms:
! OpenBSD 4.0, OSF/1 5.1, mingw.
! @item
! The macro @code{ECANCELED} is not defined on some platforms:
! OpenBSD 4.0, Cygwin, mingw.
@item
The macros @code{ENOMSG}, @code{EIDRM}, @code{EPROTO}, @code{EBADMSG},
! @code{ENOTSUP} are not defined on some platforms:
OpenBSD 4.0, mingw.
@item
The macros @code{EWOULDBLOCK}, @code{ETXTBSY}, @code{ELOOP}, @code{ENOTSOCK},
*** lib/errno.in.h.orig 2008-09-15 12:21:34.000000000 +0200
--- lib/errno.in.h 2008-09-15 12:19:42.000000000 +0200
***************
*** 94,147 ****
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
! Define them here. Values >= 128 seem safe to use.
Note: When one of these systems defines some of these macros some day,
binaries will have to be recompiled so that they recognizes the new
errno values from the system. */
# ifndef ENOMSG
! # define ENOMSG 128
# define GNULIB_defined_ENOMSG 1
# endif
# ifndef EIDRM
! # define EIDRM 129
# define GNULIB_defined_EIDRM 1
# endif
# ifndef ENOLINK
! # define ENOLINK 130
# define GNULIB_defined_ENOLINK 1
# endif
# ifndef EPROTO
! # define EPROTO 131
# define GNULIB_defined_EPROTO 1
# endif
# ifndef EMULTIHOP
! # define EMULTIHOP 132
# define GNULIB_defined_EMULTIHOP 1
# endif
# ifndef EBADMSG
! # define EBADMSG 133
# define GNULIB_defined_EBADMSG 1
# endif
# ifndef EOVERFLOW
! # define EOVERFLOW 134
# define GNULIB_defined_EOVERFLOW 1
# endif
# ifndef ENOTSUP
! # define ENOTSUP 135
# define GNULIB_defined_ENOTSUP 1
# endif
# ifndef ECANCELED
! # define ECANCELED 136
# define GNULIB_defined_ECANCELED 1
# endif
--- 94,148 ----
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
! Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
! HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
Note: When one of these systems defines some of these macros some day,
binaries will have to be recompiled so that they recognizes the new
errno values from the system. */
# ifndef ENOMSG
! # define ENOMSG 2000
# define GNULIB_defined_ENOMSG 1
# endif
# ifndef EIDRM
! # define EIDRM 2001
# define GNULIB_defined_EIDRM 1
# endif
# ifndef ENOLINK
! # define ENOLINK 2002
# define GNULIB_defined_ENOLINK 1
# endif
# ifndef EPROTO
! # define EPROTO 2003
# define GNULIB_defined_EPROTO 1
# endif
# ifndef EMULTIHOP
! # define EMULTIHOP 2004
# define GNULIB_defined_EMULTIHOP 1
# endif
# ifndef EBADMSG
! # define EBADMSG 2005
# define GNULIB_defined_EBADMSG 1
# endif
# ifndef EOVERFLOW
! # define EOVERFLOW 2006
# define GNULIB_defined_EOVERFLOW 1
# endif
# ifndef ENOTSUP
! # define ENOTSUP 2007
# define GNULIB_defined_ENOTSUP 1
# endif
# ifndef ECANCELED
! # define ECANCELED 2008
# define GNULIB_defined_ECANCELED 1
# endif
*** m4/errno_h.m4.orig 2008-09-15 12:21:34.000000000 +0200
--- m4/errno_h.m4 2008-09-15 12:08:52.000000000 +0200
***************
*** 17,23 ****
AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [
AC_EGREP_CPP(booboo,[
#include <errno.h>
! #ifndef EOVERFLOW
booboo
#endif
],
--- 17,23 ----
AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [
AC_EGREP_CPP(booboo,[
#include <errno.h>
! #if !defined EOVERFLOW || !defined ECANCELED
booboo
#endif
],
***************
*** 86,89 ****
AC_SUBST($1[_HIDDEN])
AC_SUBST($1[_VALUE])
fi
! ])
\ Kein Zeilenumbruch am Dateiende.
--- 86,89 ----
AC_SUBST($1[_HIDDEN])
AC_SUBST($1[_VALUE])
fi
! ])
- new module 'errno', Bruno Haible, 2008/09/13
- Re: new module 'errno', Bruno Haible, 2008/09/13
- Re: new module 'errno', Bruno Haible, 2008/09/13
- new module 'perror', Bruno Haible, 2008/09/14
- Re: new module 'errno', Paolo Bonzini, 2008/09/14
- Re: new module 'errno', Eric Blake, 2008/09/14
- Re: new module 'errno',
Bruno Haible <=
Re: new module 'errno', Eric Blake, 2008/09/15