new build: get rid of Go with few rc scripts.

This commit is contained in:
2021-10-27 10:01:28 +02:00
parent 804b13a4dc
commit 0adf1b0431
274 changed files with 4938 additions and 5214 deletions

View File

@ -0,0 +1,14 @@
#!/cmd/rc
if ( ~ 0 $#BUILD_INITIALIZED ) . $JEHANNE/arch/rc/lib/build/utils.rc
rm -f *.o *.tag.*
$CC \
amd64/crt0.s \
amd64/crti.s \
amd64/crtn.s \
-fasm \
$STACKCHECK_CFLAGS \
-c \
$CFLAGS
cp *.o $JEHANNE/arch/$ARCH/lib/
rm *.o

View File

@ -1,245 +0,0 @@
{
"CrtFiles": {
"Cflags": [
"-fasm"
],
"Include": [
"../lib.json"
],
"Post": [
"cp crt0.o crti.o crtn.o $JEHANNE/arch/$ARCH/lib/"
],
"SourceFiles": [
"$ARCH/crt0.s",
"$ARCH/crti.s",
"$ARCH/crtn.s"
]
},
"LibJehanne": {
"Cflags": [
"-fasm"
],
"Include": [
"../lib.json"
],
"Install": "/arch/$ARCH/lib/",
"Library": "libjehanne.a",
"Pre": [
"usyscalls header $JEHANNE/sys/src/sysconf.json > $JEHANNE/arch/amd64/include/syscalls.h",
"usyscalls code $JEHANNE/sys/src/sysconf.json > $JEHANNE/sys/src/lib/jehanne/amd64/syscalls.c"
],
"Post": [
"TOOL=ar; $TOOLPREFIX$TOOL rcs $JEHANNE/arch/$ARCH/lib/libssp.a",
"TOOL=ar; $TOOLPREFIX$TOOL rcs $JEHANNE/arch/$ARCH/lib/libssp_nonshared.a"
],
"SourceFiles": [
"9sys/access.c",
"9sys/announce.c",
"9sys/awakened.c",
"9sys/chdir.c",
"9sys/convD2M.c",
"9sys/convM2D.c",
"9sys/cputime.c",
"9sys/ctime.c",
"9sys/dial.c",
"9sys/dirfstat.c",
"9sys/dirfwstat.c",
"9sys/dirmodefmt.c",
"9sys/dirread.c",
"9sys/dirstat.c",
"9sys/dirwstat.c",
"9sys/dup.c",
"9sys/fork.c",
"9sys/getnetconninfo.c",
"9sys/getenv.c",
"9sys/getmainpid.c",
"9sys/getpid.c",
"9sys/getppid.c",
"9sys/getwd.c",
"9sys/iounit.c",
"9sys/nsec.c",
"9sys/nulldir.c",
"9sys/ocreate.c",
"9sys/pexec.c",
"9sys/pipe.c",
"9sys/postnote.c",
"9sys/privalloc.c",
"9sys/pushssl.c",
"9sys/putenv.c",
"9sys/qlock.c",
"9sys/read.c",
"9sys/rerrstr.c",
"9sys/segbrk.c",
"9sys/segattach.c",
"9sys/setnetmtpt.c",
"9sys/sleep.c",
"9sys/stat.c",
"9sys/sysfatal.c",
"9sys/syslog.c",
"9sys/sysname.c",
"9sys/time.c",
"9sys/times.c",
"9sys/tm2sec.c",
"9sys/truerand.c",
"9sys/tsemacquire.c",
"9sys/wait.c",
"9sys/waitpid.c",
"9sys/werrstr.c",
"9sys/write.c",
"apw/abort.c",
"apw/div.c",
"apw/eprintf.c",
"apw/exit.c",
"apw/system.c",
"fmt/dofmt.c",
"fmt/dorfmt.c",
"fmt/errfmt.c",
"fmt/fltfmt.c",
"fmt/fmt.c",
"fmt/fmtfd.c",
"fmt/fmtlock.c",
"fmt/fmtprint.c",
"fmt/fmtquote.c",
"fmt/fmtrune.c",
"fmt/fmtstr.c",
"fmt/fmtvprint.c",
"fmt/fprint.c",
"fmt/print.c",
"fmt/runefmtstr.c",
"fmt/runeseprint.c",
"fmt/runesmprint.c",
"fmt/runesnprint.c",
"fmt/runesprint.c",
"fmt/runevseprint.c",
"fmt/runevsmprint.c",
"fmt/runevsnprint.c",
"fmt/seprint.c",
"fmt/smprint.c",
"fmt/snprint.c",
"fmt/sprint.c",
"fmt/vfprint.c",
"fmt/vseprint.c",
"fmt/vsmprint.c",
"fmt/vsnprint.c",
"port/_assert.c",
"port/abs.c",
"port/asin.c",
"port/atan.c",
"port/atan2.c",
"port/atexit.c",
"port/atnotify.c",
"port/atof.c",
"port/atol.c",
"port/atoll.c",
"port/bsearch.c",
"port/cistrcmp.c",
"port/cistrncmp.c",
"port/cistrstr.c",
"port/charstod.c",
"port/cleanname.c",
"port/ctype.c",
"port/encodefmt.c",
"port/execl.c",
"port/exits.c",
"port/exp.c",
"port/fabs.c",
"port/floor.c",
"port/fmod.c",
"port/frand.c",
"port/frexp.c",
"port/getfields.c",
"port/getuser.c",
"port/hangup.c",
"port/hypot.c",
"port/lnrand.c",
"port/lock.c",
"port/log.c",
"port/lrand.c",
"port/malloc.c",
"port/memccpy.c",
"port/memchr.c",
"port/memcmp.c",
"port/memmove.c",
"port/memset.c",
"port/mktemp.c",
"port/muldiv.c",
"port/nan.c",
"port/needsrcquote.c",
"port/netmkaddr.c",
"port/nrand.c",
"port/ntruerand.c",
"port/perror.c",
"port/pool.c",
"port/pow.c",
"port/pow10.c",
"port/qsort.c",
"port/quote.c",
"port/rand.c",
"port/readn.c",
"port/rune.c",
"port/runebase.c",
"port/runebsearch.c",
"port/runestrcat.c",
"port/runestrchr.c",
"port/runestrcmp.c",
"port/runestrcpy.c",
"port/runestrecpy.c",
"port/runestrdup.c",
"port/runestrncat.c",
"port/runestrncmp.c",
"port/runestrncpy.c",
"port/runestrrchr.c",
"port/runestrlen.c",
"port/runestrstr.c",
"port/runetype.c",
"port/sin.c",
"port/sinh.c",
"port/strcat.c",
"port/strchr.c",
"port/strcmp.c",
"port/strcpy.c",
"port/strecpy.c",
"port/strcspn.c",
"port/strdup.c",
"port/strlen.c",
"port/strncat.c",
"port/strncmp.c",
"port/strncpy.c",
"port/strpbrk.c",
"port/strrchr.c",
"port/strspn.c",
"port/strstr.c",
"port/strtod.c",
"port/strtok.c",
"port/strtol.c",
"port/strtoll.c",
"port/strtoul.c",
"port/strtoull.c",
"port/tan.c",
"port/tanh.c",
"port/tokenize.c",
"port/toupper.c",
"port/utfecpy.c",
"port/utflen.c",
"port/utfnlen.c",
"port/utfrune.c",
"port/utfrrune.c",
"port/utfutf.c",
"port/u16.c",
"port/u32.c",
"port/u64.c",
"$ARCH/initlib.c",
"$ARCH/syscalls.c",
"$ARCH/notejmp.c",
"$ARCH/cycles.c",
"$ARCH/argv0.c",
"$ARCH/rdpmc.c",
"$ARCH/setjmp.s",
"$ARCH/stackchk.c",
"$ARCH/getfcr.s",
"$ARCH/sqrt.s",
"$ARCH/tas.s",
"$ARCH/atom.s"
]
}
}

View File

@ -0,0 +1,226 @@
#!/cmd/rc
if ( ~ 0 $#BUILD_INITIALIZED ) . $JEHANNE/arch/rc/lib/build/utils.rc
build CrtFiles.rc.build
cat syscallh.rc.template | template | rc | sed 's/ ,/,/g; s/ )/)/g' > $JEHANNE/arch/$ARCH/include/syscalls.h
cat syscallc.rc.template | template | rc | sed 's/ ,/,/g; s/ )/)/g' > $JEHANNE/sys/src/lib/jehanne/$ARCH/syscalls.c
rm -f *.o *.tag.*
$CC \
9sys/access.c \
9sys/announce.c \
9sys/awakened.c \
9sys/chdir.c \
9sys/convD2M.c \
9sys/convM2D.c \
9sys/cputime.c \
9sys/ctime.c \
9sys/dial.c \
9sys/dirfstat.c \
9sys/dirfwstat.c \
9sys/dirmodefmt.c \
9sys/dirread.c \
9sys/dirstat.c \
9sys/dirwstat.c \
9sys/dup.c \
9sys/fork.c \
9sys/getnetconninfo.c \
9sys/getenv.c \
9sys/getmainpid.c \
9sys/getpid.c \
9sys/getppid.c \
9sys/getwd.c \
9sys/iounit.c \
9sys/nsec.c \
9sys/nulldir.c \
9sys/ocreate.c \
9sys/pexec.c \
9sys/pipe.c \
9sys/postnote.c \
9sys/privalloc.c \
9sys/pushssl.c \
9sys/putenv.c \
9sys/qlock.c \
9sys/read.c \
9sys/rerrstr.c \
9sys/segbrk.c \
9sys/segattach.c \
9sys/setnetmtpt.c \
9sys/sleep.c \
9sys/stat.c \
9sys/sysfatal.c \
9sys/syslog.c \
9sys/sysname.c \
9sys/time.c \
9sys/times.c \
9sys/tm2sec.c \
9sys/truerand.c \
9sys/tsemacquire.c \
9sys/wait.c \
9sys/waitpid.c \
9sys/werrstr.c \
9sys/write.c \
apw/abort.c \
apw/div.c \
apw/eprintf.c \
apw/exit.c \
apw/system.c \
fmt/dofmt.c \
fmt/dorfmt.c \
fmt/errfmt.c \
fmt/fltfmt.c \
fmt/fmt.c \
fmt/fmtfd.c \
fmt/fmtlock.c \
fmt/fmtprint.c \
fmt/fmtquote.c \
fmt/fmtrune.c \
fmt/fmtstr.c \
fmt/fmtvprint.c \
fmt/fprint.c \
fmt/print.c \
fmt/runefmtstr.c \
fmt/runeseprint.c \
fmt/runesmprint.c \
fmt/runesnprint.c \
fmt/runesprint.c \
fmt/runevseprint.c \
fmt/runevsmprint.c \
fmt/runevsnprint.c \
fmt/seprint.c \
fmt/smprint.c \
fmt/snprint.c \
fmt/sprint.c \
fmt/vfprint.c \
fmt/vseprint.c \
fmt/vsmprint.c \
fmt/vsnprint.c \
port/_assert.c \
port/abs.c \
port/asin.c \
port/atan.c \
port/atan2.c \
port/atexit.c \
port/atnotify.c \
port/atof.c \
port/atol.c \
port/atoll.c \
port/bsearch.c \
port/cistrcmp.c \
port/cistrncmp.c \
port/cistrstr.c \
port/charstod.c \
port/cleanname.c \
port/ctype.c \
port/encodefmt.c \
port/execl.c \
port/exits.c \
port/exp.c \
port/fabs.c \
port/floor.c \
port/fmod.c \
port/frand.c \
port/frexp.c \
port/getfields.c \
port/getuser.c \
port/hangup.c \
port/hypot.c \
port/lnrand.c \
port/lock.c \
port/log.c \
port/lrand.c \
port/malloc.c \
port/memccpy.c \
port/memchr.c \
port/memcmp.c \
port/memmove.c \
port/memset.c \
port/mktemp.c \
port/muldiv.c \
port/nan.c \
port/needsrcquote.c \
port/netmkaddr.c \
port/nrand.c \
port/ntruerand.c \
port/perror.c \
port/pool.c \
port/pow.c \
port/pow10.c \
port/qsort.c \
port/quote.c \
port/rand.c \
port/readn.c \
port/rune.c \
port/runebase.c \
port/runebsearch.c \
port/runestrcat.c \
port/runestrchr.c \
port/runestrcmp.c \
port/runestrcpy.c \
port/runestrecpy.c \
port/runestrdup.c \
port/runestrncat.c \
port/runestrncmp.c \
port/runestrncpy.c \
port/runestrrchr.c \
port/runestrlen.c \
port/runestrstr.c \
port/runetype.c \
port/sin.c \
port/sinh.c \
port/strcat.c \
port/strchr.c \
port/strcmp.c \
port/strcpy.c \
port/strecpy.c \
port/strcspn.c \
port/strdup.c \
port/strlen.c \
port/strncat.c \
port/strncmp.c \
port/strncpy.c \
port/strpbrk.c \
port/strrchr.c \
port/strspn.c \
port/strstr.c \
port/strtod.c \
port/strtok.c \
port/strtol.c \
port/strtoll.c \
port/strtoul.c \
port/strtoull.c \
port/tan.c \
port/tanh.c \
port/tokenize.c \
port/toupper.c \
port/utfecpy.c \
port/utflen.c \
port/utfnlen.c \
port/utfrune.c \
port/utfrrune.c \
port/utfutf.c \
port/u16.c \
port/u32.c \
port/u64.c \
amd64/initlib.c \
amd64/syscalls.c \
amd64/notejmp.c \
amd64/cycles.c \
amd64/argv0.c \
amd64/rdpmc.c \
amd64/setjmp.s \
amd64/stackchk.c \
amd64/getfcr.s \
amd64/sqrt.s \
amd64/tas.s \
amd64/atom.s \
-fasm \
$STACKCHECK_CFLAGS \
-c \
$CFLAGS
prependLibraryName libjehanne.a
$AR -rs $JEHANNE/arch/$ARCH/lib/libjehanne.a *.o
$RANLIB $JEHANNE/arch/$ARCH/lib/libjehanne.a
$AR rcs $JEHANNE/arch/$ARCH/lib/libssp.a
$AR rcs $JEHANNE/arch/$ARCH/lib/libssp_nonshared.a
rm *.o

View File

@ -1,150 +0,0 @@
{
"KernelLibc": {
"Cflags": [
"-DKERNEL",
"-fasm"
],
"Include": [
"../klib.json"
],
"Install": "/arch/$ARCH/lib/",
"Library": "klibc.a",
"Pre": [
"usyscalls header $JEHANNE/sys/src/sysconf.json > $JEHANNE/arch/amd64/include/syscalls.h",
"usyscalls code $JEHANNE/sys/src/sysconf.json > $JEHANNE/sys/src/lib/jehanne/amd64/syscalls.c"
],
"SourceFiles": [
"9sys/convD2M.c",
"9sys/convM2D.c",
"fmt/dofmt.c",
"fmt/dorfmt.c",
"fmt/errfmt.c",
"fmt/fltfmt.c",
"fmt/fmt.c",
"fmt/fmtfd.c",
"fmt/fmtlock.c",
"fmt/fmtprint.c",
"fmt/fmtquote.c",
"fmt/fmtrune.c",
"fmt/fmtstr.c",
"fmt/fmtvprint.c",
"fmt/runefmtstr.c",
"fmt/runeseprint.c",
"fmt/runesmprint.c",
"fmt/runesnprint.c",
"fmt/runesprint.c",
"fmt/runevseprint.c",
"fmt/runevsmprint.c",
"fmt/runevsnprint.c",
"fmt/seprint.c",
"fmt/smprint.c",
"fmt/snprint.c",
"fmt/sprint.c",
"fmt/vseprint.c",
"fmt/vsmprint.c",
"fmt/vsnprint.c",
"port/_assert.c",
"port/abs.c",
"port/asin.c",
"port/atan.c",
"port/atan2.c",
"port/atof.c",
"port/atol.c",
"port/atoll.c",
"port/cistrcmp.c",
"port/cistrncmp.c",
"port/cistrstr.c",
"port/charstod.c",
"port/cleanname.c",
"port/ctype.c",
"port/encodefmt.c",
"port/exp.c",
"port/fabs.c",
"port/floor.c",
"port/fmod.c",
"port/frand.c",
"port/frexp.c",
"port/getfields.c",
"port/hypot.c",
"port/lnrand.c",
"port/log.c",
"port/lrand.c",
"port/memccpy.c",
"port/memchr.c",
"port/memcmp.c",
"port/memmove.c",
"port/memset.c",
"port/muldiv.c",
"port/nan.c",
"port/needsrcquote.c",
"port/netmkaddr.c",
"port/nrand.c",
"port/ntruerand.c",
"port/pool.c",
"port/pow.c",
"port/pow10.c",
"port/qsort.c",
"port/quote.c",
"port/rand.c",
"port/rune.c",
"port/runebase.c",
"port/runebsearch.c",
"port/runestrcat.c",
"port/runestrchr.c",
"port/runestrcmp.c",
"port/runestrcpy.c",
"port/runestrecpy.c",
"port/runestrdup.c",
"port/runestrncat.c",
"port/runestrncmp.c",
"port/runestrncpy.c",
"port/runestrrchr.c",
"port/runestrlen.c",
"port/runestrstr.c",
"port/runetype.c",
"port/sin.c",
"port/sinh.c",
"port/strcat.c",
"port/strchr.c",
"port/strcmp.c",
"port/strcpy.c",
"port/strecpy.c",
"port/strcspn.c",
"port/strdup.c",
"port/strlen.c",
"port/strncat.c",
"port/strncmp.c",
"port/strncpy.c",
"port/strpbrk.c",
"port/strrchr.c",
"port/strspn.c",
"port/strstr.c",
"port/strtod.c",
"port/strtok.c",
"port/strtol.c",
"port/strtoll.c",
"port/strtoul.c",
"port/strtoull.c",
"port/tan.c",
"port/tanh.c",
"port/tokenize.c",
"port/toupper.c",
"port/utfecpy.c",
"port/utflen.c",
"port/utfnlen.c",
"port/utfrune.c",
"port/utfrrune.c",
"port/utfutf.c",
"port/u16.c",
"port/u32.c",
"port/u64.c",
"$ARCH/argv0.c",
"$ARCH/cycles.c",
"$ARCH/rdpmc.c",
"$ARCH/setjmp.s",
"$ARCH/sqrt.s",
"$ARCH/stackchk.c",
"$ARCH/tas.s"
]
}
}

View File

@ -0,0 +1,145 @@
#!/cmd/rc
if ( ~ 0 $#BUILD_INITIALIZED ) . $JEHANNE/arch/rc/lib/build/utils.rc
cat syscallh.rc.template | template | rc | sed 's/ ,/,/g; s/ )/)/g' > $JEHANNE/arch/$ARCH/include/syscalls.h
cat syscallc.rc.template | template | rc | sed 's/ ,/,/g; s/ )/)/g' > $JEHANNE/sys/src/lib/jehanne/$ARCH/syscalls.c
rm -f *.o *.tag.*
$CC \
9sys/convD2M.c \
9sys/convM2D.c \
fmt/dofmt.c \
fmt/dorfmt.c \
fmt/errfmt.c \
fmt/fltfmt.c \
fmt/fmt.c \
fmt/fmtfd.c \
fmt/fmtlock.c \
fmt/fmtprint.c \
fmt/fmtquote.c \
fmt/fmtrune.c \
fmt/fmtstr.c \
fmt/fmtvprint.c \
fmt/runefmtstr.c \
fmt/runeseprint.c \
fmt/runesmprint.c \
fmt/runesnprint.c \
fmt/runesprint.c \
fmt/runevseprint.c \
fmt/runevsmprint.c \
fmt/runevsnprint.c \
fmt/seprint.c \
fmt/smprint.c \
fmt/snprint.c \
fmt/sprint.c \
fmt/vseprint.c \
fmt/vsmprint.c \
fmt/vsnprint.c \
port/_assert.c \
port/abs.c \
port/asin.c \
port/atan.c \
port/atan2.c \
port/atof.c \
port/atol.c \
port/atoll.c \
port/cistrcmp.c \
port/cistrncmp.c \
port/cistrstr.c \
port/charstod.c \
port/cleanname.c \
port/ctype.c \
port/encodefmt.c \
port/exp.c \
port/fabs.c \
port/floor.c \
port/fmod.c \
port/frand.c \
port/frexp.c \
port/getfields.c \
port/hypot.c \
port/lnrand.c \
port/log.c \
port/lrand.c \
port/memccpy.c \
port/memchr.c \
port/memcmp.c \
port/memmove.c \
port/memset.c \
port/muldiv.c \
port/nan.c \
port/needsrcquote.c \
port/netmkaddr.c \
port/nrand.c \
port/ntruerand.c \
port/pool.c \
port/pow.c \
port/pow10.c \
port/qsort.c \
port/quote.c \
port/rand.c \
port/rune.c \
port/runebase.c \
port/runebsearch.c \
port/runestrcat.c \
port/runestrchr.c \
port/runestrcmp.c \
port/runestrcpy.c \
port/runestrecpy.c \
port/runestrdup.c \
port/runestrncat.c \
port/runestrncmp.c \
port/runestrncpy.c \
port/runestrrchr.c \
port/runestrlen.c \
port/runestrstr.c \
port/runetype.c \
port/sin.c \
port/sinh.c \
port/strcat.c \
port/strchr.c \
port/strcmp.c \
port/strcpy.c \
port/strecpy.c \
port/strcspn.c \
port/strdup.c \
port/strlen.c \
port/strncat.c \
port/strncmp.c \
port/strncpy.c \
port/strpbrk.c \
port/strrchr.c \
port/strspn.c \
port/strstr.c \
port/strtod.c \
port/strtok.c \
port/strtol.c \
port/strtoll.c \
port/strtoul.c \
port/strtoull.c \
port/tan.c \
port/tanh.c \
port/tokenize.c \
port/toupper.c \
port/utfecpy.c \
port/utflen.c \
port/utfnlen.c \
port/utfrune.c \
port/utfrrune.c \
port/utfutf.c \
port/u16.c \
port/u32.c \
port/u64.c \
$ARCH/argv0.c \
$ARCH/cycles.c \
$ARCH/rdpmc.c \
$ARCH/setjmp.s \
$ARCH/sqrt.s \
$ARCH/stackchk.c \
$ARCH/tas.s \
$KLIB_CFLAGS
prependLibraryName klibc.a
$AR -rs $JEHANNE/arch/$ARCH/lib/klibc.a *.o
$RANLIB $JEHANNE/arch/$ARCH/lib/klibc.a
rm *.o

View File

@ -0,0 +1,60 @@
/*
* This file is part of Jehanne.
*
* Copyright (C) 2022 Giacomo Tesio <giacomo@tesio.it>
*
* Jehanne is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* Jehanne is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
*/
/* automatically generated by syscallc.rc.template */
#define PORTABLE_SYSCALLS
#include <u.h>
#! fn setClobbers {
#! if( ! ~ $"CLOBBERS *"memory" && ~ $1 *'*' && ! ~ $1 const*) {
#! CLOBBERS=$CLOBBERS', "memory"'
#! }
#! }
#! ifs='
#! '
#! CONFIGURATION=`{sed -n '/^$/!{/^#/!p}' $JEHANNE/sys/src/sysconf/syscalls.rc.confs}
#! for (line in $CONFIGURATION){
#! eval $line
#! ID='$'$ID
#! CLOBBERS='"cc", "rcx", "r11"'
#! CALLARGS=$ARGS(1)^' a1'
#! setClobbers $ARGS(1)
#! if( ! ~ 1 $#ARGS){
#! for(idx in `{seq 2 $#ARGS}){
#! CALLARGS=$CALLARGS^', '^$ARGS($idx)^' a'^$idx
#! setClobbers $ARGS($idx)
#! }
#! }
#pragma weak sys_$NAME
$RET
sys_$NAME^($CALLARGS)
{
register $RET __ret asm ("rax");
__asm__ __volatile__ (
"movq %%rcx, %%r10" "\n\t"
"movq $ID, %%rax" "\n\t"
"syscall"
: "=r" (__ret)
: /* args are ready */
: $CLOBBERS
);
return __ret;
}
#! }

View File

@ -0,0 +1,51 @@
/*
* This file is part of Jehanne.
*
* Copyright (C) 2022 Giacomo Tesio <giacomo@tesio.it>
*
* Jehanne is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* Jehanne is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
*/
/* automatically generated by syscallh.rc.template */
#! fn toPascalCase {
#! sed 's/^\(.\)\(.\+\)/echo -n \1 | tr a-z A-Z; echo \2/g' | rc
#! }
typedef enum Syscalls
{
#! ifs='
#! '
#! CONFIGURATION=`{sed -n '/^$/!{/^#/!p}' $JEHANNE/sys/src/sysconf/syscalls.rc.confs}
#! for (line in $CONFIGURATION){
#! eval $line
#! ENUM_NAME=Sys`{echo $NAME|toPascalCase}
$ENUM_NAME = $ID,
#! }
} Syscalls;
#ifndef KERNEL
#! . $JEHANNE/sys/src/kern/$ARCH/registry-$ARCH.rc.conf
#! ifs='
#! '
#! CONFIGURATION=`{sed -n '/^$/!{/^#/!p}' $JEHANNE/sys/src/sysconf/syscalls.rc.confs}
#! for (line in $CONFIGURATION){
#! eval $line
#! OTHERARGS=()
#! if( ! ~ 1 $#ARGS){
#! OTHERARGS=(', '^$ARGS(2-))
#! }
extern $RET sys_$NAME($ARGS(1) $"OTHERARGS);
#! }
#endif