diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-01-11 11:42:17 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-01-11 11:42:17 +0000 |
commit | ae97a89e1a1a9833080dccc81f6cd26784e1b964 (patch) | |
tree | 6ff1ddc7e3980591c7fd0bbd5d9b8ac82da12886 /libc/sysdeps/linux/common/str_syscalls.sh | |
parent | abdc3e4d06db2b9d93c509774fc7c4fde918ec8e (diff) |
A large update from Manuel Novoa III <mnovoa3@bellsouth.net>.
Diffstat (limited to 'libc/sysdeps/linux/common/str_syscalls.sh')
-rwxr-xr-x | libc/sysdeps/linux/common/str_syscalls.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/str_syscalls.sh b/libc/sysdeps/linux/common/str_syscalls.sh new file mode 100755 index 000000000..66ef6824d --- /dev/null +++ b/libc/sysdeps/linux/common/str_syscalls.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +echo "#include <stdio.h>" +echo "#include <stdlib.h>" +echo "#include \"../include/asm/unistd.h\"" +echo +echo "int main(void) {" +echo +echo "#define __NR__exit __NR_exit" +echo "#define __NR___open __NR_open" +echo "#define __NR__ioctl __NR_ioctl" +echo "#define __NR__fcntl __NR_fcntl" +echo "#define __NR__reboot __NR_reboot" +echo "#define __NR__mmap __NR_mmap" +echo "#define __NR__syslog __NR_syslog" +echo "#define __NR__stat __NR_stat" +echo "#define __NR__lstat __NR_lstat" +echo "#define __NR__fstat __NR_fstat" +echo "#define __NR__getdents __NR_getdents" +echo +sed -ne 's/^.*_syscall[0-9].*([^,]*, *\([^,)]*\).*/printf("#define __STR_NR_\1 \\\"%d\\\"\\n", __NR_\1);/gp' syscalls.c +echo +echo "printf(\"#define __STR_NR_exit __STR_NR__exit\n\");" +echo "printf(\"#define __STR_NR_open __STR_NR___open\n\");" +echo "printf(\"#define __STR_NR_ioctl __STR_NR__ioctl\n\");" +echo "printf(\"#define __STR_NR_fcntl __STR_NR__fcntl\n\");" +echo "printf(\"#define __STR_NR_reboot __STR_NR__reboot\n\");" +echo "printf(\"#define __STR_NR_mmap __STR_NR__mmap\n\");" +echo "printf(\"#define __STR_NR_syslog __STR_NR__syslog\n\");" +echo "printf(\"#define __STR_NR_stat __STR_NR__stat\n\");" +echo "printf(\"#define __STR_NR_lstat __STR_NR__lstat\n\");" +echo "printf(\"#define __STR_NR_fstat __STR_NR__fstat\n\");" +echo "printf(\"#define __STR_NR_getdents __STR_NR__getdents\n\");" +echo +echo "return EXIT_SUCCESS; }" |