Re: OSX Porting Problems
"Morgan Howe" <[email protected]> Thu, 15 Mar 2007 11:06:11 -0700
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 3/15/07, Axel Dörfler <[email protected]> wrote: > > "Morgan Howe" <[email protected]> wrote: > > Ah, you are right. I must have made a typo the first time I tried > > it. My > > first thought was > > #ifdef __BEOS__ || __APPLE__ > > which it didn't seem to like. I must have just missed something. > > Don't expect too much logic from the preprocessor :-) > You would need to write the above as: > #if defined(__BEOS__) || defined(__APPLE__) > > Bye, > Axel. > That makes sense. Thanks, Axel. :) Ingo - Darwin also requires endian.h, like bsd. I created headers/build/host/darwin/endian.h with the following: #ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_ENDIAN #define _HAIKU_BUILD_COMPATIBILITY_DARWIN_ENDIAN // endian.h on darwin exists in [arch]/endian.h // and includes sys/_endian.h and the macro naming differs #ifdef __INTEL __ #include <i386/endian.h> #else // PPC #include <ppc/endian.h> #endif #define __LITTLE_ENDIAN LITTLE_ENDIAN #define __BIG_ENDIAN BIG_ENDIAN #define __PDP_ENDIAN PDP_ENDIAN #endif // _HAIKU_BUILD_COMPATIBILITY_DARWIN_ENDIAN I wasn't positive if checking for __INTEL__ was the right thing, or if I should look at an endian define, or what. The above does work for me, though I can't actually test it on a ppc. If you have a suggestion for a more appropriate #ifdef just let me know for future reference. On to the next error. :) Morgan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Open-beos-kernel-devel mailing list Open-beos-kernel-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/open-beos-kernel-devel