Commit Graph

1772 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen 860f5ce7d5
mescc: Mes C Library: Support GNU Bash: Add struct winsize.
* include/termio.h (struct winsize): New type.
2019-07-06 11:25:02 +02:00
Jan Nieuwenhuizen 8d45c6484f
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-07-03 11:22:57 +02:00
Jan Nieuwenhuizen f3154aabe4
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.
* build-aux/configure-lib.sh (libmes_SOURCES, libc_tcc_SOURCES): Add
it.
* 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.
2020-01-12 18:42:25 +01:00
Jan Nieuwenhuizen 742e88abd5
mescc: Mes C Library: Support GNU Awk: Add abtod, implementing strtod.
* include/libmes.h (abtod): Declare.
* lib/mes/abtod.c: New file.
* build-aux/configure-lib.sh (libmes_SOURCES, libc_tcc_SOURCES): Add
it.
* 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-06-25 12:51:44 +02:00
Jan Nieuwenhuizen cd50beca3a
mescc: Mes C Library: Support GNU Awk: vsscanf: Support %f.
* lib/stdio/vsscanf.c (vsscanf): Support %f.
2019-06-22 11:48:39 +02:00
Jan Nieuwenhuizen 749248ac3a
mescc: Mes C Library: Support GNU Awk: Do not flush std files.
* lib/stdio/fflush.c (fflush): Do not flush std files.
2019-06-19 11:26:37 +02:00
Jan Nieuwenhuizen 9faa38bee1
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-06-16 11:25:37 +02:00
Jan Nieuwenhuizen 9be33485e2
mescc: Mes C Library: Support GNU Tar: Add readlink, symlink.
* 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-06-13 01:07:19 +02:00
Jan Nieuwenhuizen 4e6a3ce846
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.
* build-aux/configure-lib.sh (libc_tcc_SOURCES): Add it.
* 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-06-10 00:56:42 +02:00
Jan Nieuwenhuizen 18195b4d05
mescc: Mes C Library: Fix compile warnings.
* include/stdlib.h (abort): Add prototype.
2019-06-12 15:59:06 +02:00
Jan Nieuwenhuizen 396e96c056
mescc: Mes C Library: Add missing stubs.
* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add fscanf, rewind stubs.
* lib/stdio/freeopen.c: Remove.
2019-11-10 09:00:08 +01:00
Jan Nieuwenhuizen b3cac19d4c
build: Avoid tar --exclude=.
* build-aux/install.sh.in: Only use `tar --exclude=' if we also have .go
files compiled by Guile.
2019-09-20 19:33:29 +02:00
Jan Nieuwenhuizen 4f4be8d6b7
build: mesar: Remove bashisms.
* scripts/mesar.in: Remove bashisms.
2019-09-16 22:46:39 +02:00
Jan Nieuwenhuizen 558d9cc60c
configure.sh: Cleanup argument parsing. Thanks, Timothy!
* configure.sh: Cleanup argument parsing.
2019-10-01 19:12:56 +02:00
Jan Nieuwenhuizen 5fe0432301
configure.sh: Remove bashisms.
* configure.sh: Remove bashisms.  Fixes running with Gash 0.1.
2019-09-16 21:12:56 +02:00
Jan Nieuwenhuizen db9e6d7d8a
Revert "nyacc: 0.86.0 compatibility stub. WIP"
This reverts commit 0183cc1c42437fda27196e27b490285a61d47f59.

While it works to run Nyacc 0.86.0, it breaks running Nyacc 0.93 and
up.  This would need more thought and work, adding a nyacc-compat
directory or so.  Seems not worth the effort right now.
2019-09-16 21:14:15 +02:00
Jan Nieuwenhuizen 56266d2c64
nyacc: 0.86.0 compatibility stub. WIP
* mes/module/nyacc/lang/c99/util.scm: 0.86.0 compatibility stub.
2019-09-16 21:13:46 +02:00
Jan Nieuwenhuizen f5aab3b878
build: Split-out build-source-lib.sh from build-lib.sh.
* build-aux/build-lib.sh: Remove building of source lib.
* build-aux/build-source-lib.sh: New file.
* build-aux/build.sh.in: Invoke it.
* build-aux/bootstrap.sh.in: Likewise.
2019-09-20 19:40:37 +02:00
Jan Nieuwenhuizen 74d2cdd45a
build: Honor configure's --includedir. Thanks, Vagrant!
Suggested by Vagrant Cascadian

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902174#84

* build-aux/install.sh.in: Install headers in $includedir.
* configure (includedir): Typo.
* configure.sh (includedir): Likewise.
2019-11-13 09:23:27 +01:00
Jan Nieuwenhuizen 4c862b1cc5
build: Create ascii signature.
* build-aux/GNUmakefile.in (sign): Create ascii signature.
2019-11-23 22:23:33 +01:00
Jan Nieuwenhuizen 2f34ea9e00
doc: Post-release update.
* doc/announce/ANNOUNCE-0.20: Update.
* guix/git/mes.scm (mes): Update.
2019-09-09 16:48:15 +02:00
Jan Nieuwenhuizen 5222aeee7f
Release 0.20.
* configure (VERSION): Update to 0.20.
(main): Likewise.
* configure.sh (VERSION): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.
2019-09-09 16:42:25 +02:00
Jan Nieuwenhuizen a76b87fab9
doc: Release update.
* BLURB: New file.
* AUTHORS: Update.
* HACKING: Update.
* INSTALL: Update.
* NEWS: Update.
* README: Update.
* doc/images/gcc-mesboot-graph.dot: Update.
* doc/mes.texi: Update.
* simple.sh: Update.
* doc/announce/ANNOUNCE-0.20: New file.
2019-09-09 16:42:23 +02:00
Jan Nieuwenhuizen bc2886e8ba
guix: Update mescc-tools to 0.6.1.
* guix/git/mes.scm (mescc-tools): Update to 0.6.1.
* configure: Check for mescc-tools versions 0.6 or higher.
2019-09-09 16:42:13 +02:00
Jan Nieuwenhuizen 99903dce06
build: Create ascii signature.
* build-aux/GNUmakefile.in (sign): Create ascii signature.
2019-09-09 16:41:46 +02:00
Jan Nieuwenhuizen 507a320cb0
guix: Update Nyacc to 0.99.
* guix/git/mes.scm (nyacc): Update to 0.99.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 2ba9d89af8
doc: Add PORTING.
* PORTING: New file.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 1b47face21
doc: Typos. Thanks, dddddd.
* doc/announce/ANNOUNCE-0.11: Typo.
* doc/announce/ANNOUNCE-0.12: Typo.
* doc/announce/ANNOUNCE-0.13: Typo.
* doc/announce/ANNOUNCE-0.14: Typo.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen c1bc77a1fb
mescc: Remove dead code. Thanks Mark Weaver.
* module/mescc/compile.scm (field-size): Remove dead function.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen f33de25b96
guix: Update packaging.
* build-aux/manifest.scm (string-append):
* guix/git/mes.scm (nyacc, git-file?): Remove.
(mescc-tools): Bump to 0.6.0.
(%source-dir): New variable.
(mes.git): Ues it.
* guix.scm: Rename from .guix.scm.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 613bd96abe
build: Do not generate ChangeLog from tarball.
* configure (main): Set .git-for-build.
* build-aux/install.sh.in (DESTDIR): Use it as canary to skip
ChangeLog rebuild.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 2cc6d5a012
build: Use mesar instead of ar.
* scripts/mesar.in: Rename from ar.in.  Update users.
* build-aux/build.sh.in (LIBS): Update.
* build-aux/check.sh.in (recheck): Likwise.
* build-aux/install.sh.in (DESTDIR): Likwise.
* configure (main): Likwise.
* configure.sh (mes_system): Likwise.
* .gitignore: Update.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 3bed314d94
getopt: Remove old FSF address, thanks Vagrant.
* lib/posix/getopt.c: Remove old FSF address.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 15a39f0efe
Add missing #include.
* lib/tests/scaffold/55-char-array.c: Add missing #include.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic e2dfaef89e
Add missing #include.
* lib/tests/io/90-stat.c: Add missing #include.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 5f82a697b3
Add missing #include.
* lib/posix/getcwd.c: Add missing #include.
2019-09-09 16:04:15 +02:00
Jan Nieuwenhuizen 2db5ec2f55
signal: Use SA_RESTORER on x86-64.
* lib/linux/signal.c (signal)[x86_64]: Avoid segfault by setting
SA_RESTORER flag.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 23d857c834
signal: Add comment on why we don't use the restorer.
* lib/linux/signal.c: Add comment on why we don't use the restorer.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 4a183fa1cf
signal: Remove SA_SIGINFO.
* lib/linux/signal.c (signal): Remove SA_SIGINFO.
2019-09-09 16:04:15 +02:00
Danny Milosavljevic 3e6306a5ce
signal: Don't use custom restorer.
* lib/linux/signal.c (signal): Don't use custom restorer.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 02fdead244
signal: Use SA_SIGINFO (like glibc).
* lib/linux/signal.c (_restorer): Rename to...
(_restorer_for_siginfo): ...this.
(signal): Use it.  Use SA_SIGINFO.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic e8bbe21499
signal: Make sure that the signal mask is actually unsigned long.
* lib/linux/signal.c (signal): Make sure that the signal mask is actually
unsigned long.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 5754e379af
Delete "__sigmask".
Follow-up to 6d95b89759d3c598fc84194429ae8c57249daa1a

* lib/linux/signal.c (__sigmask): Delete definition.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 3f1ba73fc7
Fix "struct sigaction" structure for rt_sigaction.
* include/signal.h (sigset_t): Increase size.
* lib/linux/signal.c (signal): Use new sigset_t.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic 181d1e11ea
Inherit CFLAGS for mes.
* build-aux/check.sh.in: Inherit CFLAGS for mes.
2019-09-09 16:04:14 +02:00
Danny Milosavljevic dadf07a484
Fix typo.
* build-aux/build.sh.in: Fix typo in "CFLAGS".
2019-09-09 16:04:14 +02:00
Danny Milosavljevic c7d050c0cd
tests: Fail early on nonexistent file.
* lib/tests/io/90-stat.c (main): Fail early on nonexistent file.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 5a2a00f4e8
open: Check flags, and use _open2 if applicable.
* lib/linux/open.c (open): Check flags; use _open2.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 3943155a64
ldiv: Make rem < 0 if a < 0.
* lib/mes/div.c (ldiv): Make rem < 0 if a < 0.
2019-09-09 16:04:13 +02:00
Danny Milosavljevic 21bd2c1e90
ldiv: Handle a == LONG_MIN.
* lib/mes/div.c (ldiv): Handle a == LONG_MIN.
2019-09-09 16:04:13 +02:00