preprocess mips64 asm/unistd.h
Alexandre Oliva
aoliva@redhat.com
Fri Mar 14 15:24:00 GMT 2003
The mips64 kernel header unistd.h defines macros __NR_<syscall> for
N64, __NR_N32_<syscall> or N32 and __NR_O32_<syscall>. This is not
suitable for use in glibc for two reasons: (i) glibc only tests for
__NR_<syscall> in a number of files, and (ii) we can't just arrange to
define __NR_<syscall> to __NR_<abi>_<syscall> because this might give
false positives in case a syscall is defined on N64 but not for the
ABI in effect. The solution is to preprocess asm/unistd.h into a
header that defines not only __NR_<abi>_<syscall>, but also
__NR_<syscall> if <abi> is in effect. We might just drop __NR_<abi>_
entirely if we didn't actually test for __NR_<abi>_<syscall> in
certain cases, and if we didn't use this processed header to build a
single syscall list containing not only SYS_<syscall>, but also
SYS_<abi>_<syscall>. This enables us to have a single /usr/include
tree containing headers that work for all 3 ABIs. Ok?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips64-asm-unistd-preproc.patch
Type: text/x-patch
Size: 7727 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030314/4a4332bf/attachment.bin>
-------------- next part --------------
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Libc-alpha
mailing list