Including C system headers through a Swift Package

Oh no :sob: There’s not much more context beyond what’s written there: some system headers use either and or or as an identifier (don’t remember which). What I’m not sure about is why modules aren’t sufficient to fix this: the headers that use and and or wouldn’t be including iso646.h. Maybe someone at Apple can go find the specific motivating example for that change, because maybe it’s been fixed.

We still have to be very careful about changing this though, because perhaps Library A included iso646.h without using it, and Swift bridging header B imports library A and uses one of the reserved words as an identifier. So we might just be stuck for source compatibility reasons.

2 Likes