From a6b914d56ab283bd9d75ce84849e37a0f75fa99d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 7 Oct 2006 06:40:33 +0000 Subject: Sergey Lapin says the undefined syscall numbers from unistd.h do not get propogated into generated sysnum.h. --- extra/scripts/gen_bits_syscall_h.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'extra') diff --git a/extra/scripts/gen_bits_syscall_h.sh b/extra/scripts/gen_bits_syscall_h.sh index 718253e90..6a791be34 100755 --- a/extra/scripts/gen_bits_syscall_h.sh +++ b/extra/scripts/gen_bits_syscall_h.sh @@ -23,8 +23,9 @@ case $CC in esac ( echo "#include \"$UNISTD_H_PATH\"" ; - $CC -E $CC_SYSNUM_ARGS $INCLUDE_OPTS $UNISTD_H_PATH | # needed to strip out any kernel-internal defines - sed -ne 's/^[ ]*#define[ ]*__NR_\([A-Za-z0-9_]*\).*/UCLIBC_\1 __NR_\1/gp' + $CC -E $CC_SYSNUM_ARGS $INCLUDE_OPTS $UNISTD_H_PATH | + sed -ne 's/^[ ]*#define[ ]*__NR_\([A-Za-z0-9_]*\).*/UCLIBC_\1 __NR_\1/gp' \ + -e 's/^[ ]*#undef[ ]*__NR_\([A-Za-z0-9_]*\).*/UNDEFUCLIBC_\1 __NR_\1/gp' # needed to strip out any kernel-internal defines ) | $CC -E $INCLUDE_OPTS - | ( echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" ; echo ; @@ -36,7 +37,8 @@ $CC -E $INCLUDE_OPTS - | echo "#endif" ; echo ; sed -ne 's/^UCLIBC_\([A-Za-z0-9_]*\) *\(.*\)/#undef __NR_\1\ #define __NR_\1 \2\ -#define SYS_\1 __NR_\1/gp' +#define SYS_\1 __NR_\1/gp' \ + -e 's/^UNDEFUCLIBC_\([A-Za-z0-9_]*\).*/#undef __NR_\1/gp' echo ; echo "#endif" ; ) -- cgit v1.2.3