This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 20/01/2004, at 12:37 PM, Andreas Tobler wrote:
So, the question is, how do I check inside darwin.h which OS version I have?
You check with code like this:
+ if (*(unsigned int *) (pc_ + 0) != 0x2e1e0032) \ + break; \ + if (*(unsigned int *) (pc_ + 4) == 0x40be0050 \ + || *(unsigned int *) (pc_ + 4) == 0x41920010) \
You should make enough tests to make sure that you don't falsely identify any darwin version (past or future), by checking every instruction that would have been executed on a return from a signal handler.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |