Compare commits

...

52 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen 69a71425f1
mescc: Mes C Library: Support gcc-4.6.4. WIP 2019-01-16 13:21:36 +01:00
Jan Nieuwenhuizen bbc65faa84
.dir-locals.el: Assert default GNU settings.
* .dir-locals.el: Assert default GNU settings.
2019-01-16 13:20:26 +01:00
Jan Nieuwenhuizen c410e4ad18
WIP typo in stage0 copyright headers. 2019-01-16 13:19:53 +01:00
Jan Nieuwenhuizen 5725e5a097
doc: Update WIP 2019-01-12 22:08:36 +01:00
Jan Nieuwenhuizen 1b10685770
build: simple.sh: M2-Planet first-aid. WIP 2019-01-12 22:08:35 +01:00
Jan Nieuwenhuizen 984fb447ae
build: Remove POSIX define, use WITH_GLIBC only. WIP 2019-01-12 22:08:34 +01:00
Jan Nieuwenhuizen 7291308484
mescc: Mes C Library: Fix compile warnings.
* include/libmes.h (dtoab, itoa, ltoa, ntoab, ultoa, utoa): Return
char* (WAS: char const*).
* lib/*/*c: Update, add missing includes.
2019-01-12 22:08:22 +01:00
Jan Nieuwenhuizen 4a78958133
mescc: Mes C Library: vsscanf: Increase count for scanned float.
* lib/stdio/vsscanf.c (vsscanf): Increase count for scanned float.
2019-01-12 22:08:22 +01:00
Jan Nieuwenhuizen 212cce5692
mescc: Mes C Library: Fix isatty.
* lib/posix/isatty.c (isatty): Test ioctl == 0.
* mes/module/mes/boot-0.scm.in: Update: no tty?: read from stdin.
2019-01-12 22:08:22 +01:00
Jan Nieuwenhuizen f9ceaac9b7
test: 50-getenv: Test PATH, allow to fail.
* lib/tests/posix/50-getenv.c (main): Test PATH.
* build-aux/check-mescc.sh (broken): Add 50-getenv.
2019-01-12 22:08:22 +01:00
Jan Nieuwenhuizen 570a05be3e
mes: Support map and for-each with lists of unequal length.
* mes/module/mes/base.mes (map): Support lists of unequal length.
* mes/module/mes/scm.mes (for-each): Likewise.
* module/mescc/compile.scm (expr->register): Fix compile warning.
* tests/scm.test ("map 1,2", "map 2,1", "for-each 1,2", "for-each
2,1": Test it.
2019-01-12 22:08:21 +01:00
Jan Nieuwenhuizen 64ccd5c9c2
mescc: Mes C Library: Use __ as global internal prefix.
* include/libmes-mini.h (g_stdin, g_stdout, g_stderr): Rename to
__stdin, __stdout, __stderr.  Update users.
2019-01-12 22:08:21 +01:00
Jan Nieuwenhuizen 338010d498
mescc: Mes C Library: Support GNU Sed: Fix ungetc.
* include/sys/resource.h (OPEN_MAX, RLIMIT_NOFILE): New macro.
* lib/libc.c: Add memset.c include.
* lib/libc+tcc.c: Remove memset.c include.
* lib/linux/tcc.c (close):
* lib/mes/fdgetc.c (__ungetc_buf): New global.
(_ungetc_pos, _ungetc_fd, _ungetc_buf): Remove.  Update users.
2019-01-12 22:08:19 +01:00
Jan Nieuwenhuizen ab6028e5bd
mescc: Mes C Library: Support GNU Tar: Fix getpwnam, getpwuid stubs.
* lib/stub/getpwnam.c (getpwnam): Return pointer to static struct
passwd.
* lib/stub/getpwuid.c (getpwuid): Likewise.
2019-01-12 22:01:43 +01:00
Jan Nieuwenhuizen 2fd4ce4e62
mescc: Mes C Library: Support GNU Tar: Add getgrgid, getgrnam, setgrent stub.
* include/grp.h: New file.
* lib/stub/getgrgid.c: New file.
* lib/stub/getgrnam.c: New file.
* lib/stub/setgrent.c: New file.
* lib/libc+gnu.c: Include them.
2019-01-12 22:01:43 +01:00
Jan Nieuwenhuizen 640ec0a9ea
mescc: Mes C Library: Support GNU Awk: Add wchar_t.
* include/sys/types.h (wchar_t): New typedef.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen f308c3f6bc
mescc: Mes C Library: Support GNU Awk: Add getpgid, getpgrp stubs.
* include/unistd.h (getpgid, getpgrp): Declare.
* lib/stub/getpgid.c: New file.
* lib/stub/getpgrp.c: New file.
* lib/libc+gnu.c: Include them.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen b1a96c2fc6
mescc: Mes C Library: Support GNU Tar: Add mktime stub, fix localtime stub.
* include/time.h (mktime): Declare.
* lib/stub/mktime.c: New stub.
* lib/libc+gnu.c: Include it.
* lib/stub/localtime.c (localtime): Return pointer to static struct
tm.  Avoids segfaults.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen 2b3fbf5ffa
mescc: Mes C Library: Support GNU Tar: Add creat, mknod.
* include/linux/x86_64/syscall.h (SYS_mknod): New macro.
* include/linux/x86/syscall.h (SYS_mknod): New macro.
* lib/linux/gnu.c (mknod): New function, use it.
* include/sys/stat.h: Declare it.
* include/fcntl.h (creat): New macro.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen 098baf52a8
mescc: Mes C Library: Support GNU Tar: Add missing defines.
* include/errno.h (ENXIO): New macro.
* include/sys/stat.h (S_IFIFO, S_ISFIFO): New macro.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen 532e5b0d2d
mescc: Mes C Library: Support GNU Bash: Add struct winsize.
* include/termio.h (struct winsize): New type.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen 73fb77c191
mescc: Mes C Library: Support GNU Awk: Implement atof.
* lib/stdlib/atoi.c: Update.
* lib/stdlib/atof.c: Rename from stub/atof.c; Implement.
* lib/libc+gnu.c: Update include.
* lib/libg.c: Update include.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen a2fbf3de11
mescc: Mes C Library: Bugfix for tcc-compiled exit assembly.
* lib/linux/x86-mes-gcc/mini.c (_exit): Add clobbered registers %eax,
%ebx.  Fixes always exit 1.
2019-01-12 22:01:42 +01:00
Jan Nieuwenhuizen 09a7722c21
mescc: Mes C Library: Support GNU Awk: Add dtoab, %f in vfprintf, vsnprintf.
* include/libmes.h (dtoab): Declare.
* lib/mes/ntoab.c (ntoab): Update.
* lib/mes/dtoab.c: New file.
* lib/tests/mes/90-dtoab.c: Test it.
* lib/tests/stdio/90-sprintf.c: Test it.
* build-aux/check-mescc.sh (tests): Run it, against...
* lib/tests/mes/90-dtoab.stdout: ...baseline.
* lib/stdio/vfprintf.c (vfprintf): Support %f, even more naive support
for %e, %E, %g, %G.
* lib/stdio/vsnprintf.c (vsnprintf): Likewise.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen 0ce74918c1
mescc: Mes C Library: Support GNU Awk: Add abtod, implementing sttrod.
* include/libmes.h (abtod): Declare.
* lib/mes/abtod.c: New file.
* lib/mes/abtol.c: Update.
* lib/stdlib/strtod.c: Use it to implement; move from stub/strtod.
* lib/tests/mes/90-abtod.c: Test it.
* lib/tests/mes/90-abtod.stdout: Baseline.
* build-aux/check-mescc.sh (tests): Run it.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen 85c108076a
mescc: Mes C Library: Support GNU Awk: vsscanf: Support %f.
* lib/stdio/vsscanf.c (vsscanf): Support %f.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen 288a25893c
mescc: Mes C Library: Support GNU Awk: Do not flush std files.
* lib/stdio/fflush.c (fflush): Do not flush std files.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen 539dcb2680
mescc: Mes C Library: Support GNU Awk: Add isgraph.
* lib/ctype/isgraph.c: New file.
* lib/libc+gnu.c: Include it.
* include/ctype.h: Add missing prototypes.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen ab9d47a72f
mescc: Mes C Library: Support GNU Tar: Add readlink, readlink.
* lib/linux/gnu.c (readlink, symlink): New function.
* include/unistd.h (readlink, symlink): Declare.
* include/linux/x86/syscall.h (SYS_readlink, SYS_symlink): New macro.
* include/linux/x86_64/syscall.h (SYS_symlink, SYS_readlink): New
macro.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen 73bb01dc13
mescc: Mes C Library: Support GNU Tar: Add execlp.
* lib/posix/execl.c (vexec): New function.
(execl): Use it.
* lib/posix/execlp.c: New file.
* lib/libc+gnu.c: Include it.
* include/unistd.h (execlp): Declare.
* lib/tests/posix/90-execlp.c: New file.
* lib/tests/posix/90-execlp.stdout: New file.
* build-aux/check-mescc.sh: Test it.
2019-01-12 22:01:41 +01:00
Jan Nieuwenhuizen 5f516870e6
test: Remove special characters from files.
* scaffold/tests/06-call-not-1.c: Rename from 06-call-!1.c.
* scaffold/tests/06-not-call-1.c: Rename from 06-!call-1.c.
* scaffold/tests/12-if-eq.c: Rename from 12-if-==.c.
* scaffold/tests/13-if-neq.c: Rename from 13-if-!=.c.
* scaffold/tests/15-if-not-f.c: Rename from 15-if-!f.c.
* scaffold/tests/21-char-array-simple.c: Rename from 21-char[]-simple.c.
* scaffold/tests/21-char-array.c: Rename from 21-char[].c.
* scaffold/tests/22-while-char-array.c: Rename from 22-while-char[].c.
* scaffold/tests/41-ternary.c: Rename from 41-?.c.
* scaffold/tests/7u-call-ternary.c: Rename from 7u-call-?.c.
* scaffold/tests/7u-ternary-expression.c: Rename from 7u-?-expression.c.
* build-aux/check-mescc.sh (tests): Update.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen 3b802ff77c
build: Support building with Gash.
* build-aux/check-mes.sh: Replace unspported $((..)) by $(expr ...).
* build-aux/check-mescc.sh: Likewise.
* build-aux/check-tcc.sh: Likewise.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen 472ea876d4
build: Configure: remove temp files.
* configure (gulp-pipe*): Remove .error.
(check-header-c): Remove .config.c.
(check-compile-c): Likewise.
(check-link-c): Likewise.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen f791a2505a
build: Remove mini-mes.
* scaffold/mini-mes.c: Remove.
* build-aux/build-mes.sh: Remove commented build instructions.
* .gitignore: Remove pattern.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen 9dbbe334b0
mescc: Mes C Library: Initialize streams in crt1.
* lib/linux/x86-mes-gcc/crt1.c: Initialize streams.
* lib/linux/x86-mes/crt1.c: Likewise.
* lib/linux/x86_64-mes-gcc/crt1.c: Likewise.
* lib/linux/x86_64-mes/crt1.c: Likewise.
* src/mes.c (main): Remove initialization of streams.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen 8b21ff5925
mescc: Mes C Library: Populate with function tests from scaffold.
* .gitignore: Update.
* build-aux/bootstrap.sh.in: Update.
* build-aux/build-mes.sh: Update.
* build-aux/check-mescc.sh: Update.
* lib/tests/assert/50-assert.c: Move from scaffold/tests/50-assert.c.
* lib/tests/dirent/90-readdir.c: Move from scaffold/tests/99-readdir.c.
* lib/tests/dirent/readdir.dir: Move from scaffold/tests/readdir.dir.
* lib/tests/io/90-stat.c: Move from scaffold/tests/92-stat.c.
* lib/tests/mes/30-oputs.c: Move from scaffold/tests/31-oputs.c.
* lib/tests/mes/50-itoa.c: Move from scaffold/tests/51-itoa.c.
* lib/tests/posix/90-unsetenv.c: Move from scaffold/tests/94-unsetenv.c.
* lib/tests/setjmp/80-setjmp.c: Move from scaffold/tests/80-setjmp.c.
* lib/tests/signal/90-signal.c: Move from scaffold/tests/95-signal.c.
* lib/tests/stdio/70-printf-hello.c: Move from scaffold/tests/70-printf-hello.c.
* lib/tests/stdio/70-printf-simple.c: Move from scaffold/tests/70-printf-simple.c.
* lib/tests/stdio/70-printf.c: Move from scaffold/tests/70-printf.c.
* lib/tests/stdio/80-sscanf.c: Move from scaffold/tests/87-sscanf.c.
* lib/tests/stdio/90-fopen-append.c: Move from scaffold/tests/98-fopen.c.
* lib/tests/stdio/90-fopen.c: Move from scaffold/tests/97-fopen.c.
* lib/tests/stdio/90-fread-fwrite.c: Move from scaffold/tests/93-fread-fwrite.c.
* lib/tests/stdio/90-fseek.c: Move from scaffold/tests/91-fseek.c.
* lib/tests/stdlib/50-getenv.c: Move from lib/tests/stdlib/getenv.c.
* lib/tests/stdlib/50-malloc.c: Move from lib/tests/stdlib/malloc.c.
* lib/tests/stdlib/70-strtoull.c: Move from scaffold/tests/7j-strtoull.c.
* lib/tests/stdlib/80-qsort-dupes.c: Move from scaffold/tests/81-qsort-dupes.c.
* lib/tests/stdlib/80-qsort.c: Move from scaffold/tests/81-qsort.c.
* lib/tests/stdlib/90-strtol.c: Move from scaffold/tests/96-strto.c.
* lib/tests/string/30-strlen.c: Move from scaffold/tests/30-strlen.c.
* lib/tests/string/50-strcmp.c: Move from scaffold/tests/51-strcmp.c.
* lib/tests/string/50-strcpy.c: Move from scaffold/tests/53-strcpy.c.
* lib/tests/string/50-strncmp.c: Move from scaffold/tests/51-strncmp.c.
* lib/tests/string/70-strchr.c: Move from scaffold/tests/70-strchr.c.
* lib/tests/string/80-strncpy.c: Move from scaffold/tests/86-strncpy.c.
* lib/tests/string/80-strrchr.c: Move from scaffold/tests/88-strrchr.c.
* lib/tests/string/90-snprintf.c: Move from scaffold/tests/9a-snprintf.c.
* lib/tests/string/90-strpbrk.c: Move from scaffold/tests/90-strpbrk.c.
* lib/tests/string/90-strspn.c: Move from scaffold/tests/90-strspn.c.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen d3c9fcf57a
mescc: Mes C Library: Start test suite.
TODO: move strict libc tests from scaffold/test/* here.

* lib/tests/stdlib/getenv.c: New file.
* lib/tests/stdlib/malloc.c: Move from scaffold.
* build-aux/bootstrap.sh.in: Built them.
* build-aux/build-mes.sh: Likewise.
2019-01-12 22:01:40 +01:00
Jan Nieuwenhuizen 06e5ccbd83
mes: Remove stray debugging newline output.
* mes/module/mes/guile.mes (open-input-file): Move debugging newline
into debug clause.
2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 9ab3d3cc59
mescc: Mes C Library: Fix brk return type compare.
* lib/stdlib/malloc.c (malloc): Fix brk return type compare.
2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 2721053bc5
core: Rename load_env to read_boot.
* src/mes.c (read_boot): Rename from load_env; Update users.
(open_boot): Rename from load_boot; Update users.
2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 586bc0eec9
core: Initialize g_buf dynamically, add MES_STRING_MAX override.
* src/mes.c (g_buf, MAX_STRING): Move from strings.c.
(gc_init_cells): Initialize g_buf dynamically.
(main): Add environment override MES_MAX_STRING for MAX_STRING.
* doc/mes.texi (Environment Variables): Document it.
2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 6c266552e8
mes-snarf: rewrite for development-time snarfing
* build-aux/mes-snarf.scm (%gcc?): Remove.
(symbol->header): Produce code for src/builtins.h.
(symbol->source, symbol->names, function->environment): Remove.
(snarf-symbols): Rewrite, snarf from init_symbol (...).
(function->source): Produce code to be manually put into
(main): Remove --mes option.
2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 6947d7505d
core: Resurrect POSIX build. Thanks, gio!
* lib/libmes.c[POSIX]: Define and initialize g_stdin, g_stdout and
g_stderr that were moved to crt1 for non-POSIX builds.
* src/mes.c[POSIX]: Remove struct-initialisation exceptions.
2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 511484cfcd
FIXUP: 41eb11ffd core: Remove struct definitions for builtins, drop snarfing. 2019-01-12 22:01:39 +01:00
Jan Nieuwenhuizen 41eb11ffdb
core: Remove struct definitions for builtins, drop snarfing.
After making a change to the list of builtin functions, run

    cat src/*.i

and move the into

    src/mes.c:mes_builtins ()

and, or also after changing the list of fixed symbols in src/mes.c:mes_symbols (), do

    cat src/*.h > src/builtins.h

* build-aux/build.sh.in: Remove snarfing.
* build-aux/bootstrap.sh.in: Likewise.
* mes/module/mes/display.mes (display):
* mes/module/mes/type-0.mes (cell:type-alist): Remove <cell:function>.
(function?, builtin?): Remove.
* src/builtins.h: New file.
* src/mes.c (TFUNCTION): Remove.
(struct function): Remove.
(apply_builtin): Rewrite from call.
(mes_builtins): Rewrite.
(init_builtin, make_builtin_type, make_builtin, builtin_name,
builtin_arity, builtin, builtin_p, builtin_printer): New function.
2019-01-12 20:12:37 +01:00
Jan Nieuwenhuizen 46b76ac699
core: Remove struct definitions for cells, drop snarfing for symbols.
* src/mes.c (init_symbol): New function.
(mes_symbols): Use it.
(scm_nil, ... scm_test): Remove.
2019-01-12 20:08:54 +01:00
Jan Nieuwenhuizen d615c03706
mes: Add take-while.
* mes/module/srfi/srfi-1.mes (take-while): New function.
2018-12-30 10:41:00 +01:00
Jan Nieuwenhuizen 885a1c8ea3
mescc: Enhance POSIX command-line support, e.g. -DFOO=1.
* module/mescc.scm (unclump-single): New function.
(main): Use it to support -DFOO=bar, and equivalent.
2018-12-30 10:41:00 +01:00
Jan Nieuwenhuizen 8040913edc
build: Support running out-of-tree.
* build-aux/pre-inst-env.in (MES_PREFIX): Use absolute name.
2018-12-20 16:50:06 +01:00
Jan Nieuwenhuizen 77ea72bb7d
core: Remove string debugging.
* src/strings.c (make_bytes, make_string, string_equal_p,
symbol_to_string, symbol_to_keyword, make_symbol): Remove string
debugging.
2018-12-20 16:50:06 +01:00
Jan Nieuwenhuizen f6e4a00b2a
core: Remove --dump, --load.
* mes/module/mes/boot-0.scm.in (tty?): Remove --dump, --load.
* src/mes.c (bload_env): Remove.
* src/reader.c (dump): Remove.
2018-12-20 16:50:06 +01:00
Jan Nieuwenhuizen 548ecf8a81
doc: Post-releasee update 2018-12-16 21:20:45 +01:00
197 changed files with 3120 additions and 3238 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Mes --- Maxwell Equations of Software ;;; GNU Mes --- Maxwell Equations of Software
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Mes. ;;; This file is part of GNU Mes.
;;; ;;;
@ -16,73 +16,20 @@
;;; 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/>.
((nil ;; The GNU project defaults. These are also the GNU Emacs defaults.
. ;; Re-asserting theme here, however, as a courtesy for setups that use
((indent-tabs-mode . nil) ;; a global override.
(eval (
. ;; For writing GNU C code, see
(progn ;; https://www.gnu.org/prep/standards/html_node/Writing-C.html
(let ((top (locate-dominating-file default-directory ".dir-locals.el")))) (c-mode . ((c-file-style . "gnu")
(indent-tabs-mode . nil)))
(defun guile--manual-look-up (id mod) (makefile-mode . ((indent-tabs-mode . t)))
(message "guile--manual-look-up id=%s => %s mod=%s" id (symbol-name id) mod)
(let ((info-lookup-other-window-flag
geiser-guile-manual-lookup-other-window-p))
(info-lookup-symbol (symbol-name id) 'scheme-mode))
(when geiser-guile-manual-lookup-other-window-p
(switch-to-buffer-other-window "*info*"))
(search-forward (format "%s" id) nil t))
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t) (nil . ((indent-tabs-mode . nil)
(fill-column . 72)))
(defun guix-switch-profile (&optional profile)
"reset Emacs' environment by snarfing PROFILE/etc/profile"
(defun matches-in-string (regexp string)
"return a list of matches of REGEXP in STRING."
(let ((matches))
(save-match-data
(string-match "^" "")
(while (string-match regexp string (match-end 0))
(push (or (match-string 1 string) (match-string 0 string)) matches)))
matches))
(interactive "fprofile: ")
(let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " profile "/etc/profile")))
(exports (matches-in-string "^[+] export \\(.*\\)" output)))
(mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
(defun shell-args-to-string (&rest args)
(shell-command-to-string (mapconcat 'identity args " ")))
(defun as (string &optional arch)
(let* ((arch (or arch "--64"))
(asm (subst-char-in-string ?_ ?\s string))
(foo (message "asm:%S" asm))
(result (shell-args-to-string "as" arch (concat "<(echo '" asm "')")))
(disassembly (shell-args-to-string "objdump" "-d" "a.out"))
(foo (message "disassembly: %S" disassembly))
(match (string-match "^ 0:[\t]\\([^\t]*\\)" disassembly))
(code (match-string 1 disassembly))
(code (apply 'concat (split-string code " " t))))
(insert " ")
(insert code)))
(defun as-32 (point mark)
(interactive "r")
(let* ((string (buffer-substring point mark))
(code (as string "--32")))
(insert " ")
(insert code)))
(defun as-64 (point mark)
(interactive "r")
(let* ((string (buffer-substring point mark))
(code (as string "--64")))
(insert " ")
(insert code)))))))
(makefile-mode
(indent-tabs-mode . t))
(scheme-mode (scheme-mode
. .
((geiser-active-implementations . (guile)) ((geiser-active-implementations . (guile))
@ -96,5 +43,69 @@
(mapcar (mapcar
#'prefix-dir-locals-dir #'prefix-dir-locals-dir
'("scripts" "module"))))))) '("scripts" "module")))))))
(texinfo-mode . ((indent-tabs-mode . nil) (texinfo-mode . ((indent-tabs-mode . nil)
(fill-column . 72)))) (fill-column . 72)))
(nil .
((eval
.
(progn
(let ((top (locate-dominating-file default-directory ".dir-locals.el"))))
(defun guile--manual-look-up (id mod)
(message "guile--manual-look-up id=%s => %s mod=%s" id (symbol-name id) mod)
(let ((info-lookup-other-window-flag
geiser-guile-manual-lookup-other-window-p))
(info-lookup-symbol (symbol-name id) 'scheme-mode))
(when geiser-guile-manual-lookup-other-window-p
(switch-to-buffer-other-window "*info*"))
(search-forward (format "%s" id) nil t))
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
(defun guix-switch-profile (&optional profile)
"reset Emacs' environment by snarfing PROFILE/etc/profile"
(defun matches-in-string (regexp string)
"return a list of matches of REGEXP in STRING."
(let ((matches))
(save-match-data
(string-match "^" "")
(while (string-match regexp string (match-end 0))
(push (or (match-string 1 string) (match-string 0 string)) matches)))
matches))
(interactive "fprofile: ")
(let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " profile "/etc/profile")))
(exports (matches-in-string "^[+] export \\(.*\\)" output)))
(mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
(defun shell-args-to-string (&rest args)
(shell-command-to-string (mapconcat 'identity args " ")))
(defun as (string &optional arch)
(let* ((arch (or arch "--64"))
(asm (subst-char-in-string ?_ ?\s string))
(foo (message "asm:%S" asm))
(result (shell-args-to-string "as" arch (concat "<(echo '" asm "')")))
(disassembly (shell-args-to-string "objdump" "-d" "a.out"))
(foo (message "disassembly: %S" disassembly))
(match (string-match "^ 0:[\t]\\([^\t]*\\)" disassembly))
(code (match-string 1 disassembly))
(code (apply 'concat (split-string code " " t))))
(insert " ")
(insert code)))
(defun as-32 (point mark)
(interactive "r")
(let* ((string (buffer-substring point mark))
(code (as string "--32")))
(insert " ")
(insert code)))
(defun as-64 (point mark)
(interactive "r")
(let* ((string (buffer-substring point mark))
(code (as string "--64")))
(insert " ")
(insert code))))))))

42
.gitignore vendored
View File

@ -62,22 +62,52 @@
/lib/x86-mes/0exit-42 /lib/x86-mes/0exit-42
/lib/x86-mes/exit-42 /lib/x86-mes/exit-42
/lib/tests/*/[0-9a][0-9a-z]-*
/lib/tests/*/x86-mes-*
!/lib/tests/*/*.c
!/lib/tests/*/*.exit
!/lib/tests/*/*.stdout
/scaffold/argv /scaffold/argv
/scaffold/hello /scaffold/hello
/scaffold/main /scaffold/main
/scaffold/malloc
/scaffold/micro-mes /scaffold/micro-mes
/scaffold/tiny-mes /scaffold/tiny-mes
/scaffold/mini-mes
/scaffold/x86-mes-* /scaffold/x86-mes-*
/scaffold/x86_64-mes-* /scaffold/x86_64-mes-*
/scaffold/tests/x86-mes-* /scaffold/tests/x86-mes-*
/scaffold/tests/[0-9a][0-9a-z]-[^.]* /scaffold/tests/[0-9a][0-9a-z]-*
/scaffold/tests/t.*
!/scaffold/tests/*.c
!/scaffold/tests/*.exit
!/scaffold/tests/*.stdout
/src/mes.mes.symbols.h
/src/gc.mes.h
/src/hash.mes.h
/src/lib.mes.h
/src/math.mes.h
/src/mes.mes.h
/src/module.mes.h
/src/posix.mes.h
/src/reader.mes.h
/src/strings.mes.h
/src/struct.mes.h
/src/vector.mes.h
/src/gc.mes.i
/src/hash.mes.i
/src/lib.mes.i
/src/math.mes.i
/src/mes.mes.i
/src/module.mes.i
/src/posix.mes.i
/src/reader.mes.i
/src/strings.mes.i
/src/struct.mes.i
/src/vector.mes.i
/src/*.h
/src/*.i
/src/mes /src/mes
/src/x86-mes-mes /src/x86-mes-mes
/src/x86_64-mes-mes /src/x86_64-mes-mes
@ -124,3 +154,5 @@
/doc/images/gcc-mesboot-graph.eps /doc/images/gcc-mesboot-graph.eps
/doc/images/gcc-mesboot-graph.pdf /doc/images/gcc-mesboot-graph.pdf
/doc/web/ /doc/web/
/lib/x86_64-mes/0exit-42
/lib/x86_64-mes/exit-42

View File

@ -8,15 +8,15 @@ Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
notice and this notice are preserved. notice and this notice are preserved.
* SETUP * SETUP
guix environment -l .guix.scm #64 bit + 32bit GUIX_PACKAGE_PATH=guix guix environment -l .guix.scm #64 bit + 32bit
or or
guix environment --system=i686-linux -l .guix.scm #32 bit only GUIX_PACKAGE_PATH=guix guix environment --system=i686-linux -l .guix.scm #32 bit only
or or
guix package --profile=~/.config/guix/mes --manifest=build-aux/manifest.scm GUIX_PACKAGE_PATH=guix guix package --profile=~/.config/guix/mes --manifest=build-aux/manifest.scm
. ~/.config/guix/mes/etc/profile . ~/.config/guix/mes/etc/profile
* BUILD * BUILD

View File

@ -19,8 +19,8 @@ similar way.
* Regular build * Regular build
** Prerequisites ** Prerequisites
*** Guix *** Guix
guix environment -l .guix.scm #64 bit + 32bit GUIX_PACKAGE_PATH=guix guix environment -l .guix.scm #64 bit + 32bit
guix environment --system=i686-linux -l .guix.scm #32 bit only GUIX_PACKAGE_PATH=guix guix environment --system=i686-linux -l .guix.scm #32 bit only
*** Other GNU/Linux *** Other GNU/Linux
- [[https://github.com/oriansj/mescc-tools][mescc-tools]], 0.5 is known to work. - [[https://github.com/oriansj/mescc-tools][mescc-tools]], 0.5 is known to work.

View File

@ -10,18 +10,6 @@ MES_ARENA=${MES_ARENA-100000000}
MES_MAX_ARENA=${MES_MAX_ARENA-100000000} MES_MAX_ARENA=${MES_MAX_ARENA-100000000}
MES_STACK=${MES_STACK-500000} MES_STACK=${MES_STACK-500000}
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/gc.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/hash.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/lib.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/math.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/mes.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/module.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/posix.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/reader.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/strings.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/struct.c
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/vector.c
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-0header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf-0footer.hex2 --exec_enable -o lib/x86-mes/0exit-42 hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-0header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf-0footer.hex2 --exec_enable -o lib/x86-mes/0exit-42
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf32-footer-single-main.hex2 --exec_enable -o lib/x86-mes/exit-42 hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf32-footer-single-main.hex2 --exec_enable -o lib/x86-mes/exit-42
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/crt1.S -o lib/x86-mes/crt1.o M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/crt1.S -o lib/x86-mes/crt1.o
@ -63,9 +51,9 @@ mv lib/libc+gnu.x86-mes-o lib/x86-mes/libc+gnu.o
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-argv scaffold/argv.x86-mes-o -l c-mini @GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-argv scaffold/argv.x86-mes-o -l c-mini
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/malloc.x86-mes-o scaffold/malloc.c @GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/tests/stdlib/50-malloc.x86-mes-o lib/tests/stdlib/50-malloc.c
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-malloc scaffold/malloc.x86-mes-o -l c @GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/tests/posix/50-getenv.x86-mes-o lib/tests/posix/50-getenv.c
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/micro-mes.x86-mes-o scaffold/micro-mes.c @GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/micro-mes.x86-mes-o scaffold/micro-mes.c

View File

@ -32,7 +32,7 @@ fi
[ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.S lib/$mes_arch/crt1.S [ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.S lib/$mes_arch/crt1.S
[ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.o lib/$mes_arch/crt1.o [ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.o lib/$mes_arch/crt1.o
[ ! "$mesc_p" -a ! "$posix_p" ] && (program_prefix= compile lib/linux/$mes_arch/crt0) [ ! "$mesc_p" -a ! "$with_glibc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crt0)
[ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crti) [ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crti)
[ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crtn) [ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crtn)
@ -69,14 +69,18 @@ compile scaffold/hello
compile scaffold/argv compile scaffold/argv
(libc="-l c-mini" link scaffold/argv) (libc="-l c-mini" link scaffold/argv)
[ "$mes_p" ] && compile scaffold/malloc [ "$mes_p" ] && compile lib/tests/stdlib/50-malloc
[ "$mes_p" ] && link scaffold/malloc [ "$mes_p" ] && link lib/tests/stdlib/50-malloc
[ "$mes_p" ] && compile lib/tests/posix/50-getenv
[ "$mes_p" ] && link lib/tests/posix/50-getenv
[ "$mes_p" ] && compile scaffold/micro-mes [ "$mes_p" ] && compile scaffold/micro-mes
[ "$mes_p" ] && link scaffold/micro-mes [ "$mes_p" ] && link scaffold/micro-mes
[ "$mes_p" ] && compile scaffold/tiny-mes [ "$mes_p" ] && compile scaffold/tiny-mes
[ "$mes_p" ] && link scaffold/tiny-mes [ "$mes_p" ] && link scaffold/tiny-mes
#[ "$mes_p" ] && compile scaffold/mini-mes
#[ "$mes_p" ] && link scaffold/mini-mes
compile src/mes compile src/mes
link src/mes link src/mes

View File

@ -27,13 +27,6 @@ if [ -n "$GUILE" -a "$GUILE" != true ]; then
sh ${srcdest}build-aux/build-guile.sh sh ${srcdest}build-aux/build-guile.sh
fi fi
if [ ! "$mes_p" ]; then
sh ${srcdest}build-aux/snarf.sh
#elif [ ! -d "$MES_SEED" ]; then
#else
fi
sh ${srcdest}build-aux/snarf.sh --mes
if [ "$gcc_p$tcc_p" ]; then if [ "$gcc_p$tcc_p" ]; then
sh ${srcdest}build-aux/build-mes.sh sh ${srcdest}build-aux/build-mes.sh
elif [ -d "$MES_SEED" ]; then elif [ -d "$MES_SEED" ]; then
@ -41,7 +34,7 @@ elif [ -d "$MES_SEED" ]; then
fi fi
## FIXME: remove this and have user configure/build/install for each compiler? ## FIXME: remove this and have user configure/build/install for each compiler?
unset CFLAGS CPPFLAGS LDFLAGS gcc_p tcc_p posix_p unset CFLAGS CPPFLAGS LDFLAGS gcc_p tcc_p with_glibc_p
MES=guile MES=guile
mesc_p=1 mesc_p=1
mes_p=1 mes_p=1

View File

@ -41,7 +41,7 @@ archive () {
link () { link () {
lib=$libc lib=$libc
[ "$posix_p" ] && lib='-l mes' [ "$with_glibc_p" ] && lib='-l mes'
out=$(dirname "$1")/${program_prefix}$(basename "$1") out=$(dirname "$1")/${program_prefix}$(basename "$1")
trace "CCLD $1" $CC $CFLAGS $LDFLAGS -o" $out" $crt1 "$1".${program_prefix}o $2 $lib trace "CCLD $1" $CC $CFLAGS $LDFLAGS -o" $out" $crt1 "$1".${program_prefix}o $2 $lib
} }

View File

@ -66,14 +66,14 @@ for t in $tests; do
echo $t: [SKIP]; echo $t: [SKIP];
continue continue
fi fi
${top_builddir}/pre-inst-env sh "$t" &> $t.${mes}log ${top_builddir}/pre-inst-env sh "$t" > $t.${mes}log 2>&1
r=$? r=$?
total=$((total+1)) total=$(expr $total + 1)
if [ $r = 0 ]; then if [ $r = 0 ]; then
echo $t: [${mes}OK] echo $t: [${mes}OK]
else else
echo $t: [${mes}FAIL] echo $t: [${mes}FAIL]
fail=$((fail+1)) fail=$(expr $fail + 1)
fi fi
done done
if [ $fail != 0 ]; then if [ $fail != 0 ]; then

View File

@ -26,206 +26,215 @@ set -e
test_sh=${test_sh-${srcdest}build-aux/test.sh} test_sh=${test_sh-${srcdest}build-aux/test.sh}
tests=" tests="
t scaffold/tests/t
00-exit-0 scaffold/tests/00-exit-0
01-return-0 scaffold/tests/01-return-0
02-return-1 scaffold/tests/02-return-1
03-call scaffold/tests/03-call
04-call-0 scaffold/tests/04-call-0
05-call-1 scaffold/tests/05-call-1
06-call-!1 scaffold/tests/06-call-not-1
06-!call-1 scaffold/tests/06-not-call-1
06-call-2 scaffold/tests/06-call-2
06-call-string scaffold/tests/06-call-string
06-call-variable scaffold/tests/06-call-variable
06-return-void scaffold/tests/06-return-void
07-include scaffold/tests/07-include
08-assign scaffold/tests/08-assign
08-assign-negative scaffold/tests/08-assign-negative
08-assign-global scaffold/tests/08-assign-global
10-if-0 scaffold/tests/10-if-0
11-if-1 scaffold/tests/11-if-1
12-if-== scaffold/tests/12-if-eq
13-if-!= scaffold/tests/13-if-neq
14-if-goto scaffold/tests/14-if-goto
15-if-!f scaffold/tests/15-if-not-f
16-if-t scaffold/tests/16-if-t
17-compare-char scaffold/tests/17-compare-char
17-compare-ge scaffold/tests/17-compare-ge
17-compare-gt scaffold/tests/17-compare-gt
17-compare-le scaffold/tests/17-compare-le
17-compare-lt scaffold/tests/17-compare-lt
17-compare-unsigned-ge scaffold/tests/17-compare-unsigned-ge
17-compare-unsigned-gt scaffold/tests/17-compare-unsigned-gt
17-compare-unsigned-le scaffold/tests/17-compare-unsigned-le
17-compare-unsigned-lt scaffold/tests/17-compare-unsigned-lt
17-compare-unsigned-char-le scaffold/tests/17-compare-unsigned-char-le
17-compare-unsigned-short-le scaffold/tests/17-compare-unsigned-short-le
17-compare-unsigned-long-le scaffold/tests/17-compare-unsigned-long-le
17-compare-and scaffold/tests/17-compare-and
17-compare-or scaffold/tests/17-compare-or
17-compare-and-or scaffold/tests/17-compare-and-or
17-compare-assign scaffold/tests/17-compare-assign
17-compare-call scaffold/tests/17-compare-call
18-assign-shadow scaffold/tests/18-assign-shadow
20-while scaffold/tests/20-while
21-char[]-simple scaffold/tests/21-char-array-simple
21-char[] scaffold/tests/21-char-array
22-while-char[] scaffold/tests/22-while-char-array
23-global-pointer-init-null scaffold/tests/23-global-pointer-init-null
23-global-pointer-init scaffold/tests/23-global-pointer-init
23-global-pointer-ref scaffold/tests/23-global-pointer-ref
23-global-pointer-pointer-ref scaffold/tests/23-global-pointer-pointer-ref
23-pointer-sub scaffold/tests/23-pointer-sub
23-pointer scaffold/tests/23-pointer
30-strlen lib/tests/mes/30-oputs
31-oputs lib/tests/string/30-strlen
32-call-wrap scaffold/tests/32-call-wrap
32-compare scaffold/tests/32-compare
33-and-or scaffold/tests/33-and-or
34-pre-post scaffold/tests/34-pre-post
35-compare-char scaffold/tests/35-compare-char
36-compare-arithmetic scaffold/tests/36-compare-arithmetic
37-compare-assign scaffold/tests/37-compare-assign
38-compare-call-2 scaffold/tests/38-compare-call-2
38-compare-call-3 scaffold/tests/38-compare-call-3
38-compare-call scaffold/tests/38-compare-call
40-if-else scaffold/tests/40-if-else
41-? scaffold/tests/41-ternary
42-goto-label scaffold/tests/42-goto-label
43-for-do-while scaffold/tests/43-for-do-while
44-switch scaffold/tests/44-switch
44-switch-fallthrough scaffold/tests/44-switch-fallthrough
44-switch-body-fallthrough scaffold/tests/44-switch-body-fallthrough
45-void-call scaffold/tests/45-void-call
46-function-static scaffold/tests/46-function-static
47-function-expression scaffold/tests/47-function-expression
48-global-static scaffold/tests/48-global-static
50-assert lib/tests/assert/50-assert
51-pointer-sub lib/tests/mes/50-itoa
51-itoa lib/tests/posix/50-getenv
51-strcmp lib/tests/string/50-strcmp
51-strncmp lib/tests/string/50-strcpy
53-strcpy lib/tests/string/50-strncmp
54-argc scaffold/tests/51-pointer-sub
54-argv scaffold/tests/54-argc
55-char-array scaffold/tests/54-argv
60-math scaffold/tests/55-char-array
61-array scaffold/tests/60-math
62-array scaffold/tests/61-array
63-struct scaffold/tests/62-array
63-struct-pointer scaffold/tests/63-struct
63-struct-local scaffold/tests/63-struct-pointer
63-struct-function scaffold/tests/63-struct-local
63-struct-assign scaffold/tests/63-struct-function
63-struct-array scaffold/tests/63-struct-assign
63-struct-array-assign scaffold/tests/63-struct-array
63-struct-array-compare scaffold/tests/63-struct-array-assign
63-struct-cell scaffold/tests/63-struct-array-compare
64-make-cell scaffold/tests/63-struct-cell
65-read scaffold/tests/64-make-cell
66-local-char-array scaffold/tests/65-read
70-strchr scaffold/tests/66-local-char-array
70-stdarg scaffold/tests/70-stdarg
70-printf-hello lib/tests/stdio/70-printf-hello
70-printf-simple lib/tests/stdio/70-printf-simple
70-printf lib/tests/stdio/70-printf
71-struct-array lib/tests/stdlib/70-strtoull
72-typedef-struct-def lib/tests/string/70-strchr
73-union-hello scaffold/tests/71-struct-array
73-union scaffold/tests/72-typedef-struct-def
74-multi-line-string scaffold/tests/73-union-hello
75-struct-union scaffold/tests/73-union
76-pointer-arithmetic-pp scaffold/tests/74-multi-line-string
76-pointer-arithmetic scaffold/tests/75-struct-union
77-pointer-assign scaffold/tests/76-pointer-arithmetic-pp
78-union-struct scaffold/tests/76-pointer-arithmetic
79-int-array-simple scaffold/tests/77-pointer-assign
79-int-array scaffold/tests/78-union-struct
7a-struct-char-array scaffold/tests/79-int-array-simple
7b-struct-int-array-hello scaffold/tests/79-int-array
7b-struct-int-array-pointer scaffold/tests/7a-struct-char-array
7b-struct-int-array scaffold/tests/7b-struct-int-array-hello
7c-dynarray scaffold/tests/7b-struct-int-array-pointer
7d-cast-char scaffold/tests/7b-struct-int-array
7e-struct-array-access scaffold/tests/7c-dynarray
7f-struct-pointer-arithmetic scaffold/tests/7d-cast-char
7g-struct-byte-word-field scaffold/tests/7e-struct-array-access
7h-struct-assign scaffold/tests/7f-struct-pointer-arithmetic
7i-struct-struct-simple scaffold/tests/7g-struct-byte-word-field
7i-struct-struct scaffold/tests/7h-struct-assign
7j-strtoull scaffold/tests/7i-struct-struct-simple
7k-empty-for scaffold/tests/7i-struct-struct
7k-for-each-elem-simple scaffold/tests/7k-empty-for
7k-for-each-elem scaffold/tests/7k-for-each-elem-simple
7l-struct-any-size-array-simple scaffold/tests/7k-for-each-elem
7l-struct-any-size-array scaffold/tests/7l-struct-any-size-array-simple
7m-struct-char-array-assign scaffold/tests/7l-struct-any-size-array
7n-struct-struct-array scaffold/tests/7m-struct-char-array-assign
7o-struct-pre-post-simple scaffold/tests/7n-struct-struct-array
7o-struct-pre-post scaffold/tests/7o-struct-pre-post-simple
7p-struct-cast scaffold/tests/7o-struct-pre-post
7q-bit-field-simple scaffold/tests/7p-struct-cast
7q-bit-field scaffold/tests/7q-bit-field-simple
7r-sign-extend scaffold/tests/7q-bit-field
7s-struct-short scaffold/tests/7r-sign-extend
7s-unsigned-compare scaffold/tests/7s-struct-short
7t-function-destruct scaffold/tests/7s-unsigned-compare
7u-double scaffold/tests/7t-function-destruct
7u-long-long scaffold/tests/7u-double
7u-?-expression scaffold/tests/7u-long-long
7u-call-? scaffold/tests/7u-ternary-expression
7u-inc-byte-word scaffold/tests/7u-call-ternary
7u-struct-func scaffold/tests/7u-inc-byte-word
7u-struct-size10 scaffold/tests/7u-struct-func
7u-vstack scaffold/tests/7u-struct-size10
80-setjmp scaffold/tests/7u-vstack
81-qsort lib/tests/setjmp/80-setjmp
81-qsort-dupes lib/tests/stdio/80-sscanf
82-define lib/tests/stdlib/80-qsort
83-heterogenoous-init lib/tests/stdlib/80-qsort-dupes
84-struct-field-list lib/tests/string/80-strncpy
85-sizeof lib/tests/string/80-strrchr
86-strncpy scaffold/tests/82-define
87-sscanf scaffold/tests/83-heterogenoous-init
88-strrchr scaffold/tests/84-struct-field-list
90-strspn scaffold/tests/85-sizeof
90-strpbrk lib/tests/dirent/90-readdir
91-fseek lib/tests/io/90-stat
92-stat lib/tests/mes/90-abtod
93-fread-fwrite lib/tests/mes/90-dtoab
94-unsetenv lib/tests/posix/90-execlp
95-signal lib/tests/posix/90-unsetenv
96-strto lib/tests/signal/90-signal
97-fopen lib/tests/stdio/90-fopen
98-fopen lib/tests/stdio/90-fopen-append
99-readdir lib/tests/stdio/90-fread-fwrite
9a-snprintf lib/tests/stdio/90-fseek
a0-call-trunc-char lib/tests/stdio/90-sprintf
a0-call-trunc-short lib/tests/stdlib/90-strtol
a0-call-trunc-int lib/tests/string/90-snprintf
a0-math-divide-signed-negative lib/tests/string/90-strpbrk
a1-global-no-align lib/tests/string/90-strspn
a1-global-no-clobber scaffold/tests/a0-call-trunc-char
scaffold/tests/a0-call-trunc-short
scaffold/tests/a0-call-trunc-int
scaffold/tests/a0-math-divide-signed-negative
scaffold/tests/a1-global-no-align
scaffold/tests/a1-global-no-clobber
" "
broken="$broken broken="$broken
17-compare-unsigned-char-le scaffold/tests/17-compare-unsigned-char-le
17-compare-unsigned-short-le scaffold/tests/17-compare-unsigned-short-le
66-local-char-array scaffold/tests/66-local-char-array
a0-call-trunc-int scaffold/tests/a0-call-trunc-int
a0-math-divide-signed-negative scaffold/tests/a0-math-divide-signed-negative
lib/tests/mes/90-abtod
lib/tests/mes/90-dtoab
lib/tests/posix/50-getenv
lib/tests/stdio/90-sprintf
" "
if [ "$mes_arch" = "x86_64-gcc" ]; then if [ "$mes_arch" = "x86_64-gcc" ]; then
broken="$broken broken="$broken
21-char[] scaffold/tests/21-char-array
41-? scaffold/tests/41-ternary
70-printf-stdarg scaffold/tests/stdio/70-printf-stdarg
70-printf-simple scaffold/tests/stdio/70-printf-simple
70-printf scaffold/tests/stdio/70-printf
80-setjmp lib/tests/setjmp/80-setjmp
a1-global-no-align scaffold/tests/a1-global-no-align
" "
fi fi
@ -234,34 +243,34 @@ expect=$(echo $broken | wc -w)
pass=0 pass=0
fail=0 fail=0
total=0 total=0
mkdir -p scaffold/tests
for t in $tests; do for t in $tests; do
if [ -z "${t/[012][0-9]-*/}" ]; then b=$(basename "$t")
if [ -z "${b/[012][0-9]-*/}" ]; then
libc= libc=
elif [ -z "${t/[34][0-9]-*/}" ]; then elif [ -z "${b/[34][0-9]-*/}" ]; then
libc='-l c-mini' libc='-l c-mini'
elif [ -z "${t/[78][0-9a-z]-*/}" ]; then elif [ -z "${b/[78][0-9a-z]-*/}" ]; then
libc='-l c+tcc' libc='-l c+tcc'
elif [ -z "${t/9[0-9a-z]-*/}" ]; then elif [ -z "${b/9[0-9a-z]-*/}" ]; then
libc='-l c+gnu' libc='-l c+gnu'
else else
libc='-l c' libc='-l c'
fi fi
sh $test_sh "scaffold/tests/$t" &> scaffold/tests/"$t".log sh $test_sh "$t" > "$t".log 2>&1
r=$? r=$?
total=$((total+1)) total=$(expr $total + 1)
if [ $r = 0 ]; then if [ $r = 0 ]; then
echo $t: [OK] echo $t: [OK]
pass=$((pass+1)) pass=$(expr $pass + 1)
else else
echo $t: [FAIL] echo $t: [FAIL]
fail=$((fail+1)) fail=$(expr $fail + 1)
fi fi
done done
[ $expect != 0 ] && echo "expect: $expect" [ $expect != 0 ] && echo "expect: $expect"
[ $fail != 0 ] && echo "failed: $fail" [ $fail != 0 ] && echo "failed: $fail"
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))" [ $fail -lt $expect ] && echo "solved: $(expr $expect - $fail)"
echo "passed: $pass" echo "passed: $pass"
echo "total: $total" echo "total: $total"
if [ $fail != 0 -a $fail -gt $expect ]; then if [ $fail != 0 -a $fail -gt $expect ]; then

