Jan Nieuwenhuizen
092626243a
mes: Fix -c, --command.
...
* mes/module/mes/boot-0.scm: Prepend 'begin to expr list.
2019-10-10 13:22:12 +02:00
Jan Nieuwenhuizen
8d49b40b13
check: Remove duplicate test.
...
* build-aux/check-boot.sh (TESTS): Remove duplicate test.
2019-10-03 22:17:50 +02:00
Jan Nieuwenhuizen
0e55071bc7
mescc: Mes C Library: Support gcc-4.6.4: vfprintf, vsnprintf: pad with space.
...
* lib/stdio/vfprintf.c (vfprintf): pad with space.
* lib/stdio/vsnprintf.c (vsnprintf): pad with space.
2019-09-20 14:44:31 +02:00
Jan Nieuwenhuizen
98b9ac8e98
mescc: Mes C Library: Support gcc-4.6.4: Add math stubs.
...
* lib/math/ceil.c: New file.
* lib/math/floor.c: New file.
* lib/stub/atan2.c: New file.
* lib/stub/cos.c: New file.
* lib/stub/exp.c: New file.
* lib/stub/log.c: New file.
* lib/stub/modf.c: New file.
* lib/stub/pow.c: New file.
* lib/stub/sin.c: New file.
* lib/stub/sqrt.c: New file.
* lib/libc+gnu.c: Include them.
* include/math.h (atan2, ceil, cos, exp, fabs, floor, log, modf, pow,
sin, sqrt): Declare.
* lib/math/fabs.c: Update.
* lib/stub/ldexp.c: Update.
2019-09-13 15:11:38 +02:00
Jan Nieuwenhuizen
6bb225b403
mescc: Mes C Library: Support gcc-4.6.4: Add fscanf, vfscanf.
...
* lib/stdio/vfscanf.c: New file.
* lib/stdio/fscanf.c: New file.
* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add them.
* include/stdio.h (fscanf): Declare.
* include/stdarg.h (vfscanf): Declare.
* lib/stub/fscanf.c: Remove.
2019-09-06 19:04:50 +02:00
Jan Nieuwenhuizen
d643f923a3
mescc: Mes C Libray: Fix off_t.
...
* include/sys/types.h (off_t): Drop unsigned.
2019-09-04 17:35:33 +02:00
Jan Nieuwenhuizen
a56918eaa2
mescc: Environment setup.
...
* scripts/mescc.in (MES_ARENA, MES_MAX_ARENA, MES_STACK): Reduce defaults.
* build-aux/check.sh.in (MES_ARENA): Likewise. Export them.
* build-aux/bootstrap.sh.in (MES_STACK): Likewise.
(MES_PREFIX): Set default.
2019-09-06 23:24:23 +02:00
Danny Milosavljevic
73715dab4a
Add missing #include.
...
* lib/stdlib/mbstowcs.c: Add missing #include.
2019-08-27 01:46:57 +02:00
Danny Milosavljevic
01ae1994ed
Fix dtoab.
...
* lib/mes/dtoab.c (dtoab): Fix it.
* lib/tests/mes/90-dtoab.c (main): Fix test.
* build-aux/check-mescc.sh (XFAIL_TESTS: Remove it.
2019-08-27 00:43:37 +02:00
Danny Milosavljevic
3d5557c34a
va_align: Fix compiler warning.
...
Follow-up to 49b0cd7d2e6952044d7436260d6ba950e40ee05f.
* include/stdarg.h: Fix compiler warning.
2019-08-27 05:49:22 +02:00
Danny Milosavljevic
abc0809bfa
Add missing #include.
...
* lib/tests/mes/90-abtod.c (main): Add missing #include.
2019-08-27 04:32:02 +02:00
Danny Milosavljevic
4c77c2c9ca
Fix variable argument list traversal for doubles.
...
* include/stdarg.h (va_align): New macro.
(va_arg8): New macro.
* lib/stdio/vfprintf.c (vfprintf): Use it.
* lib/stdio/vsnprintf.c (vsnprintf): Use it.
2019-08-27 04:04:56 +02:00
Jan Nieuwenhuizen
58fb0cf764
build: Improve --with-system-libc support.
...
* build-aux/build-lib.sh: Avoid building libc for --with-system-libc.
Make libmes richer.
build-aux/check-mescc.sh: Enable 50-malloc test.
* include/dirstream.h: Use HAVE_DIRSTREAM_H to cater for non-existing
dirstream.h.
* include/grp.h[SYSTEM_LIBC]: Typo.
* include/mes/lib.h (__brk, __call_at_exit)[SYSTEM_LIBC]: Declare.
* include/stdlib.h (comparison_fn_t)[SYSTEM_LIBC]: Declare.
* include/time.h (mktime): Return time_t.
* lib/posix/isatty.c [SYSTEM_LIBC]: Do not (re)declare termios.
* lib/stub/mktime.c (mktime): Return time_t.
* lib/tests/scaffold/41-ternary.c (main): Remove assumption that
locals are initialized.
* lib/tests/scaffold/70-stdarg.c: Cater for SYSTEM_LIBC.
* lib/tests/setjmp/80-setjmp.c: Declare jmp buf.
* lib/*/*.c: Add missing mes/lib.h, errno.h includes.
2019-08-24 19:05:58 +02:00
Jan Nieuwenhuizen
fd1109a25f
mescc: Mes C Library: vfprintf, vsnprintf: Pad floats with space.
...
* lib/stdio/vfprintf.c (vfprintf): Pad floats with space.
* lib/stdio/vsnprintf.c (vsnprintf): Pad floats with space.
* lib/tests/stdio/90-sprintf.c: Test it.
2019-09-01 22:18:00 +02:00
Jan Nieuwenhuizen
f097a9d270
mescc: Mes C Library: vsscanf: Increase count for scanned float.
...
* lib/stdio/vsscanf.c (vsscanf): Increase count for scanned float.
2019-08-01 11:01:47 +02:00
Jan Nieuwenhuizen
de197a48f5
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-07-31 12:25:43 +02:00
Jan Nieuwenhuizen
5c979a8ce1
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-07-24 12:23:54 +02:00
Jan Nieuwenhuizen
9573f469f8
mescc: Mes C Library: Support GNU Awk: Add wchar_t.
...
* include/sys/types.h (wchar_t): New typedef.
2019-07-21 13:23:49 +02:00
Jan Nieuwenhuizen
fe96cc37df
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-07-18 12:13:18 +02:00
Jan Nieuwenhuizen
0d3f1ed2ae
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-07-15 11:58:21 +02:00
Jan Nieuwenhuizen
b97c59ff21
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/mknod.c: New file.
* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add it.
* include/sys/stat.h (mknod): Declare it.
* include/fcntl.h (creat): New macro.
2019-07-12 11:56:58 +02:00
Jan Nieuwenhuizen
203ef4944b
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-07-09 11:53:16 +02:00
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