Re: [PATCH] Shift key-related error codes up and insert ECANCELED

Jakub Jelinek
2004-10-22T17:25:19Z

On Fri, Oct 22, 2004 at 05:57:42PM +0100, David Howells wrote:
>
> This patch shifts the key-related error codes up by one and inserts an
> ECANCELED error code where not already defined. It seems that has been defined
> in glibc without passing it back to the kernel:-/

Not sure what's the story behind ECANCELED not being in kernel headers,
certainly it is something only userland needs ATM.
It is a POSIX mandated errno code used in aio_* that glibc is using
since 1998, so it would be really bad to break all apps using aio.

The values you posted match exactly what glibc is using:

libc/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h:# define ECANCELED 47 /* Operation canceled. */
libc/sysdeps/unix/sysv/aix/bits/errno.h:# define ECANCELED 117 /* Asynchronous i/o cancelled. */
libc/sysdeps/unix/sysv/linux/alpha/bits/errno.h:# define ECANCELED 131
libc/sysdeps/unix/sysv/linux/sparc/bits/errno.h:# define ECANCELED 127
libc/sysdeps/unix/sysv/linux/bits/errno.h:# define ECANCELED 125
libc/sysdeps/unix/sysv/linux/hppa/bits/errno.h:# define ECANCELED ECANCELLED
libc/sysdeps/mach/hurd/bits/errno.h:#define ECANCELED _HURD_ERRNO (118)/* Operation canceled */

just maybe asm-parisc/errno.h could have
#define ECANCELED ECANCELLED
added (ECANCELED is the POSIX mandated spelling, while asm-parisc/errno.h
for some reason defines ECANCELLED).

Jakub