OLD | NEW |
1 #! /bin/sh | 1 #! /bin/sh |
2 | 2 |
3 # Usage: make-syscalls.sh ../sysdeps/unix/common | 3 # Usage: make-syscalls.sh ../sysdeps/unix/common |
4 # Expects $sysdirs in environment. | 4 # Expects $sysdirs in environment. |
5 | 5 |
6 ############################################################################## | 6 ############################################################################## |
7 | 7 |
8 # Syscall Signature Key Letters for BP Thunks: | 8 # Syscall Signature Key Letters for BP Thunks: |
9 # | 9 # |
10 # a: unchecked address (e.g., 1st arg to mmap) | 10 # a: unchecked address (e.g., 1st arg to mmap) |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 echo " echo '#undef $base'; \\" | 203 echo " echo '#undef $base'; \\" |
204 done | 204 done |
205 echo "\ | 205 echo "\ |
206 echo '$frtn$strong ( ); /* $args */'; \\ | 206 echo '$frtn$strong ( ); /* $args */'; \\ |
207 echo 'libc_hidden_proto ($strong)'; \\" | 207 echo 'libc_hidden_proto ($strong)'; \\" |
208 echo -n " echo '$frtn$strong (" | 208 echo -n " echo '$frtn$strong (" |
209 sprtr= | 209 sprtr= |
210 for arg; do | 210 for arg; do |
211 echo -n "$sprtr" | 211 echo -n "$sprtr" |
212 case $arg in | 212 case $arg in |
213 [abIpP]*) echo -n "void *$arg";; | 213 [abIpPBN]*) echo -n "void *$arg";; |
214 f*) echo -n "int $arg[2]";; | 214 f*) echo -n "int $arg[2]";; |
215 i*) echo -n "int $arg";; | 215 i*) echo -n "int $arg";; |
216 n*) echo -n "size_t $arg";; | 216 n*) echo -n "size_t $arg";; |
217 [sS]*) echo -n "char *$arg";; | 217 [sS]*) echo -n "char *$arg";; |
218 V*) echo -n "unsigned char *$arg";; | 218 V*) echo -n "unsigned char *$arg";; |
219 W*) echo -n "int *$arg";; | 219 W*) echo -n "int *$arg";; |
220 esac | 220 esac |
221 sprtr=", " | 221 sprtr=", " |
222 done | 222 done |
223 echo ") {'; \\" | 223 echo ") {'; \\" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 ) | \$(COMPILE.c) -x c -o \$@ -" | 399 ) | \$(COMPILE.c) -x c -o \$@ -" |
400 ### Use this for debugging intermediate output: | 400 ### Use this for debugging intermediate output: |
401 ### ) >\$(@:.ob=.c) | 401 ### ) >\$(@:.ob=.c) |
402 ### \$(subst -c,-E,\$(COMPILE.c)) -o \$(@:.ob=.ib) \$(@:.ob=.c) | 402 ### \$(subst -c,-E,\$(COMPILE.c)) -o \$(@:.ob=.ib) \$(@:.ob=.c) |
403 ### \$(COMPILE.c) -x cpp-output -o \$@ \$(@:.ob=.ib)" | 403 ### \$(COMPILE.c) -x cpp-output -o \$@ \$(@:.ob=.ib)" |
404 echo endif | 404 echo endif |
405 ;; | 405 ;; |
406 esac | 406 esac |
407 | 407 |
408 done | 408 done |
OLD | NEW |