]>
git.saurik.com Git - apple/xnu.git/blob - bsd/kern/makesyscalls.sh
2 # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93
3 # $FreeBSD: src/sys/kern/makesyscalls.sh,v 1.60 2003/04/01 01:12:24 jeff Exp $
5 # Copyright (c) 2004-2007 Apple Inc. All rights reserved.
7 # @APPLE_OSREFERENCE_LICENSE_HEADER_START@
9 # This file contains Original Code and/or Modifications of Original Code
10 # as defined in and that are subject to the Apple Public Source License
11 # Version 2.0 (the 'License'). You may not use this file except in
12 # compliance with the License. Please obtain a copy of the License at
13 # http://www.opensource.apple.com/apsl/ and read it before using this
16 # The Original Code and all software distributed under the License are
17 # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
18 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
19 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
20 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
21 # Please see the License for the specific language governing rights and
22 # limitations under the License.
24 # @APPLE_OSREFERENCE_LICENSE_HEADER_END@
30 syscallnamesfile
="syscalls.c"
31 sysprotofile
="../sys/sysproto.h"
32 sysproto_h
=_SYS_SYSPROTO_H_
33 syshdrfile
="../sys/syscall.h"
34 syscall_h
=_SYS_SYSCALL_H_
35 syscalltablefile
="init_sysent.c"
38 namesname
="syscallnames"
41 syslegal
="sysent.syslegal.$$"
42 sysent
="sysent.switch.$$"
43 sysinc
="sysinc.switch.$$"
44 sysarg
="sysarg.switch.$$"
45 sysprotoend
="sysprotoend.$$"
46 syscallnamestempfile
="syscallnamesfile.$$"
47 syshdrtempfile
="syshdrtempfile.$$"
49 trap "rm $syslegal $sysent $sysinc $sysarg $sysprotoend $syscallnamestempfile $syshdrtempfile" 0
51 touch $syslegal $sysent $sysinc $sysarg $sysprotoend $syscallnamestempfile $syshdrtempfile
54 0) echo "usage: $0 input-file <config-file>" 1>&2
59 if [ -n "$2" -a -f "$2" ]; then
73 /^#/!s/\([{}()*,;]\)/ \1 /g
77 syslegal = \"$syslegal\"
78 sysprotofile = \"$sysprotofile\"
79 sysprotoend = \"$sysprotoend\"
80 sysproto_h = \"$sysproto_h\"
81 syscall_h = \"$syscall_h\"
83 syscalltablefile = \"$syscalltablefile\"
86 syscallnamesfile = \"$syscallnamesfile\"
87 syscallnamestempfile = \"$syscallnamestempfile\"
88 syshdrfile = \"$syshdrfile\"
89 syshdrtempfile = \"$syshdrtempfile\"
90 syscallprefix = \"$syscallprefix\"
91 switchname = \"$switchname\"
92 namesname = \"$namesname\"
96 printf "/*\n" > syslegal
97 printf " * Copyright (c) 2004-2007 Apple Inc. All rights reserved.\n" > syslegal
98 printf " * \n" > syslegal
99 printf " * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n" > syslegal
100 printf " * \n" > syslegal
101 printf " * This file contains Original Code and/or Modifications of Original Code\n" > syslegal
102 printf " * as defined in and that are subject to the Apple Public Source License\n" > syslegal
103 printf " * Version 2.0 (the \047License\047). You may not use this file except in\n" > syslegal
104 printf " * compliance with the License. The rights granted to you under the License\n" > syslegal
105 printf " * may not be used to create, or enable the creation or redistribution of,\n" > syslegal
106 printf " * unlawful or unlicensed copies of an Apple operating system, or to\n" > syslegal
107 printf " * circumvent, violate, or enable the circumvention or violation of, any\n" > syslegal
108 printf " * terms of an Apple operating system software license agreement.\n" > syslegal
109 printf " * \n" > syslegal
110 printf " * Please obtain a copy of the License at\n" > syslegal
111 printf " * http://www.opensource.apple.com/apsl/ and read it before using this file.\n" > syslegal
112 printf " * \n" > syslegal
113 printf " * The Original Code and all software distributed under the License are\n" > syslegal
114 printf " * distributed on an \047AS IS\047 basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n" > syslegal
115 printf " * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n" > syslegal
116 printf " * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n" > syslegal
117 printf " * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n" > syslegal
118 printf " * Please see the License for the specific language governing rights and\n" > syslegal
119 printf " * limitations under the License.\n" > syslegal
120 printf " * \n" > syslegal
121 printf " * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n" > syslegal
122 printf " * \n" > syslegal
123 printf " * \n" > syslegal
124 printf " * System call switch table.\n *\n" > syslegal
125 printf " * DO NOT EDIT-- this file is automatically generated.\n" > syslegal
126 printf " * created from %s\n */\n\n", infile > syslegal
129 printf "\n/* The casts are bogus but will do for now. */\n" > sysent
130 printf "__private_extern__ struct sysent %s[] = {\n",switchname > sysent
132 printf "#ifndef %s\n", sysproto_h > sysarg
133 printf "#define\t%s\n\n", sysproto_h > sysarg
134 printf "#ifndef %s\n", syscall_h > syshdrtempfile
135 printf "#define\t%s\n\n", syscall_h > syshdrtempfile
136 printf "#include <sys/appleapiopts.h>\n" > syshdrtempfile
137 printf "#ifdef __APPLE_API_PRIVATE\n" > syshdrtempfile
138 printf "#include <sys/appleapiopts.h>\n" > sysarg
139 printf "#include <sys/cdefs.h>\n" > sysarg
140 printf "#include <sys/mount_internal.h>\n" > sysarg
141 printf "#include <sys/types.h>\n" > sysarg
142 printf "#include <sys/sem_internal.h>\n" > sysarg
143 printf "#include <sys/semaphore.h>\n" > sysarg
144 printf "#include <sys/wait.h>\n" > sysarg
145 printf "#include <mach/shared_region.h>\n" > sysarg
146 printf "\n#ifdef KERNEL\n" > sysarg
147 printf "#ifdef __APPLE_API_PRIVATE\n" > sysarg
148 printf "#ifndef __arm__\n" > sysarg
149 printf "#define\tPAD_(t)\t(sizeof(uint64_t) <= sizeof(t) \\\n " > sysarg
150 printf "\t\t? 0 : sizeof(uint64_t) - sizeof(t))\n" > sysarg
151 printf "#else\n" > sysarg
152 printf "#define\tPAD_(t)\t(sizeof(register_t) <= sizeof(t) \\\n" > sysarg
153 printf " ? 0 : sizeof(register_t) - sizeof(t))\n" > sysarg
154 printf "#endif\n" > sysarg
155 printf "#if BYTE_ORDER == LITTLE_ENDIAN\n"> sysarg
156 printf "#define\tPADL_(t)\t0\n" > sysarg
157 printf "#define\tPADR_(t)\tPAD_(t)\n" > sysarg
158 printf "#else\n" > sysarg
159 printf "#define\tPADL_(t)\tPAD_(t)\n" > sysarg
160 printf "#define\tPADR_(t)\t0\n" > sysarg
161 printf "#endif\n" > sysarg
162 printf "\n__BEGIN_DECLS\n" > sysarg
163 printf "#ifndef __MUNGE_ONCE\n" > sysarg
164 printf "#define __MUNGE_ONCE\n" > sysarg
165 printf "#ifndef __arm__\n" > sysarg
166 printf "void munge_w(const void *, void *); \n" > sysarg
167 printf "void munge_ww(const void *, void *); \n" > sysarg
168 printf "void munge_www(const void *, void *); \n" > sysarg
169 printf "void munge_wwww(const void *, void *); \n" > sysarg
170 printf "void munge_wwwww(const void *, void *); \n" > sysarg
171 printf "void munge_wwwwww(const void *, void *); \n" > sysarg
172 printf "void munge_wwwwwww(const void *, void *); \n" > sysarg
173 printf "void munge_wwwwwwww(const void *, void *); \n" > sysarg
174 printf "void munge_wl(const void *, void *); \n" > sysarg
175 printf "void munge_wlw(const void *, void *); \n" > sysarg
176 printf "void munge_wwwl(const void *, void *); \n" > sysarg
177 printf "void munge_wwwlww(const void *, void *); \n" > sysarg
178 printf "void munge_wwlwww(const void *, void *); \n" > sysarg
179 printf "void munge_wwwwl(const void *, void *); \n" > sysarg
180 printf "void munge_wwwwwl(const void *, void *); \n" > sysarg
181 printf "void munge_wsw(const void *, void *); \n" > sysarg
182 printf "void munge_wws(const void *, void *); \n" > sysarg
183 printf "void munge_wwwsw(const void *, void *); \n" > sysarg
184 printf "#else \n" > sysarg
185 printf "#define munge_w NULL \n" > sysarg
186 printf "#define munge_ww NULL \n" > sysarg
187 printf "#define munge_www NULL \n" > sysarg
188 printf "#define munge_wwww NULL \n" > sysarg
189 printf "#define munge_wwwww NULL \n" > sysarg
190 printf "#define munge_wwwwww NULL \n" > sysarg
191 printf "#define munge_wwwwwww NULL \n" > sysarg
192 printf "#define munge_wwwwwwww NULL \n" > sysarg
193 printf "#define munge_wl NULL \n" > sysarg
194 printf "#define munge_wlw NULL \n" > sysarg
195 printf "#define munge_wwwl NULL \n" > sysarg
196 printf "#define munge_wwwlww NULL\n" > sysarg
197 printf "#define munge_wwlwww NULL \n" > sysarg
198 printf "#define munge_wwwwl NULL \n" > sysarg
199 printf "#define munge_wwwwwl NULL \n" > sysarg
200 printf "#define munge_wsw NULL \n" > sysarg
201 printf "#define munge_wws NULL \n" > sysarg
202 printf "#define munge_wwwsw NULL \n" > sysarg
203 printf "#endif // ! __arm__\n" > sysarg
204 printf "#ifdef __ppc__\n" > sysarg
205 printf "void munge_d(const void *, void *); \n" > sysarg
206 printf "void munge_dd(const void *, void *); \n" > sysarg
207 printf "void munge_ddd(const void *, void *); \n" > sysarg
208 printf "void munge_dddd(const void *, void *); \n" > sysarg
209 printf "void munge_ddddd(const void *, void *); \n" > sysarg
210 printf "void munge_dddddd(const void *, void *); \n" > sysarg
211 printf "void munge_ddddddd(const void *, void *); \n" > sysarg
212 printf "void munge_dddddddd(const void *, void *); \n" > sysarg
213 printf "#else \n" > sysarg
214 printf "#define munge_d NULL \n" > sysarg
215 printf "#define munge_dd NULL \n" > sysarg
216 printf "#define munge_ddd NULL \n" > sysarg
217 printf "#define munge_dddd NULL \n" > sysarg
218 printf "#define munge_ddddd NULL \n" > sysarg
219 printf "#define munge_dddddd NULL \n" > sysarg
220 printf "#define munge_ddddddd NULL \n" > sysarg
221 printf "#define munge_dddddddd NULL \n" > sysarg
222 printf "#endif // __ppc__\n" > sysarg
223 printf "#endif /* !__MUNGE_ONCE */\n" > sysarg
227 printf "const char *%s[] = {\n", namesname > syscallnamestempfile
230 NF == 0 || $1 ~ /^;/ {
233 $1 ~ /^#[ ]*include/ {
240 print > syscallnamestempfile
242 savesyscall = syscall_num
249 print > syscallnamestempfile
251 syscall_num = savesyscall
258 print > syscallnamestempfile
264 printf "%s: line %d: syscall number out of sync at %d\n",
265 infile, NR, syscall_num
270 function align_comment(linesize, location, thefile) {
271 printf(" ") > thefile
272 while (linesize < location) {
273 printf(" ") > thefile
277 function parserr(was, wanted) {
278 printf "%s: line %d: unexpected %s (expected %s)\n",
279 infile, NR, was, wanted
283 function parseline() {
292 additional_comments = " "
294 # find start and end of call name and arguments
295 if ($current_field != "{")
296 parserr($current_field, "{")
297 args_start = current_field
299 while (current_field <= NF) {
300 if ($current_field == "}") {
301 args_end = current_field
307 printf "%s: line %d: invalid call name and arguments\n",
312 # find start and end of optional comments
314 if (current_field < NF && $current_field == "{") {
315 comments_start = current_field
316 while (current_field <= NF) {
317 if ($current_field == "}") {
318 comments_end = current_field
323 if (comments_end == 0) {
324 printf "%s: line %d: invalid comments \n",
330 if ($args_end != "}")
331 parserr($args_end, "}")
333 if ($args_end != ";")
334 parserr($args_end, ";")
337 # skip any NO_SYSCALL_STUB qualifier
338 if ($args_end == "NO_SYSCALL_STUB")
341 if ($args_end != ")")
342 parserr($args_end, ")")
345 # extract additional comments
346 if (comments_start != 0) {
347 current_field = comments_start + 1
348 while (current_field < comments_end) {
349 additional_comments = additional_comments $current_field " "
354 # get function return type
355 current_field = args_start + 1
356 returntype = $current_field
358 # get function name and set up to get arguments
360 funcname = $current_field
361 argalias = funcname "_args"
362 current_field++ # bump past function name
364 if ($current_field != "(")
365 parserr($current_field, "(")
368 if (current_field == args_end) {
369 if ($current_field != "void")
370 parserr($current_field, "argument definition")
374 # extract argument types and names
375 while (current_field <= args_end) {
380 while (current_field < args_end && $(current_field + 1) != ",") {
381 if (argtype[argc] != "" && oldf != "*") {
382 argtype[argc] = argtype[argc] " ";
384 argtype[argc] = argtype[argc] $current_field;
385 ext_argtype[argc] = argtype[argc];
386 oldf = $current_field;
389 if (argtype[argc] == "")
390 parserr($current_field, "argument definition")
391 argname[argc] = $current_field;
392 current_field += 2; # skip name, and any comma
395 printf "%s: line %d: too many arguments!\n", infile, NR
399 argssize = "AC(" argalias ")"
404 add_sysnames_entry = 1
405 add_sysheader_entry = 1
406 add_sysproto_entry = 1
408 add_64bit_fakesafe = 0
413 if ($2 != "ALL" && $2 != "UALL") {
416 add_sysnames_entry = 0
417 add_sysheader_entry = 0
418 add_sysproto_entry = 0
420 if (match($2, "[T]") != 0) {
424 if (match($2, "[N]") != 0) {
425 add_sysnames_entry = 1
428 if (match($2, "[H]") != 0) {
429 add_sysheader_entry = 1
432 if (match($2, "[P]") != 0) {
433 add_sysproto_entry = 1
436 if (match($2, "[U]") != 0) {
439 if (match($2, "[F]") != 0) {
440 add_64bit_fakesafe = 1
443 if (files_keyword_OK == 0) {
444 printf "%s: line %d: unrecognized keyword %s\n", infile, NR, $2
448 else if ($2 == "UALL") {
449 add_64bit_unsafe = 1;
455 # output function argument structures to sysproto.h and build the
456 # name of the appropriate argument mungers
461 if ((funcname != "nosys" && funcname != "enosys") || (syscall_num == 0 && funcname == "nosys")) {
463 if (add_sysproto_entry == 1) {
464 printf("struct %s {\n", argalias) > sysarg
468 for (i = 1; i <= argc; i++) {
469 # Build name of argument munger.
470 # We account for all sys call argument types here.
471 # This is where you add any new types. With LP64 support
472 # each argument consumes 64-bits.
473 # see .../xnu/bsd/dev/ppc/munge.s for munge argument types.
474 if (argtype[i] == "long") {
475 if (add_64bit_unsafe == 0)
476 ext_argtype[i] = "user_long_t";
477 munge32 = munge32 "s"
478 munge64 = munge64 "d"
481 else if (argtype[i] == "u_long") {
482 if (add_64bit_unsafe == 0)
483 ext_argtype[i] = "user_ulong_t";
484 munge32 = munge32 "w"
485 munge64 = munge64 "d"
488 else if (argtype[i] == "size_t") {
489 if (add_64bit_unsafe == 0)
490 ext_argtype[i] = "user_size_t";
491 munge32 = munge32 "w"
492 munge64 = munge64 "d"
495 else if (argtype[i] == "ssize_t") {
496 if (add_64bit_unsafe == 0)
497 ext_argtype[i] = "user_ssize_t";
498 munge32 = munge32 "s"
499 munge64 = munge64 "d"
502 else if (argtype[i] == "user_ssize_t" || argtype[i] == "user_long_t") {
503 munge32 = munge32 "s"
504 munge64 = munge64 "d"
507 else if (argtype[i] == "user_addr_t" || argtype[i] == "user_size_t" ||
508 argtype[i] == "user_ulong_t") {
509 munge32 = munge32 "w"
510 munge64 = munge64 "d"
513 else if (argtype[i] == "caddr_t" || argtype[i] == "semun_t" ||
514 match(argtype[i], "[\*]") != 0) {
515 if (add_64bit_unsafe == 0)
516 ext_argtype[i] = "user_addr_t";
517 munge32 = munge32 "w"
518 munge64 = munge64 "d"
521 else if (argtype[i] == "int" || argtype[i] == "u_int" ||
522 argtype[i] == "uid_t" || argtype[i] == "pid_t" ||
523 argtype[i] == "id_t" || argtype[i] == "idtype_t" ||
524 argtype[i] == "socklen_t" || argtype[i] == "uint32_t" || argtype[i] == "int32_t" ||
525 argtype[i] == "sigset_t" || argtype[i] == "gid_t" ||
526 argtype[i] == "mode_t" || argtype[i] == "key_t" || argtype[i] == "time_t") {
527 munge32 = munge32 "w"
528 munge64 = munge64 "d"
531 else if (argtype[i] == "off_t" || argtype[i] == "int64_t" || argtype[i] == "uint64_t") {
532 munge32 = munge32 "l"
533 munge64 = munge64 "d"
537 printf "%s: line %d: invalid type \"%s\" \n",
538 infile, NR, argtype[i]
539 printf "You need to add \"%s\" into the type checking code. \n",
543 if (add_sysproto_entry == 1) {
544 printf("\tchar %s_l_[PADL_(%s)]; " \
545 "%s %s; char %s_r_[PADR_(%s)];\n",
546 argname[i], ext_argtype[i],
547 ext_argtype[i], argname[i],
548 argname[i], ext_argtype[i]) > sysarg
551 if (add_sysproto_entry == 1) {
552 printf("};\n") > sysarg
555 else if (add_sysproto_entry == 1) {
556 printf("struct %s {\n\tregister_t dummy;\n};\n", argalias) > sysarg
560 # output to init_sysent.c
562 if (add_sysent_entry == 0) {
566 munge_ret = "_SYSCALL_RET_NONE"
567 if (tempname != "enosys") {
572 # figure out which return value type to munge
573 if (returntype == "user_addr_t") {
574 munge_ret = "_SYSCALL_RET_ADDR_T"
576 else if (returntype == "user_ssize_t") {
577 munge_ret = "_SYSCALL_RET_SSIZE_T"
579 else if (returntype == "user_size_t") {
580 munge_ret = "_SYSCALL_RET_SIZE_T"
582 else if (returntype == "int") {
583 munge_ret = "_SYSCALL_RET_INT_T"
585 else if (returntype == "u_int") {
586 munge_ret = "_SYSCALL_RET_UINT_T"
588 else if (returntype == "off_t") {
589 munge_ret = "_SYSCALL_RET_OFF_T"
591 else if (returntype == "void") {
592 munge_ret = "_SYSCALL_RET_NONE"
595 printf "%s: line %d: invalid return type \"%s\" \n",
596 infile, NR, returntype
597 printf "You need to add \"%s\" into the return type checking code. \n",
603 if (add_64bit_unsafe == 1 && add_64bit_fakesafe == 0)
604 my_flags = "UNSAFE_64BIT";
606 printf("\t{%s, %s, %s, \(sy_call_t *\)%s, %s, %s, %s, %s},",
607 argssize, add_resv, my_flags, tempname, munge32, munge64, munge_ret, size32) > sysent
608 linesize = length(argssize) + length(add_resv) + length(my_flags) + length(tempname) + \
609 length(munge32) + length(munge64) + length(munge_ret) + 28
610 align_comment(linesize, 88, sysent)
611 printf("/* %d = %s%s*/\n", syscall_num, funcname, additional_comments) > sysent
613 # output to syscalls.c
614 if (add_sysnames_entry == 1) {
616 if (funcname == "nosys" || funcname == "enosys") {
617 if (syscall_num == 0)
620 tempname = "#" syscall_num
622 printf("\t\"%s\", ", tempname) > syscallnamestempfile
623 linesize = length(tempname) + 8
624 align_comment(linesize, 25, syscallnamestempfile)
625 if (substr(tempname,1,1) == "#") {
626 printf("/* %d =%s*/\n", syscall_num, additional_comments) > syscallnamestempfile
629 printf("/* %d = %s%s*/\n", syscall_num, tempname, additional_comments) > syscallnamestempfile
633 # output to syscalls.h
634 if (add_sysheader_entry == 1) {
636 if (syscall_num == 0) {
639 if (tempname != "nosys" && tempname != "enosys") {
640 printf("#define\t%s%s", syscallprefix, tempname) > syshdrtempfile
641 linesize = length(syscallprefix) + length(tempname) + 12
642 align_comment(linesize, 30, syshdrtempfile)
643 printf("%d\n", syscall_num) > syshdrtempfile
644 # special case for gettimeofday on ppc - cctools project uses old name
645 if (tempname == "ppc_gettimeofday") {
646 printf("#define\t%s%s", syscallprefix, "gettimeofday") > syshdrtempfile
647 linesize = length(syscallprefix) + length(tempname) + 12
648 align_comment(linesize, 30, syshdrtempfile)
649 printf("%d\n", syscall_num) > syshdrtempfile
652 else if (skip_for_header == 0) {
653 printf("\t\t\t/* %d %s*/\n", syscall_num, additional_comments) > syshdrtempfile
657 # output function prototypes to sysproto.h
658 if (add_sysproto_entry == 1) {
659 if (funcname =="exit") {
660 printf("void %s(struct proc *, struct %s *, int *);\n",
661 funcname, argalias) > sysprotoend
663 else if ((funcname != "nosys" && funcname != "enosys") || (syscall_num == 0 && funcname == "nosys")) {
664 printf("int %s(struct proc *, struct %s *, %s *);\n",
665 funcname, argalias, returntype) > sysprotoend
674 printf "#define AC(name) (sizeof(struct name) / sizeof(syscall_arg_t))\n" > sysinc
677 printf("\n__END_DECLS\n") > sysprotoend
678 printf("#undef PAD_\n") > sysprotoend
679 printf("#undef PADL_\n") > sysprotoend
680 printf("#undef PADR_\n") > sysprotoend
681 printf "\n#endif /* __APPLE_API_PRIVATE */\n" > sysprotoend
682 printf "#endif /* KERNEL */\n" > sysprotoend
683 printf("\n#endif /* !%s */\n", sysproto_h) > sysprotoend
685 printf("};\n") > sysent
686 printf("int nsysent = sizeof(sysent) / sizeof(sysent[0]);\n") > sysent
687 printf("/* Verify that NUM_SYSENT reflects the latest syscall count */\n") > sysent
688 printf("int nsysent_size_check[((sizeof(sysent) / sizeof(sysent[0])) == NUM_SYSENT) ? 1 : -1] __unused;\n") > sysent
690 printf("};\n") > syscallnamestempfile
691 printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall_num) \
693 printf("\n#endif /* __APPLE_API_PRIVATE */\n") > syshdrtempfile
694 printf("#endif /* !%s */\n", syscall_h) > syshdrtempfile
697 # define value in syscall table file to permit redifintion because of the way
698 # __private_extern__ (doesn't) work.
699 cat $syslegal > $syscalltablefile
700 printf "#define __INIT_SYSENT_C__ 1\n" >> $syscalltablefile
701 cat $sysinc $sysent >> $syscalltablefile
702 cat $syslegal $sysarg $sysprotoend > $sysprotofile
703 cat $syslegal $syscallnamestempfile > $syscallnamesfile
704 cat $syslegal $syshdrtempfile > $syshdrfile