View File

@ -135,20 +135,20 @@ for t in $tests; do
continue; continue;
fi fi
cp $TINYCC_PREFIX/tests/tests2/$i* scaffold/tinycc cp $TINYCC_PREFIX/tests/tests2/$i* scaffold/tinycc
sh ${srcdest}build-aux/test.sh "scaffold/tinycc/$t" &> scaffold/tinycc/"$t".log sh ${srcdest}build-aux/test.sh "scaffold/tinycc/$t" > scaffold/tinycc/"$t".log 2>&1
r=$? r=$?
total=$((total+1)) total=$(expr $total + 1)
if [ $r = 0 ]; then if [ $r = 0 ]; then
echo $t: [OK] echo $t: [OK]
pass=$((pass+1)) pass=$(expr $pass + 1)
else else
echo $t: [FAIL] echo $t: [FAIL]
fail=$((fail+1)) fail=$(expr $fail + 1)
fi fi
done done
[ $expect != 0 ] && echo "expect: $expect" [ $expect != 0 ] && echo "expect: $expect"
[ $fail != 0 ] && echo "failed: $fail" [ $fail != 0 ] && echo "failed: $fail"
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))" [ $fail -lt $expect ] && echo "solved: $(expr $expect - $fail)"
echo "passed: $pass" echo "passed: $pass"
echo "total: $total" echo "total: $total"
if [ $fail != 0 -a $fail -gt $expect ]; then if [ $fail != 0 -a $fail -gt $expect ]; then

