Repository navigation
libnet.h: revert the reject declaration -- flex has `extern int reject' - #606
Merged
Merged
Conversation
The first build after the header round stopped in flex:
flexdef.h:366 external redeclaration of: reject
EXTERN INT reject
EXTERN FUNC(INT, IND CHAR, IND CHAR) INT libnet.h:36
flex declares reject as a VARIABLE. libnet.h is reached from
<sys/socket.h>, so anything it declares is surface for every
networked program in the tree, and 210 files under external/ use the
name -- gnulib spells two parameters with it.
My sweep looked for `reject(' and so could not match a variable,
which is the mistake CLAUDE.md already records from the bacon link
round: four VARIABLES a function-shaped grep could not match
(optind, opterr, optarg, stdin). Same error, same session. The rule
is now in the build-system section: before adding any name to a
public APE header, grep external/ for the bare word.
The net_accept/net_listen/net_reject removal STAYS -- those three
were declared and defined nowhere, and nothing in this failure bears
on them. Only the reject addition is reverted; reject stays defined
and undeclared, as it was, with the reason in the header.
Control: a TU with `#include <sys/socket.h>' and `extern int reject;'
gives 0 errors against the fixed header and `redeclared as different
kind of symbol' with the declaration put back -- gcc's wording for
what 6c printed. apehdr-sweep 148 headers, 0 standalone findings,
together-case still 8; apdecl-sweep 0.
apehdr-sweep could not have caught this and the limit is recorded: it
compiles APE headers against each other, while the collision came
from a package's own header.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first build after the header round stopped in flex:
flexdef.h:366 external redeclaration of: reject
EXTERN INT reject
EXTERN FUNC(INT, IND CHAR, IND CHAR) INT libnet.h:36
flex declares reject as a VARIABLE. libnet.h is reached from <sys/socket.h>, so anything it declares is surface for every networked program in the tree, and 210 files under external/ use the name -- gnulib spells two parameters with it.
My sweep looked for `reject(' and so could not match a variable, which is the mistake CLAUDE.md already records from the bacon link round: four VARIABLES a function-shaped grep could not match (optind, opterr, optarg, stdin). Same error, same session. The rule is now in the build-system section: before adding any name to a public APE header, grep external/ for the bare word.
The net_accept/net_listen/net_reject removal STAYS -- those three were declared and defined nowhere, and nothing in this failure bears on them. Only the reject addition is reverted; reject stays defined and undeclared, as it was, with the reason in the header.
Control: a TU with
#include <sys/socket.h>' andextern int reject;' gives 0 errors against the fixed header and `redeclared as different kind of symbol' with the declaration put back -- gcc's wording for what 6c printed. apehdr-sweep 148 headers, 0 standalone findings, together-case still 8; apdecl-sweep 0.apehdr-sweep could not have caught this and the limit is recorded: it compiles APE headers against each other, while the collision came from a package's own header.
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs