Opened 2 years ago
Closed 2 years ago
#20244 closed enhancement (fixed)
pax-20240817
| Reported by: | Douglas R. Reno | Owned by: | Douglas R. Reno |
|---|---|---|---|
| Priority: | normal | Milestone: | 12.2 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description
New version
Change History (3)
comment:1 by , 2 years ago
| Milestone: | 12.3 → 12.2 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 2 years ago
comment:3 by , 2 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

There doesn't seem to be any release notes, so we'll copy the git log
add portable MirBSD sleep(1), sub-second capable, fully GNU compatible even with -DSMALL still 804 bytes more than the mksh builtin, but this is more compatible (avoids builtins’ issue wrt signal handling) and meets user experience (GNU…) sync with src/bin/mksh/Build.sh,v 1.780 forgot this in cid 100610068A12D70CCBD get rid of {,u}int16_t, which was wrong here anyway uint32_t isn’t as easy (and ar.c and options.c use {,u}int64_t totally unabashedly without even testing… gah!) yet but will follow later… regen cf. http://www.mirbsd.org/permalinks/wlog-10-tg_evo-77.htm bring mirtoconf installments into sync, plus fallout mksh: • remove bogus TARGET_OSREV on a line by itself breaking BeOS builds • move HAVE_MKNOD=0 default to just before use for easier sync • rename mkshexe → buildoutput, like the others pax, sleep (mirtoconf sync): • test basic tools • display *flags on entry • get version from pax.h or sleep.h and add it there • fixed -g handling • add all OSes known to mksh’s Build.sh, even if osnote’d or oswarn’d as untested or worse (but this way we have them complete) • NeXTstep’s cc needs -traditional-cpp • skip checking for __attribute__ on compilers we know lack them • reintroduce or reorder some code/comment blocks, to sync more easily all: • fix list of files to be not removed in rmf() and sync with ccpr • factor out long and short name for easier synchronisation (-v shows long) • only add '-g3 -fno-builtin' with -g for gcc, just add -g for all others • add osnote which is less harsh than oswarn • if -g try -Og over -O2 if adding optflags pax: • use cp -p in the ln|| case; use ln -f||cp -pf if not rm -f’ing first • show paxmirabilis version in/before usage() sleep: • fix in-tree build, missing file removal • display sleep version on -V (but otherwise just skip that arg though exit 0 if it’s the only one) • use ts2 as timespecsub result, so we have a -= ipv a=b-a • inline timespecsub, GNU lacks it regen let CFLAGS autodetection choke on stack protector when the libc lacks it (Linux klibc) by introducing an array on the stack of main() no longer necessary spellintian fix import MirBSD contrib/samples/portmdoc,v 1.19 split compiler support off into mbsdcc.h and keep mbsdint.h for integer fix we can use mbsdcc.h for CTAs etc. in conf tests now too extra range check turns out MSVC dislikes offsetof(struct s, label[0]) but offsetof(struct s, label) is fine; it considers the latter a run-time thing, apparently (we test they are identical in mkt-int.sh now) drop MKSH_BROKEN_OFFSETOF in the same go, because it applied to SCO and Xenix only, which were probably using MSVC’s antecessor also allow the mbnil == NULL test on CFrustFrust again as the last changes seemingly fixed it quell MSVC struct padding warnings for CTAs FAM overhaul, prodded by Jens Gustedt via: https://digitalcourage.social/@JensGustedt/111186421403499035 mbsdint.h: • assign mbiSIZE_MAX to mbccSIZE_MAX once we have determined it (note loading mbsdint.h is also good near mbsdcc.h top) mbsdcc.h: • move offsetof monkey-fix here from mksh/sh.h (for old klibc/dietlibc on GCC or NWCC (Nils Weller’s) where it’s broken and we can just redirect to the compiler builtin); safe since <stddef.h> was just read • introduce mbccSIZE_MAX and document at the beginning that including <basetsd.h> or <limits.h> first is useful • introduce mbccABEND(msg) which users are supposed to provide/override, not call, but which we can call from within our “run-time” macros • introduce mbccChkExpr(x) which is a sort of compile-time check that works within an expression / function-like cpp macro, even on CFrustFrust (boy t̲h̲a̲t̲ was hard) and evaluates to 0 • add mbccCEX(x) which ensures its argument is compile-time constant (and which itself also is); we do not need the Linux __is_constexpr but a compile error here • rename mbccFAM to mbccFAMslot • add mbccFAMSZ (compile-time) and mbccFAMsz (run-time) to calculate the minimum length of an object for a struct with a FAM of the given size ‣ arguments: struct foo, member, size-in-chars ‣ size-in-chars is mbccCEX’d by mbccFAMSZ so it’s usable in definitions like a storage union itself ‣ the return value of mbccFAMSZ/mbccFAMsz, size_t, is roughly the same as the offsetof method recommended before, but (by Jens) has a lower bound of sizeof(struc), so its trailing padding will be guaranteed to be present if the FAM is tiny enough ‣ also, check that sizeof(struc) + size-in-chars fits mbccSIZE_MAX → compile-time for mbccFAMSZ → run-time with mbccABEND for mbccFAMsz this also came from mksh (checkoktoadd etm.) • add more FAM examples: ‣ nōn-char type, with sizeof(type[cnt]) which while feeling unnatural has a lower chance of corner cases than sizeof(type) * (size_t)cnt… ‣ storage union mkt-int.sh (testsuite): extend accordingly where plausible ‣ at some point we’ll want to add “negative tests”, i.e. tests for where compilation must error out… mksh: • change most offsetof to mbccFAMSZ where possible else mbccFAMsz ‣ 1 → 1U etc. while here ‣ also, alloc1 → alloc where suitable, given mbccFAMsz also checks now • tempfile pathname template string cleanup while here • follow mbccFAMslot renaming • provide kerrf-based mbccABEND do the (0+(x)) dance for mbccChkExpr as well, compilers are idiots mbccS2(FOO) for where FOO is a macro, not a parameter revise some of the __STDC_VERSION__-related #if''s: older g++ can define these while lacking support integrate latest portmdoc integrate latest portmdoc also fix some things while here and add portmdoc to missing pages advance mbsd{int,cc}.h quite a bit: • move mksh/sh.h SHIKATANAI macro to mbsdcc.h and test it (bt-normal) • mirtime: note Issue 8 changes needed • C++ mbccChkExpr/mbccCEX now work with both OpenWatcom C++ (targetting Linux/i386), antique G++ and SUNWCC (Sun Studio 12.6), too • C++ mbccFAMslot now works outside GCC/Clang/MSVC++ (“works”, [1] hah) • OpenWatcom C: disable warning “Comparison result always 0” during CTA (downside is that ending a CTA should restore the level, but it lacks a pop pragma, so we set the level to 4/info) • for all bitfields, use unsigned int because SUNWcc complains about nōn-portable bitfields, C89 allows only {,{,un}signed} int anyway • better consistency checks in mbCTA_END • -DMBSDINT_H_SMALL_SYSTEM=3 handles 64-bit types again but works in a 16-bit environment (OpenWatcom C targetting DOS, where I got the selftests to work but the whole testsuite won’t fit a segment, or even multiple at once, we’re going to have to hack that eventually) • -DMBSDINT_H_WANT_LONG_IN_SIZET=0 for 16-bit without size_t ≥ long • change mbiTYPE_ISF to work in OpenWatcom C++; as that works in CTAs, mbiCTA_TYPE_{NOT,not}F goes away • work around MSVC ignoring (unsigned)sizetvar casts for -Wformat by writing them as (0U + (unsigned)sizetvar); their rationale is to make users switch to %zu ofc but we can’t do that in ancient C • check bc(1) is usable near testsuite runner beginning • rename all files to not have more than one dot, for OpenWatcom/DOS • check the “whether we can build at all” result if it runs unless cross • also check the split compile and link step works • check for <float.h> for the testsuite’s system info helper and make it show float, double and long double info if present • split tif() from ti(), the latter “probably” fails compilation, in its int parts, if a type is actually float; tif now uses some bounds checks against the type-maximum and max-const deferring mbiMASK_BITS (and the mbiMASK_BITS part of mbiTYPE_UBITS) into a function instead of inline so the constant folder does not explode (also uses a volatile variable for the same purpose) but this is just so we can go without configure- time type checks exclusively in the system info helper • time_t could be float outside of POSIX land, use tif to info it (CTAs check other (shown) types to be integral) testsuite and consistency fixes • style consistency also shellcheck has a marginal point but too many FPs here anyway • oops, this is not mksh… • more report • move some testsuite helpers to xxt-int.c • move __predict_{true,false} to mbsdcc.h • don’t __predict_true((vr) >= 0), let the compiler do w/ever • output layout • more precise note • “Hi from” as in mksh/Build.sh at the beginning, for scrollback • show more information about the environment endianness (when detectible, common cases incl. PDP) and nil representation in memory (rotated for little endian for convenience) • do something to compare expected vs. actually run tests • fix inconsistent indentation • add pass tests for mbiCAAlet and a large comment about it • fix range for mbiCAP*/mbiCAS* tests • fix range used for mbiCAU*() tests; add comment about missing macros • overhaul some test helper macros and functions for better checks • fix mbiSAFECOMPLEMENT test wording; test mbiCAsafe* always bring in many portability improvements from ../mksh/Build.sh not everything, and not for ../sleep/Build.sh, as I lack enough spoons to do that rn and pax in Debian needs an upload, due to Poettering shit more portability from mksh and then some (ouch² @ dietlibc…) dismiss u_char for Fefe say hello to syskern/mbsdcc.h in .linked/ further portability fixes etm. bump for a release (announced later, I need it for Debian r/n) fix PDF version string