View File

@ -25,8 +25,8 @@ set -e
. ${srcdest}build-aux/trace.sh . ${srcdest}build-aux/trace.sh
./pre-inst-env bash ${srcdest}build-aux/check-boot.sh ./pre-inst-env bash ${srcdest}build-aux/check-boot.sh
./pre-inst-env bash ${srcdest}build-aux/check-mes.sh ./pre-inst-env sh ${srcdest}build-aux/check-mes.sh
./pre-inst-env bash ${srcdest}build-aux/check-mescc.sh ./pre-inst-env sh ${srcdest}build-aux/check-mescc.sh
if [ -d $TINYCC_PREFIX/tests/tests2 ] ;then if [ -d $TINYCC_PREFIX/tests/tests2 ] ;then
./pre-inst-env bash ${srcdest}build-aux/check-tcc.sh ./pre-inst-env sh ${srcdest}build-aux/check-tcc.sh
fi fi

View File

@ -64,7 +64,7 @@ infodir:=@infodir@
libdir:=@libdir@ libdir:=@libdir@
mandir:=@mandir@ mandir:=@mandir@
moduledir:=@moduledir@ moduledir:=@moduledir@
posix_p:=@posix_p@ with_glibc_p:=@with_glibc_p@
program_prefix:=@program_prefix@ program_prefix:=@program_prefix@
srcdest:=@srcdest@ srcdest:=@srcdest@
srcdir:=@srcdir@ srcdir:=@srcdir@

