Compare commits
25 Commits
wip-gcc4.2
...
master
Author | SHA1 | Date |
---|---|---|
Jan (janneke) Nieuwenhuizen | 1608f9f38a | |
Jan (janneke) Nieuwenhuizen | 7562330ec7 | |
Jan (janneke) Nieuwenhuizen | f0182ecf97 | |
Jan (janneke) Nieuwenhuizen | 56fed8d65e | |
Jan (janneke) Nieuwenhuizen | c824c62f85 | |
Jan (janneke) Nieuwenhuizen | 029a891d4e | |
Jan (janneke) Nieuwenhuizen | 43fe67e2f9 | |
R. Masters | b28f42de07 | |
Jan (janneke) Nieuwenhuizen | 1e14c26305 | |
Jan (janneke) Nieuwenhuizen | c1f93c1d71 | |
Jan (janneke) Nieuwenhuizen | dbb446d906 | |
Jan (janneke) Nieuwenhuizen | cfb620567a | |
Jan (janneke) Nieuwenhuizen | bc1fa57851 | |
Jan (janneke) Nieuwenhuizen | 25e0c4d119 | |
Jan (janneke) Nieuwenhuizen | 84fd995f43 | |
Jan (janneke) Nieuwenhuizen | 77602c2cde | |
Jan (janneke) Nieuwenhuizen | fc6e88ab89 | |
Jan (janneke) Nieuwenhuizen | 5f73e64480 | |
Gabriel Wicki | 580782bb72 | |
Jan (janneke) Nieuwenhuizen | ec12220737 | |
Ekaitz | f89fed3c3b | |
Ekaitz | 761420ac31 | |
Jan (janneke) Nieuwenhuizen | 5fc5983e50 | |
Jan (janneke) Nieuwenhuizen | 358ae145ab | |
Jan (janneke) Nieuwenhuizen | 2a1976b6de |
|
@ -1,3 +1,21 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2016,2017,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU Mes 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; either version 3 of the License, or (at
|
||||||
|
# your option) any later version.
|
||||||
|
#
|
||||||
|
# GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
*-
|
*-
|
||||||
*~
|
*~
|
||||||
.#*
|
.#*
|
||||||
|
@ -117,6 +135,7 @@
|
||||||
/doc/images/gcc-mesboot-graph.pdf
|
/doc/images/gcc-mesboot-graph.pdf
|
||||||
/doc/web/
|
/doc/web/
|
||||||
/config.sh
|
/config.sh
|
||||||
|
/include/arch
|
||||||
/include/mes/config.h
|
/include/mes/config.h
|
||||||
/gcc-lib
|
/gcc-lib
|
||||||
/mescc-lib
|
/mescc-lib
|
||||||
|
|
8
COPYING
8
COPYING
|
@ -1,7 +1,7 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
<http://www.gnu.org/licenses/>.
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
The GNU General Public License does not permit incorporating your program
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
may consider it more useful to permit linking proprietary applications with
|
may consider it more useful to permit linking proprietary applications with
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License. But first, please read
|
Public License instead of this License. But first, please read
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
|
|
35
HACKING
35
HACKING
|
@ -5,7 +5,8 @@
|
||||||
guix shell #64 bit + 32bit
|
guix shell #64 bit + 32bit
|
||||||
|
|
||||||
CC=i686-unknown-linux-gnu-gcc ./configure
|
CC=i686-unknown-linux-gnu-gcc ./configure
|
||||||
CC=arm-unknown-linux-gnu-gcc ./configure
|
CC=arm-unknown-linux-gnueabihf-gcc ./configure
|
||||||
|
|
||||||
or
|
or
|
||||||
./configure
|
./configure
|
||||||
|
|
||||||
|
@ -129,30 +130,30 @@ x/s *((char **)($rsp+8))
|
||||||
|
|
||||||
** C parser/compiler
|
** C parser/compiler
|
||||||
*** [[https://savannah.gnu.org/projects/nyacc][nyacc]]
|
*** [[https://savannah.gnu.org/projects/nyacc][nyacc]]
|
||||||
*** PEG: [[http://piumarta.com/software/peg/][parse C using PEG]]
|
*** PEG: [[https://piumarta.com/software/peg/][parse C using PEG]]
|
||||||
*** [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
|
*** [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
|
||||||
*** [[http://www.t3x.org/subc/index.html][Sub C]]
|
*** [[https://www.t3x.org/subc/index.html][Sub C]]
|
||||||
*** [[https://groups.google.com/forum/#!topic/comp.lang.lisp/VPuX0VsjTTE][C intepreter in LISP/Scheme/Python]]
|
*** [[https://groups.google.com/forum/#!topic/comp.lang.lisp/VPuX0VsjTTE][C intepreter in LISP/Scheme/Python]]
|
||||||
|
|
||||||
** C assembler/linker
|
** C assembler/linker
|
||||||
*** [[http://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
|
*** [[https://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
|
||||||
*** ELF
|
*** ELF
|
||||||
7f 45 4c 46
|
7f 45 4c 46
|
||||||
*** [[http://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
|
*** [[https://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
|
||||||
*** [[http://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
|
*** [[https://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
|
||||||
** SC - c as s-expressions
|
** SC - c as s-expressions
|
||||||
sc: http://sph.mn/content/3d3
|
sc: https://sph.mn/content/3d3
|
||||||
** RNRS
|
** RNRS
|
||||||
*** [[http://www.scheme-reports.org/][Scheme Reports]]
|
*** [[https://www.scheme-reports.org/][Scheme Reports]]
|
||||||
*** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-349.pdf][Scheme - Report on Scheme]]
|
*** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-349.pdf][Scheme - Report on Scheme]]
|
||||||
*** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-452.pdf][RRS - Revised Report on Scheme]]
|
*** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-452.pdf][RRS - Revised Report on Scheme]]
|
||||||
|
|
||||||
** tiny schemes
|
** tiny schemes
|
||||||
http://forum.osdev.org/viewtopic.php?f=15&t=19937
|
https://forum.osdev.org/viewtopic.php?f=15&t=19937
|
||||||
|
|
||||||
http://www.stripedgazelle.org/joey/dreamos.html
|
https://www.stripedgazelle.org/joey/dreamos.html
|
||||||
http://armpit.sourceforge.net/
|
https://armpit.sourceforge.net/
|
||||||
http://common-lisp.net/project/movitz/movitz.html
|
https://common-lisp.net/project/movitz/movitz.html
|
||||||
|
|
||||||
<civodul> janneke: https://github.com/namin/inc looks interesting [15:18]
|
<civodul> janneke: https://github.com/namin/inc looks interesting [15:18]
|
||||||
** Orians Jeremiah
|
** Orians Jeremiah
|
||||||
|
@ -169,13 +170,13 @@ http://common-lisp.net/project/movitz/movitz.html
|
||||||
<janneke> OriansJ: i looked a few times and saw 'LISP empty', so thanks for
|
<janneke> OriansJ: i looked a few times and saw 'LISP empty', so thanks for
|
||||||
the pointer! [00:24]
|
the pointer! [00:24]
|
||||||
<civodul> OriansJ, janneke: from that page, there's also:
|
<civodul> OriansJ, janneke: from that page, there's also:
|
||||||
https://web.archive.org/web/20160604035203fw_/http://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
|
https://web.archive.org/web/20160604035203fw_/https://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
|
||||||
|
|
||||||
** C4/C500
|
** C4/C500
|
||||||
https://web.archive.org/web/20160604041431/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
|
https://web.archive.org/web/20160604041431/https://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
|
||||||
https://github.com/rswier/c4/blob/master/c4.c
|
https://github.com/rswier/c4/blob/master/c4.c
|
||||||
** Compilers for free
|
** Compilers for free
|
||||||
http://codon.com/compilers-for-free
|
https://codon.com/compilers-for-free
|
||||||
** Small lisps
|
** Small lisps
|
||||||
*** [[https://www.mirrorservice.org/sites/www.bitsavers.org/bits/TI/Explorer/zeta-c/][ZETA-C]]
|
*** [[https://www.mirrorservice.org/sites/www.bitsavers.org/bits/TI/Explorer/zeta-c/][ZETA-C]]
|
||||||
** Small C compilers
|
** Small C compilers
|
||||||
|
@ -187,10 +188,10 @@ simple as possible.
|
||||||
*** pcc
|
*** pcc
|
||||||
*** early GCC?
|
*** early GCC?
|
||||||
https://miyuki.github.io/2017/10/04/gcc-archaeology-1.html
|
https://miyuki.github.io/2017/10/04/gcc-archaeology-1.html
|
||||||
*** [[http://tack.sourceforge.net/][ack]]
|
*** [[https://tack.sourceforge.net/][ack]]
|
||||||
<rain1> it may be possible to compile like this: mes |> ack |> pcc |> tcc |>
|
<rain1> it may be possible to compile like this: mes |> ack |> pcc |> tcc |>
|
||||||
gcc 4.7.4 |> gcc later version... up to modern
|
gcc 4.7.4 |> gcc later version... up to modern
|
||||||
*** [[https://web.archive.org/web/20160402225843/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/][cc500]]
|
*** [[https://web.archive.org/web/20160402225843/https://homepage.ntlworld.com/edmund.grimley-evans/cc500/][cc500]]
|
||||||
** rain1's Bootstrapping Wiki: https://bootstrapping.miraheze.org/wiki/Main_Page
|
** rain1's Bootstrapping Wiki: https://bootstrapping.miraheze.org/wiki/Main_Page
|
||||||
** rain1's hex86
|
** rain1's hex86
|
||||||
https://notabug.org/rain1/hex86/src/master/tests/hex0b3.hex86
|
https://notabug.org/rain1/hex86/src/master/tests/hex0b3.hex86
|
||||||
|
|
18
NEWS
18
NEWS
|
@ -2,7 +2,7 @@
|
||||||
#+TITLE: GNU Mes NEWS – history of user-visible changes
|
#+TITLE: GNU Mes NEWS – history of user-visible changes
|
||||||
#+STARTUP: content hidestars
|
#+STARTUP: content hidestars
|
||||||
|
|
||||||
Copyright © 2016,2017,2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
Copyright © 2016,2017,2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
are permitted in any medium without royalty provided the copyright
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
@ -10,6 +10,22 @@ Copyright © 2016,2017,2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@
|
||||||
|
|
||||||
Please send Mes bug reports to bug-mes@gnu.org.
|
Please send Mes bug reports to bug-mes@gnu.org.
|
||||||
|
|
||||||
|
* Changes in 0.24.2 since 0.24.1
|
||||||
|
** Build
|
||||||
|
*** A number of compile warnings have been fixed.
|
||||||
|
*** The `simple.make' and `simple.sh' builds have been resurrected.
|
||||||
|
** MesCC
|
||||||
|
*** Some assembly defines were added for building TinyCC for x86_64.
|
||||||
|
*** `__assert_fail' has been updated to use the standard signature.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** A bootstrap build without M2-Planet is now supported again.
|
||||||
|
*** `gettimeofday' no longer segfaults in the M2-Planet build.
|
||||||
|
*** `stat64' and friends are now used on 32bit platforms.
|
||||||
|
This fixes https://debbugs.gnu.org/41264, and should also fix
|
||||||
|
https://debbugs.gnu.org/49985,
|
||||||
|
https://debbugs.gnu.org/53415,
|
||||||
|
https://debbugs.gnu.org/53416.
|
||||||
|
*** The Mes C Library now supports uppercase hex conversions.
|
||||||
* Changes in 0.24.1 since 0.24
|
* Changes in 0.24.1 since 0.24
|
||||||
** Build
|
** Build
|
||||||
*** Support M2-Planet bootstrap for ARM.
|
*** Support M2-Planet bootstrap for ARM.
|
||||||
|
|
6
README
6
README
|
@ -7,7 +7,7 @@
|
||||||
System. Since version 0.22 it has again helped to halve the size of
|
System. Since version 0.22 it has again helped to halve the size of
|
||||||
opaque, uninspectable binary seeds that are currently being used in the
|
opaque, uninspectable binary seeds that are currently being used in the
|
||||||
[[https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25][Further Reduced Binary Seed bootstrap]] of [[https://www.gnu.org/software/guix][GNU Guix]]. The final goal is to
|
[[https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25][Further Reduced Binary Seed bootstrap]] of [[https://www.gnu.org/software/guix][GNU Guix]]. The final goal is to
|
||||||
help create a full-source bootstrap as part of the [[http://bootstrappable.org][bootstrappable builds]]
|
help create a full-source bootstrap as part of the [[https://bootstrappable.org][bootstrappable builds]]
|
||||||
effort for UNIX-like operating systems.
|
effort for UNIX-like operating systems.
|
||||||
|
|
||||||
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C
|
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C
|
||||||
|
@ -25,7 +25,7 @@ Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
i686-linux, x86_64-linux, armhf-linux and aarch64-linux.
|
i686-linux, x86_64-linux, armhf-linux and aarch64-linux.
|
||||||
|
|
||||||
Mes is inspired by The Maxwell Equations of Software: [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][LISP-1.5]] -- John
|
Mes is inspired by The Maxwell Equations of Software: [[https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][LISP-1.5]] -- John
|
||||||
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
Jeremiah Orians's [[https://github.com/oriansj/stage0][stage0]] ~500 byte self-hosting hex assembler.
|
Jeremiah Orians's [[https://github.com/oriansj/stage0][stage0]] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ General Public Licence version 3 or later. See the file [[file:COPYING][COPYING
|
||||||
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
[8] https://www.nongnu.org/nyacc
|
[8] https://www.nongnu.org/nyacc
|
||||||
[9] https://gitlab.com/janneke/tinycc
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
[10] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]]
|
[10] [[https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]]
|
||||||
[11] https://savannah.nongnu.org/projects/stage0
|
[11] https://savannah.nongnu.org/projects/stage0
|
||||||
[12] https://nlnet.nl/project/GNUMes
|
[12] https://nlnet.nl/project/GNUMes
|
||||||
[13] https://nlnet.nl/project/GNUMes-arm
|
[13] https://nlnet.nl/project/GNUMes-arm
|
||||||
|
|
5
ROADMAP
5
ROADMAP
|
@ -1,7 +1,7 @@
|
||||||
-*- org -*-
|
-*- org -*-
|
||||||
#+TITLE: Tentative GNU Mes Road Map
|
#+TITLE: Tentative GNU Mes Road Map
|
||||||
|
|
||||||
Copyright © 2016,2017,2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
Copyright © 2016,2017,2018,2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
are permitted in any medium without royalty provided the copyright
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
@ -23,6 +23,9 @@ on Libera Chat!
|
||||||
|
|
||||||
* TODO
|
* TODO
|
||||||
** release 0.x, unsorted
|
** release 0.x, unsorted
|
||||||
|
- Full Guile module support.
|
||||||
|
- Run Gash and Gash-Utils on Mes.
|
||||||
|
- Remove Guile as a dependency for the Guix Full Source Bootstrap.
|
||||||
- Integrate Full Source bootstrap for ARM on GNU Guix;
|
- Integrate Full Source bootstrap for ARM on GNU Guix;
|
||||||
see branch wip-aarch64-bootstrap.
|
see branch wip-aarch64-bootstrap.
|
||||||
- Integrate Reduced Binary Seed bootstrap for ARM on GNU Guix;
|
- Integrate Reduced Binary Seed bootstrap for ARM on GNU Guix;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# GNU Mes --- Maxwell Equations of Software
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
# Copyright © 2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Mes.
|
# This file is part of GNU Mes.
|
||||||
#
|
#
|
||||||
|
@ -85,17 +85,26 @@ PHONY_TARGETS:=\
|
||||||
|
|
||||||
.PHONY: $(PHONY_TARGETS)
|
.PHONY: $(PHONY_TARGETS)
|
||||||
|
|
||||||
|
X86_ARCH_HEADERS = $(wildcard $(scrdest)include/linux/x86/*.h)
|
||||||
|
ARCH_HEADERS = $(X86_ARCH_HEADERS:$(srcdest)include/linux/x86/%=include/arch/%)
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
all: doc
|
all: doc
|
||||||
|
|
||||||
doc: build
|
doc: build
|
||||||
|
|
||||||
build:
|
build: | $(ARCH_HEADERS)
|
||||||
$(SHELL) build.sh
|
$(SHELL) build.sh
|
||||||
|
|
||||||
src/${program_prefix}mes: build
|
src/${program_prefix}mes: build
|
||||||
|
|
||||||
|
include/arch/%.h: $(srcdest)include/$(mes_kernel)/$(mes_cpu)/%.h | arch-dir
|
||||||
|
cp -f $< $@
|
||||||
|
|
||||||
|
arch-dir:
|
||||||
|
mkdir -p include/arch
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.s bin/mes bin/mes-gcc bin/mes-mescc
|
rm -f *.o *.s bin/mes bin/mes-gcc bin/mes-mescc
|
||||||
rm -f mes.{aux,cp,cps,fn,info,log,tmp,toc,vr,vrs}
|
rm -f mes.{aux,cp,cps,fn,info,log,tmp,toc,vr,vrs}
|
||||||
|
@ -348,6 +357,7 @@ tag:
|
||||||
# 1. Tag for release
|
# 1. Tag for release
|
||||||
# make tag VERSION=0.23
|
# make tag VERSION=0.23
|
||||||
# 2. Create signed tarball
|
# 2. Create signed tarball
|
||||||
|
# ./configure
|
||||||
# make sign-dist
|
# make sign-dist
|
||||||
# 3. Update Guix package description
|
# 3. Update Guix package description
|
||||||
# make release
|
# make release
|
||||||
|
|
|
@ -50,7 +50,7 @@ srcdest=../${srcdest}
|
||||||
ln -sf ${srcdest}mes .
|
ln -sf ${srcdest}mes .
|
||||||
ln -sf ${srcdest}module .
|
ln -sf ${srcdest}module .
|
||||||
ln -sf ${srcdest}src .
|
ln -sf ${srcdest}src .
|
||||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||||
AM_CFLAGS="-L ${srcdest}lib"
|
AM_CFLAGS="-L ${srcdest}lib"
|
||||||
|
|
||||||
mkdir -p $mes_cpu-mes
|
mkdir -p $mes_cpu-mes
|
||||||
|
@ -108,7 +108,7 @@ $AR crD $mes_cpu-mes/libc+tcc.a $objects
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
srcdest=
|
srcdest=
|
||||||
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||||
AM_CFLAGS="-L ${srcdest}lib"
|
AM_CFLAGS="-L ${srcdest}lib"
|
||||||
|
|
||||||
objects=
|
objects=
|
||||||
|
|
|
@ -64,16 +64,6 @@ if test -e libc+tcc.s; then
|
||||||
cp libc+tcc.s $mes_cpu-mes
|
cp libc+tcc.s $mes_cpu-mes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $courageous; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
archive libc+gnu.a $libc_gnu_SOURCES
|
|
||||||
cp libc+gnu.a $mes_cpu-mes
|
|
||||||
if test -e libc+gnu.s; then
|
|
||||||
cp libc+gnu.s $mes_cpu-mes
|
|
||||||
fi
|
|
||||||
|
|
||||||
archive libtcc1.a $libtcc1_SOURCES
|
archive libtcc1.a $libtcc1_SOURCES
|
||||||
cp libtcc1.a $mes_cpu-mes
|
cp libtcc1.a $mes_cpu-mes
|
||||||
if test -e libtcc1.s; then
|
if test -e libtcc1.s; then
|
||||||
|
@ -85,3 +75,13 @@ cp libgetopt.a $mes_cpu-mes
|
||||||
if test -e libgetopt.s; then
|
if test -e libgetopt.s; then
|
||||||
cp libgetopt.s $mes_cpu-mes
|
cp libgetopt.s $mes_cpu-mes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $courageous; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libc+gnu.a $libc_gnu_SOURCES
|
||||||
|
cp libc+gnu.a $mes_cpu-mes
|
||||||
|
if test -e libc+gnu.s; then
|
||||||
|
cp libc+gnu.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
|
@ -66,9 +66,8 @@ fi
|
||||||
AM_CPPFLAGS="
|
AM_CPPFLAGS="
|
||||||
-D HAVE_CONFIG_H=1
|
-D HAVE_CONFIG_H=1
|
||||||
-I ${srcdest}lib
|
-I ${srcdest}lib
|
||||||
-I include
|
|
||||||
-I ${srcdest}include
|
-I ${srcdest}include
|
||||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
-I ../include
|
||||||
"
|
"
|
||||||
if test $mes_kernel = gnu; then
|
if test $mes_kernel = gnu; then
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS
|
AM_CPPFLAGS="$AM_CPPFLAGS
|
||||||
|
@ -93,9 +92,9 @@ fi
|
||||||
AM_CPPFLAGS="
|
AM_CPPFLAGS="
|
||||||
-D HAVE_CONFIG_H=1
|
-D HAVE_CONFIG_H=1
|
||||||
-I ${srcdest}lib
|
-I ${srcdest}lib
|
||||||
-I include
|
|
||||||
-I ${srcdest}include
|
-I ${srcdest}include
|
||||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
-I ../include
|
||||||
|
-I include
|
||||||
"
|
"
|
||||||
if test "$compiler" != bootstrap; then
|
if test "$compiler" != bootstrap; then
|
||||||
${SHELL} ${srcdest}build-aux/build-mes.sh
|
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||||
|
@ -137,9 +136,9 @@ fi
|
||||||
AM_CPPFLAGS="
|
AM_CPPFLAGS="
|
||||||
-D HAVE_CONFIG_H=1
|
-D HAVE_CONFIG_H=1
|
||||||
-I ${srcdest}lib
|
-I ${srcdest}lib
|
||||||
-I include
|
|
||||||
-I ${srcdest}include
|
-I ${srcdest}include
|
||||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
-I ../include
|
||||||
|
-I include
|
||||||
"
|
"
|
||||||
compiler=mescc
|
compiler=mescc
|
||||||
AR=${MESAR-"${srcdest}pre-inst-env mesar"}
|
AR=${MESAR-"${srcdest}pre-inst-env mesar"}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! @SHELL@
|
#! @SHELL@
|
||||||
|
|
||||||
# GNU Mes --- Maxwell Equations of Software
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Mes.
|
# This file is part of GNU Mes.
|
||||||
#
|
#
|
||||||
|
@ -99,6 +99,7 @@ mkdir -p $DESTDIR$includedir
|
||||||
mkdir -p $DESTDIR$libdir
|
mkdir -p $DESTDIR$libdir
|
||||||
mkdir -p $DESTDIR$pkgdatadir
|
mkdir -p $DESTDIR$pkgdatadir
|
||||||
tar -cf- -C ${srcdir}/include . | tar -${v}xf- -C $DESTDIR$includedir
|
tar -cf- -C ${srcdir}/include . | tar -${v}xf- -C $DESTDIR$includedir
|
||||||
|
tar -cf- -C include . | tar -${v}xf- -C $DESTDIR$includedir
|
||||||
tar -cf- -C ${srcdir}/lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
tar -cf- -C ${srcdir}/lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||||
tar -cf- -C ${srcdir}/lib $mes_kernel/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
tar -cf- -C ${srcdir}/lib $mes_kernel/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||||
if test -z "$srcdest"; then
|
if test -z "$srcdest"; then
|
||||||
|
|
|
@ -4,7 +4,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
||||||
!#
|
!#
|
||||||
|
|
||||||
;;; GNU Mes --- Maxwell Equations of Software
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2020 Vagrant Cascadian <vagrant@reproducible-builds.org>
|
;;; Copyright © 2020 Vagrant Cascadian <vagrant@reproducible-builds.org>
|
||||||
;;;
|
;;;
|
||||||
;;; configure: This file is part of GNU Mes.
|
;;; configure: This file is part of GNU Mes.
|
||||||
|
@ -37,7 +37,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
||||||
(define PACKAGE "mes")
|
(define PACKAGE "mes")
|
||||||
(define PACKAGE-NAME "GNU Mes")
|
(define PACKAGE-NAME "GNU Mes")
|
||||||
(define PACKAGE-BUGREPORT "bug-mes@gnu.org")
|
(define PACKAGE-BUGREPORT "bug-mes@gnu.org")
|
||||||
(define VERSION "0.24.1")
|
(define VERSION "0.24.2")
|
||||||
|
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(guile)
|
(guile)
|
||||||
|
@ -707,6 +707,13 @@ See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
|
||||||
#define MES_VERSION \"" VERSION "\"
|
#define MES_VERSION \"" VERSION "\"
|
||||||
")))))
|
")))))
|
||||||
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
|
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
|
||||||
|
(let ((arch-dir (string-append srcdest "include/" mes-kernel "/" mes-cpu)))
|
||||||
|
(define (copy-header file-name)
|
||||||
|
(system* "cp" "-f" "-v"
|
||||||
|
(string-append arch-dir "/" file-name)
|
||||||
|
(string-append "include/arch/" file-name)))
|
||||||
|
(system* "mkdir" "-p" "include/arch")
|
||||||
|
(for-each copy-header '("kernel-stat.h" "syscall.h")))
|
||||||
|
|
||||||
(let ((make (and=> (file-name "make" deps) basename)))
|
(let ((make (and=> (file-name "make" deps) basename)))
|
||||||
(display (string-append "
|
(display (string-append "
|
||||||
|
|
12
configure.sh
12
configure.sh
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
# GNU Mes --- Maxwell Equations of Software
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
# Copyright © 2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Mes.
|
# This file is part of GNU Mes.
|
||||||
#
|
#
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=0.24.1
|
VERSION=0.24.2
|
||||||
srcdir=${srcdir-$(dirname $0)}
|
srcdir=${srcdir-$(dirname $0)}
|
||||||
srcdest=
|
srcdest=
|
||||||
if test "$srcdir" != "."; then
|
if test "$srcdir" != "."; then
|
||||||
|
@ -77,8 +77,8 @@ GUILE=${GUILE-$(command -v guile)} || true
|
||||||
HEX2=${HEX2-$(command -v hex2)}
|
HEX2=${HEX2-$(command -v hex2)}
|
||||||
LDPFLAGS=${LDFLAGS-}
|
LDPFLAGS=${LDFLAGS-}
|
||||||
M1=${M1-$(command -v M1)}
|
M1=${M1-$(command -v M1)}
|
||||||
M2_PLANET=${M1-$(command -v M2-Planet)}
|
M2_PLANET=${M2_PLANET-$(command -v M2-Planet)} || true
|
||||||
KAEM=${KAEM-$(command -v kaem)}
|
KAEM=${KAEM-$(command -v kaem)} || true
|
||||||
MES_FOR_BUILD=${MES_FOR_BUILD-$(command -v mes || command -v guile || echo mes)}
|
MES_FOR_BUILD=${MES_FOR_BUILD-$(command -v mes || command -v guile || echo mes)}
|
||||||
GIT=${GIT-$(command -v git)} || true
|
GIT=${GIT-$(command -v git)} || true
|
||||||
PERL=${PERL-$(command -v perl)} || true
|
PERL=${PERL-$(command -v perl)} || true
|
||||||
|
@ -271,6 +271,10 @@ cat >> include/mes/config.h <<EOF
|
||||||
#define MES_VERSION "$VERSION"
|
#define MES_VERSION "$VERSION"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
mkdir -p include/arch
|
||||||
|
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/kernel-stat.h include/arch
|
||||||
|
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/syscall.h include/arch
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
GNU Mes is configured for
|
GNU Mes is configured for
|
||||||
compiler: $compiler
|
compiler: $compiler
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
|
||||||
|
Subject: GNU Mes 0.24.2 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
|
||||||
|
We are happy to announce the release of GNU Mes 0.24.2, representing 25
|
||||||
|
commits over nine months by four people.
|
||||||
|
|
||||||
|
This release should fix the long standing `stat64' bug #41264[0].
|
||||||
|
|
||||||
|
We are very grateful that the NLnet Foundation[1] is sponsoring this
|
||||||
|
work!
|
||||||
|
|
||||||
|
What's next?
|
||||||
|
|
||||||
|
Work to prototype this so-called "Full Source Bootstrap" for ARM on
|
||||||
|
Aarch64 is happening on the wip-aarch64-bootstrap[2] branch. Also, full
|
||||||
|
Guile compatible module support, and RISC-V support.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[3] is a Scheme interpreter and C compiler for bootstrapping
|
||||||
|
the GNU System. Since version 0.22 it has again helped to halve the
|
||||||
|
size of opaque, uninspectable binary seeds that are currently being
|
||||||
|
used in the Reduced Binary Seed bootstrap[4] of GNU Guix[5]. The
|
||||||
|
final goal is to help create a full source bootstrap as part of the
|
||||||
|
bootstrappable builds[6] effort for UNIX-like operating systems.
|
||||||
|
|
||||||
|
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C
|
||||||
|
compiler written in Scheme and these are mutual self-hosting. Mes can
|
||||||
|
now be bootstrapped from M2-Planet[7] and Mescc-Tools[8].
|
||||||
|
|
||||||
|
Mes has a Garbage Collector, a library of loadable Scheme modules--
|
||||||
|
notably Dominique Boucher's LALR[9], Pre-R6RS portable
|
||||||
|
syntax-case[10] with R7RS ellipsis, Matt Wette's Nyacc[11] --and test
|
||||||
|
suite, just enough to support a REPL and a C99 compiler: mescc.
|
||||||
|
|
||||||
|
Mes + MesCC + Mes C Library can build a bootstrappable TinyCC[12] that
|
||||||
|
is self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
|
i686-linux, x86_64-linux, armhf-linux and aarch64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[13] --
|
||||||
|
John McCarthy page 13, GNU Guix's source/binary packaging transparency
|
||||||
|
and Jeremiah Orians's stage0[14] 357-byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.24.2.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.24.2.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.24.2.tar.gz
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.24.2.tar.gz.sig
|
||||||
|
|
||||||
|
Here are the SHA1 and SHA256 checksums:
|
||||||
|
|
||||||
|
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.24.2.tar.gz
|
||||||
|
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.24.2.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.24.2.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
or that public key has expired, try the following commands to update
|
||||||
|
or refresh it, and then rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
gpg --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
See https://bootstrappable.org
|
||||||
|
Join #bootstrappable on irc.libera.chat
|
||||||
|
|
||||||
|
* NEWS
|
||||||
|
* Changes in 0.24.2 since 0.24.1
|
||||||
|
** Build
|
||||||
|
*** A number of compile warnings have been fixed.
|
||||||
|
*** The `simple.make' and `simple.sh' builds have been resurrected.
|
||||||
|
** MesCC
|
||||||
|
*** Some assembly defines were added for building TinyCC for x86_64.
|
||||||
|
*** `__assert_fail' has been updated to use the standard signature.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** A bootstrap build without M2-Planet is now supported again.
|
||||||
|
*** `gettimeofday' no longer segfaults in the M2-Planet build.
|
||||||
|
*** `stat64' and friends are now used on 32bit platforms.
|
||||||
|
This fixes https://debbugs.gnu.org/41264, and should also fix
|
||||||
|
https://debbugs.gnu.org/49985,
|
||||||
|
https://debbugs.gnu.org/53415,
|
||||||
|
https://debbugs.gnu.org/53416.
|
||||||
|
*** The Mes C Library now supports uppercase hex conversions.
|
||||||
|
|
||||||
|
* Links
|
||||||
|
[0] https://debbugs.gnu.org/41264
|
||||||
|
[1] https://nlnet.nl/project/GNUMes-ARM_RISC-V
|
||||||
|
[2] https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-aarch64-bootstrap
|
||||||
|
[3] https://www.gnu.org/software/mes
|
||||||
|
[4] https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25
|
||||||
|
[5] https://www.gnu.org/software/guix
|
||||||
|
[6] https://bootstrappable.org
|
||||||
|
[7] https://github.com/oriansj/m2-planet
|
||||||
|
[8] https://savannah.nongnu.org/projects/mescc-tools
|
||||||
|
[9] https://github.com/schemeway/lalr-scm
|
||||||
|
[10] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[11] https://www.nongnu.org/nyacc
|
||||||
|
[12] https://gitlab.com/janneke/tinycc
|
||||||
|
[13] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[14] https://github.com/oriansj/stage0-posix
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
@display
|
@display
|
||||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||||
@uref{http://fsf.org/}
|
@uref{https://fsf.org/}
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
@ -414,7 +414,7 @@ The Free Software Foundation may publish new, revised versions
|
||||||
of the GNU Free Documentation License from time to time. Such new
|
of the GNU Free Documentation License from time to time. Such new
|
||||||
versions will be similar in spirit to the present version, but may
|
versions will be similar in spirit to the present version, but may
|
||||||
differ in detail to address new problems or concerns. See
|
differ in detail to address new problems or concerns. See
|
||||||
@uref{http://www.gnu.org/copyleft/}.
|
@uref{https://www.gnu.org/copyleft/}.
|
||||||
|
|
||||||
Each version of the License is given a distinguishing version number.
|
Each version of the License is given a distinguishing version number.
|
||||||
If the Document specifies that a particular numbered version of this
|
If the Document specifies that a particular numbered version of this
|
||||||
|
|
22
doc/mes.texi
22
doc/mes.texi
|
@ -204,7 +204,7 @@ Freedom 1.
|
||||||
@section Reproducible Builds
|
@section Reproducible Builds
|
||||||
|
|
||||||
The current Reproducible Builds effort incubated in the Debian
|
The current Reproducible Builds effort incubated in the Debian
|
||||||
project@footnote{@url{http://debian.org, The Debian Project}} and was
|
project@footnote{@url{https://debian.org, The Debian Project}} and was
|
||||||
organized by Lunar. Quoting the Reproducible Builds
|
organized by Lunar. Quoting the Reproducible Builds
|
||||||
website@footnote{@url{https://reproducible-builds.org/,Reproducible
|
website@footnote{@url{https://reproducible-builds.org/,Reproducible
|
||||||
Builds}}
|
Builds}}
|
||||||
|
@ -365,7 +365,7 @@ Most computers work pretty well so apparently there is not a pressing
|
||||||
need to inspect and study all of these codes. At the same time it is
|
need to inspect and study all of these codes. At the same time it is
|
||||||
tricky to fully trust@footnote{ Ken Thompson's 1984 Turing award
|
tricky to fully trust@footnote{ Ken Thompson's 1984 Turing award
|
||||||
acceptance speech
|
acceptance speech
|
||||||
@url{http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf,
|
@url{https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf,
|
||||||
Reflections on Trusting Tust}.} a computer that was bootstrapped in this
|
Reflections on Trusting Tust}.} a computer that was bootstrapped in this
|
||||||
way.
|
way.
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ and mescc-tools can be removed.
|
||||||
As fate would have it, I stumbled upon this
|
As fate would have it, I stumbled upon this
|
||||||
@url{https://queue.acm.org/detail.cfm?id=1039523, interview with Alan
|
@url{https://queue.acm.org/detail.cfm?id=1039523, interview with Alan
|
||||||
Kay}, where he shares a revelation he had when reading John McCarthy's
|
Kay}, where he shares a revelation he had when reading John McCarthy's
|
||||||
@url{http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf,
|
@url{https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf,
|
||||||
LISP-1.5} manual:
|
LISP-1.5} manual:
|
||||||
|
|
||||||
@quotation
|
@quotation
|
||||||
|
@ -553,11 +553,11 @@ in the Mes source tree for additional details.
|
||||||
GNU Mes depends on the following packages:
|
GNU Mes depends on the following packages:
|
||||||
|
|
||||||
@itemize
|
@itemize
|
||||||
@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or
|
@item @url{https://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or
|
||||||
later, including 2.2.x and 3.0.x,
|
later, including 2.2.x and 3.0.x,
|
||||||
@item @url{http://www.gnu.org/software/make/, GNU Make}.
|
@item @url{https://www.gnu.org/software/make/, GNU Make}.
|
||||||
@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, version 1.00.2,
|
@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, version 1.00.2,
|
||||||
@item @url{http://gcc.gnu.org, GCC's gcc}, version 2.95.3 or later, including 10.2.0,
|
@item @url{https://gcc.gnu.org, GCC's gcc}, version 2.95.3 or later, including 10.2.0,
|
||||||
@item @url{https://savannah.gnu.org/projects/mescc-tools/, mescc-tools}, version 1.4.0,
|
@item @url{https://savannah.gnu.org/projects/mescc-tools/, mescc-tools}, version 1.4.0,
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ responsibility.
|
||||||
The Reduced Binary Seed bootstrap currently adopted by Guix@footnote{See
|
The Reduced Binary Seed bootstrap currently adopted by Guix@footnote{See
|
||||||
@file{gnu/packages/commencement.scm} in the @var{master} branch in Guix
|
@file{gnu/packages/commencement.scm} in the @var{master} branch in Guix
|
||||||
git
|
git
|
||||||
@url{http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm}}.
|
@url{https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm}}.
|
||||||
In its intiial form it is only available for x86-linux and armhf-linux.
|
In its intiial form it is only available for x86-linux and armhf-linux.
|
||||||
|
|
||||||
Currently, it goes like this:
|
Currently, it goes like this:
|
||||||
|
@ -935,7 +935,7 @@ The @var{option}s can be among the following:
|
||||||
align @var{symbol}, the default is @code{functions}; other valid values
|
align @var{symbol}, the default is @code{functions}; other valid values
|
||||||
are: @code{globals}.
|
are: @code{globals}.
|
||||||
|
|
||||||
@item --base-address=ADRRESS
|
@item --base-address=ADDRESS
|
||||||
use BaseAddress ADDRESS [0x1000000]
|
use BaseAddress ADDRESS [0x1000000]
|
||||||
|
|
||||||
@item -c
|
@item -c
|
||||||
|
@ -1155,8 +1155,8 @@ Porting MesCC:
|
||||||
The Perfect Setup to hack on Mes is basically the perfect setup used
|
The Perfect Setup to hack on Mes is basically the perfect setup used
|
||||||
for Guile hacking (@pxref{Using Guile in Emacs,,, guile, Guile Reference
|
for Guile hacking (@pxref{Using Guile in Emacs,,, guile, Guile Reference
|
||||||
Manual}). First, you need more than an editor, you need
|
Manual}). First, you need more than an editor, you need
|
||||||
@url{http://www.gnu.org/software/emacs, Emacs}, empowered by the
|
@url{https://www.gnu.org/software/emacs, Emacs}, empowered by the
|
||||||
wonderful @url{http://nongnu.org/geiser/, Geiser}.
|
wonderful @url{https://nongnu.org/geiser/, Geiser}.
|
||||||
|
|
||||||
Geiser allows for interactive and incremental development from within
|
Geiser allows for interactive and incremental development from within
|
||||||
Emacs: code compilation and evaluation from within buffers, access to
|
Emacs: code compilation and evaluation from within buffers, access to
|
||||||
|
@ -1181,7 +1181,7 @@ Scheme code in Mes is written in a purely functional style.
|
||||||
@cindex coding style
|
@cindex coding style
|
||||||
When writing Scheme code, we follow common wisdom among Scheme
|
When writing Scheme code, we follow common wisdom among Scheme
|
||||||
programmers. In general, we follow the
|
programmers. In general, we follow the
|
||||||
@url{http://mumble.net/~campbell/scheme/style.txt, Riastradh's Lisp
|
@url{https://mumble.net/~campbell/scheme/style.txt, Riastradh's Lisp
|
||||||
Style Rules}. This document happens to describe the conventions mostly
|
Style Rules}. This document happens to describe the conventions mostly
|
||||||
used in Guile’s code too. It is very thoughtful and well written, so
|
used in Guile’s code too. It is very thoughtful and well written, so
|
||||||
please do read it.
|
please do read it.
|
||||||
|
|
|
@ -183,13 +183,13 @@ extensive examples, including parsers for the Javascript and C99 languages.")
|
||||||
(define-public mes
|
(define-public mes
|
||||||
(package
|
(package
|
||||||
(name "mes")
|
(name "mes")
|
||||||
(version #!mes!# "0.24.1")
|
(version #!mes!# "0.24.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"https://ftp.gnu.org/pub/gnu/mes/mes-" version ".tar.gz"))
|
"https://ftp.gnu.org/pub/gnu/mes/mes-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 #!mes!# "0d855agwawjjzwbjmvb5xlbwg77zdpwbjm9kjxc2wqvn0vmhq4im"))))
|
(base32 #!mes!# "0vp8v88zszh1imm3dvdfi3m8cywshdj7xcrsq4cgmss69s2y1nkx"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(supported-systems '("aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux"))
|
(supported-systems '("aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux"))
|
||||||
(propagated-inputs (list mescc-tools nyacc))
|
(propagated-inputs (list mescc-tools nyacc))
|
||||||
|
@ -238,7 +238,7 @@ Guile.")
|
||||||
(license gpl3+)))
|
(license gpl3+)))
|
||||||
|
|
||||||
(define-public mes.git
|
(define-public mes.git
|
||||||
(let ((version #!mes!# "0.24.1")
|
(let ((version #!mes!# "0.24.2")
|
||||||
(revision "0")
|
(revision "0")
|
||||||
(commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))))
|
(commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))))
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -27,8 +27,9 @@
|
||||||
#undef __MES_ASSERT_H
|
#undef __MES_ASSERT_H
|
||||||
#include_next <assert.h>
|
#include_next <assert.h>
|
||||||
#else // ! SYSTEM_LIBC
|
#else // ! SYSTEM_LIBC
|
||||||
#define assert(x) ((x) ? (void)0 : __assert_fail (#x))
|
#define assert(x) ((x) ? (void)0 : __assert_fail (#x, 0, 0, 0))
|
||||||
void __assert_fail (char *s);
|
void __assert_fail (char const *s, char const *file, unsigned line,
|
||||||
|
char const *function);
|
||||||
#endif // ! SYSTEM_LIBC
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
#endif // __MES_ASSERT_H
|
#endif // __MES_ASSERT_H
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -17,40 +17,9 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#ifndef __MES_GNU_X86_KERNEL_STAT_H
|
||||||
|
#define __MES_GNU_X86_KERNEL_STAT_H 1
|
||||||
|
|
||||||
#if SYSTEM_LIBC
|
#include <arch/syscall.h>
|
||||||
#error "SYSTEM_LIBC not supported"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#endif // __MES_GNU_X86_KERNEL_STAT_H
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main (int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int size = 5000;
|
|
||||||
puts ("m!\n");
|
|
||||||
//int *p = 0;
|
|
||||||
char *p = 0;
|
|
||||||
p = malloc (size);
|
|
||||||
size = 5000;
|
|
||||||
puts ("p=");
|
|
||||||
puts (itoa (p));
|
|
||||||
puts ("\n");
|
|
||||||
for (int i = 0; i < size; i++)
|
|
||||||
{
|
|
||||||
puts ("set ");
|
|
||||||
puts (itoa (i));
|
|
||||||
puts ("\n");
|
|
||||||
p[i] = i;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < size; i++)
|
|
||||||
{
|
|
||||||
puts (itoa (i));
|
|
||||||
puts (": ");
|
|
||||||
puts (itoa (p[i]));
|
|
||||||
puts ("\n");
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU Mes 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; either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_LINUX_ARM_KERNEL_STAT_H
|
||||||
|
#define __MES_LINUX_ARM_KERNEL_STAT_H 1
|
||||||
|
|
||||||
|
// https://github.com/torvalds/linux/blob/master/arch/arm/include/uapi/asm/stat.h
|
||||||
|
|
||||||
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
|
#if __SIZEOF_LONG_LONG__ != 8
|
||||||
|
|
||||||
|
// *INDENT-OFF*
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
unsigned long st_dev;
|
||||||
|
unsigned long st_ino;
|
||||||
|
unsigned short st_mode;
|
||||||
|
unsigned short st_nlink;
|
||||||
|
unsigned short st_uid;
|
||||||
|
unsigned short st_gid;
|
||||||
|
unsigned long st_rdev;
|
||||||
|
unsigned long st_size;
|
||||||
|
unsigned long st_blksize;
|
||||||
|
unsigned long st_blocks;
|
||||||
|
unsigned long st_atime;
|
||||||
|
unsigned long st_atime_usec;
|
||||||
|
unsigned long st_mtime;
|
||||||
|
unsigned long st_mtime_usec;
|
||||||
|
unsigned long st_ctime;
|
||||||
|
unsigned long st_ctime_usec;
|
||||||
|
unsigned long __pad0;
|
||||||
|
unsigned long __pad1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
unsigned long long st_dev;
|
||||||
|
unsigned char __pad0[4];
|
||||||
|
unsigned long __st_ino;
|
||||||
|
unsigned int st_mode;
|
||||||
|
unsigned int st_nlink;
|
||||||
|
unsigned long st_uid;
|
||||||
|
unsigned long st_gid;
|
||||||
|
unsigned long long st_rdev;
|
||||||
|
unsigned char __pad3[4];
|
||||||
|
long long st_size;
|
||||||
|
unsigned long st_blksize;
|
||||||
|
unsigned long long st_blocks;
|
||||||
|
unsigned long st_atime;
|
||||||
|
unsigned long st_atime_nsec;
|
||||||
|
unsigned long st_mtime;
|
||||||
|
unsigned int st_mtime_nsec;
|
||||||
|
unsigned long st_ctime;
|
||||||
|
unsigned long st_ctime_nsec;
|
||||||
|
unsigned long long st_ino;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
#endif // __MES_LINUX_ARM_KERNEL_STAT_H
|
|
@ -109,4 +109,23 @@
|
||||||
#define SYS_readlink 0x55
|
#define SYS_readlink 0x55
|
||||||
#define SYS_mknod 0x0e
|
#define SYS_mknod 0x0e
|
||||||
|
|
||||||
|
#if __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
#define SYS_stat64 0xc3
|
||||||
|
#define SYS_lstat64 0xc4
|
||||||
|
#define SYS_fstat64 0xc5
|
||||||
|
#define SYS_fcntl64 0xdd
|
||||||
|
#define SYS_getdents64 0xdc
|
||||||
|
|
||||||
|
#undef SYS_stat
|
||||||
|
#define SYS_stat SYS_stat64
|
||||||
|
|
||||||
|
#undef SYS_lstat
|
||||||
|
#define SYS_lstat SYS_lstat64
|
||||||
|
|
||||||
|
#undef SYS_fstat
|
||||||
|
#define SYS_fstat SYS_fstat64
|
||||||
|
|
||||||
|
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
#endif /* __MES_LINUX_ARM_SYSCALL_H */
|
#endif /* __MES_LINUX_ARM_SYSCALL_H */
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU Mes 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; either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __LINUX_M2_KERNEL_STAT_H
|
||||||
|
#define __LINUX_M2_KERNEL_STAT_H
|
||||||
|
|
||||||
|
/* https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h */
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
unsigned st_dev;
|
||||||
|
unsigned st_ino;
|
||||||
|
char st_mode[2];
|
||||||
|
char st_nlink[2];
|
||||||
|
char st_uid[2];
|
||||||
|
char st_gid[2];
|
||||||
|
unsigned st_rdev;
|
||||||
|
unsigned st_size;
|
||||||
|
unsigned st_blksize;
|
||||||
|
unsigned st_blocks;
|
||||||
|
unsigned st_atime;
|
||||||
|
unsigned st_atime_usec;
|
||||||
|
unsigned st_mtime;
|
||||||
|
unsigned st_mtime_usec;
|
||||||
|
unsigned st_ctime;
|
||||||
|
unsigned st_ctime_usec;
|
||||||
|
unsigned __pad0;
|
||||||
|
unsigned __pad1;
|
||||||
|
};
|
||||||
|
#endif /* __LINUX_M2_KERNEL_STAT_H */
|
|
@ -0,0 +1,79 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU Mes 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; either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_LINUX_X86_KERNEL_STAT_H
|
||||||
|
#define __MES_LINUX_X86_KERNEL_STAT_H 1
|
||||||
|
|
||||||
|
// https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h
|
||||||
|
|
||||||
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
|
#if __SIZEOF_LONG_LONG__ != 8
|
||||||
|
|
||||||
|
// *INDENT-OFF*
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
unsigned long st_dev;
|
||||||
|
unsigned long st_ino;
|
||||||
|
unsigned short st_mode;
|
||||||
|
unsigned short st_nlink;
|
||||||
|
unsigned short st_uid;
|
||||||
|
unsigned short st_gid;
|
||||||
|
unsigned long st_rdev;
|
||||||
|
unsigned long st_size;
|
||||||
|
unsigned long st_blksize;
|
||||||
|
unsigned long st_blocks;
|
||||||
|
unsigned long st_atime;
|
||||||
|
unsigned long st_atime_usec;
|
||||||
|
unsigned long st_mtime;
|
||||||
|
unsigned long st_mtime_usec;
|
||||||
|
unsigned long st_ctime;
|
||||||
|
unsigned long st_ctime_usec;
|
||||||
|
unsigned long __pad0;
|
||||||
|
unsigned long __pad1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
unsigned long long st_dev;
|
||||||
|
unsigned char __pad0[4];
|
||||||
|
unsigned long __st_ino;
|
||||||
|
unsigned int st_mode;
|
||||||
|
unsigned int st_nlink;
|
||||||
|
unsigned long st_uid;
|
||||||
|
unsigned long st_gid;
|
||||||
|
unsigned long long st_rdev;
|
||||||
|
unsigned char __pad3[4];
|
||||||
|
long long st_size;
|
||||||
|
unsigned long st_blksize;
|
||||||
|
unsigned long long st_blocks;
|
||||||
|
unsigned long st_atime;
|
||||||
|
unsigned long st_atime_nsec;
|
||||||
|
unsigned long st_mtime;
|
||||||
|
unsigned int st_mtime_nsec;
|
||||||
|
unsigned long st_ctime;
|
||||||
|
unsigned long st_ctime_nsec;
|
||||||
|
unsigned long long st_ino;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
#endif // __MES_LINUX_X86_KERNEL_STAT_H
|
|
@ -75,7 +75,6 @@
|
||||||
#define SYS_stat 0x6a
|
#define SYS_stat 0x6a
|
||||||
|
|
||||||
/* libc+gnu */
|
/* libc+gnu */
|
||||||
|
|
||||||
#define SYS_chdir 0x0c
|
#define SYS_chdir 0x0c
|
||||||
#define SYS_link 0x09
|
#define SYS_link 0x09
|
||||||
#define SYS_getpid 0x14
|
#define SYS_getpid 0x14
|
||||||
|
@ -112,4 +111,23 @@
|
||||||
#define SYS_readlink 0x55
|
#define SYS_readlink 0x55
|
||||||
#define SYS_mknod 0x0e
|
#define SYS_mknod 0x0e
|
||||||
|
|
||||||
|
#if __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
#define SYS_stat64 0xc3
|
||||||
|
#define SYS_lstat64 0xc4
|
||||||
|
#define SYS_fstat64 0xc5
|
||||||
|
#define SYS_fcntl64 0xdd
|
||||||
|
#define SYS_getdents64 0xdc
|
||||||
|
|
||||||
|
#undef SYS_stat
|
||||||
|
#define SYS_stat SYS_stat64
|
||||||
|
|
||||||
|
#undef SYS_lstat
|
||||||
|
#define SYS_lstat SYS_lstat64
|
||||||
|
|
||||||
|
#undef SYS_fstat
|
||||||
|
#define SYS_fstat SYS_fstat64
|
||||||
|
|
||||||
|
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
#endif /* __MES_LINUX_X86_SYSCALL_H */
|
#endif /* __MES_LINUX_X86_SYSCALL_H */
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU Mes 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; either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_LINUX_X86_64_KERNEL_STAT_H
|
||||||
|
#define __MES_LINUX_X86_64_KERNEL_STAT_H 1
|
||||||
|
|
||||||
|
// https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h
|
||||||
|
|
||||||
|
// *INDENT-OFF*
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
unsigned long st_dev;
|
||||||
|
unsigned long st_ino;
|
||||||
|
unsigned long st_nlink;
|
||||||
|
unsigned int st_mode;
|
||||||
|
unsigned int st_uid;
|
||||||
|
unsigned int st_gid;
|
||||||
|
unsigned int __pad0;
|
||||||
|
unsigned long st_rdev;
|
||||||
|
unsigned long st_size;
|
||||||
|
unsigned long st_atime;
|
||||||
|
unsigned long st_atime_nsec;
|
||||||
|
unsigned long st_mtime;
|
||||||
|
unsigned long st_mtime_nsec;
|
||||||
|
unsigned long st_ctime;
|
||||||
|
unsigned long st_ctime_nsec;
|
||||||
|
unsigned long st_blksize;
|
||||||
|
long st_blocks;
|
||||||
|
unsigned long __pad1;
|
||||||
|
unsigned long __pad2;
|
||||||
|
unsigned long __pad3;
|
||||||
|
unsigned long __pad4;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __MES_LINUX_X86_64_KERNEL_STAT_H
|
|
@ -0,0 +1,138 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU Mes 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; either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __M2_TYPES_H
|
||||||
|
#define __M2_TYPES_H 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
#ifndef __MES_CLOCK_T
|
||||||
|
#define __MES_CLOCK_T
|
||||||
|
#undef clock_t
|
||||||
|
typedef long clock_t;
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MES_DEV_T
|
||||||
|
#define __MES_DEV_T
|
||||||
|
#undef dev_t
|
||||||
|
typedef long dev_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
#if !defined (__MES_FILE_T) && ! defined (_FILE_T)
|
||||||
|
#define __MES_FILE_T
|
||||||
|
#define _FILE_T
|
||||||
|
typedef long FILE;
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MES_GID_T
|
||||||
|
#define __MES_GID_T
|
||||||
|
#undef gid_t
|
||||||
|
typedef unsigned gid_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MES_INO_T
|
||||||
|
#define __MES_INO_T
|
||||||
|
#undef ino_t
|
||||||
|
typedef unsigned ino_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __SIZEOF_LONG_LONG__ == 8
|
||||||
|
#ifndef __MES_INO64_T
|
||||||
|
#define __MES_INO64_T
|
||||||
|
#undef ino64_t
|
||||||
|
typedef unsigned ino64_t;
|
||||||
|
#endif
|
||||||
|
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
#if !defined (__MES_INTPTR_T) && !defined (__intptr_t_defined)
|
||||||
|
#define __MES_INTPTR_T
|
||||||
|
#define __intptr_t_defined
|
||||||
|
#undef intptr_t
|
||||||
|
typedef long intptr_t;
|
||||||
|
#undef uintptr_t
|
||||||
|
typedef unsigned uintptr_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MES_OFF_T
|
||||||
|
#define __MES_OFF_T
|
||||||
|
#undef off_t
|
||||||
|
typedef long off_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __SIZEOF_LONG_LONG__ == 8
|
||||||
|
#ifndef __MES_OFF64_T
|
||||||
|
#define __MES_OFF64_T
|
||||||
|
#undef off64_t
|
||||||
|
typedef unsigned off64_t;
|
||||||
|
#endif
|
||||||
|
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||||
|
|
||||||
|
#ifndef __MES_PID_T
|
||||||
|
#define __MES_PID_T
|
||||||
|
#undef pid_t
|
||||||
|
typedef int pid_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PTRDIFF_T
|
||||||
|
#define __PTRDIFF_T
|
||||||
|
#ifndef __MES_PTRDIFF_T
|
||||||
|
#define __MES_PTRDIFF_T
|
||||||
|
#undef ptrdiff_t
|
||||||
|
typedef long ptrdiff_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MES_SIGVAL_T
|
||||||
|
#define __MES_SIGVAL_T
|
||||||
|
#undef clock_t
|
||||||
|
typedef long sigval_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __SIZE_T
|
||||||
|
#define __SIZE_T
|
||||||
|
#ifndef __MES_SIZE_T
|
||||||
|
#define __MES_SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MES_SSIZE_T
|
||||||
|
#define __MES_SSIZE_T
|
||||||
|
#undef ssize_t
|
||||||
|
typedef long ssize_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MES_UID_T
|
||||||
|
#define __MES_UID_T
|
||||||
|
#undef uid_t
|
||||||
|
typedef unsigned uid_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __WCHAR_T
|
||||||
|
#define __WCHAR_T
|
||||||
|
#ifndef __MES_WCHAR_T
|
||||||
|
#define __MES_WCHAR_T
|
||||||
|
#undef wchar_t
|
||||||
|
typedef int wchar_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __M2_TYPES_H
|
|
@ -67,7 +67,8 @@ extern void (*__call_at_exit) (void);
|
||||||
#define __FILEDES_MAX 512
|
#define __FILEDES_MAX 512
|
||||||
|
|
||||||
#if !SYSTEM_LIBC
|
#if !SYSTEM_LIBC
|
||||||
void __assert_fail (char *s);
|
void __assert_fail (char const *s, char const *file, unsigned line,
|
||||||
|
char const *function);
|
||||||
ssize_t __buffered_read (int filedes, void *buffer, size_t size);
|
ssize_t __buffered_read (int filedes, void *buffer, size_t size);
|
||||||
size_t __buffered_read_clear (int filedes);
|
size_t __buffered_read_clear (int filedes);
|
||||||
void _exit (int code);
|
void _exit (int code);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef __MES_SYS_STAT_H
|
#ifndef __MES_SYS_STAT_H
|
||||||
#define __MES_SYS_STAT_H 1lei
|
#define __MES_SYS_STAT_H 1
|
||||||
|
|
||||||
#if SYSTEM_LIBC
|
#if SYSTEM_LIBC
|
||||||
#undef __MES_SYS_STAT_H
|
#undef __MES_SYS_STAT_H
|
||||||
|
@ -29,60 +29,13 @@
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <arch/kernel-stat.h>
|
||||||
|
|
||||||
#ifndef __MES_MODE_T
|
#ifndef __MES_MODE_T
|
||||||
#define __MES_MODE_T
|
#define __MES_MODE_T
|
||||||
typedef int mode_t;
|
typedef int mode_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// *INDENT-OFF*
|
|
||||||
#if __i386__ || __arm__
|
|
||||||
struct stat
|
|
||||||
{
|
|
||||||
unsigned long st_dev;
|
|
||||||
unsigned long st_ino;
|
|
||||||
unsigned short st_mode;
|
|
||||||
unsigned short st_nlink;
|
|
||||||
unsigned short st_uid;
|
|
||||||
unsigned short st_gid;
|
|
||||||
unsigned long st_rdev;
|
|
||||||
long st_size; /* Linux: unsigned long; glibc: off_t (i.e. signed) */
|
|
||||||
unsigned long st_blksize;
|
|
||||||
unsigned long st_blocks;
|
|
||||||
time_t st_atime; /* Linux: unsigned long; glibc: time_t */
|
|
||||||
unsigned long st_atime_usec;
|
|
||||||
time_t st_mtime; /* Linux: unsigned long; glibc: time_t */
|
|
||||||
unsigned long st_mtime_usec;
|
|
||||||
time_t st_ctime; /* Linux: unsigned long; glibc: time_t */
|
|
||||||
unsigned long st_ctime_usec;
|
|
||||||
unsigned long __foo0;
|
|
||||||
unsigned long __foo1;
|
|
||||||
};
|
|
||||||
#elif __x86_64__
|
|
||||||
struct stat
|
|
||||||
{
|
|
||||||
unsigned long st_dev;
|
|
||||||
unsigned long st_ino;
|
|
||||||
unsigned int st_mode;
|
|
||||||
unsigned int st_nlink;
|
|
||||||
unsigned int st_uid;
|
|
||||||
unsigned int st_gid;
|
|
||||||
unsigned long st_rdev;
|
|
||||||
long st_size;
|
|
||||||
unsigned long st_blksize;
|
|
||||||
unsigned long st_blocks;
|
|
||||||
time_t st_atime;
|
|
||||||
unsigned long st_atime_usec;
|
|
||||||
time_t st_mtime;
|
|
||||||
unsigned long st_mtime_usec;
|
|
||||||
time_t st_ctime;
|
|
||||||
unsigned long st_ctime_usec;
|
|
||||||
unsigned long __foo0;
|
|
||||||
unsigned long __foo1;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
// *INDENT-ON*
|
|
||||||
|
|
||||||
int chmod (char const *file_name, mode_t mode);
|
int chmod (char const *file_name, mode_t mode);
|
||||||
int fstat (int filedes, struct stat *buf);
|
int fstat (int filedes, struct stat *buf);
|
||||||
int mkdir (char const *file_name, mode_t mode);
|
int mkdir (char const *file_name, mode_t mode);
|
||||||
|
|
3
kaem.run
3
kaem.run
|
@ -53,6 +53,7 @@ M2-Planet \
|
||||||
-f lib/mes/fdputc.c \
|
-f lib/mes/fdputc.c \
|
||||||
-f lib/mes/eputc.c \
|
-f lib/mes/eputc.c \
|
||||||
\
|
\
|
||||||
|
-f include/m2/types.h \
|
||||||
-f include/mes/mes.h \
|
-f include/mes/mes.h \
|
||||||
-f include/mes/builtins.h \
|
-f include/mes/builtins.h \
|
||||||
-f include/mes/constants.h \
|
-f include/mes/constants.h \
|
||||||
|
@ -81,6 +82,8 @@ M2-Planet \
|
||||||
-f lib/mes/fdungetc.c \
|
-f lib/mes/fdungetc.c \
|
||||||
-f lib/posix/setenv.c \
|
-f lib/posix/setenv.c \
|
||||||
-f lib/linux/access.c \
|
-f lib/linux/access.c \
|
||||||
|
-f include/linux/m2/kernel-stat.h \
|
||||||
|
-f include/sys/stat.h \
|
||||||
-f lib/m2/chmod.c \
|
-f lib/m2/chmod.c \
|
||||||
-f lib/linux/ioctl3.c \
|
-f lib/linux/ioctl3.c \
|
||||||
-f lib/m2/isatty.c \
|
-f lib/m2/isatty.c \
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
* Copyright © 2023 Rick Masters <grick23@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
|
|
@ -24,5 +24,5 @@
|
||||||
int
|
int
|
||||||
isxdigit (int c)
|
isxdigit (int c)
|
||||||
{
|
{
|
||||||
return isdigit (c) || (c >= 'a' && c <= 'f');
|
return isdigit (c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
char *
|
char *
|
||||||
_getcwd (char *buffer, size_t size)
|
_getcwd (char *buffer, size_t size)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
access (char const *file_name, int how)
|
access (char const *file_name, int how)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
long
|
long
|
||||||
brk (void *addr)
|
brk (void *addr)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
chdir (char const *file_name)
|
chdir (char const *file_name)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
dup (int old)
|
dup (int old)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
dup2 (int old, int new)
|
dup2 (int old, int new)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
execve (char const *file_name, char *const argv[], char *const env[])
|
execve (char const *file_name, char *const argv[], char *const env[])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
fork ()
|
fork ()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
fsync (int filedes)
|
fsync (int filedes)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
gid_t
|
gid_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
uid_t
|
uid_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
gid_t
|
gid_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
uid_t
|
uid_t
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
link (char const *old_name, char const *new_name)
|
link (char const *old_name, char const *new_name)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ ssize_t
|
||||||
read (int filedes, void *buffer, size_t size)
|
read (int filedes, void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
long long_filedes = filedes;
|
long long_filedes = filedes;
|
||||||
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, buffer, size);
|
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, (long) buffer, (long) size);
|
||||||
if (__mes_debug () > 4)
|
if (__mes_debug () > 4)
|
||||||
{
|
{
|
||||||
if (bytes == 1)
|
if (bytes == 1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
rmdir (char const *file_name)
|
rmdir (char const *file_name)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ sighandler_t
|
||||||
signal (int signum, sighandler_t action)
|
signal (int signum, sighandler_t action)
|
||||||
{
|
{
|
||||||
#if __i386__
|
#if __i386__
|
||||||
return _sys_call2 (SYS_signal, signum, action);
|
return (sighandler_t) _sys_call2 (SYS_signal, signum, (long) action);
|
||||||
#else
|
#else
|
||||||
static struct sigaction setup_action = { 0 };
|
static struct sigaction setup_action = { 0 };
|
||||||
static struct sigaction old = { 0 };
|
static struct sigaction old = { 0 };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,16 +19,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/* Linux' SYS_time syscall is a compatibility shim for SYS_gettimeofday.
|
|
||||||
Therefore, prefer SYS_gettimeofday. */
|
|
||||||
|
|
||||||
#if defined (SYS_gettimeofday)
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
time_t
|
time_t
|
||||||
time (time_t * result)
|
time (time_t * result)
|
||||||
|
@ -41,31 +35,3 @@ time (time_t * result)
|
||||||
*result = tv.tv_sec;
|
*result = tv.tv_sec;
|
||||||
return tv.tv_sec;
|
return tv.tv_sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined (SYS_time)
|
|
||||||
|
|
||||||
time_t
|
|
||||||
time (time_t * result)
|
|
||||||
{
|
|
||||||
return _sys_call1 (SYS_time, (long) result);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#warning there is no time
|
|
||||||
|
|
||||||
#include <mes/lib.h>
|
|
||||||
|
|
||||||
time_t
|
|
||||||
time (time_t * result)
|
|
||||||
{
|
|
||||||
static int stub = 0;
|
|
||||||
if (__mes_debug () && !stub)
|
|
||||||
eputs ("time stub\n");
|
|
||||||
stub = 1;
|
|
||||||
if (result)
|
|
||||||
*result = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
unlink (char const *file_name)
|
unlink (char const *file_name)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
execve (char const *file_name, char **argv, char **env)
|
execve (char const *file_name, char **argv, char **env)
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/syscall.h>
|
||||||
|
#include <arch/syscall.h>
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,16 +19,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
char *__tv;
|
||||||
|
|
||||||
long
|
long
|
||||||
time (long* result)
|
time (long* result)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
struct timeval tv;
|
if (__tv == 0)
|
||||||
struct timezone tz;
|
__tv = malloc (sizeof (struct timeval));
|
||||||
r = _sys_call2 (SYS_gettimeofday, tv, tz);
|
struct timeval *tv = __tv;
|
||||||
|
r = _sys_call2 (SYS_gettimeofday, tv, 0);
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
#include <linux/syscall.h>
|
#include <linux/syscall.h>
|
||||||
#include <syscall.h>
|
#include <arch/syscall.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -19,14 +19,30 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
__assert_fail (char *s)
|
__assert_fail (char const *msg, char const *file, unsigned line,
|
||||||
|
char const *function)
|
||||||
{
|
{
|
||||||
|
if (file && file[0])
|
||||||
|
{
|
||||||
|
eputs (file);
|
||||||
|
eputs (":");
|
||||||
|
}
|
||||||
|
if (line)
|
||||||
|
{
|
||||||
|
eputs (itoa (line));
|
||||||
|
eputs (":");
|
||||||
|
}
|
||||||
|
if (function && function[0])
|
||||||
|
{
|
||||||
|
eputs (function);
|
||||||
|
eputs (":");
|
||||||
|
}
|
||||||
eputs ("assert fail: ");
|
eputs ("assert fail: ");
|
||||||
eputs (s);
|
eputs (msg);
|
||||||
eputs ("\n");
|
eputs ("\n");
|
||||||
char *fail = s;
|
char *fail = 0;
|
||||||
fail = 0;
|
|
||||||
fail[0] = 0;
|
fail[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
* Copyright © 2022 Rick Masters <grick23@gmail.com>
|
* Copyright © 2022,2023 Rick Masters <grick23@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -43,10 +43,15 @@ abtol (char const **p, int base)
|
||||||
while (isnumber (s[0], base) != 0)
|
while (isnumber (s[0], base) != 0)
|
||||||
{
|
{
|
||||||
i = i * base;
|
i = i * base;
|
||||||
if (s[0] > '9')
|
if (s[0] >= 'a')
|
||||||
m = 'a' - 10;
|
m = 'a' - 10;
|
||||||
else
|
else
|
||||||
m = '0';
|
{
|
||||||
|
if (s[0] >= 'A')
|
||||||
|
m = 'A' - 10;
|
||||||
|
else
|
||||||
|
m = '0';
|
||||||
|
}
|
||||||
i = i + s[0] - m;
|
i = i + s[0] - m;
|
||||||
s = s + 1;
|
s = s + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
* Copyright © 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
||||||
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -20,11 +20,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib.h>
|
#include <mes/lib.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
assert_msg (int bool, char *msg)
|
assert_msg (int bool, char *msg)
|
||||||
{
|
{
|
||||||
if (bool == 0)
|
if (bool == 0)
|
||||||
__assert_fail (msg);
|
__assert_fail (msg, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
vfscanf (FILE * stream, char const *template, va_list ap)
|
vfscanf (FILE * stream, char const *template, va_list ap)
|
||||||
|
@ -76,7 +77,7 @@ vfscanf (FILE * stream, char const *template, va_list ap)
|
||||||
ungetc (p, stream);
|
ungetc (p, stream);
|
||||||
*q = 0;
|
*q = 0;
|
||||||
q = buf;
|
q = buf;
|
||||||
*d = abtol (&q, 10);
|
*d = abtol ((char const**)&q, 10);
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,6 @@ mbstowcs (wchar_t * wstring, char const *string, size_t size)
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("mbstowcs stub\n");
|
eputs ("mbstowcs stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
strcpy (wstring, string);
|
strcpy ((char*)wstring, string);
|
||||||
return strlen (string);
|
return strlen (string);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
### GNU Mes --- Maxwell Equations of Software
|
### GNU Mes --- Maxwell Equations of Software
|
||||||
### Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
### Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
### Copyright © 2018 Peter De Wachter <pdewacht@gmail.com>
|
### Copyright © 2018 Peter De Wachter <pdewacht@gmail.com>
|
||||||
|
### Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
|
||||||
###
|
###
|
||||||
### This file is part of GNU Mes.
|
### This file is part of GNU Mes.
|
||||||
###
|
###
|
||||||
|
@ -123,10 +124,14 @@ DEFINE mov____%rdx,%rax 4889d0
|
||||||
DEFINE mov____%rdx,%rdi 4889d7
|
DEFINE mov____%rdx,%rdi 4889d7
|
||||||
DEFINE mov____%rsi,(%rdi) 488937
|
DEFINE mov____%rsi,(%rdi) 488937
|
||||||
DEFINE mov____%rsp,%rbp 4889e5
|
DEFINE mov____%rsp,%rbp 4889e5
|
||||||
|
DEFINE mov____%si,(%rdi) 668937
|
||||||
|
DEFINE mov____%sil,(%rdi) 448837
|
||||||
DEFINE mov____(%rax),%eax 8b00
|
DEFINE mov____(%rax),%eax 8b00
|
||||||
DEFINE mov____(%rax),%esi 8b30
|
DEFINE mov____(%rax),%esi 8b30
|
||||||
DEFINE mov____(%rax),%rax 488b00
|
DEFINE mov____(%rax),%rax 488b00
|
||||||
DEFINE mov____(%rax),%rsi 488b30
|
DEFINE mov____(%rax),%rsi 488b30
|
||||||
|
DEFINE mov____(%rax),%si 668b30
|
||||||
|
DEFINE mov____(%rax),%sil 408a30
|
||||||
DEFINE mov____(%rdi),%edi 8b3f
|
DEFINE mov____(%rdi),%edi 8b3f
|
||||||
DEFINE mov____(%rdi),%rdi 488b3f
|
DEFINE mov____(%rdi),%rdi 488b3f
|
||||||
DEFINE mov____0x32(%rbp),%rax 488b85
|
DEFINE mov____0x32(%rbp),%rax 488b85
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;;; -*-scheme-*-
|
;;; -*-scheme-*-
|
||||||
|
|
||||||
;;; GNU Mes --- Maxwell Equations of Software
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Mes.
|
;;; This file is part of GNU Mes.
|
||||||
;;;
|
;;;
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
(define welcome
|
(define welcome
|
||||||
(string-append "GNU Mes " %version "
|
(string-append "GNU Mes " %version "
|
||||||
Copyright (C) 2016,2017,2018,2019,2020,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
Copyright (C) 2016,2017,2018,2019,2020,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
Copyright (C) 2019,2020,2021 Danny Milosavljevic <dannym@scratchpost.org>
|
Copyright (C) 2019,2020,2021 Danny Milosavljevic <dannym@scratchpost.org>
|
||||||
and others.
|
and others.
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ Options:
|
||||||
--arch=ARCH compile for ARCH [~a]
|
--arch=ARCH compile for ARCH [~a]
|
||||||
--kernel=ARCH compile for KERNEL [~a]
|
--kernel=ARCH compile for KERNEL [~a]
|
||||||
-dumpmachine display the compiler's target machine
|
-dumpmachine display the compiler's target machine
|
||||||
--base-address=ADRRESS
|
--base-address=ADDRESS
|
||||||
use BaseAddress ADDRESS [0x1000000]
|
use BaseAddress ADDRESS [0x1000000]
|
||||||
--numbered-arch mescc-tools use numbered arch
|
--numbered-arch mescc-tools use numbered arch
|
||||||
-D DEFINE[=VALUE] define DEFINE [VALUE=1]
|
-D DEFINE[=VALUE] define DEFINE [VALUE=1]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Mes --- Maxwell Equations of Software
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
;;; Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
|
;;; Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Mes.
|
;;; This file is part of GNU Mes.
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
#:use-module (ice-9 pretty-print)
|
#:use-module (ice-9 pretty-print)
|
||||||
#:use-module (ice-9 getopt-long)
|
#:use-module (ice-9 getopt-long)
|
||||||
#:use-module (mes mes-0)
|
|
||||||
#:use-module (mes misc)
|
#:use-module (mes misc)
|
||||||
|
|
||||||
#:use-module (mescc info)
|
#:use-module (mescc info)
|
||||||
|
@ -40,10 +39,9 @@
|
||||||
mescc:link
|
mescc:link
|
||||||
multi-opt))
|
multi-opt))
|
||||||
|
|
||||||
(define GUILE-with-output-to-file with-output-to-file)
|
(define (with-output-to-file* file-name thunk)
|
||||||
(define (with-output-to-file file-name thunk)
|
|
||||||
(if (equal? file-name "-") (thunk)
|
(if (equal? file-name "-") (thunk)
|
||||||
(GUILE-with-output-to-file file-name thunk)))
|
(with-output-to-file file-name thunk)))
|
||||||
|
|
||||||
(define (mescc:preprocess options)
|
(define (mescc:preprocess options)
|
||||||
(let* ((pretty-print/write (string->symbol (option-ref options 'write (if guile? "pretty-print" "write"))))
|
(let* ((pretty-print/write (string->symbol (option-ref options 'write (if guile? "pretty-print" "write"))))
|
||||||
|
@ -64,7 +62,7 @@
|
||||||
(arch (arch-get options))
|
(arch (arch-get options))
|
||||||
(defines (append (arch-get-defines options) defines))
|
(defines (append (arch-get-defines options) defines))
|
||||||
(verbose? (count-opt options 'verbose)))
|
(verbose? (count-opt options 'verbose)))
|
||||||
(with-output-to-file ast-file-name
|
(with-output-to-file* ast-file-name
|
||||||
(lambda _ (for-each (cut c->ast prefix defines includes arch pretty-print/write verbose? <>) files)))))
|
(lambda _ (for-each (cut c->ast prefix defines includes arch pretty-print/write verbose? <>) files)))))
|
||||||
|
|
||||||
(define (c->ast prefix defines includes arch write verbose? file-name)
|
(define (c->ast prefix defines includes arch write verbose? file-name)
|
||||||
|
@ -89,7 +87,7 @@
|
||||||
(filter (negate (cut eq? <> 'functions)) align))))
|
(filter (negate (cut eq? <> 'functions)) align))))
|
||||||
(when verbose?
|
(when verbose?
|
||||||
(format (current-error-port) "dumping: ~a\n" M1-file-name))
|
(format (current-error-port) "dumping: ~a\n" M1-file-name))
|
||||||
(with-output-to-file M1-file-name
|
(with-output-to-file* M1-file-name
|
||||||
(cut infos->M1 M1-file-name infos #:align align #:verbose? verbose?))
|
(cut infos->M1 M1-file-name infos #:align align #:verbose? verbose?))
|
||||||
M1-file-name))
|
M1-file-name))
|
||||||
|
|
||||||
|
@ -183,7 +181,7 @@
|
||||||
(filter (negate (cut eq? <> 'functions)) align))))
|
(filter (negate (cut eq? <> 'functions)) align))))
|
||||||
(when verbose?
|
(when verbose?
|
||||||
(format (current-error-port) "dumping: ~a\n" M1-file-name))
|
(format (current-error-port) "dumping: ~a\n" M1-file-name))
|
||||||
(with-output-to-file M1-file-name
|
(with-output-to-file* M1-file-name
|
||||||
(cut infos->M1 M1-file-name infos #:align align))
|
(cut infos->M1 M1-file-name infos #:align align))
|
||||||
(or (M1->hex2 options (list M1-file-name))
|
(or (M1->hex2 options (list M1-file-name))
|
||||||
(exit 1))))
|
(exit 1))))
|
||||||
|
|
44
simple.make
44
simple.make
|
@ -1,6 +1,6 @@
|
||||||
# GNU Mes --- Maxwell Equations of Software
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
# Copyright © 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
# Copyright © 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
||||||
# Copyright © 2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2018,2019,2020,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Mes.
|
# This file is part of GNU Mes.
|
||||||
#
|
#
|
||||||
|
@ -33,7 +33,7 @@ M2_PLANET_FUBAR = i386
|
||||||
|
|
||||||
#M2_PLANET_ARCH = amd64
|
#M2_PLANET_ARCH = amd64
|
||||||
#M2_PLANET_FUBAR = amd64
|
#M2_PLANET_FUBAR = amd64
|
||||||
M2_PLANET_FLAGS = --debug --architecture $(M2_PLANET_ARCH)
|
M2_PLANET_FLAGS = --bootstrap-mode --debug --architecture $(M2_PLANET_ARCH)
|
||||||
|
|
||||||
CFLAGS:= \
|
CFLAGS:= \
|
||||||
$(CFLAGS) \
|
$(CFLAGS) \
|
||||||
|
@ -76,12 +76,14 @@ M2_SOURCES = \
|
||||||
lib/linux/x86-mes-m2/crt1.c \
|
lib/linux/x86-mes-m2/crt1.c \
|
||||||
lib/linux/x86-mes-m2/_exit.c \
|
lib/linux/x86-mes-m2/_exit.c \
|
||||||
lib/linux/x86-mes-m2/_write.c \
|
lib/linux/x86-mes-m2/_write.c \
|
||||||
|
lib/mes/globals.c \
|
||||||
lib/m2/cast.c \
|
lib/m2/cast.c \
|
||||||
lib/m2/exit.c \
|
lib/m2/exit.c \
|
||||||
lib/mes/write.c \
|
lib/mes/mini-write.c \
|
||||||
lib/linux/x86-mes-m2/syscall.c \
|
lib/linux/x86-mes-m2/syscall.c \
|
||||||
|
lib/stub/__raise.c \
|
||||||
lib/linux/brk.c \
|
lib/linux/brk.c \
|
||||||
lib/stdlib/malloc.c \
|
lib/m2/malloc.c \
|
||||||
lib/string/memset.c \
|
lib/string/memset.c \
|
||||||
\
|
\
|
||||||
lib/m2/read.c \
|
lib/m2/read.c \
|
||||||
|
@ -170,7 +172,8 @@ GCC_SOURCES = \
|
||||||
lib/mes/itoa.c \
|
lib/mes/itoa.c \
|
||||||
lib/mes/ltoa.c \
|
lib/mes/ltoa.c \
|
||||||
lib/mes/assert_msg.c \
|
lib/mes/assert_msg.c \
|
||||||
src/cc.c
|
src/cc.c \
|
||||||
|
src/globals.c
|
||||||
|
|
||||||
mes-gcc: bin/mes-gcc
|
mes-gcc: bin/mes-gcc
|
||||||
mes-m2: bin/mes-m2
|
mes-m2: bin/mes-m2
|
||||||
|
@ -179,11 +182,11 @@ gc-gcc: bin/gc-gcc
|
||||||
gc-m2: bin/gc-m2
|
gc-m2: bin/gc-m2
|
||||||
|
|
||||||
bin/mes-gcc: simple.make $(GCC_SOURCES) $(MES_SOURCES) $(INCLUDES) | bin
|
bin/mes-gcc: simple.make $(GCC_SOURCES) $(MES_SOURCES) $(INCLUDES) | bin
|
||||||
$(CC) $(CFLAGS) $(GCC_SOURCES) $(MES_SOURCES) -o $@
|
$(CC) $(CFLAGS) -o $@ $(GCC_SOURCES) $(MES_SOURCES)
|
||||||
cp -f $@ bin/mes
|
cp -f $@ bin/mes
|
||||||
|
|
||||||
bin/gc-gcc: simple.make $(GCC_SOURCES) $(TEST_GC_SOURCES) $(INCLUDES) | bin
|
bin/gc-gcc: simple.make $(GCC_SOURCES) $(TEST_GC_SOURCES) $(INCLUDES) | bin
|
||||||
$(CC) $(CFLAGS) -D GC_TEST=1 $(GCC_SOURCES) $(TEST_GC_SOURCES) -o $@
|
$(CC) $(CFLAGS) -D GC_TEST=1 -o $@ $(GCC_SOURCES) $(TEST_GC_SOURCES)
|
||||||
|
|
||||||
M2_PLANET_INCLUDES = \
|
M2_PLANET_INCLUDES = \
|
||||||
include/m2/lib.h \
|
include/m2/lib.h \
|
||||||
|
@ -198,10 +201,10 @@ M2_PLANET_SOURCES = \
|
||||||
$(M2_PLANET_INCLUDES:%.h=%.h) \
|
$(M2_PLANET_INCLUDES:%.h=%.h) \
|
||||||
$(M2_SOURCES)
|
$(M2_SOURCES)
|
||||||
|
|
||||||
m2/mes-m2.M1: simple.make $(M2_PLANET_SOURCES) $(MES_SOURCES) $(M2_PLANET_INCLUDES) | bin
|
m2/mes-m2.M1: simple.make $(M2_PLANET_SOURCES) $(MES_SOURCES) $(M2_PLANET_INCLUDES) | m2
|
||||||
$(M2_PLANET) $(M2_PLANET_FLAGS) $(M2_PLANET_SOURCES:%=-f %) $(MES_SOURCES:%.c=-f %.c) -o $@ || rm -f $@
|
$(M2_PLANET) $(M2_PLANET_FLAGS) $(M2_PLANET_SOURCES:%=-f %) $(MES_SOURCES:%.c=-f %.c) -o $@ || rm -f $@
|
||||||
|
|
||||||
m2/mes-m2.blood-elf.M1: m2/mes-m2.M1
|
m2/mes-m2.blood-elf.M1: m2/mes-m2.M1 | m2
|
||||||
blood-elf --little-endian -f $< -o $@
|
blood-elf --little-endian -f $< -o $@
|
||||||
|
|
||||||
m2/mes-m2.hex2: m2/mes-m2.blood-elf.M1
|
m2/mes-m2.hex2: m2/mes-m2.blood-elf.M1
|
||||||
|
@ -215,13 +218,13 @@ m2/mes-m2.hex2: m2/mes-m2.blood-elf.M1
|
||||||
-f m2/mes-m2.blood-elf.M1 \
|
-f m2/mes-m2.blood-elf.M1 \
|
||||||
-o $@
|
-o $@
|
||||||
|
|
||||||
bin/mes-m2: m2/mes-m2.hex2
|
bin/mes-m2: m2/mes-m2.hex2 | bin
|
||||||
hex2 \
|
hex2 \
|
||||||
--architecture $(M2_PLANET_ARCH) \
|
--architecture $(M2_PLANET_ARCH) \
|
||||||
--little-endian \
|
--little-endian \
|
||||||
--base-address 0x1000000 \
|
--base-address 0x1000000 \
|
||||||
-f lib/x86-mes/elf32-header.hex2 \
|
-f lib/linux/x86-mes/elf32-header.hex2 \
|
||||||
-f m2/mes-m2.hex2 \
|
-f m2/mes-m2.hex2 \
|
||||||
-o $@
|
-o $@
|
||||||
cp -f $@ bin/mes
|
cp -f $@ bin/mes
|
||||||
|
|
||||||
|
@ -250,14 +253,17 @@ check-gc: $(MES)
|
||||||
check-mescc: $(MES)
|
check-mescc: $(MES)
|
||||||
rm -f a.out
|
rm -f a.out
|
||||||
# this already needs succesful GC
|
# this already needs succesful GC
|
||||||
# MES_DEBUG=1 MES_PREFIX=mes MES=$(MES) sh -x scripts/mescc -- -I include -nostdlib lib/string/strlen.c lib/mes/eputs.c scaffold/hello.c
|
# LIBRARY_PATH=lib MES_DEBUG=1 MES_PREFIX=mes MES=$(MES) sh -x scripts/mescc -- -I include -nostdlib lib/mes/globals.c lib/string/strlen.c lib/mes/eputs.c scaffold/hello.c
|
||||||
MES_DEBUG=1 MES_PREFIX=mes MES=$(MES) sh -x scripts/mescc -- -m 32 -I include -nostdlib lib/linux/$(MESCC_CPU)-mes-mescc/crt1.c scaffold/main.c
|
LIBRARY_PATH=lib MES_DEBUG=1 MES_PREFIX=mes MES=$(MES) sh -x scripts/mescc -- -m 32 -I include -nostdlib lib/mes/globals.c lib/linux/$(MESCC_CPU)-mes-mescc/crt1.c scaffold/main.c
|
||||||
./a.out; r=$$?; if [ $$r != 42 ]; then exit 1; fi
|
./a.out; r=$$?; if [ $$r != 42 ]; then exit 1; fi
|
||||||
|
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
bin:
|
bin:
|
||||||
mkdir -p bin
|
mkdir -p $@
|
||||||
|
|
||||||
|
m2:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
TAGS:
|
TAGS:
|
||||||
etags $(shell find . -name '*.c' -o -name '*.h') --language=scheme $(shell find mes module -name '*.mes' -o -name '*.scm')
|
etags $(shell find . -name '*.c' -o -name '*.h') --language=scheme $(shell find mes module -name '*.mes' -o -name '*.scm')
|
||||||
|
|
313
simple.sh
313
simple.sh
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
# GNU Mes --- Maxwell Equations of Software
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
# Copyright © 2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Mes.
|
# This file is part of GNU Mes.
|
||||||
#
|
#
|
||||||
|
@ -36,47 +36,50 @@ cat > include/mes/config.h <<EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
## Build ##
|
## Build ##
|
||||||
gcc -g -D HAVE_CONFIG_H=1 -I include\
|
gcc -g -D HAVE_CONFIG_H=1 \
|
||||||
-o out-system-libc/mes\
|
-I include \
|
||||||
\
|
-I include/$mes_kernel/$mes_cpu \
|
||||||
lib/mes/eputs.c\
|
-o out-system-libc/mes \
|
||||||
lib/mes/oputs.c\
|
\
|
||||||
\
|
lib/mes/eputs.c \
|
||||||
lib/mes/cast.c\
|
lib/mes/oputs.c \
|
||||||
lib/mes/itoa.c\
|
\
|
||||||
lib/mes/ltoa.c\
|
lib/mes/cast.c \
|
||||||
lib/mes/ltoab.c\
|
lib/mes/itoa.c \
|
||||||
lib/mes/ultoa.c\
|
lib/mes/ltoa.c \
|
||||||
lib/mes/utoa.c\
|
lib/mes/ltoab.c \
|
||||||
lib/mes/eputc.c\
|
lib/mes/ultoa.c \
|
||||||
lib/mes/fdgetc.c\
|
lib/mes/utoa.c \
|
||||||
lib/mes/fdputc.c\
|
lib/mes/eputc.c \
|
||||||
lib/mes/fdputs.c\
|
lib/mes/fdgetc.c \
|
||||||
lib/mes/fdungetc.c\
|
lib/mes/fdputc.c \
|
||||||
lib/mes/mes_open.c\
|
lib/mes/fdputs.c \
|
||||||
lib/mes/ntoab.c\
|
lib/mes/fdungetc.c \
|
||||||
lib/mes/oputc.c\
|
lib/mes/mes_open.c \
|
||||||
\
|
lib/mes/ntoab.c \
|
||||||
lib/mes/__assert_fail.c\
|
lib/mes/oputc.c \
|
||||||
lib/mes/assert_msg.c\
|
\
|
||||||
\
|
lib/mes/__assert_fail.c \
|
||||||
src/builtins.c\
|
lib/mes/assert_msg.c \
|
||||||
src/cc.c\
|
\
|
||||||
src/core.c\
|
src/builtins.c \
|
||||||
src/display.c\
|
src/cc.c \
|
||||||
src/eval-apply.c\
|
src/core.c \
|
||||||
src/gc.c\
|
src/display.c \
|
||||||
src/hash.c\
|
src/eval-apply.c \
|
||||||
src/lib.c\
|
src/gc.c \
|
||||||
src/math.c\
|
src/globals.c \
|
||||||
src/mes.c\
|
src/hash.c \
|
||||||
src/module.c\
|
src/lib.c \
|
||||||
src/posix.c\
|
src/math.c \
|
||||||
src/reader.c\
|
src/mes.c \
|
||||||
src/stack.c\
|
src/module.c \
|
||||||
src/string.c\
|
src/posix.c \
|
||||||
src/struct.c\
|
src/reader.c \
|
||||||
src/symbol.c\
|
src/stack.c \
|
||||||
|
src/string.c \
|
||||||
|
src/struct.c \
|
||||||
|
src/symbol.c \
|
||||||
src/vector.c
|
src/vector.c
|
||||||
|
|
||||||
## Check ##
|
## Check ##
|
||||||
|
@ -162,117 +165,125 @@ cat > include/mes/config.h <<EOF
|
||||||
#define MES_VERSION "git"
|
#define MES_VERSION "git"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
mkdir -p include/arch
|
||||||
|
cp -f include/$mes_kernel/$mes_cpu/kernel-stat.h include/arch
|
||||||
|
cp -f include/$mes_kernel/$mes_cpu/syscall.h include/arch
|
||||||
|
|
||||||
## Build ##
|
## Build ##
|
||||||
compiler=gcc # not configurable
|
compiler=gcc # not configurable
|
||||||
$CC -g -D HAVE_CONFIG_H=1 -I include -I include/$mes_kernel/$mes_cpu\
|
$CC -g -D HAVE_CONFIG_H=1 \
|
||||||
-nostdinc -nostdlib -fno-builtin -fno-stack-protector\
|
-I include -I include/$mes_kernel/$mes_cpu \
|
||||||
-o out-mes/mes\
|
-nostdinc -nostdlib \
|
||||||
\
|
-fno-builtin -fno-stack-protector \
|
||||||
lib/linux/$mes_cpu-mes-gcc/crt1.c\
|
-o out-mes/mes \
|
||||||
\
|
\
|
||||||
lib/mes/globals.c\
|
lib/linux/$mes_cpu-mes-gcc/crt1.c \
|
||||||
lib/mes/eputs.c\
|
\
|
||||||
lib/mes/oputs.c\
|
lib/mes/globals.c \
|
||||||
\
|
lib/mes/eputs.c \
|
||||||
lib/posix/write.c\
|
lib/mes/oputs.c \
|
||||||
lib/string/strlen.c\
|
\
|
||||||
lib/stdlib/puts.c\
|
lib/posix/write.c \
|
||||||
lib/stdlib/exit.c\
|
lib/string/strlen.c \
|
||||||
lib/$mes_kernel/$mes_cpu-mes-$compiler/_exit.c\
|
lib/stdlib/puts.c \
|
||||||
lib/$mes_kernel/$mes_cpu-mes-$compiler/_write.c\
|
lib/stdlib/exit.c \
|
||||||
\
|
lib/$mes_kernel/$mes_cpu-mes-$compiler/_exit.c \
|
||||||
lib/mes/cast.c\
|
lib/$mes_kernel/$mes_cpu-mes-$compiler/_write.c \
|
||||||
lib/mes/itoa.c\
|
\
|
||||||
lib/mes/ltoa.c\
|
lib/mes/cast.c \
|
||||||
lib/mes/ltoab.c\
|
lib/mes/itoa.c \
|
||||||
lib/mes/ultoa.c\
|
lib/mes/ltoa.c \
|
||||||
lib/mes/utoa.c\
|
lib/mes/ltoab.c \
|
||||||
lib/mes/eputc.c\
|
lib/mes/ultoa.c \
|
||||||
lib/mes/fdgetc.c\
|
lib/mes/utoa.c \
|
||||||
lib/mes/fdputc.c\
|
lib/mes/eputc.c \
|
||||||
lib/mes/fdputs.c\
|
lib/mes/fdgetc.c \
|
||||||
lib/mes/fdungetc.c\
|
lib/mes/fdputc.c \
|
||||||
lib/mes/mes_open.c\
|
lib/mes/fdputs.c \
|
||||||
lib/mes/ntoab.c\
|
lib/mes/fdungetc.c \
|
||||||
lib/mes/oputc.c\
|
lib/mes/mes_open.c \
|
||||||
\
|
lib/mes/ntoab.c \
|
||||||
lib/stdlib/atoi.c\
|
lib/mes/oputc.c \
|
||||||
lib/mes/abtol.c\
|
\
|
||||||
lib/ctype/isdigit.c\
|
lib/stdlib/atoi.c \
|
||||||
lib/ctype/isnumber.c\
|
lib/mes/abtol.c \
|
||||||
lib/ctype/isspace.c\
|
lib/ctype/isdigit.c \
|
||||||
lib/ctype/isxdigit.c\
|
lib/ctype/isnumber.c \
|
||||||
\
|
lib/ctype/isspace.c \
|
||||||
lib/mes/__assert_fail.c\
|
lib/ctype/isxdigit.c \
|
||||||
lib/mes/assert_msg.c\
|
\
|
||||||
lib/mes/__buffered_read.c\
|
lib/stub/__raise.c \
|
||||||
lib/mes/__mes_debug.c\
|
lib/mes/__assert_fail.c \
|
||||||
lib/posix/execv.c\
|
lib/mes/assert_msg.c \
|
||||||
lib/posix/getcwd.c\
|
lib/mes/__buffered_read.c \
|
||||||
lib/posix/getenv.c\
|
lib/mes/__mes_debug.c \
|
||||||
lib/posix/isatty.c\
|
lib/posix/execv.c \
|
||||||
lib/posix/open.c\
|
lib/posix/getcwd.c \
|
||||||
lib/posix/setenv.c\
|
lib/posix/getenv.c \
|
||||||
lib/posix/wait.c\
|
lib/posix/isatty.c \
|
||||||
lib/stdio/fgetc.c\
|
lib/posix/open.c \
|
||||||
lib/stdio/fputc.c\
|
lib/posix/setenv.c \
|
||||||
lib/stdio/fputs.c\
|
lib/posix/wait.c \
|
||||||
lib/stdio/getc.c\
|
lib/stdio/fgetc.c \
|
||||||
lib/stdio/getchar.c\
|
lib/stdio/fputc.c \
|
||||||
lib/stdio/putc.c\
|
lib/stdio/fputs.c \
|
||||||
lib/stdio/putchar.c\
|
lib/stdio/getc.c \
|
||||||
lib/stdio/ungetc.c\
|
lib/stdio/getchar.c \
|
||||||
lib/stdlib/free.c\
|
lib/stdio/putc.c \
|
||||||
lib/stdlib/malloc.c\
|
lib/stdio/putchar.c \
|
||||||
lib/stdlib/realloc.c\
|
lib/stdio/ungetc.c \
|
||||||
lib/string/memchr.c\
|
lib/stdlib/free.c \
|
||||||
lib/string/memcmp.c\
|
lib/linux/malloc.c \
|
||||||
lib/string/memcpy.c\
|
lib/stdlib/realloc.c \
|
||||||
lib/string/memmove.c\
|
lib/string/memchr.c \
|
||||||
lib/string/memset.c\
|
lib/string/memcmp.c \
|
||||||
lib/string/strcmp.c\
|
lib/string/memcpy.c \
|
||||||
lib/string/strcpy.c\
|
lib/string/memmove.c \
|
||||||
lib/string/strncmp.c\
|
lib/string/memset.c \
|
||||||
\
|
lib/string/strcmp.c \
|
||||||
lib/linux/lseek.c\
|
lib/string/strcpy.c \
|
||||||
\
|
lib/string/strncmp.c \
|
||||||
lib/linux/access.c\
|
\
|
||||||
lib/linux/brk.c\
|
lib/linux/lseek.c \
|
||||||
lib/linux/chmod.c\
|
\
|
||||||
lib/linux/clock_gettime.c\
|
lib/linux/access.c \
|
||||||
lib/linux/dup.c\
|
lib/linux/brk.c \
|
||||||
lib/linux/dup2.c\
|
lib/linux/chmod.c \
|
||||||
lib/linux/execve.c\
|
lib/linux/clock_gettime.c \
|
||||||
lib/linux/fork.c\
|
lib/linux/dup.c \
|
||||||
lib/linux/fsync.c\
|
lib/linux/dup2.c \
|
||||||
lib/linux/_getcwd.c\
|
lib/linux/execve.c \
|
||||||
lib/linux/gettimeofday.c\
|
lib/linux/fork.c \
|
||||||
lib/linux/ioctl3.c\
|
lib/linux/fsync.c \
|
||||||
lib/linux/_open3.c\
|
lib/linux/_getcwd.c \
|
||||||
lib/linux/read.c\
|
lib/linux/gettimeofday.c \
|
||||||
lib/linux/_read.c\
|
lib/linux/ioctl3.c \
|
||||||
lib/linux/time.c\
|
lib/linux/_open3.c \
|
||||||
lib/linux/unlink.c\
|
lib/linux/read.c \
|
||||||
lib/linux/waitpid.c\
|
lib/linux/_read.c \
|
||||||
lib/linux/$mes_cpu-mes-$compiler/syscall.c\
|
lib/linux/time.c \
|
||||||
\
|
lib/linux/unlink.c \
|
||||||
src/builtins.c\
|
lib/linux/waitpid.c \
|
||||||
src/cc.c\
|
lib/linux/$mes_cpu-mes-$compiler/syscall.c \
|
||||||
src/core.c\
|
\
|
||||||
src/display.c\
|
src/builtins.c \
|
||||||
src/eval-apply.c\
|
src/cc.c \
|
||||||
src/gc.c\
|
src/core.c \
|
||||||
src/hash.c\
|
src/display.c \
|
||||||
src/lib.c\
|
src/eval-apply.c \
|
||||||
src/math.c\
|
src/gc.c \
|
||||||
src/mes.c\
|
src/globals.c \
|
||||||
src/module.c\
|
src/hash.c \
|
||||||
src/posix.c\
|
src/lib.c \
|
||||||
src/reader.c\
|
src/math.c \
|
||||||
src/stack.c\
|
src/mes.c \
|
||||||
src/string.c\
|
src/module.c \
|
||||||
src/struct.c\
|
src/posix.c \
|
||||||
src/symbol.c\
|
src/reader.c \
|
||||||
|
src/stack.c \
|
||||||
|
src/string.c \
|
||||||
|
src/struct.c \
|
||||||
|
src/symbol.c \
|
||||||
src/vector.c
|
src/vector.c
|
||||||
|
|
||||||
## Check ##
|
## Check ##
|
||||||
|
|
11
src/gc.c
11
src/gc.c
|
@ -1,6 +1,7 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
* Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -326,11 +327,11 @@ void
|
||||||
gc_up_arena ()
|
gc_up_arena ()
|
||||||
{
|
{
|
||||||
long old_arena_bytes = (ARENA_SIZE + JAM_SIZE) * sizeof (struct scm);
|
long old_arena_bytes = (ARENA_SIZE + JAM_SIZE) * sizeof (struct scm);
|
||||||
if (ARENA_SIZE >> 1 < MAX_ARENA_SIZE >> 2)
|
if (ARENA_SIZE / 2 < MAX_ARENA_SIZE / 4)
|
||||||
{
|
{
|
||||||
ARENA_SIZE = ARENA_SIZE << 1;
|
ARENA_SIZE = ARENA_SIZE * 2;
|
||||||
JAM_SIZE = JAM_SIZE << 1;
|
JAM_SIZE = JAM_SIZE * 2;
|
||||||
GC_SAFETY = GC_SAFETY << 1;
|
GC_SAFETY = GC_SAFETY * 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ARENA_SIZE = MAX_ARENA_SIZE - JAM_SIZE;
|
ARENA_SIZE = MAX_ARENA_SIZE - JAM_SIZE;
|
||||||
|
@ -448,7 +449,7 @@ void
|
||||||
gc_flip ()
|
gc_flip ()
|
||||||
{
|
{
|
||||||
if (g_free - g_news > JAM_SIZE)
|
if (g_free - g_news > JAM_SIZE)
|
||||||
JAM_SIZE = (g_free - g_news) + ((g_free - g_news) / 2);
|
JAM_SIZE = ((g_free - g_news) * 3) / 2;
|
||||||
|
|
||||||
cell_arena = g_cells - M2_CELL_SIZE; /* For debugging. */
|
cell_arena = g_cells - M2_CELL_SIZE; /* For debugging. */
|
||||||
gc_cellcpy (g_cells, g_news, (g_free - g_news) / M2_CELL_SIZE);
|
gc_cellcpy (g_cells, g_news, (g_free - g_news) / M2_CELL_SIZE);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
// char const *MES_VERSION = "0.24";
|
// char const *MES_VERSION = "0.24.2";
|
||||||
|
|
||||||
#if __M2_PLANET__
|
#if __M2_PLANET__
|
||||||
#define M2_CELL_SIZE 12
|
#define M2_CELL_SIZE 12
|
||||||
|
|
Loading…
Reference in New Issue