summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorKhem Raj <kraj@mvista.com>2006-10-07 06:40:33 +0000
committerKhem Raj <kraj@mvista.com>2006-10-07 06:40:33 +0000
commita6b914d56ab283bd9d75ce84849e37a0f75fa99d (patch)
tree6f754c843849dfdc55bf3201d6f0aff5413ddd55 /extra
parent442bfab4b43daf68984e8bec8989a351a2811fdd (diff)
downloaduClibc-alpine-a6b914d56ab283bd9d75ce84849e37a0f75fa99d.tar.bz2
uClibc-alpine-a6b914d56ab283bd9d75ce84849e37a0f75fa99d.tar.xz
Sergey Lapin says the undefined syscall numbers from unistd.h do not get propogated into generated sysnum.h.
Diffstat (limited to 'extra')
-rwxr-xr-xextra/scripts/gen_bits_syscall_h.sh8
1 files changed, 5 insertions, 3 deletions
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" ;
)