build: Improve --with-system-libc support.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 25 Jun 2019 17:05:58 +0000 (19:05 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 25 Jun 2019 17:05:58 +0000 (19:05 +0200)
commitdd0a0d779aacbc4d50f6b7dc73c98f3aa82cc68c
tree5405556befa53124e2c12920eb4f8d493358d526
parent9f60920538f8768682916aa01030f1df977cfc9c
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.
44 files changed:
build-aux/build-lib.sh
build-aux/check-mescc.sh
build-aux/test-c.sh
include/dirstream.h
include/grp.h
include/mes/lib.h
include/stdlib.h
include/time.h
lib/dirent/__getdirentries.c
lib/dirent/opendir.c
lib/posix/isatty.c
lib/stdio/clearerr.c
lib/stdio/fprintf.c
lib/stdio/perror.c
lib/stdio/printf.c
lib/stdio/snprintf.c
lib/stdio/sprintf.c
lib/stdio/sscanf.c
lib/stdio/vprintf.c
lib/stub/chown.c
lib/stub/ctime.c
lib/stub/fpurge.c
lib/stub/freadahead.c
lib/stub/fscanf.c
lib/stub/getlogin.c
lib/stub/getpwnam.c
lib/stub/getpwuid.c
lib/stub/gmtime.c
lib/stub/localtime.c
lib/stub/pclose.c
lib/stub/popen.c
lib/stub/rand.c
lib/stub/rewind.c
lib/stub/setbuf.c
lib/stub/sigsetmask.c
lib/stub/sys_siglist.c
lib/stub/system.c
lib/stub/ttyname.c
lib/stub/umask.c
lib/stub/utime.c
lib/tests/io/90-stat.c
lib/tests/scaffold/41-ternary.c
lib/tests/scaffold/70-stdarg.c
lib/tests/setjmp/80-setjmp.c