Messages in this thread Patch in this message | | | Date | Wed, 23 Feb 2000 09:35:11 +0100 | From | Jakub Jelinek <> | Subject | Re: si_band type |
| |
On Tue, Feb 22, 2000 at 03:54:11PM -0800, Ulrich Drepper wrote: > The type of the si_band (more correctly: _sifields._sigpoll._fd) field in > > include/asm-*/siginfo.h > > is wrong. It should be `long', not `int'. We can easily change it > for 32-bit architectures, but what to do for 64bit? If nobody is > using it (is it possible at all?) we can probably just do it without > disturbing anybody. > > Would somebody please take the initiative on this?
It should be doable for sparc64, I guess ia64 as well (but as I don't know if some ia64 application already uses si_band so I'm not enclosing a patch for it, but I don't think people are running phhttpd on ia64 yet), but I strongly doubt we can do anything about it for alpha. Which standard requires it to be long?
Here is a sparc patch:
--- linux/arch/sparc64/kernel/signal32.c.jj Fri Jan 21 12:38:52 2000 +++ linux/arch/sparc64/kernel/signal32.c Wed Feb 23 09:09:01 2000 @@ -126,6 +126,8 @@ int copy_siginfo_to_user32(siginfo_t32 * err |= __put_user(from->si_pid, &to->si_pid); err |= __put_user(from->si_uid, &to->si_uid); break; + case SIGURG: + case SIGIO: case SIGSEGV: case SIGILL: case SIGFPE: --- linux/fs/fcntl.c.jj Thu Dec 2 09:32:50 1999 +++ linux/fs/fcntl.c Wed Feb 23 09:03:45 2000 @@ -259,7 +259,7 @@ out: /* Table to convert sigio signal codes into poll band bitmaps */ -static int band_table[NSIGPOLL+1] = { +static long band_table[NSIGPOLL+1] = { ~0, POLLIN | POLLRDNORM, /* POLL_IN */ POLLOUT | POLLWRNORM | POLLWRBAND, /* POLL_OUT */ @@ -291,7 +291,7 @@ static void send_sigio_to_task(struct ta si.si_errno = 0; si.si_code = reason; if (reason < 0 || reason > NSIGPOLL) - si.si_band = ~0; + si.si_band = ~0L; else si.si_band = band_table[reason]; si.si_fd = fa->fa_fd; --- linux/include/asm-sparc64/siginfo.h.jj Fri Feb 11 11:04:41 2000 +++ linux/include/asm-sparc64/siginfo.h Wed Feb 23 09:03:07 2000 @@ -65,7 +65,7 @@ typedef struct siginfo { /* SIGPOLL */ struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + long _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; } _sifields; Cheers, Jakub ___________________________________________________________________ Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj Linux version 2.3.47 on a sparc64 machine (1343.49 BogoMips) ___________________________________________________________________ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |