diff --git a/mlibc/libc-mes.c b/mlibc/libc-mes.c index a5f074fa..6eda30c4 100644 --- a/mlibc/libc-mes.c +++ b/mlibc/libc-mes.c @@ -45,7 +45,7 @@ write () asm (".byte 0x8b 0x5d 0x08"); // mov 0x8(%ebp),%ebx asm (".byte 0x8b 0x4d 0x0c"); // mov 0xc(%ebp),%ecx asm (".byte 0x8b 0x55 0x10"); // mov 0x10(%ebp),%edx - + asm (".byte 0xb8 0x04 0x00 0x00 0x00"); // mov $0x4,%eax asm (".byte 0xcd 0x80"); // int $0x80 } @@ -360,6 +360,7 @@ _env (char **e) return e; } +int main(int,char*[]); int _start () { diff --git a/mlibc/mini-libc-mes.c b/mlibc/mini-libc-mes.c index 9cc021bf..8fe9c595 100644 --- a/mlibc/mini-libc-mes.c +++ b/mlibc/mini-libc-mes.c @@ -18,6 +18,8 @@ * along with Mes. If not, see . */ +int g_stdin = 0; + void exit () { @@ -60,6 +62,7 @@ _env (char **e) return e; } +int main(int,char*[]); int _start () { diff --git a/module/language/c99/compiler.mes b/module/language/c99/compiler.mes index aba55d30..970430eb 100644 --- a/module/language/c99/compiler.mes +++ b/module/language/c99/compiler.mes @@ -2452,6 +2452,6 @@ (define (alist-add a b) (let* ((b-keys (map car b)) - (a (filter (lambda (f) (or (cdr f) (not (member f b-keys)))) a)) + (a (filter (lambda (f) (or (cdr f) (not (member (car f) b-keys)))) a)) (a-keys (map car a))) (append a (filter (lambda (e) (not (member (car e) a-keys))) b))))