From dfa8e6e9d5060883998ef17ecf82f8fbbd944b5c Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 2 May 2021 13:10:40 +0200 Subject: [PATCH] mescc: Mes C Library: malloc.c: Move unix-variant to lib/linux. * lib/stdlib/malloc.c: Move to... lib/linux/malloc.c: ...here. * build-aux/configure-lib.sh (libc_SOURCES): Move malloc.c... [linux]: ...here. --- build-aux/configure-lib.sh | 4 ++-- lib/{stdlib => linux}/malloc.c | 12 +----------- 2 files changed, 3 insertions(+), 13 deletions(-) rename lib/{stdlib => linux}/malloc.c (74%) diff --git a/build-aux/configure-lib.sh b/build-aux/configure-lib.sh index 0c122b50..2d9ab1fb 100644 --- a/build-aux/configure-lib.sh +++ b/build-aux/configure-lib.sh @@ -1,7 +1,7 @@ #! /bin/sh # GNU Mes --- Maxwell Equations of Software -# Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen +# Copyright © 2019,2020,2021 Jan (janneke) Nieuwenhuizen # # This file is part of GNU Mes. # @@ -155,7 +155,6 @@ lib/stdio/putc.c lib/stdio/putchar.c lib/stdio/ungetc.c lib/stdlib/free.c -lib/stdlib/malloc.c lib/stdlib/realloc.c lib/string/memchr.c lib/string/memcmp.c @@ -209,6 +208,7 @@ lib/linux/_getcwd.c lib/linux/gettimeofday.c lib/linux/ioctl.c lib/linux/_open3.c +lib/linux/malloc.c lib/linux/_read.c lib/linux/time.c lib/linux/unlink.c diff --git a/lib/stdlib/malloc.c b/lib/linux/malloc.c similarity index 74% rename from lib/stdlib/malloc.c rename to lib/linux/malloc.c index 54f89af4..42914440 100644 --- a/lib/stdlib/malloc.c +++ b/lib/linux/malloc.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright © 2016,2017,2018,2019,2021 Jan (janneke) Nieuwenhuizen * Copyright © 2021 Danny Milosavljevic * * This file is part of GNU Mes. @@ -24,15 +24,6 @@ #include #include -/* FIXME: We want bin/mes-mescc's x86-linux sha256sum to stay the same. - Therfore we cannot remove stdlib/malloc from libc_SOURCES, which is - what GNU suggests. - - move stdlib/malloc.c to unix/malloc.c and move it from shared - libc_SOURCES to linux-specific list when the checksum of mes.c - changes. */ - -#if !__GNU__ char *__brk = 0; void * @@ -49,4 +40,3 @@ malloc (size_t size) __brk += size; return p; } -#endif /* !__GNU__ */