mescc: Mes C Library: Add buffered read.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 27 Jul 2019 20:58:49 +0000 (22:58 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 27 Jul 2019 20:58:49 +0000 (22:58 +0200)
commitef29ade04b883d407c9bdda8cf3895a8c51920a4
tree4fec0f34f9c14ac7c208c15f3f3fd6350f6a43a7
parentc7d86eb9552b0ff39ee15266b4db546c19b6c2e4
mescc: Mes C Library: Add buffered read.

* lib/mes/__buffered_read.c: New file.
* build-aux/configure-lib.sh (libc_SOURCES): Add it.  Also add memmove.c.
(libc_tcc_SOURCES): Remove memmove.c
* lib/linux/close.c (close): Clear read buffer.
* lib/linux/_open3.c (_open3): Likewise.
* lib/linux/lseek.c (lseek): Correct for read buffer.
* lib/stdio/fwrite.c (fwrite): Likewise.
* lib/posix/read.c (read): Call __buffered_read.
* lib/posix/write.c (write): Add FIXME note about buffered reads.
* simple.sh: Update.
14 files changed:
build-aux/configure-lib.sh
include/mes/lib.h
lib/linux/_open3.c
lib/linux/close.c
lib/linux/lseek.c
lib/mes/__buffered_read.c [new file with mode: 0644]
lib/mes/fdgetc.c
lib/posix/read.c
lib/posix/write.c
lib/stdio/fread.c
lib/stdio/fseek.c
lib/stdio/fwrite.c
mes/module/mes/repl.mes
simple.sh