Files
makronix/src/lib/libedit
lotherkandClaude Opus 5.5 b18945f578 Makronix/Linux: NetBSD's /bin/sh, libedit and libterminfo by the normal build
make src DIR=lib/libterminfo, lib/libedit, share/terminfo, bin/sh: the
"includes" pass first as in build.sh (curses.h, term.h), terminfo.cdb
compiled by the tooldir's nbtic, libraries into /lib (USE_SHLIBDIR).

libmxlinux, NetBSD's own sources reached over: cdb(3) (cdbr, cdbw,
mi_vector_hash) for terminfo.cdb.  Headers: <sys/endian.h> (glibc's
<endian.h> plus NetBSD's encoders/decoders, endian.h:190-230 -- NetBSD's
whole header would turn ntohl into a macro under glibc's prototypes),
<sys/bitops.h>, <sys/cdbr.h>/<cdbr.h> (sys/sys/Makefile:54),
<cdbw.h>, <sys/stdint.h>, and a <sys/sysctl.h> with NetBSD's MIB numbers
(the real one pulls in sys/proc.h and UVM).  Ours at the kernel boundary:
sysctl(3) answering the user.* subtree as NetBSD's libc does
(sysctl.c:106) from confstr/sysconf -- sh asks user.cs_path;
fcntl F_MAXFD/F_CLOSEM (as 10/11 they are F_SETSIG/F_GETSIG to Linux, so
they get unknown values and never reach the kernel), funopen/funopen2
over fopencookie, setproctitle via PR_SET_NAME, issetugid from AT_SECURE.
mxlinux.h: BSD/BSD4_3/BSD4_4 (sys/param.h:49-51; sh includes <sys/wait.h>
only #ifdef BSD), __va_list, <string.h> as NetBSD's <strings.h> has it,
<stddef.h>, dup3; mx_termios.h: TCSASOFT 0 (any other value makes Linux's
tcsetattr fail).

src/lib/libedit/config.h: HAVE_STRUCT_DIRENT_D_NAMLEN only without
__GLIBC__ -- libedit's own portable branch, its autoconf answer for glibc.

Measured: sh runs under qemu-aarch64 -L build/mxsysroot-hotdogb
(functions, arithmetic, command substitution, kill -l, trap ... INFO with
kill -INFO); the port tests of cat chmod cp echo ln ls mkdir mv rm rmdir
test kill pass with this sh as their interpreter; expr's "lang" case
reports that the sysroot has no glibc locales (sh's own setlocale
message, var.c:1948).  23 of 34 programs of src/bin build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:41:27 +00:00
..