From fda2e4b9fc9b7a87995d092e5540a2d3effee6d3 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Fri, 4 Nov 2022 10:04:00 +0100 Subject: [PATCH] kaem: hello: Remove --bootstrap-mode. * include/mes/lib-mini.h: Remove M2 bootstrap constants. [__M2__](size_t): Fall-back to unsigned instead of unsigned long. * scaffold/hello.kaem: Use it instead of lib/m2/lib.h. Remove --bootstrap-mode from M2-Planet call. --- include/mes/lib-mini.h | 9 +++++---- scaffold/hello.kaem | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/mes/lib-mini.h b/include/mes/lib-mini.h index 2874d527..b3f24316 100644 --- a/include/mes/lib-mini.h +++ b/include/mes/lib-mini.h @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2016,2017,2018,2020 Jan (janneke) Nieuwenhuizen + * Copyright © 2016,2017,2018,2020,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -25,17 +25,14 @@ #include #endif -// CONSTANT STDIN 0 #ifndef STDIN #define STDIN 0 #endif -// CONSTANT STDOUT 1 #ifndef STDOUT #define STDOUT 1 #endif -// CONSTANT STDERR 2 #ifndef STDERR #define STDERR 2 #endif @@ -63,10 +60,14 @@ int oputs (char const *s); #ifndef __MES_SIZE_T #define __MES_SIZE_T #undef size_t +#if __M2__ +typedef unsigned size_t; +#else typedef unsigned long size_t; #endif #endif #endif +#endif #ifndef _SSIZE_T #define _SSIZE_T diff --git a/scaffold/hello.kaem b/scaffold/hello.kaem index 24aff5e0..f32a15b0 100644 --- a/scaffold/hello.kaem +++ b/scaffold/hello.kaem @@ -24,10 +24,9 @@ mes_cpu=${mes_cpu:-x86} stage0_cpu=${stage0_cpu:-x86} M2-Planet \ - --bootstrap-mode \ --debug \ --architecture ${stage0_cpu} \ - -f include/m2/lib.h \ + -f include/mes/lib-mini.h \ -f lib/linux/${mes_cpu}-mes-m2/crt1.c \ -f lib/linux/${mes_cpu}-mes-m2/_exit.c \ -f lib/linux/${mes_cpu}-mes-m2/_write.c \