View File

@ -81,7 +81,7 @@ export mes_p
export mesc_p export mesc_p
export tcc_p export tcc_p
export mes_arch export mes_arch
export posix_p export with_glibc_p
CPPFLAGS=${CPPFLAGS-" CPPFLAGS=${CPPFLAGS-"
-D 'VERSION=\"$VERSION\"' -D 'VERSION=\"$VERSION\"'
@ -92,7 +92,7 @@ CPPFLAGS=${CPPFLAGS-"
-I ${srcdest}include -I ${srcdest}include
"} "}
[ "$posix_p" ] && CPPFLAGS="$CPPFLAGS -D POSIX=1 -D WITH_GLIBC=1" [ "$with_glibc_p" ] && CPPFLAGS="$CPPFLAGS -D WITH_GLIBC=1"
LDFLAGS=${LDFLAGS-" LDFLAGS=${LDFLAGS-"
-v -v

View File

@ -64,7 +64,7 @@ infodir="@infodir@"
libdir="@libdir@" libdir="@libdir@"
mandir="@mandir@" mandir="@mandir@"
moduledir="@moduledir@" moduledir="@moduledir@"
posix_p="@posix_p@" with_glibc_p="@with_glibc_p@"
program_prefix="@program_prefix@" program_prefix="@program_prefix@"
srcdest="@srcdest@" srcdest="@srcdest@"
srcdir="@srcdir@" srcdir="@srcdir@"

View File

@ -1,7 +1,7 @@
#! /bin/sh #! /bin/sh
# GNU Mes --- Maxwell Equations of Software # GNU Mes --- Maxwell Equations of Software
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# #
# This file is part of GNU Mes. # This file is part of GNU Mes.
# #
@ -25,7 +25,7 @@ set -e
mes_prefix=@prefix@/share/mes mes_prefix=@prefix@/share/mes
# use bash or lose if pipes fail # use bash or lose if pipes fail
if [ "$(basename $SHELL)" == bash ]; then if [ "$(basename $SHELL)" = bash ]; then
set -o pipefail set -o pipefail
fi fi
@ -39,7 +39,7 @@ cp scripts/mescc $DESTDIR@bindir@/mescc
sed \ sed \
-e "s,^#! /bin/sh,#! @SHELL@," \ -e "s,^#! /bin/sh,#! @SHELL@," \
scripts/diff.scm > $DESTDIR@bindir@/diff.scm scripts/diff.scm > $DESTDIR@bindir@/diff.scm
chmod -w+x $DESTDIR@bindir@/diff.scm chmod +x $DESTDIR@bindir@/diff.scm
mkdir -p $DESTDIR@docdir@ mkdir -p $DESTDIR@docdir@

View File

@ -101,50 +101,23 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
(define %start 1) (define %start 1)
(define (symbol->header s i) (define (symbol->header s i)
(format #f "#define cell_~a ~a\n" s i))
(define (symbol->source s i)
(string-append (string-append
(format #f "g_free++;\n") (format #f "// CONSTANT ~a ~a\n" s i)
(format #f "g_cells[cell_~a] = scm_~a;\n\n" s s))) (format #f "#define ~a ~a\n" s i)))
(define (symbol->names s i)
(if %gcc?
(format #f "NAME_SYMBOL (cell_~a, scm_~a.name);\n" s s)
(format #f "NAME_SYMBOL (cell_~a, scm_~a.cdr);\n" s s)))
(define (function->header f i) (define (function->header f i)
(let* ((arity (or (assoc-ref (function.annotation f) 'arity) (let* ((arity (or (assoc-ref (function.annotation f) 'arity)
(if (string-null? (function.formals f)) 0 (if (string-null? (function.formals f)) 0
(length (string-split (function.formals f) #\,))))) (length (string-split (function.formals f) #\,)))))
(n (if (eq? arity 'n) -1 arity))) (n (if (eq? arity 'n) -1 arity)))
(string-append (format #f "SCM ~a (~a);\n" (function.name f) (function.formals f))))
(format #f "SCM ~a (~a);\n" (function.name f) (function.formals f))
(if %gcc?
(format #f "struct function fun_~a = {.function~a=&~a, .arity=~a, .name=~s};\n" (function.name f) arity (function.name f) n (function-scm-name f))
(format #f "struct function fun_~a = {&~a, ~a, ~s};\n" (function.name f) (function.name f) n (function-scm-name f)))
(if %gcc?
(format #f "struct scm ~a = {TFUNCTION, .name=0, .function=0};\n" (function-builtin-name f))
(format #f "struct scm ~a = {TFUNCTION, 0, 0};\n" (function-builtin-name f)))
(format #f "SCM cell_~a;\n\n" (function.name f)))))
(define (function->source f i) (define (function->source f i)
(string-append (let* ((arity (or (assoc-ref (function.annotation f) 'arity)
(if %gcc? (if (string-null? (function.formals f)) 0
(format #f "~a.function = g_function;\n" (function-builtin-name f)) (length (string-split (function.formals f) #\,)))))
(format #f "~a.car = g_function;\n" (function-builtin-name f))) (n (if (eq? arity 'n) -1 arity)))
(format #f "g_functions[g_function++] = fun_~a;\n" (function.name f)) (format #f " a = init_builtin (builtin_type, ~s, ~a, &~a, a);\n" (function.name f) n (function.name f))))
(format #f "cell_~a = g_free++;\n" (function.name f))
(format #f "g_cells[cell_~a] = ~a;\n\n" (function.name f) (function-builtin-name f))))
(define (function->environment f i)
(string-append
(if %gcc?
(format #f "scm_~a.string = MAKE_BYTES0 (fun_~a.name);\n" (function.name f) (function.name f))
(format #f "scm_~a.cdr = MAKE_BYTES0 (fun_~a.name);\n" (function.name f) (function.name f)))
(if %gcc?
(format #f "a = acons (cstring_to_symbol (CSTRING_STRUCT (scm_~a)), ~a, a);\n\n" (function.name f) (function-cell-name f))
(format #f "a = acons (cstring_to_symbol (CSTRING_STRUCT (scm_~a)), ~a, a);\n\n" (function.name f) (function-cell-name f)))))
(define (disjoin . predicates) (define (disjoin . predicates)
(lambda (. arguments) (lambda (. arguments)
@ -152,12 +125,11 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
(define (snarf-symbols string) (define (snarf-symbols string)
(let* ((lines (string-split string #\newline)) (let* ((lines (string-split string #\newline))
(scm (filter (cut string-prefix? "struct scm scm_" <>) lines)) (symbols (filter (cut string-prefix? " init_symbol (" <>) lines)))
(symbols (filter (disjoin (cut string-contains <> "TSPECIAL") (cut string-contains <> "TSYMBOL")) scm)))
(define (line->symbol line) (define (line->symbol line)
((compose ((compose
(lambda (s) (string-take s (string-index s #\space))) (lambda (s) (string-take s (string-index s #\,)))
(cut string-drop <> (string-length "struct scm scm_"))) (cut string-drop <> (string-length " init_symbol (")))
line)) line))
(map line->symbol symbols))) (map line->symbol symbols)))
@ -218,27 +190,16 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
(source (make-file (source (make-file
(string-append base-name ".i") (string-append base-name ".i")
(string-join (map function->source (filter (negate no-environment?) functions) (iota (length functions) (+ (length symbols) %start))) ""))) (string-join (map function->source (filter (negate no-environment?) functions) (iota (length functions) (+ (length symbols) %start))) "")))
(environment (make-file
(string-append base-name ".environment.i")
(string-join (map function->environment (filter (negate no-environment?) functions) (iota (length functions) (+ (length symbols) %start))) "")))
(symbols.h (make-file (symbols.h (make-file
(string-append base-name ".symbols.h") (string-append base-name ".symbols.h")
(string-join (map symbol->header symbols (iota (length symbols) %start)) ""))) (string-join (map symbol->header symbols (iota (length symbols) %start)) ""))))
(symbols.i (make-file (list header source symbols.h)))
(string-append base-name ".symbols.i")
(string-join (map symbol->source symbols (iota (length symbols))) "")))
(symbol-names.i (make-file
(string-append base-name ".symbol-names.i")
(string-join (map symbol->names symbols (iota (length symbols))) ""))))
(list header source environment symbols.h symbols.i symbol-names.i)))
(define (file-write file) (define (file-write file)
(system* "mkdir" "-p" (dirname (file.name file))) (system* "mkdir" "-p" (dirname (file.name file)))
(with-output-to-file (file.name file) (lambda () (display (file.content file))))) (with-output-to-file (file.name file) (lambda () (display (file.content file)))))
(define (main args) (define (main args)
(let* ((files (if (not (and (pair? (cdr args)) (equal? (cadr args) "--mes"))) (cdr args) (let* ((files (cdr args))
(begin (set! %gcc? #f)
(cddr args))))
(files (append-map generate-includes files))) (files (append-map generate-includes files)))
(map file-write (filter content? files)))) (for-each file-write (filter content? files))))

View File

@ -24,7 +24,7 @@ abs_top_builddir="@abs_top_builddir@"
prefix=${prefix-@prefix@} prefix=${prefix-@prefix@}
program_prefix=${program_prefix-@program_prefix@} program_prefix=${program_prefix-@program_prefix@}
MES_PREFIX=${MES_PREFIX-${srcdest}mes} MES_PREFIX=${MES_PREFIX-${abs_top_srcdir}/mes}
export MES_PREFIX export MES_PREFIX
GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/scripts:$abs_top_builddir/module${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/scripts:$abs_top_builddir/module${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"

View File

@ -23,18 +23,14 @@ set -e
. ${srcdest}build-aux/config.sh . ${srcdest}build-aux/config.sh
. ${srcdest}build-aux/trace.sh . ${srcdest}build-aux/trace.sh
snarf=" " trace "SNARF$snarf gc.c" ${srcdest}build-aux/mes-snarf.scm src/gc.c
if [ -n "$1" ]; then trace "SNARF$snarf hash.c" ${srcdest}build-aux/mes-snarf.scm src/hash.c
snarf=.mes trace "SNARF$snarf lib.c" ${srcdest}build-aux/mes-snarf.scm src/lib.c
fi trace "SNARF$snarf math.c" ${srcdest}build-aux/mes-snarf.scm src/math.c
trace "SNARF$snarf gc.c" ${srcdest}build-aux/mes-snarf.scm $1 src/gc.c trace "SNARF$snarf mes.c" ${srcdest}build-aux/mes-snarf.scm src/mes.c
trace "SNARF$snarf hash.c" ${srcdest}build-aux/mes-snarf.scm $1 src/hash.c trace "SNARF$snarf module.c" ${srcdest}build-aux/mes-snarf.scm src/module.c
trace "SNARF$snarf lib.c" ${srcdest}build-aux/mes-snarf.scm $1 src/lib.c trace "SNARF$snarf posix.c" ${srcdest}build-aux/mes-snarf.scm src/posix.c
trace "SNARF$snarf math.c" ${srcdest}build-aux/mes-snarf.scm $1 src/math.c trace "SNARF$snarf reader.c" ${srcdest}build-aux/mes-snarf.scm src/reader.c
trace "SNARF$snarf mes.c" ${srcdest}build-aux/mes-snarf.scm $1 src/mes.c trace "SNARF$snarf strings.c" ${srcdest}build-aux/mes-snarf.scm src/strings.c
trace "SNARF$snarf module.c" ${srcdest}build-aux/mes-snarf.scm $1 src/module.c trace "SNARF$snarf struct.c" ${srcdest}build-aux/mes-snarf.scm src/struct.c
trace "SNARF$snarf posix.c" ${srcdest}build-aux/mes-snarf.scm $1 src/posix.c trace "SNARF$snarf vector.c" ${srcdest}build-aux/mes-snarf.scm src/vector.c
trace "SNARF$snarf reader.c" ${srcdest}build-aux/mes-snarf.scm $1 src/reader.c
trace "SNARF$snarf strings.c" ${srcdest}build-aux/mes-snarf.scm $1 src/strings.c
trace "SNARF$snarf struct.c" ${srcdest}build-aux/mes-snarf.scm $1 src/struct.c
trace "SNARF$snarf vector.c" ${srcdest}build-aux/mes-snarf.scm $1 src/vector.c

View File

@ -38,12 +38,12 @@ link "$t"
r=0 r=0
[ -f "$t".exit ] && r=$(cat "$t".exit) [ -f "$t".exit ] && r=$(cat "$t".exit)
set +e set +e
$(dirname "$o")/${program_prefix}$(basename "$o") $ARGS > "$o".${program_prefix}stdout $(dirname "$o")/${program_prefix}$(basename "$o") $ARGS > "$o".${program_prefix}1 2> "$o".${program_prefix}2
m=$? m=$?
cat "$o".${program_prefix}stdout cat "$o".${program_prefix}1
set -e set -e
[ $m = $r ] [ $m = $r ]
if [ -f "$t".expect ]; then if [ -f "$t".stdout ]; then
$DIFF -ub "$t".expect "$o".${program_prefix}stdout $DIFF -ub "$t".stdout "$o".${program_prefix}1
fi fi

View File

@ -26,7 +26,7 @@ sh ${srcdest}build-aux/test-cc.sh $1
if [ ! "$mesc_p" ]; then if [ ! "$mesc_p" ]; then
#FIXME: c&p #FIXME: c&p
unset CFLAGS CPPFLAGS LDFLAGS gcc_p tcc_p posix_p unset CFLAGS CPPFLAGS LDFLAGS gcc_p tcc_p with_glibc_p
MES=${MES-guile} MES=${MES-guile}
mesc_p=1 mesc_p=1
mes_p=1 mes_p=1

10
configure vendored
View File

@ -91,6 +91,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
(output (read-string port)) (output (read-string port))
(status (close-pipe port)) (status (close-pipe port))
(error (with-input-from-file ".error" read-string))) (error (with-input-from-file ".error" read-string)))
(when (file-exists? ".error")
(delete-file ".error"))
(set-current-error-port err) (set-current-error-port err)
(verbose "command[~a]: ~s => ~a [~a]\n" status command output error) (verbose "command[~a]: ~s => ~a [~a]\n" status command output error)
(if (not (zero? status)) "" (if (not (zero? status)) ""
@ -223,6 +225,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
(let ((name (dependency-name dependency))) (let ((name (dependency-name dependency)))
(stderr "checking for ~a..." name) (stderr "checking for ~a..." name)
(let ((result (check cc name))) (let ((result (check cc name)))
(when (file-exists? ".config.c")
(delete-file ".config.c"))
(stderr " ~a\n" (if result "yes" "no")) (stderr " ~a\n" (if result "yes" "no"))
(if result (set-field dependency (dependency-file-name) name) (if result (set-field dependency (dependency-file-name) name)
dependency)))) dependency))))
@ -231,6 +235,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
(let ((name (dependency-name dependency))) (let ((name (dependency-name dependency)))
(stderr "checking for ~a..." name) (stderr "checking for ~a..." name)
(let ((result (check cc (dependency-data dependency)))) (let ((result (check cc (dependency-data dependency))))
(when (file-exists? ".config.c")
(delete-file ".config.c"))
(stderr " ~a\n" (if result "yes" "no")) (stderr " ~a\n" (if result "yes" "no"))
(if result (set-field dependency (dependency-file-name) name) (if result (set-field dependency (dependency-file-name) name)
dependency)))) dependency))))
@ -239,6 +245,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
(let ((name (dependency-name dependency))) (let ((name (dependency-name dependency)))
(stderr "checking for ~a..." name) (stderr "checking for ~a..." name)
(let ((result (check cc (dependency-data dependency)))) (let ((result (check cc (dependency-data dependency))))
(when (file-exists? ".config.c")
(delete-file ".config.c"))
(stderr " ~a\n" (if result "yes" "no")) (stderr " ~a\n" (if result "yes" "no"))
(if result (set-field dependency (dependency-file-name) name) (if result (set-field dependency (dependency-file-name) name)
dependency)))) dependency))))
@ -525,7 +533,7 @@ Some influential environment variables:
("@mes_arch@" . ,mes-arch) ("@mes_arch@" . ,mes-arch)
("@mes_p@" . ,(if mes? "1" "")) ("@mes_p@" . ,(if mes? "1" ""))
("@mesc_p@" . ,(if mesc? "1" "")) ("@mesc_p@" . ,(if mesc? "1" ""))
("@posix_p@" . ,(if posix? "1" "")) ("@with_glibc_p@" . ,(if posix? "1" ""))
("@tcc_p@" . ,(if tcc? "1" "")) ("@tcc_p@" . ,(if tcc? "1" ""))
("@abs_top_srcdir@" . ,abs-top-srcdir) ("@abs_top_srcdir@" . ,abs-top-srcdir)

View File

@ -111,7 +111,7 @@ subst () {
-e s,"@mesc_p@,$mesc_p,"\ -e s,"@mesc_p@,$mesc_p,"\
-e s,"@tcc_p@,$tcc_p,"\ -e s,"@tcc_p@,$tcc_p,"\
-e s,"@mes_arch@,$mes_arch,"\ -e s,"@mes_arch@,$mes_arch,"\
-e s,"@posix_p@,$posix_p,"\ -e s,"@with_glibc_p@,$with_glibc_p,"\
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\ -e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
-e s,"@abs_top_builddir@,$abs_top_builddir,"\ -e s,"@abs_top_builddir@,$abs_top_builddir,"\
-e s,"@top_builddir@,$top_builddir,"\ -e s,"@top_builddir@,$top_builddir,"\
@ -195,7 +195,7 @@ if [ ! "$mesc_p" ]; then
mes_arch=$mes_arch-$compiler mes_arch=$mes_arch-$compiler
fi fi
if [ ! "$mesc_p" -a ! "$mes_p" ]; then if [ ! "$mesc_p" -a ! "$mes_p" ]; then
posix_p=1 with_glibc_p=1
fi fi
subst ${srcdest}mes/module/mes/boot-0.scm.in mes/module/mes/boot-0.scm subst ${srcdest}mes/module/mes/boot-0.scm.in mes/module/mes/boot-0.scm

View File

@ -5,7 +5,8 @@ Subject: GNU Mes 0.19 released
We are pleased to announce the release of GNU Mes 0.19, representing We are pleased to announce the release of GNU Mes 0.19, representing
100 commits over 10 weeks. 100 commits over 10 weeks.
Mes has now brought the Reduced Binary Seed bootstrap to Guix and work Mes has now brought the Reduced Binary Seed bootstrap to Guix (bootstrap
a GNU/Linux system without binary GNU toolchain or equivalent) and work
is ongoing to audit and verify this bootstrap path in NixOS. is ongoing to audit and verify this bootstrap path in NixOS.
This release introduces strings as byte-array, hash-tables and native This release introduces strings as byte-array, hash-tables and native
@ -68,8 +69,8 @@ Packages are available from Guix's core-updates branch.
Here are the MD5 and SHA1 checksums: Here are the MD5 and SHA1 checksums:
f9f901f175fbc8a5a3d90c9c551ccc8c mes-0.19.tar.gz 99e134df87adc5fc5fd2c04941929c23 mes-0.19.tar.gz
4f7612731a745ebb806548186453d55e0d0bf217 mes-0.19.tar.gz c9781b3b6a814acc985c2ac68caa111a56583bca mes-0.19.tar.gz
[*] Use a .sig file to verify that the corresponding file (without the [*] 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 .sig suffix) is intact. First, be sure to download both the .sig file
@ -131,7 +132,7 @@ installed in Guix from a git checkout by running
** Noteworthy bug fixes ** Noteworthy bug fixes
*** Mes now supports characters #\xNN. *** Mes now supports characters #\xNN.
*** Mes now supports assq-ref and assoc-ref with alist == #f. *** Mes now supports assq-ref and assoc-ref with alist == #f.
*** Mes now support \xNN in strings. Fixes using Nyacc-0.86.0. *** Mes now supports \xNN in strings. This allows using Nyacc-0.86.0.
*** MesCC now supports the unary plus operator. *** MesCC now supports the unary plus operator.
*** MesCC now supports the `U' integer suffix. *** MesCC now supports the `U' integer suffix.
*** MesCC now comes with INTnn_MIN/MAX, UINTnn defines in stdint.h. *** MesCC now comes with INTnn_MIN/MAX, UINTnn defines in stdint.h.

View File

@ -1,124 +1,123 @@
digraph "Guix bag" { digraph "Guix bag" {
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" [label = "gcc-mesboot@4.9.4", shape = box, fontname = Helvetica]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" [label = "gcc-mesboot@4.9.4", shape = box, fontname = Helvetica];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/j1kj1qmiv3rg88679bzxxbapgk8gn2qc-gcc-mesboot1-wrapper-4.7.4.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = magenta];
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkgoldenrod]; "/gnu/store/yyhvgy169sksvcs4mycmnxyl0za465sj-gcc-mesboot-4.9.4.drv" -> "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" [color = magenta];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [label = "binutils-mesboot@2.20.1a", shape = box, fontname = Helvetica]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" [label = "binutils-mesboot@2.20.1a", shape = box, fontname = Helvetica];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = red];
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkviolet]; "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = red];
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [label = "binutils-mesboot0@2.20.1a", shape = box, fontname = Helvetica]; "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" [label = "binutils-mesboot0@2.20.1a", shape = box, fontname = Helvetica];
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = red]; "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" [color = cyan3];
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red]; "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red]; "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = red]; "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = cyan3];
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = red]; "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = cyan3];
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [label = "tcc-boot@0.9.27", shape = box, fontname = Helvetica]; "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" [label = "tcc-boot@0.9.27", shape = box, fontname = Helvetica];
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" -> "/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [color = darkgoldenrod]; "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" -> "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" [color = blue];
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" -> "/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" [color = darkgoldenrod]; "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" -> "/gnu/store/3l18gnbldwrkyzgxf9rl0vc3gqgs6vkc-tcc-boot0-0.9.26-6.c004e9a.drv" [color = blue];
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = blue];
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [label = "mes-boot@0.18", shape = box, fontname = Helvetica]; "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" [label = "mes-boot@0.19", shape = box, fontname = Helvetica];
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" -> "/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" [color = cyan3]; "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" -> "/gnu/store/hyvpkk62xhr6blxmrd0s4cam40n48450-bootstrap-mescc-tools-0.5.2.drv" [color = dimgrey];
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = cyan3]; "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = dimgrey];
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" -> "/gnu/store/gz3agxnnlgkafw2c8jnvk2hqmlh85pkc-guile-bootstrap-2.0.drv" [color = cyan3]; "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" -> "/gnu/store/z4vssfndi1la67dvadsb4fv85rx5zig0-bootstrap-mes-0.drv" [color = dimgrey];
"/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" [label = "mescc-tools-boot@0.5.2", shape = box, fontname = Helvetica]; "/gnu/store/hyvpkk62xhr6blxmrd0s4cam40n48450-bootstrap-mescc-tools-0.5.2.drv" [label = "bootstrap-mescc-tools@0.5.2", shape = box, fontname = Helvetica];
"/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet]; "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica];
"/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica]; "/gnu/store/z4vssfndi1la67dvadsb4fv85rx5zig0-bootstrap-mes-0.drv" [label = "bootstrap-mes@0", shape = box, fontname = Helvetica];
"/gnu/store/gz3agxnnlgkafw2c8jnvk2hqmlh85pkc-guile-bootstrap-2.0.drv" [label = "guile-bootstrap@2.0", shape = box, fontname = Helvetica]; "/gnu/store/3l18gnbldwrkyzgxf9rl0vc3gqgs6vkc-tcc-boot0-0.9.26-6.c004e9a.drv" [label = "tcc-boot0@0.9.26-6.c004e9a", shape = box, fontname = Helvetica];
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" [label = "tcc-boot0@0.9.26-4.46ee3f1", shape = box, fontname = Helvetica]; "/gnu/store/3l18gnbldwrkyzgxf9rl0vc3gqgs6vkc-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" [color = darkseagreen];
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [color = darkseagreen]; "/gnu/store/3l18gnbldwrkyzgxf9rl0vc3gqgs6vkc-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/hyvpkk62xhr6blxmrd0s4cam40n48450-bootstrap-mescc-tools-0.5.2.drv" [color = darkseagreen];
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" [color = darkseagreen]; "/gnu/store/3l18gnbldwrkyzgxf9rl0vc3gqgs6vkc-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = darkseagreen];
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/3l18gnbldwrkyzgxf9rl0vc3gqgs6vkc-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/z4vssfndi1la67dvadsb4fv85rx5zig0-bootstrap-mes-0.drv" [color = darkseagreen];
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/gz3agxnnlgkafw2c8jnvk2hqmlh85pkc-guile-bootstrap-2.0.drv" [color = darkseagreen]; "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [label = "diffutils-mesboot@2.7", shape = box, fontname = Helvetica];
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [label = "diffutils-mesboot@2.7", shape = box, fontname = Helvetica]; "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" -> "/gnu/store/ba3vgwp3ins7v31g38f7wn0y2wknxbbi-mes-boot-0.19.drv" [color = magenta];
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [color = red]; "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" -> "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" [color = magenta];
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = red]; "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red]; "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red]; "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = magenta];
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = red]; "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [label = "make-mesboot0@3.80", shape = box, fontname = Helvetica];
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [label = "make-mesboot0@3.80", shape = box, fontname = Helvetica]; "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" -> "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" [color = magenta];
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = blue]; "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = blue]; "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = blue]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [label = "glibc-mesboot0@2.2.5", shape = box, fontname = Helvetica];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [label = "glibc-mesboot0@2.2.5", shape = box, fontname = Helvetica]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = dimgrey]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" [color = dimgrey]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = dimgrey]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = dimgrey]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = dimgrey]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/s31k70hy4hgyvissrwimx2s837494hvg-mesboot-headers-0.19.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" [color = dimgrey]; "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = cyan3];
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = dimgrey]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" [label = "gcc-core-mesboot@2.95.3", shape = box, fontname = Helvetica];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" [label = "gcc-core-mesboot@2.95.3", shape = box, fontname = Helvetica]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" [color = darkgoldenrod];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkgoldenrod]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/a1ff309vviqfm73py9hnssz66ihyl16c-tcc-boot-0.9.27.drv" [color = darkgoldenrod];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = darkgoldenrod]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = darkgoldenrod];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = darkgoldenrod];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = darkgoldenrod];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkgoldenrod]; "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = darkgoldenrod];
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkgoldenrod]; "/gnu/store/s31k70hy4hgyvissrwimx2s837494hvg-mesboot-headers-0.19.drv" [label = "mesboot-headers@0.19", shape = box, fontname = Helvetica];
"/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" [label = "mesboot-headers@0.18", shape = box, fontname = Helvetica]; "/gnu/store/s31k70hy4hgyvissrwimx2s837494hvg-mesboot-headers-0.19.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = dimgrey];
"/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet]; "/gnu/store/s31k70hy4hgyvissrwimx2s837494hvg-mesboot-headers-0.19.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = dimgrey];
"/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkviolet]; "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [label = "linux-libre-headers-bootstrap@0", shape = box, fontname = Helvetica];
"/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [label = "linux-libre-headers-bootstrap@0", shape = box, fontname = Helvetica]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" [label = "gcc-mesboot0@2.95.3", shape = box, fontname = Helvetica];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [label = "gcc-mesboot0@2.95.3", shape = box, fontname = Helvetica]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/dc08x4icyp3vhi3b6gkrpcvclhhb4bs1-gcc-core-mesboot-2.95.3.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkviolet]; "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = dimgrey];
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkviolet]; "/gnu/store/j1kj1qmiv3rg88679bzxxbapgk8gn2qc-gcc-mesboot1-wrapper-4.7.4.drv" [label = "gcc-mesboot1-wrapper@4.7.4", shape = box, fontname = Helvetica];
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" [label = "gcc-mesboot1-wrapper@4.7.4", shape = box, fontname = Helvetica]; "/gnu/store/j1kj1qmiv3rg88679bzxxbapgk8gn2qc-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = darkseagreen];
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = blue]; "/gnu/store/j1kj1qmiv3rg88679bzxxbapgk8gn2qc-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" [color = darkseagreen];
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" [color = blue]; "/gnu/store/j1kj1qmiv3rg88679bzxxbapgk8gn2qc-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" [color = darkseagreen];
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = blue]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" [label = "glibc-mesboot@2.16.0", shape = box, fontname = Helvetica];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" [label = "glibc-mesboot@2.16.0", shape = box, fontname = Helvetica]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen]; "/gnu/store/k0c7r9bfmc6a0ji6kl4gfhlppwlzb013-glibc-mesboot-2.16.0.drv" -> "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" [color = cyan3];
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" [label = "glibc-headers-mesboot@2.16.0", shape = box, fontname = Helvetica];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" [label = "glibc-headers-mesboot@2.16.0", shape = box, fontname = Helvetica]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/s31k70hy4hgyvissrwimx2s837494hvg-mesboot-headers-0.19.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen]; "/gnu/store/i8mwdv9j384qnwb7ipz92a7jb25yw5cw-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" [color = magenta];
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" [label = "gcc-mesboot1@4.7.4", shape = box, fontname = Helvetica];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [label = "gcc-mesboot1@4.7.4", shape = box, fontname = Helvetica]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/rs1ggdq6bmzgjfkfqmkd6a6cxr9437v4-binutils-mesboot-2.20.1a.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/jjhwiiqy26bbz8ljil49j13mw2d60ja1-diffutils-mesboot-2.7.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen]; "/gnu/store/snivnh2vwkdq9iyim060k5bca3arkmd7-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" [color = cyan3];
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkseagreen]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" [label = "make-mesboot@3.82", shape = box, fontname = Helvetica];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [label = "make-mesboot@3.82", shape = box, fontname = Helvetica]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/hb7v0ngmiq8097cr5h019qlhixwyfbgn-binutils-mesboot0-2.20.1a.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkgoldenrod]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/b3znapqr1bjvy35ck6w9g8q18i7azw1a-glibc-mesboot0-2.2.5.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkgoldenrod]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/0nl531x2qxvhq4rsmjb5w6689f1i9s3b-gcc-mesboot0-2.95.3.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [color = darkgoldenrod]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/y12rm6j4zb71d7rfm05lp5zsgk3rwx4g-make-mesboot0-3.80.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkgoldenrod]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/sflg089rcki77ay6p1d9p0k1d4g7yni4-bootstrap-binaries-0.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod]; "/gnu/store/m5wqnh0ap50npqy2bivn4b907jqiwfyn-make-mesboot-3.82.drv" -> "/gnu/store/ffmmqdgq7wicc3z0xlj9b3w1i9g1z4r1-linux-libre-headers-bootstrap-0.drv" [color = magenta];
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkgoldenrod];
} }

View File

@ -34,7 +34,7 @@ Documentation License''.
@titlepage @titlepage
@title GNU Mes Reference Manual @title GNU Mes Reference Manual
@subtitle Full Source Bootstrapping of the GNU GuixSD Operating System @subtitle Full Source Bootstrapping of the GNU Guix Operating System
@author Jan (janneke) Nieuwenhuizen @author Jan (janneke) Nieuwenhuizen
@page @page
@ -169,7 +169,7 @@ For all softwares on such a system we have the full source code and
build recipes available. build recipes available.
@c The Free System Distribution Guidelines (GNU FSDG)@footnote{Examples of @c The Free System Distribution Guidelines (GNU FSDG)@footnote{Examples of
@c free operating systems are GNU GuixSD, GNU Parabola and Trisquel, see @c free operating systems are GNU Guix, GNU Parabola and Trisquel, see
@c https://www.gnu.org/distros/free-system-distribution-guidelines.html} @c https://www.gnu.org/distros/free-system-distribution-guidelines.html}
@c can serve as help to create such a system @c can serve as help to create such a system
@ -253,7 +253,7 @@ binary seed that all software distributions inject are the so called
@emph{bootstrap binaries}. Bootstrap binaries are the initial binary @emph{bootstrap binaries}. Bootstrap binaries are the initial binary
seeds that are used to start building the distribution. seeds that are used to start building the distribution.
The GNU GuixSD operating system has a relatively small closure of The GNU Guix operating system has a relatively small closure of
bootstrap binaries: GNU binutils, GNU gcc, GNU Libc, GNU Guile, and bootstrap binaries: GNU binutils, GNU gcc, GNU Libc, GNU Guile, and
``Static binaries'' (think: bash, bzip2, coreutils, gawk, grep, gzip, ``Static binaries'' (think: bash, bzip2, coreutils, gawk, grep, gzip,
patch, sed, tar, xz). patch, sed, tar, xz).
@ -553,7 +553,7 @@ Recipe for yogurt: Add yogurt to milk.
@end quotation @end quotation
The bootstrap problem we have set out to solve is that none of our The bootstrap problem we have set out to solve is that none of our
modern software distributions, and GuixSD in particular, can be created modern software distributions, and Guix in particular, can be created
all from source code. In addition to the carefully signed source code all from source code. In addition to the carefully signed source code
of all the programs (the `milk') an opaque binary seed (the `yogurt') is of all the programs (the `milk') an opaque binary seed (the `yogurt') is
injected as an essential dependency. injected as an essential dependency.
@ -592,7 +592,7 @@ responsibility.
The Mes full source bootstrap process@footnote{TBH, the current state of The Mes full source bootstrap process@footnote{TBH, the current state of
affairs demands to label this a `Reduced Binary Seed bootstrap'} is affairs demands to label this a `Reduced Binary Seed bootstrap'} is
currently being developed in GuixSD@footnote{See currently being developed in Guix@footnote{See
@file{gnu/packages/commencement.scm} in the @var{core-updates-next} branch in Guix @file{gnu/packages/commencement.scm} in the @var{core-updates-next} branch in Guix
git git
@url{http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/mes.scm?h=wip-bootstrap}}. @url{http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/mes.scm?h=wip-bootstrap}}.
@ -622,11 +622,11 @@ glibc-source + binutils + gcc + glibc0 => glibc
@c This graph is generated from wip-bootstrap, doing: @c This graph is generated from wip-bootstrap, doing:
@c ~/src/guix-boot/pre-inst-env guix graph --type=bag -e '(@@ (gnu packages commencement) gcc-mesboot)' doc/images/gcc-mesboot-graph.dot @c ~/src/guix/core-updates/pre-inst-env guix graph --type=bag -e '(@@ (gnu packages commencement) gcc-mesboot)' > doc/images/gcc-mesboot-graph.dot
@c dot -T png doc/images/gcc-mesboot-graph.dot > doc/images/gcc-mesboot-graph.png @c dot -T png doc/images/gcc-mesboot-graph.dot > doc/images/gcc-mesboot-graph.png
Here's a generated dependency diagram to for the final bootstrap gcc Here's a generated dependency diagram to for the final bootstrap gcc
that builds the rest of GuixSD that builds the rest of Guix.
@image{images/gcc-mesboot-graph,2in,,Reference graph of the gcc-mesboot} @image{images/gcc-mesboot-graph,2in,,Reference graph of the gcc-mesboot}
@ -757,6 +757,11 @@ The initial size of the arena @pxref{5.3,,, sicp, SICP} in cells. Default: 20,0
The maximum size of the arena in cells. Default: 100,000,000. The maximum size of the arena in cells. Default: 100,000,000.
@item MES_MAX_STRING
@vindex MES_MAX_STRING
The maximum size of a string. Default: 524,288.
@item MES_DEBUG @item MES_DEBUG
@vindex MES_DEBUG @vindex MES_DEBUG
@ -814,6 +819,12 @@ The @var{option}s can be among the following:
@table @code @table @code
@item --align
align globals
@item --base-address=ADRRESS
use BaseAddress ADDRESS [0x1000000]
@item -c @item -c
@cindex compile @cindex compile
preprocess, compile and assemble only; do not link preprocess, compile and assemble only; do not link
@ -821,6 +832,12 @@ preprocess, compile and assemble only; do not link
@item -D @var{DEFINE}[=@var{VALUE}] @item -D @var{DEFINE}[=@var{VALUE}]
@cindex define DEFINE [VALUE=1] @cindex define DEFINE [VALUE=1]
@item -dumpmachine
@cindex arch
@cindex architecture
@cindex machine
display the compiler's target processor
@item -E @item -E
preprocess only; do not compile, assemble or link preprocess only; do not compile, assemble or link
@ -842,18 +859,30 @@ append DIR to library path
@item -l LIBNAME @item -l LIBNAME
link with LIBNAME link with LIBNAME
@item -m BITS
compile for BITS bits [32]
@item -O LEVEL
use optimizing LEVEL
@item -o FILE @item -o FILE
write output to FILE write output to FILE
@item -S @item -S
preprocess and compile only; do not assemble or link preprocess and compile only; do not assemble or link
@item --std=STANDARD
assume that the input sources are for STANDARD
@item -v, --version @item -v, --version
display version and exit display version and exit
@item -w,--write=TYPE @item -w,--write=TYPE
dump Nyacc AST using TYPE @{pretty-print,write@} dump Nyacc AST using TYPE @{pretty-print,write@}
@item -x LANGUAGE
specify LANGUAGE of the following input files
@end table @end table
@menu @menu
@ -1041,7 +1070,7 @@ Please send bug reports with full details to @email{bug-mes@@gnu.org}.
We would like to thank the following people for their help: Jeremiah We would like to thank the following people for their help: Jeremiah
Orians, Peter de Wachter, rain1, Ricardo Wurmus, Rutger van Beusekom. Orians, Peter de Wachter, rain1, Ricardo Wurmus, Rutger van Beusekom.
We also thank Ludovic Courtès for creating GuixSD and making the We also thank Ludovic Courtès for creating GNU Guix and making the
bootstrap problem so painfully visible, John McCarthy for creating bootstrap problem so painfully visible, John McCarthy for creating
LISP-1.5 and Alan Kay for their inspiring comment on LISP-1.5 and Alan Kay for their inspiring comment on
@url{https://queue.acm.org/detail.cfm?id=1039523, Page 13}. @url{https://queue.acm.org/detail.cfm?id=1039523, Page 13}.

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -29,11 +29,23 @@
#else // ! WITH_GLIBC #else // ! WITH_GLIBC
#include <endian.h> #include <endian.h>
int isalnum (int c);
int isalpha (int c); int isalpha (int c);
int isascii (int c); int isascii (int c);
int iscntrl (int c);
int isdigit (int c); int isdigit (int c);
int isxdigit (int c); int isgraph (int c);
int islower (int c);
int isnumber (int c, int base);
int isprint (int c);
int ispunct (int c);
int isspace (int c); int isspace (int c);
int isupper (int c);
int isxdigit (int c);
int tolower (int c);
int toupper (int c);
#endif // ! WITH_GLIBC #endif // ! WITH_GLIBC
#endif // __MES_CTYPE_H #endif // __MES_CTYPE_H

View File

@ -38,14 +38,16 @@ int errno;
#define ENOENT 2 #define ENOENT 2
#define EINTR 4 #define EINTR 4
#define EIO 5 #define EIO 5
#define ENXIO 6
#define E2BIG 7 #define E2BIG 7
#define ENOEXEC 8 #define ENOEXEC 8
#define EBADF 9 #define EBADF 9
#define ECHILD 10 #define ECHILD 10
#define EAGAIN 11 #define EAGAIN 11
#define ENOMEM 12 #define ENOMEM 12
#define EACCES 13 #define EACCES 13
#define EEXIST 17 #define EEXIST 17
#define EXDEV 18
#define ENOTDIR 20 #define ENOTDIR 20
#define EISDIR 21 #define EISDIR 21
#define EINVAL 22 #define EINVAL 22

View File

@ -46,6 +46,7 @@
#define F_GETFL 3 #define F_GETFL 3
#define F_SETFL 4 #define F_SETFL 4
#define creat(file_name, mode) open (file_name, O_WRONLY | O_CREAT | O_TRUNC, mode)
int dup (int old); int dup (int old);
int dup2 (int old, int new); int dup2 (int old, int new);
int fcntl (int filedes, int command, ...); int fcntl (int filedes, int command, ...);

43
include/grp.h Normal file
View File

@ -0,0 +1,43 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2019 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_GRP_H
#define __MES_GRP_H 1
#if WITH_GLIBC
#undef __MES_GRP_H
#include_next <pwd.h>
#else // ! WITH_GLIBC
struct group
{
char *gr_name;
gid_t gr_gid;
char **gr_mem;
};
struct group *getgrent (void);
void endgrent (void);
void setgrent (void);
struct group *getgrgid (gid_t gid);
struct group *getgrnam (char const *name);
#endif // ! WITH_GLIBC
#endif // __MES_GRP_H

View File

@ -21,11 +21,6 @@
#ifndef __MES_LIBMES_MINI_H #ifndef __MES_LIBMES_MINI_H
#define __MES_LIBMES_MINI_H #define __MES_LIBMES_MINI_H
char **environ;
int g_stdin;
int g_stdout;
int g_stderr;
#if !WITH_GLIBC #if !WITH_GLIBC
#ifndef _SIZE_T #ifndef _SIZE_T
@ -64,18 +59,25 @@ int errno;
#endif //!WITH_LIBC #endif //!WITH_LIBC
// CONSTANT STDIN 0
#ifndef STDIN #ifndef STDIN
#define STDIN 0 #define STDIN 0
#endif #endif
// CONSTANT STDOUT 1
#ifndef STDOUT #ifndef STDOUT
#define STDOUT 1 #define STDOUT 1
#endif #endif
// CONSTANT STDERR 2
#ifndef STDERR #ifndef STDERR
#define STDERR 2 #define STDERR 2
#endif #endif
char **environ;
int __stdin;
int __stdout;
int __stderr;
int eputs (char const* s); int eputs (char const* s);
int puts (char const* s); int puts (char const* s);

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -23,14 +23,21 @@
#include <libmes-mini.h> #include <libmes-mini.h>
#if WITH_GLIBC
int mes_open (char const *file_name, int flags, ...);
#define open mes_open
#endif
int __mes_debug (); int __mes_debug ();
double abtod (char const** p, int base);
long abtol (char const** p, int base); long abtol (char const** p, int base);
char const* ntoab (long number, int base, int signed_p); char *dtoab (double number, int base, int signed_p);
char const* itoa (int number); char *itoa (int number);
char const* ltoa (long number); char *ltoa (long number);
char const* ultoa (unsigned long number); char *ltoab (long x, int base);
char const* utoa (unsigned number); char *ntoab (long number, int base, int signed_p);
char const* ltoab (long x, int base); char *ultoa (unsigned long number);
char *utoa (unsigned number);
int atoi (char const *s); int atoi (char const *s);
int eputc (int c); int eputc (int c);
int fdgetc (int fd); int fdgetc (int fd);

View File

@ -83,4 +83,9 @@
// make+POSIX // make+POSIX
#define SYS_sigprocmask 0x7e #define SYS_sigprocmask 0x7e
// tar
#define SYS_symlink 0x53
#define SYS_readlink 0x55
#define SYS_mknod 0x0e
#endif // __MES_LINUX_X86_SYSCALL_H #endif // __MES_LINUX_X86_SYSCALL_H

View File

@ -77,7 +77,12 @@
#define SYS_getegid 0x6c #define SYS_getegid 0x6c
#define SYS_getppid 0x6e #define SYS_getppid 0x6e
// make+POSIX // make+WITH_GLIBC
#define SYS_rt_sigprocmask 0x0e #define SYS_rt_sigprocmask 0x0e
// tar
#define SYS_symlink 0x58
#define SYS_readlink 0x59
#define SYS_mknod 0x85
#endif // __MES_LINUX_X86_64_SYSCALL_H #endif // __MES_LINUX_X86_64_SYSCALL_H

View File

@ -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,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -31,7 +31,7 @@
#define __FOO_VARARGS 1 #define __FOO_VARARGS 1
#endif #endif
typedef long va_list; typedef char* va_list;
#define va_start(ap, last) (void)((ap) = (char*)(&(last) + 1)) #define va_start(ap, last) (void)((ap) = (char*)(&(last) + 1))
#define va_arg(ap, type) (type)(((long*)((ap) = ((ap) + sizeof (void*))))[-1]) #define va_arg(ap, type) (type)(((long*)((ap) = ((ap) + sizeof (void*))))[-1])
#define va_end(ap) (void)((ap) = 0) #define va_end(ap) (void)((ap) = 0)

View File

@ -58,6 +58,9 @@ typedef int int32_t;
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
typedef long long int64_t; typedef long long int64_t;
typedef int intmax_t;
typedef unsigned uintmax_t;
#ifndef __MES_SIZE_T #ifndef __MES_SIZE_T
#define __MES_SIZE_T #define __MES_SIZE_T
#undef size_t #undef size_t
@ -70,10 +73,12 @@ typedef unsigned long size_t;
typedef long intptr_t; typedef long intptr_t;
#endif #endif
// FIXME #ifndef __MES_UINTPTR_T
typedef int intmax_t; #define __MES_UINTPTR_T
typedef unsigned uintmax_t; #undef intptr_t
typedef unsigned* uintptr_t; typedef long uintptr_t;
#endif
#ifndef __MES_PTRDIFF_T #ifndef __MES_PTRDIFF_T
#define __MES_PTRDIFF_T #define __MES_PTRDIFF_T

View File

@ -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,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -31,6 +31,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <alloca.h> #include <alloca.h>
double atof (char const *s);
int atoi (char const *s); int atoi (char const *s);
int atexit (void (*function) (void)); int atexit (void (*function) (void));
void * calloc (size_t nmemb, size_t size); void * calloc (size_t nmemb, size_t size);

View File

@ -50,6 +50,8 @@ struct rusage
#define RUSAGE_SELF 0 #define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1 #define RUSAGE_CHILDREN -1
#define RLIMIT_NOFILE 1024
#define OPEN_MAX RLIMIT_NOFILE
int getrusage (int processes, struct rusage *rusage); int getrusage (int processes, struct rusage *rusage);

View File

@ -82,10 +82,12 @@ struct stat
int chmod (char const *file_name, mode_t mode); int chmod (char const *file_name, mode_t mode);
int mkdir (char const *file_name, mode_t mode); int mkdir (char const *file_name, mode_t mode);
int mknod (char const *file_name, mode_t mode, dev_t dev);
int chown (char const *file_name, uid_t owner, gid_t group); int chown (char const *file_name, uid_t owner, gid_t group);
int rmdir (char const *file_name); int rmdir (char const *file_name);
int stat (char const *file_name, struct stat *buf); int stat (char const *file_name, struct stat *buf);
#define S_IFIFO 0010000
#define S_IFCHR 0020000 #define S_IFCHR 0020000
#define S_IFDIR 0040000 #define S_IFDIR 0040000
#define S_IFBLK 0060000 #define S_IFBLK 0060000
@ -93,6 +95,7 @@ int stat (char const *file_name, struct stat *buf);
#define S_IFLNK 0120000 #define S_IFLNK 0120000
#define S_IFMT 0170000 #define S_IFMT 0170000
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)

View File

@ -135,6 +135,15 @@ typedef long ssize_t;
typedef unsigned uid_t; typedef unsigned uid_t;
#endif #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 // ! WITH_GLIBC #endif // ! WITH_GLIBC
#endif // __MES_SYS_TYPES_H #endif // __MES_SYS_TYPES_H

View File

@ -49,6 +49,14 @@
#define CS8 0000060 #define CS8 0000060
#define PARENB 0000400 #define PARENB 0000400
struct winsize
{
unsigned short ws_row;
unsigned short ws_col;
unsigned short ws_xpixel;
unsigned short ws_ypixel;
};
struct termio struct termio
{ {
unsigned short c_iflag; unsigned short c_iflag;

View File

@ -58,6 +58,7 @@ struct timespec
int clock_gettime (clockid_t clk_id, struct timespec *tp); int clock_gettime (clockid_t clk_id, struct timespec *tp);
struct tm *localtime (time_t const *timep); struct tm *localtime (time_t const *timep);
struct tm *gmtime (time_t const *time); struct tm *gmtime (time_t const *time);
int mktime (struct tm *broken_time);
time_t time (time_t *tloc); time_t time (time_t *tloc);

View File

@ -62,6 +62,7 @@ unsigned int alarm (unsigned int seconds);
int close (int fd); int close (int fd);
int execv (char const *file_name, char *const argv[]); int execv (char const *file_name, char *const argv[]);
int execl (char const *file_name, char const *arg, ...); int execl (char const *file_name, char const *arg, ...);
int execlp (char const *file_name, char const *arg, ...);
int execve (char const *file, char *const argv[], char *const env[]); int execve (char const *file, char *const argv[], char *const env[]);
int execvp (char const *file, char *const argv[]); int execvp (char const *file, char *const argv[]);
int fork (void); int fork (void);
@ -72,19 +73,23 @@ int setgid (gid_t newgid);
int setuid (uid_t newuid); int setuid (uid_t newuid);
uid_t geteuid (void); uid_t geteuid (void);
gid_t getegid (void); gid_t getegid (void);
pid_t getpgrp (void);
pid_t getpid (void);
int getpgid (pid_t pid);
int isatty (int fd); int isatty (int fd);
int link (char const *oldname, char const *newname); int link (char const *old_name, char const *new_name);
off_t lseek (int fd, off_t offset, int whence); off_t lseek (int fd, off_t offset, int whence);
ssize_t read (int fd, void *buffer, size_t size); ssize_t read (int fd, void *buffer, size_t size);
ssize_t readlink (char const *file_name, char *buffer, size_t size);
#if __SBRK_CHAR_PTRDIFF #if __SBRK_CHAR_PTRDIFF
/* xmalloc in binutils <= 2.10.1 uses this old prototype */ /* xmalloc in binutils <= 2.10.1 uses this old prototype */
char * sbrk (ptrdiff_t delta); char * sbrk (ptrdiff_t delta);
#else #else
void * sbrk (intptr_t delta); void * sbrk (intptr_t delta);
#endif #endif
int symlink (char const *old_name, char const *new_name);
int unlink (char const *file_name); int unlink (char const *file_name);
ssize_t write (int filedes, void const *buffer, size_t size); ssize_t write (int filedes, void const *buffer, size_t size);
pid_t getpid (void);
#endif // ! WITH_GLIBC #endif // ! WITH_GLIBC

27
lib/ctype/isgraph.c Normal file
View File

@ -0,0 +1,27 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2019 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/>.
*/
#include <ctype.h>
int
isgraph (int c)
{
return c > 32 && c < 127;
}

View File

@ -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,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -31,7 +31,7 @@
// m4 // m4
#include <stdlib/abort.c> #include <stdlib/abort.c>
#include <stdlib/atol.c> #include <stdlib/atol.c>
#include <stub/atof.c> #include <stdlib/atof.c>
#include <string/bcmp.c> #include <string/bcmp.c>
#include <string/bcopy.c> #include <string/bcopy.c>
#include <string/bzero.c> #include <string/bzero.c>
@ -83,7 +83,6 @@
#include <math/fabs.c> #include <math/fabs.c>
// gcc // gcc
#include <stdio/freopen.c> #include <stdio/freopen.c>
#include <stub/times.c> #include <stub/times.c>
#include <posix/sleep.c> #include <posix/sleep.c>
@ -119,3 +118,16 @@
#include <stub/rand.c> #include <stub/rand.c>
#include <stub/sigdelset.c> #include <stub/sigdelset.c>
#include <stub/ttyname.c> #include <stub/ttyname.c>
// gawk
#include <ctype/isgraph.c>
#include <stub/getpgid.c>
#include <stub/getpgrp.c>
// #include <mes/abtod.c> in libc+tcc for strtod,strtof (could be stubbed)
// tar
#include <posix/execlp.c>
#include <stub/getgrgid.c>
#include <stub/getgrnam.c>
#include <stub/mktime.c>
#include <stub/setgrent.c>

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -61,6 +61,8 @@ int errno;
#include <ctype/isupper.c> #include <ctype/isupper.c>
#include <ctype/tolower.c> #include <ctype/tolower.c>
#include <ctype/toupper.c> #include <ctype/toupper.c>
#include <mes/abtod.c> // implementation instead of stub for GNU gawk
#include <mes/dtoab.c> // implementation instead of stub for GNU gawk
#include <mes/search-path.c> #include <mes/search-path.c>
#include <posix/execvp.c> #include <posix/execvp.c>
#include <stdio/fclose.c> #include <stdio/fclose.c>
@ -85,6 +87,7 @@ int errno;
#include <stdio/vsscanf.c> #include <stdio/vsscanf.c>
#include <stdlib/calloc.c> #include <stdlib/calloc.c>
#include <stdlib/qsort.c> #include <stdlib/qsort.c>
#include <stdlib/strtod.c>
#include <stdlib/strtof.c> #include <stdlib/strtof.c>
#include <stdlib/strtol.c> #include <stdlib/strtol.c>
#include <stdlib/strtold.c> #include <stdlib/strtold.c>
@ -93,7 +96,6 @@ int errno;
#include <stdlib/strtoull.c> #include <stdlib/strtoull.c>
#include <string/memmem.c> #include <string/memmem.c>
#include <string/memmove.c> #include <string/memmove.c>
#include <string/memset.c>
#include <string/strcat.c> #include <string/strcat.c>
#include <string/strchr.c> #include <string/strchr.c>
#include <string/strlwr.c> #include <string/strlwr.c>
@ -105,5 +107,4 @@ int errno;
#include <stub/ldexp.c> #include <stub/ldexp.c>
#include <stub/mprotect.c> #include <stub/mprotect.c>
#include <stub/localtime.c> #include <stub/localtime.c>
#include <stub/strtod.c>
#include <stub/sigemptyset.c> #include <stub/sigemptyset.c>

View File

@ -40,8 +40,6 @@
#error both __GNU__ and _linux__ are undefined, choose one #error both __GNU__ and _linux__ are undefined, choose one
#endif #endif
int g_stdin = 0;
void _env (); void _env ();
#define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MAX(a, b) (((a) > (b)) ? (a) : (b))
@ -60,9 +58,9 @@ __mes_debug ()
#if !___GNU__ #if !___GNU__
#include <string/memcpy.c>
#include <stdlib/malloc.c>
#include <assert/assert.c> #include <assert/assert.c>
#include <stdlib/malloc.c>
#include <string/memcpy.c>
#endif #endif
#include <stdio/getchar.c> #include <stdio/getchar.c>
@ -76,15 +74,16 @@ __mes_debug ()
#include <string/memchr.c> #include <string/memchr.c>
#include <string/memcmp.c> #include <string/memcmp.c>
#include <string/memset.c>
#include <string/strcmp.c> #include <string/strcmp.c>
#include <string/strcpy.c> #include <string/strcpy.c>
#include <string/strncmp.c> #include <string/strncmp.c>
#include <stdlib/free.c> #include <stdlib/free.c>
#include <stdlib/realloc.c> #include <stdlib/realloc.c>
#include <stdlib/getenv.c>
#include <stdlib/setenv.c>
#include <posix/getenv.c>
#include <posix/isatty.c> #include <posix/isatty.c>
#include <posix/setenv.c>
#include <posix/wait.c> #include <posix/wait.c>
#include <posix/execv.c> #include <posix/execv.c>

View File

@ -48,7 +48,7 @@
// m4 // m4
#include <stdlib/abort.c> #include <stdlib/abort.c>
#include <stub/atof.c> #include <stdlib/atof.c>
#include <string/bcmp.c> #include <string/bcmp.c>
#include <string/bcopy.c> #include <string/bcopy.c>
#include <string/bzero.c> #include <string/bzero.c>

View File

@ -41,10 +41,32 @@
#include <mes/fdputs.c> #include <mes/fdputs.c>
#include <mes/fdungetc.c> #include <mes/fdungetc.c>
#if POSIX #if WITH_GLIBC
#undef open
#include <fcntl.h>
#include <stdarg.h>
// The Mes C Library defines and initializes these in crt1
int __stdin = STDIN;
int __stdout = STDOUT;
int __stderr = STDERR;
int
mes_open (char const *file_name, int flags, ...)
{
va_list ap;
va_start (ap, flags);
int mask = va_arg (ap, int);
__ungetc_init ();
int r = open (file_name, flags, mask);
if (r > 2)
__ungetc_buf[r] = -1;
va_end (ap);
return r;
}
#include <mes/eputs.c> #include <mes/eputs.c>
#include <mes/oputs.c> #include <mes/oputs.c>
#endif // POSIX #endif // WITH_GLIBC
#include <mes/eputc.c> #include <mes/eputc.c>
#include <mes/oputc.c> #include <mes/oputc.c>

View File

@ -197,3 +197,22 @@ sigprocmask (int how, sigset_t const *set, sigset_t *oldset)
return _sys_call3 (SYS_rt_sigprocmask, (long)how, (long)set, (long)oldset); return _sys_call3 (SYS_rt_sigprocmask, (long)how, (long)set, (long)oldset);
#endif #endif
} }
// tar
int
symlink (char const *old_name, char const *new_name)
{
return _sys_call2 (SYS_symlink, (long)old_name, (long)new_name);
}
ssize_t
readlink (char const *file_name, char *buffer, size_t size)
{
return _sys_call3 (SYS_readlink, (long)file_name, (long)buffer, (long)size);
}
int
mknod (char const *file_name, mode_t mode, dev_t dev)
{
return _sys_call3 (SYS_mknod, (long)file_name, (long)mode, (long)dev);
}

View File

@ -69,14 +69,10 @@ read (int filedes, void *buffer, size_t size)
int int
_open3 (char const *file_name, int flags, int mask) _open3 (char const *file_name, int flags, int mask)
{ {
#if !MES_BOOTSTRAP
if (!flags)
{
_ungetc_pos = -1;
_ungetc_fd = -1;
}
#endif
int r = _sys_call3 (SYS_open, (long)file_name, (int)flags, (int)mask); int r = _sys_call3 (SYS_open, (long)file_name, (int)flags, (int)mask);
__ungetc_init ();
if (r > 2)
__ungetc_buf[r] = -1;
return r; return r;
} }

View File

@ -23,11 +23,8 @@
int int
close (int filedes) close (int filedes)
{ {
if (_ungetc_fd == filedes) if (filedes > 2)
{ __ungetc_buf[filedes] = -1;
_ungetc_pos = -1;
_ungetc_fd = -1;
}
return _sys_call1 (SYS_close, (int)filedes); return _sys_call1 (SYS_close, (int)filedes);
} }

View File

@ -23,7 +23,7 @@
// instead of calling main, it seems to call either _main or ___main, // instead of calling main, it seems to call either _main or ___main,
// let's try _main first // let's try _main first
char **environ = 0; #include <libmes-mini.h>
int _main (int argc, char *argv[]); int _main (int argc, char *argv[]);
void void

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -18,12 +18,32 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
char **environ = 0; #include <libmes-mini.h>
//int main (int argc, char *argv[], char *envp[]); //int main (int argc, char *argv[], char *envp[]);
void void
_start () _start ()
{ {
asm (
"mov $0,%%eax\n\t"
"mov %%eax,%0\n"
: "=r" (__stdin)
: //no inputs ""
);
asm (
"mov $1,%%eax\n\t"
"mov %%eax,%0\n"
: "=r" (__stdout)
: //no inputs ""
);
asm (
"mov $2,%%eax\n\t"
"mov %%eax,%0\n"
: "=r" (__stderr)
: //no inputs ""
);
asm ( asm (
"mov %%ebp,%%eax\n\t" "mov %%ebp,%%eax\n\t"
"add $4,%%eax\n\t" "add $4,%%eax\n\t"

View File

@ -30,6 +30,7 @@ _exit (int code)
"int $0x80\n\t" "int $0x80\n\t"
: // no outputs "=" (r) : // no outputs "=" (r)
: "rm" (code) : "rm" (code)
: "eax", "ebx"
); );
// not reached // not reached
_exit (0); _exit (0);

View File

@ -18,12 +18,22 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
char **environ = 0; #include "libmes-mini.h"
int main (int argc, char *argv[], char *envp[]); int main (int argc, char *argv[], char *envp[]);
int int
_start () _start ()
{ {
asm ("mov____$i8,%eax !0");
asm ("mov____%eax,0x32 &__stdin");
asm ("mov____$i8,%eax !1");
asm ("mov____%eax,0x32 &__stdout");
asm ("mov____$i8,%eax !2");
asm ("mov____%eax,0x32 &__stderr");
asm ("mov____%ebp,%eax"); asm ("mov____%ebp,%eax");
asm ("add____$i8,%eax !4"); asm ("add____$i8,%eax !4");

View File

@ -23,7 +23,7 @@
// instead of calling main, it seems to call either _main or ___main, // instead of calling main, it seems to call either _main or ___main,
// let's try _main first // let's try _main first
char **environ = 0; #include <libmes-mini.h>
int main (int argc, char *argv[]); int main (int argc, char *argv[]);
// gcc x86_64 calling convention: // gcc x86_64 calling convention:

View File

@ -18,7 +18,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/>.
*/ */
char **environ = 0; #include <libmes-mini.h>
// int main (int argc, char *argv[]); // int main (int argc, char *argv[]);
// gcc x86_64 calling convention: // gcc x86_64 calling convention:
@ -27,6 +27,26 @@ char **environ = 0;
void void
_start () _start ()
{ {
asm (
"mov $0,%%rax\n\t"
"mov %%rax,%0\n"
: "=r" (__stdin)
: //no inputs ""
);
asm (
"mov $1,%%rax\n\t"
"mov %%rax,%0\n"
: "=r" (__stdout)
: //no inputs ""
);
asm (
"mov $2,%%rax\n\t"
"mov %%rax,%0\n"
: "=r" (__stderr)
: //no inputs ""
);
asm ( asm (
"mov %%rbp,%%rax\n\t" "mov %%rbp,%%rax\n\t"
"add $8,%%rax\n\t" "add $8,%%rax\n\t"

View File

@ -18,12 +18,21 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
char **environ = 0; #include "libmes-mini.h"
int main (int argc, char *argv[]); int main (int argc, char *argv[], char *envp[]);
int int
_start () _start ()
{ {
asm ("mov____$i8,%rax !0");
asm ("mov____%rax,0x32 &__stdin");
asm ("mov____$i8,%rax !1");
asm ("mov____%rax,0x32 &__stdout");
asm ("mov____$i8,%rax !2");
asm ("mov____%rax,0x32 &__stderr");
#if 0 //MES_CCAMD64 #if 0 //MES_CCAMD64
asm ("add____$i32,%rbp %0x80"); // FIXME: corresponds to x86_64/as.scm function-preamble-fu asm ("add____$i32,%rbp %0x80"); // FIXME: corresponds to x86_64/as.scm function-preamble-fu
#endif #endif

53
lib/mes/abtod.c Normal file
View File

@ -0,0 +1,53 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 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/>.
*/
#include <libmes.h>
double
abtod (char const **p, int base)
{
char const *s = *p;
double d = 0;
int sign_p = 0;
if (!base)
base = 10;
double dbase = base;
long i = abtol (&s, base);
long f = 0;
long e = 0;
if (*s == '.')
{
s++;
f = abtol (&s, base);
}
if (*s == 'e')
{
s++;
e = abtol (&s, base);
}
d = i + f / dbase;
if (e < 0)
while (e++)
d = d / dbase;
while (e--)
d = d * dbase;
*p = s;
return sign_p ? -d : d;
}

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -19,18 +19,23 @@
*/ */
#include <libmes.h> #include <libmes.h>
#include <ctype.h>
long long
abtol (char const **p, int base) abtol (char const **p, int base)
{ {
char const *s = *p; char const *s = *p;
int i = 0; int i = 0;
int sign = 1; int sign_p = 0;
if (!base) if (!base)
base = 10; base = 10;
while (isspace (*s))
s++;
if (*s && *s == '+')
s++;
if (*s && *s == '-') if (*s && *s == '-')
{ {
sign = -1; sign_p = 1;
s++; s++;
} }
while (isnumber (*s, base)) while (isnumber (*s, base))
@ -41,5 +46,5 @@ abtol (char const **p, int base)
s++; s++;
} }
*p = s; *p = s;
return i * sign; return sign_p ? -i : i;
} }

45
lib/mes/dtoab.c Normal file
View File

@ -0,0 +1,45 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 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/>.
*/
#include <libmes.h>
#include <limits.h>
char *
dtoab (double d, int base, int signed_p)
{
static char dtoa_buf[40];
long i = (long)d;
char *p = ntoab (i, base, signed_p);
strcpy (dtoa_buf, p);
long f = (d - (double)i) * (double)100000000000;
if (f)
{
if (f < 0)
f = -f;
strcat (dtoa_buf, ".");
p = ntoab (f, base, 1);
strcat (dtoa_buf, p);
p = strchr (dtoa_buf, 0);
p--;
while (*p && *p == '0')
*p-- = 0;
}
return dtoa_buf;
}

View File

@ -23,5 +23,5 @@
int int
eputc (int c) eputc (int c)
{ {
return fdputc (c, g_stderr); return fdputc (c, __stderr);
} }

View File

@ -24,6 +24,6 @@ int
eputs (char const* s) eputs (char const* s)
{ {
int i = strlen (s); int i = strlen (s);
write (g_stderr, s, i); write (__stderr, s, i);
return 0; return 0;
} }

View File

@ -19,50 +19,34 @@
*/ */
#include <libmes.h> #include <libmes.h>
#include <limits.h>
#include <sys/resource.h>
int _ungetc_pos = -1; int __ungetc_buf[RLIMIT_NOFILE+1] = {0};
int _ungetc_fd = -1;
char _ungetc_buf[10]; void
__ungetc_init ()
{
if (__ungetc_buf[RLIMIT_NOFILE] == 0)
memset (__ungetc_buf, -1, (RLIMIT_NOFILE+1)*sizeof (int));
}
int int
fdgetc (int fd) fdgetc (int fd)
{ {
__ungetc_init ();
char c; char c;
int i; int i = __ungetc_buf[fd];
if (_ungetc_pos == -1) if (i >= 0)
__ungetc_buf[fd] = -1;
else
{ {
int r = read (fd, &c, 1); int r = read (fd, &c, 1);
if (r < 1) if (r < 1)
return -1; return -1;
i = c; i = c;
} }
else
{
i = _ungetc_buf[_ungetc_pos];
if (_ungetc_fd != fd && i == 10)
{
// FIXME: Nyacc's ungetc exposes harmless libmec.c bug
// we need one unget position per FD
_ungetc_pos = -1;
_ungetc_fd = -1;
return fdgetc (fd);
}
else if (_ungetc_fd != fd)
{
eputs (" ***MES C LIB*** fdgetc ungetc conflict unget-fd=");
eputs (itoa (_ungetc_fd));
eputs (", fdgetc-fd=");
eputs (itoa (fd));
eputs (", c=");
eputs (itoa ( _ungetc_buf[_ungetc_pos]));
eputs ("\n");
exit (1);
}
i = _ungetc_buf[_ungetc_pos];
_ungetc_pos -= 1;
if (_ungetc_pos == -1)
_ungetc_fd = -1;
}
if (i < 0) if (i < 0)
i += 256; i += 256;

View File

@ -23,26 +23,22 @@
int int
fdungetc (int c, int fd) fdungetc (int c, int fd)
{ {
__ungetc_init ();
if (c == -1) if (c == -1)
return c; return c;
if (_ungetc_pos == -1) else if (__ungetc_buf[fd] != -1)
_ungetc_fd = fd;
else if (_ungetc_fd != fd)
{ {
eputs (" ***MES LIB C*** fdungetc ungetc conflict unget-fd="); eputs (" ***MES C LIB*** fdungetc ungetc buffer overflow fd=");
eputs (itoa (_ungetc_fd));
eputs (", fdungetc-fd=");
eputs (itoa (fd)); eputs (itoa (fd));
eputs ("\n"); eputs ("\n");
exit (1); exit (1);
} }
_ungetc_pos++; __ungetc_buf[fd] = c;
_ungetc_buf[_ungetc_pos] = c;
return c; return c;
} }
int int
_fdungetc_p (int fd) _fdungetc_p (int fd)
{ {
return _ungetc_pos > -1; return __ungetc_buf[fd] >= 0;
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 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 <libmes.h> #include <libmes.h>
char const* char *
itoa (int x) itoa (int x)
{ {
return ntoab (x, 10, 1); return ntoab (x, 10, 1);

View File

@ -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,2019 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 <libmes.h> #include <libmes.h>
char const* char *
ltoa (long x) ltoa (long x)
{ {
return ntoab (x, 10, 1); return ntoab (x, 10, 1);

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 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 <libmes.h> #include <libmes.h>
char const* char *
ltoab (long x, int base) ltoab (long x, int base)
{ {
return ntoab (x, base, 1); return ntoab (x, base, 1);

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -20,18 +20,18 @@
#include <libmes.h> #include <libmes.h>
char const* char *
ntoab (long x, int base, int signed_p) ntoab (long x, int base, int signed_p)
{ {
static char itoa_buf[20]; static char itoa_buf[20];
char *p = itoa_buf + 11; char *p = itoa_buf + 11;
*p-- = 0; *p-- = 0;
int sign = 0; int sign_p = 0;
unsigned long u = x; unsigned long u = x;
if (signed_p && x < 0) if (signed_p && x < 0)
{ {
sign = 1; sign_p = 1;
u = -x; u = -x;
} }
@ -42,7 +42,7 @@ ntoab (long x, int base, int signed_p)
u = u / base; u = u / base;
} while (u); } while (u);
if (sign && *(p + 1) != '0') if (sign_p && *(p + 1) != '0')
*p-- = '-'; *p-- = '-';
return p+1; return p+1;

View File

@ -23,5 +23,5 @@
int int
oputc (int c) oputc (int c)
{ {
return fdputc (c, g_stdout); return fdputc (c, __stdout);
} }

View File

@ -24,6 +24,6 @@ int
oputs (char const* s) oputs (char const* s)
{ {
int i = strlen (s); int i = strlen (s);
write (g_stdout, s, i); write (__stdout, s, i);
return 0; return 0;
} }

View File

@ -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,2019 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 <libmes.h> #include <libmes.h>
char const* char *
ultoa (unsigned long x) ultoa (unsigned long x)
{ {
return ntoab (x, 10, 1); return ntoab (x, 10, 1);

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 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 <libmes.h> #include <libmes.h>
char const* char *
utoa (unsigned x) utoa (unsigned x)
{ {
return ntoab (x, 10, 0); return ntoab (x, 10, 0);

View File

@ -22,20 +22,13 @@
#include <unistd.h> #include <unistd.h>
int int
execl (char const *file_name, char const *arg, ...) vexec (char const *file_name, va_list ap)
{ {
if (__mes_debug () > 2) char *arg = va_arg (ap, char const *);
{
eputs ("execl "); eputs (file_name); eputs ("\n");
}
char *argv[1000]; // POSIX minimum 4096 char *argv[1000]; // POSIX minimum 4096
int i = 0; int i = 0;
va_list ap;
va_start (ap, arg);
argv[i++] = file_name; argv[i++] = file_name;
arg = va_arg (ap, char const *);
while (arg) while (arg)
{ {
argv[i++] = arg; argv[i++] = arg;
@ -50,3 +43,18 @@ execl (char const *file_name, char const *arg, ...)
va_end (ap); va_end (ap);
return r; return r;
} }
int
execl (char const *file_name, char const *arg, ...)
{
va_list ap;
int r;
va_start (ap, arg);
if (__mes_debug () > 2)
{
eputs ("execl "); eputs (file_name); eputs ("\n");
}
r = vexec (file_name, ap);
va_end (ap);
return r;
}

44
lib/posix/execlp.c Normal file
View File

@ -0,0 +1,44 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2018 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/>.
*/
#include <libmes.h>
#include <unistd.h>
int
execlp (char const *file_name, char const *arg, ...)
{
va_list ap;
int r;
va_start (ap, arg);
if (file_name[0] != '/')
file_name = search_path (file_name);
if (__mes_debug () > 2)
{
eputs ("execlp "); eputs (file_name ? file_name : "0"); eputs ("\n");
}
if (!file_name)
{
errno = ENOENT;
return -1;
}
r = vexec (file_name, ap);
va_end (ap);
return r;
}

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -20,8 +20,56 @@
#include <unistd.h> #include <unistd.h>
int typedef unsigned char cc_t;
isatty (int fd) typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
// Use termio, termios2?
#define NCCS 19
struct termios
{ {
return ioctl (fd, TCGETS, 0) & 0xf0; tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
cc_t c_line;
cc_t c_cc[NCCS];
};
struct ktermios
{
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
cc_t c_line;
cc_t c_cc[NCCS];
speed_t c_ispeed;
speed_t c_ospeed;
};
int
__tcgetattr (int filedes, struct termios *termios_p)
{
struct ktermios kernel_termios;
int r = ioctl (filedes, TCGETS, &kernel_termios);
termios_p->c_iflag = kernel_termios.c_iflag;
termios_p->c_oflag = kernel_termios.c_oflag;
termios_p->c_cflag = kernel_termios.c_cflag;
termios_p->c_lflag = kernel_termios.c_lflag;
termios_p->c_line = kernel_termios.c_line;
#if 0
termios_p->c_ispeed = kernel_termios.c_ispeed;
termios_p->c_ospeed = kernel_termios.c_ospeed;
#endif
memcpy (&termios_p->c_cc[0], &kernel_termios.c_cc[0], NCCS * sizeof (cc_t));
return r;
}
int
isatty (int filedes)
{
struct termios term;
return __tcgetattr (filedes, &term) == 0;
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -23,5 +23,8 @@
int int
fflush (FILE *stream) fflush (FILE *stream)
{ {
fsync ((int)stream); int filedes = (int)stream;
if (filedes < 3)
return 0;
return fsync (filedes);
} }

View File

@ -23,5 +23,5 @@
int int
getchar () getchar ()
{ {
return fdgetc (g_stdin); return fdgetc (__stdin);
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -18,6 +18,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/>.
*/ */
#include <libmes.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -32,7 +33,7 @@ vfprintf (FILE* f, char const* format, va_list ap)
if (*p != '%') if (*p != '%')
{ {
count++; count++;
fputc (*p++, fd); fputc (*p++, f);
} }
else else
{ {
@ -87,7 +88,7 @@ vfprintf (FILE* f, char const* format, va_list ap)
{ {
case '%': case '%':
{ {
fputc (*p, fd); fputc (*p, f);
count++; count++;
break; break;
} }
@ -95,7 +96,7 @@ vfprintf (FILE* f, char const* format, va_list ap)
{ {
char _c; char _c;
_c = va_arg (ap, long); _c = va_arg (ap, long);
fputc (_c, fd); fputc (_c, f);
break; break;
} }
case 'd': case 'd':
@ -109,7 +110,7 @@ vfprintf (FILE* f, char const* format, va_list ap)
int base = c == 'o' ? 8 int base = c == 'o' ? 8
: c == 'x' || c == 'X' ? 16 : c == 'x' || c == 'X' ? 16
: 10; : 10;
char const *s = ntoab (d, base, c != 'u' && c != 'x' && c != 'X'); char *s = ntoab (d, base, c != 'u' && c != 'x' && c != 'X');
if (c == 'X') if (c == 'X')
strupr (s); strupr (s);
int length = strlen (s); int length = strlen (s);
@ -183,6 +184,50 @@ vfprintf (FILE* f, char const* format, va_list ap)
} }
break; break;
} }
case 'f':
case 'e':
case 'E':
case 'g':
case 'G':
{
double d = va_arg (ap, double);
char *s = dtoab (d, 10, 1);
if (c == 'E' || c == 'G')
strupr (s);
int length = strlen (s);
if (precision == -1)
precision = length;
if (!left_p)
{
while (width-- > precision)
{
fputc (pad, f);
count++;
}
while (precision > length)
{
fputc ('0', f);
precision--;
width--;
count++;
}
}
while (*s)
{
if (precision-- <= 0)
break;
width--;
fputc (*s++, f);
count++;
}
while (width > 0)
{
width--;
fputc (pad, f);
count++;
}
break;
}
case 'n': case 'n':
{ {
int *n = va_arg (ap, int *); int *n = va_arg (ap, int *);

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -24,5 +24,5 @@
int int
vprintf (char const* format, va_list ap) vprintf (char const* format, va_list ap)
{ {
return vfprintf (STDOUT, format, ap); return vfprintf (stdout, format, ap);
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -18,8 +18,9 @@
* 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 <stdio.h> #include <libmes.h>
#include <stdlib.h> #include <stdarg.h>
#include <string.h>
int int
vsnprintf (char *str, size_t size, char const* format, va_list ap) vsnprintf (char *str, size_t size, char const* format, va_list ap)
@ -114,7 +115,7 @@ vsnprintf (char *str, size_t size, char const* format, va_list ap)
int base = c == 'o' ? 8 int base = c == 'o' ? 8
: c == 'x' || c == 'X' ? 16 : c == 'x' || c == 'X' ? 16
: 10; : 10;
char const *s = ntoab (d, base, c != 'u' && c != 'x' && c != 'X'); char *s = ntoab (d, base, c != 'u' && c != 'x' && c != 'X');
if (c == 'X') if (c == 'X')
strupr (s); strupr (s);
int length = strlen (s); int length = strlen (s);
@ -198,6 +199,55 @@ vsnprintf (char *str, size_t size, char const* format, va_list ap)
} }
break; break;
} }
case 'f':
case 'e':
case 'E':
case 'g':
case 'G':
{
double d = va_arg (ap, double);
char *s = dtoab (d, 10, 1);
if (c == 'E' || c == 'G')
strupr (s);
int length = strlen (s);
if (precision == -1)
precision = length;
if (!left_p)
{
while (width-- > precision)
{
if (count < size)
*str++ = pad;
count++;
}
while (precision > length)
{
if (count < size)
*str++ = '0';
precision--;
width--;
count++;
}
}
while (*s)
{
if (precision-- <= 0)
break;
width--;
c = *s++;
if (count < size)
*str++ = c;
count++;
}
while (width > 0)
{
width--;
if (count < size)
*str++ = pad;
count++;
}
break;
}
case 'n': case 'n':
{ {
int *n = va_arg (ap, int *); int *n = va_arg (ap, int *);

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -18,8 +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 <limits.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h>
int int
vsprintf (char *str, char const* format, va_list ap) vsprintf (char *str, char const* format, va_list ap)

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -18,6 +18,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/>.
*/ */
#include <libmes.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
@ -62,6 +63,17 @@ vsscanf (char const *s, char const *template, va_list ap)
count++; count++;
break; break;
} }
case 'e':
case 'f':
case 'g':
case 'E':
case 'G':
{
float *f = va_arg (ap, float*);
*f = strtod (p, &p);
count++;
break;
}
default: default:
{ {
eputs ("vsscanf: not supported: %:"); eputs ("vsscanf: not supported: %:");

View File

@ -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,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -20,12 +20,9 @@
#include <libmes.h> #include <libmes.h>
int double
atof (int x) atof (char const* string)
{ {
static int stub = 0; char const *p = string;
if (__mes_debug () && !stub) return abtod (&p, 0);
eputs ("atof stub\n");
stub = 1;
return 0;
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -21,8 +21,8 @@
#include <libmes.h> #include <libmes.h>
int int
atoi (char const *s) atoi (char const *string)
{ {
char const *p = s; char const *p = string;
return abtol (&p, 0); return abtol (&p, 0);
} }

View File

@ -25,7 +25,7 @@ malloc (size_t size)
{ {
if (!__brk) if (!__brk)
__brk = brk (0); __brk = brk (0);
if (brk (__brk + size) == (void*)-1) if (brk (__brk + size) == -1)
return 0; return 0;
char *p = __brk; char *p = __brk;
__brk += size; __brk += size;

View File

@ -20,9 +20,6 @@
#include <stdlib.h> #include <stdlib.h>
#if !__MESC__
typedef char wchar_t[];
size_t size_t
mbstowcs (wchar_t *wstring, char const *string, mbstowcs (wchar_t *wstring, char const *string,
size_t size) size_t size)
@ -34,4 +31,3 @@ mbstowcs (wchar_t *wstring, char const *string,
strcpy (wstring, string); strcpy (wstring, string);
return strlen (string); return strlen (string);
} }
#endif

40
lib/stdlib/strtod.c Normal file
View File

@ -0,0 +1,40 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2018,2019 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/>.
*/
#include <libmes.h>
#include <stdlib.h>
double
strtod (char const *string, char **tailptr)
{
int base = 10;
if (!strncmp (string, "0x", 2))
{
string += 2;
base = 16;
}
if (tailptr)
{
*tailptr = string;
return abtod (tailptr, base);
}
char **p = &string;
return abtod (p, base);
}

View File

@ -19,14 +19,15 @@
*/ */
#include <libmes.h> #include <libmes.h>
#include <time.h>
int char *
ctime (int x) ctime (time_t const *TIME)
{ {
static int stub = 0; static int stub = 0;
if (__mes_debug () && !stub) if (__mes_debug () && !stub)
eputs ("ctime stub\n"); eputs ("ctime stub\n");
stub = 1; stub = 1;
errno = 0; errno = 0;
return 0; return "now";
} }

35
lib/stub/getgrgid.c Normal file
View File

@ -0,0 +1,35 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 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/>.
*/
#include <libmes.h>
#include <grp.h>
struct group *
getgrgid (gid_t gid)
{
static int stub = 0;
if (__mes_debug () && !stub)
eputs ("getgrid stub\n");
static char *groups[2] = {"root", 0 };
static struct group root = {"root", 0, groups};
stub = 1;
errno = 0;
return &root;
}

35
lib/stub/getgrnam.c Normal file
View File

@ -0,0 +1,35 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 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/>.
*/
#include <libmes.h>
#include <grp.h>
struct group *
getgrnam (char const* name)
{
static int stub = 0;
if (__mes_debug () && !stub)
eputs ("getgrid stub\n");
static char *groups[2] = {"root", 0 };
static struct group root = {"root", 0, groups};
stub = 1;
errno = 0;
return &root;
}

33
lib/stub/getpgid.c Normal file
View File

@ -0,0 +1,33 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2019 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/>.
*/
#include <libmes.h>
#include <unistd.h>
int
getpgid (pid_t pid)
{
static int stub = 0;
if (__mes_debug () && !stub)
eputs ("getpgid stub\n");
stub = 1;
errno = 0;
return 0;
}

33
lib/stub/getpgrp.c Normal file
View File

@ -0,0 +1,33 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2019 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/>.
*/
#include <libmes.h>
#include <unistd.h>
pid_t
getpgrp (void)
{
static int stub = 0;
if (__mes_debug () && !stub)
eputs ("getpgrp stub\n");
stub = 1;
errno = 0;
return 0;
}

View File

@ -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,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -22,12 +22,13 @@
#include <pwd.h> #include <pwd.h>
struct passwd * struct passwd *
getpwnam (const char *NAME) getpwnam (const char *name)
{ {
static int stub = 0; static int stub = 0;
if (__mes_debug () && !stub) if (__mes_debug () && !stub)
eputs ("getpwnam stub\n"); eputs ("getpwnam stub\n");
stub = 1; stub = 1;
errno = 0; errno = 0;
return 0; static struct passwd root = {"root", "*", 0, 0, "", "/root", "/bin/sh"};
return &root;
} }

View File

@ -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,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -29,5 +29,6 @@ getpwuid ()
eputs ("getpwuid stub\n"); eputs ("getpwuid stub\n");
stub = 1; stub = 1;
errno = 0; errno = 0;
return 0; static struct passwd root = {"root", "*", 0, 0, "", "/root", "/bin/sh"};
return &root;
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -30,5 +30,6 @@ localtime (time_t const *timep)
eputs ("localtime stub\n"); eputs ("localtime stub\n");
stub = 1; stub = 1;
errno = 0; errno = 0;
return 0; static struct tm zero = {0};
return &zero;
} }

View File

@ -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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -19,14 +19,15 @@
*/ */
#include <libmes.h> #include <libmes.h>
#include <stdlib.h> #include <time.h>
double int
strtod (char const *string, char **tailptr) mktime (struct tm *broken_time)
{ {
static int stub = 0; static int stub = 0;
if (__mes_debug () && !stub) if (__mes_debug () && !stub)
eputs ("strtod stub\n"); eputs ("mktime stub\n");
stub = 1; stub = 1;
errno = 0;
return 0; return 0;
} }

Some files were not shown because too many files have changed in this diff Show More