...
>> I'd gotten the impression from Gotham's message that the header file has
>> the same name regardless of which architecture is being used. If it
>> didn't have the same name, I see no reason why he would have mentioned
>> his inability to use the size or modification date of the header file to
>> determine which one it is. Using the file name would have been far
>> easier than either of those methods, if the filename were in fact different.
>> I've seen installation scripts that will install different versions of
>> the same file depending upon the target architecture, so that's one
>> plausible way for that to be the case.
>
> In any individual compilation, there can be only one struct Monkey
> type. Something has to change between one compilation and the next to
> define a different struct Monkey type.
>
> Given the OP's statement that here is a header file for each
> architecture, he needs to tell us how he specifies which one to use.
He's not seen fit to clarify the issue, so we can only guess. However,
I've seen multiple libraries whose installation scripts will install
one, and only one, header file of a given name, with the contents of
that file being different depending upon the architecture that the
library was installed on. If the library he's talking about shares that
feature, it's the installation script, not the OP, that specifies which
one to use - and he's looking for way to determine programmatically
which choice that was.
> If there is only one header file, he needs to tell us how he forces
> only the desired type to be defined.
If the library he's using is similar, in this regard, to the ones I'm
thinking of, the header file contains a declaration for only one
architecture-specific type. That is the desired type, and it was
determined when the library was installed.
However, for those libraries, doing what the OP wanted to do would have
been trivial. Their installation scripts used various methods to
determine which version of the library to install, and all of those
methods would be equally available to the OP. He would only need to read
the installation script and the installed code to find out how it made
that determination, and then do the same in his own code.
If I remember correctly (it's been a while), there were even macros
#defined by the headers that could be queried to determine which choice
the installation script had made, which would make the task even more
trivial.