Skip to content

apehdr-sweep: triage the together-case; twelve errors are six causes - #602

Merged
staalmannen merged 1 commit into
mainfrom
claude/upgrade-ape-c-library-mmZGd
Oct 7, 2026
Merged

staalmannen merged 1 commit into
mainfrom
claude/upgrade-ape-c-library-mmZGd

Conversation

@staalmannen

Copy link
Copy Markdown
Owner

The list had sat untriaged for rounds because it was read as twelve findings. Four of the six causes are one header each:

f2c.h five errors. Its #define min/max/abs collide with
<libv.h>'s extern int min(int,int), and its
"typedef struct {real r,i;} complex" with
<complex.h>'s "#define complex Complex". All 149
files that include it are under external/f2c, so it
does not belong in sys/include/ape.
regex.h / three, and design intent. pcre2posix spells the
pcre2posix.h REG
* codes as an enum where regex.h #defines them.
Plan9libnet.h two. It declares Plan 9's accept(int, char*) and
listen(char*, char*) against <sys/socket.h>.
libnet.h beside it is the same interface with net_
prefixes and is what all five callers use; nothing
includes Plan9libnet.h at all.
bsd.h:47 one, real and ours: getopt with a non-const
prototype, and <unistd.h> does not declare getopt at
all, so this is the tree's only declaration.
features.h:55 one, real and ours, with a victim: "#define hidden"
is musl's internal visibility macro in a public
header, and sqlite3.h:10957 declares "unsigned char
hidden[48]" which it erases.

The sweep prints the triage rather than the raw lines and still does not gate, since three of the six are intent. The two recommendations -- moving f2c.h out of the public directory and deleting Plan9libnet.h -- are recorded, not done.

Also records that the full distclean and install completed with conforming layout, and that a completed build is a precondition for the measurement rather than the measurement.

Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs

The list had sat untriaged for rounds because it was read as twelve
findings.  Four of the six causes are one header each:

  f2c.h           five errors.  Its #define min/max/abs collide with
                  <libv.h>'s extern int min(int,int), and its
                  "typedef struct {real r,i;} complex" with
                  <complex.h>'s "#define complex _Complex".  All 149
                  files that include it are under external/f2c, so it
                  does not belong in sys/include/ape.
  regex.h /       three, and design intent.  pcre2posix spells the
  pcre2posix.h    REG_* codes as an enum where regex.h #defines them.
  Plan9libnet.h   two.  It declares Plan 9's accept(int, char*) and
                  listen(char*, char*) against <sys/socket.h>.
                  libnet.h beside it is the same interface with net_
                  prefixes and is what all five callers use; nothing
                  includes Plan9libnet.h at all.
  bsd.h:47        one, real and ours: getopt with a non-const
                  prototype, and <unistd.h> does not declare getopt at
                  all, so this is the tree's only declaration.
  features.h:55   one, real and ours, with a victim: "#define hidden"
                  is musl's internal visibility macro in a public
                  header, and sqlite3.h:10957 declares "unsigned char
                  hidden[48]" which it erases.

The sweep prints the triage rather than the raw lines and still does
not gate, since three of the six are intent.  The two recommendations
-- moving f2c.h out of the public directory and deleting
Plan9libnet.h -- are recorded, not done.

Also records that the full distclean and install completed with
conforming layout, and that a completed build is a precondition for
the measurement rather than the measurement.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
@staalmannen
staalmannen merged commit ba66da5 into main Oct 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants