rename libc to libjehanne; improve libposix
This is to avoid conflicts between standards' assumptions and Jehanne's choices
This commit is contained in:
parent
3c7dc6eb8b
commit
2f850291d5
2
hacking
2
hacking
|
@ -1 +1 @@
|
|||
Subproject commit 1114e56fb6975e26fecd0466494105cbe42d8b85
|
||||
Subproject commit 86c03ba7e6b1fab1bbccd6aad1e72e1bf0a94317
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2017 Giacomo Tesio <giacomo@tesio.it>
|
||||
* Copyright (C) 2015-2020 Giacomo Tesio <giacomo@tesio.it>
|
||||
*
|
||||
* This file is part of the UCB release of Plan 9. It is subject to the license
|
||||
* terms in the LICENSE file found in the top-level directory of this
|
||||
|
@ -9,8 +9,8 @@
|
|||
* in the LICENSE file.
|
||||
*/
|
||||
|
||||
#pragma lib "libc.a"
|
||||
#pragma src "/sys/src/lib/c"
|
||||
#pragma lib "libjehanne.a"
|
||||
#pragma src "/sys/src/lib/jehanne"
|
||||
|
||||
#define JEHANNE_LIBC /* only for native code */
|
||||
|
||||
|
@ -614,8 +614,8 @@ extern Waitmsg* jehanne_wait(void);
|
|||
extern int jehanne_waitpid(void);
|
||||
extern int jehanne_wstat(const char*, uint8_t*, int);
|
||||
|
||||
extern int32_t jehanne_read(int, void*, int32_t);
|
||||
extern int32_t jehanne_write(int, const void*, int32_t);
|
||||
extern long jehanne_read(int, void*, int32_t);
|
||||
extern long jehanne_write(int, const void*, int32_t);
|
||||
|
||||
extern Dir* jehanne_dirstat(const char*);
|
||||
extern Dir* jehanne_dirfstat(int);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"-lthread",
|
||||
"-lbio",
|
||||
"-l9p2000",
|
||||
"-lc"
|
||||
"-ljehanne"
|
||||
],
|
||||
"Post": [
|
||||
"rm -f *.o"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
"Install": "/arch/$ARCH/cmd/",
|
||||
"Program": "mpc",
|
||||
"SourceFiles": [
|
||||
"/sys/src/lib/c/lib9.c",
|
||||
"/sys/src/lib/jehanne/lib9.c",
|
||||
"mpc.c"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"Program": "fdisk",
|
||||
"SourceFiles": [
|
||||
"/sys/src/lib/c/lib9.c",
|
||||
"/sys/src/lib/jehanne/lib9.c",
|
||||
"fdisk.c",
|
||||
"edit.c",
|
||||
"y.tab.c"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"Program": "prep",
|
||||
"SourceFiles": [
|
||||
"/sys/src/lib/c/lib9.c",
|
||||
"/sys/src/lib/jehanne/lib9.c",
|
||||
"prep.c",
|
||||
"edit.c",
|
||||
"y.tab.c"
|
||||
|
|
|
@ -133,9 +133,6 @@ void substitute(int);
|
|||
static Rune la;
|
||||
static Rune lr;
|
||||
|
||||
#undef read
|
||||
extern int jehanne_read(int, void*, int);
|
||||
|
||||
void
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"Program": "grep",
|
||||
"SourceFiles": [
|
||||
"/sys/src/lib/c/lib9.c",
|
||||
"/sys/src/lib/jehanne/lib9.c",
|
||||
"comp.c",
|
||||
"main.c",
|
||||
"sub.c",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"Oflags": [
|
||||
"-static",
|
||||
"-l9p2000",
|
||||
"-lc"
|
||||
"-ljehanne"
|
||||
],
|
||||
"Program": "comconsole",
|
||||
"SourceFiles": [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"Oflags": [
|
||||
"-static",
|
||||
"-l9p2000",
|
||||
"-lc"
|
||||
"-ljehanne"
|
||||
],
|
||||
"Program": "pipeconsole",
|
||||
"SourceFiles": [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"Oflags": [
|
||||
"-static",
|
||||
"-l9p2000",
|
||||
"-lc"
|
||||
"-ljehanne"
|
||||
],
|
||||
"Program": "screenconsole",
|
||||
"SourceFiles": [
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"Program": "hoc",
|
||||
"SourceFiles": [
|
||||
"/sys/src/lib/c/lib9.c",
|
||||
"/sys/src/lib/jehanne/lib9.c",
|
||||
"code.c",
|
||||
"init.c",
|
||||
"math.c",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"/arch/$ARCH/lib/libauth.a",
|
||||
"/arch/$ARCH/lib/libbio.a",
|
||||
"/arch/$ARCH/lib/libip.a",
|
||||
"/arch/$ARCH/lib/libc.a"
|
||||
"/arch/$ARCH/lib/libjehanne.a"
|
||||
],
|
||||
"Oflags": [
|
||||
"-static"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"Install": "/arch/$ARCH/cmd/",
|
||||
"Program": "rc",
|
||||
"SourceFiles": [
|
||||
"/sys/src/lib/c/lib9.c",
|
||||
"/sys/src/lib/jehanne/lib9.c",
|
||||
"code.c",
|
||||
"exec.c",
|
||||
"getflags.c",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"Install": "/arch/$ARCH/cmd/sys/",
|
||||
"Oflags": [
|
||||
"-static",
|
||||
"-lc"
|
||||
"-ljehanne"
|
||||
],
|
||||
"Projects": [
|
||||
"call/"
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
"Ramfiles": {
|
||||
"rofs": "/arch/$ARCH/cmd/disk/rofs"
|
||||
},
|
||||
"Systab": "/sys/src/lib/c/9syscall/sys.h"
|
||||
"Systab": "/sys/src/lib/jehanne/9syscall/sys.h"
|
||||
},
|
||||
"Program": "jehanne",
|
||||
"Install": "/arch/$ARCH/kern/",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"-DKERNDATE=1433623937",
|
||||
"-c",
|
||||
"-I.",
|
||||
"-I$JEHANNE/sys/src/lib/c",
|
||||
"-I$JEHANNE/sys/src/lib/jehanne",
|
||||
"-mcmodel=kernel",
|
||||
"-O0",
|
||||
"-static",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"-mcmodel=small"
|
||||
],
|
||||
"Libs": [
|
||||
"/arch/$ARCH/lib/libc.a"
|
||||
"/arch/$ARCH/lib/libjehanne.a"
|
||||
],
|
||||
"Post": [
|
||||
"export TOOL=strip && $TOOLPREFIX$TOOL init",
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
"Ramfiles": {
|
||||
"rofs": "/arch/$ARCH/cmd/disk/rofs"
|
||||
},
|
||||
"Systab": "/sys/src/lib/c/9syscall/sys.h"
|
||||
"Systab": "/sys/src/lib/jehanne/9syscall/sys.h"
|
||||
},
|
||||
"Post": [
|
||||
"#strip $JEHANNE/arch/$ARCH/kern/jehanne"
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
"comconsole": "/arch/$ARCH/cmd/hmi/comconsole",
|
||||
"srv": "/arch/$ARCH/cmd/srv"
|
||||
},
|
||||
"Systab": "/sys/src/lib/c/9syscall/sys.h"
|
||||
"Systab": "/sys/src/lib/jehanne/9syscall/sys.h"
|
||||
},
|
||||
"Post": [
|
||||
"OBJCOPY=objcopy; $TOOLPREFIX$OBJCOPY -I elf64-x86-64 -O elf32-i386 workhorse $JEHANNE/hacking/bin/workhorse.32bit",
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"./libboot.a",
|
||||
"/arch/$ARCH/lib/libip.a",
|
||||
"/arch/$ARCH/lib/libauth.a",
|
||||
"/arch/$ARCH/lib/libc.a"
|
||||
"/arch/$ARCH/lib/libjehanne.a"
|
||||
],
|
||||
"Oflags": [
|
||||
"-static"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
/* osys_create works like the Plan 9 create(2) syscall, but with different races.
|
||||
* In Plan 9 tjere os a race due to the different behaviour between the
|
||||
/* ocreate works like the Plan 9 create(2) syscall, but with different races.
|
||||
* In Plan 9 there is a race due to the different behaviour between the
|
||||
* create syscall and the Tcreate message in 9P2000 when the file already exists:
|
||||
* see https://github.com/brho/plan9/blob/master/sys/src/9/port/chan.c#L1564-L1603
|
||||
* for details.
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This file is part of Jehanne.
|
||||
*
|
||||
* Copyright (C) 2015-2019 Giacomo Tesio <giacomo@tesio.it>
|
||||
* Copyright (C) 2015-2020 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
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
int
|
||||
long
|
||||
jehanne_read(int fd, void* buf, int nbytes)
|
||||
{
|
||||
return sys_pread(fd, buf, nbytes, ~0LL);
|
|
@ -18,7 +18,7 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
int
|
||||
long
|
||||
jehanne_write(int fd, const void* buf, int nbytes)
|
||||
{
|
||||
return sys_pwrite(fd, buf, nbytes, ~0LL);
|
|
@ -15,7 +15,7 @@
|
|||
"$ARCH/crtn.s"
|
||||
]
|
||||
},
|
||||
"Libc": {
|
||||
"LibJehanne": {
|
||||
"Cflags": [
|
||||
"-fasm"
|
||||
],
|
||||
|
@ -23,10 +23,10 @@
|
|||
"../lib.json"
|
||||
],
|
||||
"Install": "/arch/$ARCH/lib/",
|
||||
"Library": "libc.a",
|
||||
"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/c/amd64/syscalls.c"
|
||||
"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",
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue