Chromium Code Reviews| Index: sysdeps/unix/make-syscalls.sh |
| diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh |
| index 34ef9241cbb0690df0701d0e92d2cb9ce47cebe3..06f72e61bae9326e5f01a9459fc9c36f598a196d 100644 |
| --- a/sysdeps/unix/make-syscalls.sh |
| +++ b/sysdeps/unix/make-syscalls.sh |
| @@ -159,12 +159,88 @@ shared-only-routines += $file |
| (echo '/* Dummy module requested by syscalls.list */'; \\" |
| ;; |
| x*) |
| + case $args in |
| + *:*) |
| + set `echo $args | |
|
pasko-google - do not use
2011/09/06 14:18:56
type=`echo ...`
khim
2011/09/06 14:25:34
We need sed construct to pull other argument types
|
| + sed -e 's/^\(.\):\(.*\)/\2 \10/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \11/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \12/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \13/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \14/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \15/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \16/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \17/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \18/' \ |
| + -e 's/^\([^ ]\)\(.*\)/\2 \19/'` |
| + ;; |
| + *) set int;; |
|
pasko-google - do not use
2011/09/06 14:18:56
too many leading spaces
khim
2011/09/06 14:25:34
Done.
|
| + esac |
| + rtn=$1; shift |
| + case $rtn in |
| + [bp]*) frtn='void *';; |
| + *) frtn='int ';; |
| + esac |
| echo "\ |
| \$(make-target-directory) |
| - (echo 'int __unimplemented_syscall(const char *name);'; \\ |
| - echo 'int $strong (void);'; \\ |
| - echo 'libc_hidden_proto ($strong)'; \\ |
| - echo 'int $strong (void) { return __unimplemented_syscall(\"$syscall\"); }'; \\ |
| + (echo '#define $strong ${strong}_RENAMED'; \\" |
| + for name in $weak; do |
| + case $name in |
| + *@@*) |
| + base=`echo $name | sed 's/@@.*//'` |
| + echo " echo '#define $base ${base}_RENAMED'; \\" |
| + ;; |
| + *@*) |
| + base=`echo $name | sed 's/@.*//'` |
| + echo " echo '#define $base ${base}_RENAMED'; \\" |
| + ;; |
| + *) |
| + echo " echo '#define $name ${name}_RENAMED'; \\" |
|
pasko-google - do not use
2011/09/06 14:18:56
base=$name
..
esac
echo "..."
khim
2011/09/06 14:25:34
Done.
|
| + ;; |
| + esac |
| + done |
| + echo "\ |
| + echo '#include <sysdep.h>'; \\ |
| + echo '#undef $strong'; \\" |
| + for name in $weak; do |
| + case $name in |
| + *@@*) |
| + base=`echo $name | sed 's/@@.*//'` |
| + echo " echo '#undef $base'; \\" |
| + ;; |
| + *@*) |
| + base=`echo $name | sed 's/@.*//'` |
| + echo " echo '#undef $base'; \\" |
| + ;; |
| + *) |
| + echo " echo '#undef $name'; \\" |
|
pasko-google - do not use
2011/09/06 14:18:56
ditto
khim
2011/09/06 14:25:34
Done.
|
| + ;; |
| + esac |
| + done |
| + echo "\ |
| + echo '$frtn$strong ( ); /* $args */'; \\ |
| + echo 'libc_hidden_proto ($strong)'; \\" |
| + echo -n " echo '$frtn$strong (" |
| + sprtr= |
| + for arg; do |
| + echo -n "$sprtr" |
| + case $arg in |
| + [abIpP]*) echo -n "void *$arg";; |
| + f*) echo -n "int $arg[2]";; |
| + i*) echo -n "int $arg";; |
| + n*) echo -n "size_t $arg";; |
| + [sS]*) echo -n "char *$arg";; |
| + V*) echo -n "unsigned char *$arg";; |
| + W*) echo -n "int *$arg";; |
| + esac |
| + sprtr=", " |
| + done |
| + echo ") {'; \\" |
| + echo -n " echo ' return INLINE_SYSCALL ($syscall, $nargs" |
| + for arg; do |
| + echo -n ", $arg" |
| + done |
| + echo ");'; \\ |
| + echo '}'; \\ |
| echo 'strong_alias ($strong, __${syscall}_nocancel)'; \\ |
| echo 'libc_hidden_def ($strong)'; \\" |
| ;; |
| @@ -210,7 +286,7 @@ shared-only-routines += $file |
| echo " echo 'libc_hidden_def ($name)'; \\" |
| ;; |
| *) |
| - echo " echo 'int $name (void);'; \\" |
| + echo " echo '$frtn$name ( );'; \\" |
| echo " echo 'libc_hidden_proto ($name)'; \\" |
| echo " echo 'weak_alias ($strong, $name)'; \\" |
| echo " echo 'libc_hidden_weak ($name)'; \\" |