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] |
Geoffrey Keating wrote:
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: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.+ if (*(unsigned int *) (pc_ + 0) != 0x2e1e0032) \ + break; \ + if (*(unsigned int *) (pc_ + 4) == 0x40be0050 \ + || *(unsigned int *) (pc_ + 4) == 0x41920010) \
Hm!
future?
Well, I have limited resources here, one powerbook, which is three years old and is also my production machine.
I see what I can do. It will certainly take a longer time.
Also I have first to find out about all different versions and how to get them. ( I hope I understood you right)
Andreas*
*wondering why this macro has not already been implemented before..... seems so easy.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |