Repository navigation
bash: gettext's lock.h was shadowing APE's - #599
Merged
Merged
Conversation
The first rebuild after the -J default stopped with
/sys/include/ape/qlock.h:44 syntax error, last name: Lock
compiling general.c. -I$BASHSRC/lib/intl was on bash's CFLAGS and
that directory holds gettext's own lock.h. An -I is searched ahead of
the system path, so APE's <pthread.h>, reaching its own
#include <lock.h>, got gettext's file, which never typedefs Lock;
<qlock.h> then reached "Lock lock;" with no such type.
It was inert while <qlock.h> carried its own Lock typedef behind an
always-true "#ifndef Lock". Removing that duplicate was correct and is
what made the shadow reachable.
-J is not in frame: the error is a parse of a type name, and the same
file fails the same way under -9.
Removing the -I is measured: ENABLE_NLS is undef, the only <libintl.h>
includes in the compiled set are behind #if ENABLE_NLS, and nothing
compiled here names any other of that directory's 29 headers.
ishadow-sweep.py sweeps the class -- which package -I directories hold
a header that an APE header includes with angle brackets. 31 pairs
over 19 names, and it gates nothing: most are deliberate, so a hit is
a question rather than a finding.
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 rebuild after the -J default stopped with
compiling general.c. -I$BASHSRC/lib/intl was on bash's CFLAGS and that directory holds gettext's own lock.h. An -I is searched ahead of the system path, so APE's <pthread.h>, reaching its own #include <lock.h>, got gettext's file, which never typedefs Lock; <qlock.h> then reached "Lock lock;" with no such type.
It was inert while <qlock.h> carried its own Lock typedef behind an always-true "#ifndef Lock". Removing that duplicate was correct and is what made the shadow reachable.
-J is not in frame: the error is a parse of a type name, and the same file fails the same way under -9.
Removing the -I is measured: ENABLE_NLS is undef, the only <libintl.h>
includes in the compiled set are behind #if ENABLE_NLS, and nothing compiled here names any other of that directory's 29 headers.
ishadow-sweep.py sweeps the class -- which package -I directories hold a header that an APE header includes with angle brackets. 31 pairs over 19 names, and it gates nothing: most are deliberate, so a hit is a question rather than a finding.
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs