Re: OSX Porting Problems
Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> Thu, 15 Mar 2007 20:10:24 +0100
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2007-03-15 at 19:06:11 [+0100], Morgan Howe <[email protected]> wrote: [...] > 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 I find this a bit weird. A C program has to know the architecture in order to include the right endian.h? Is there no header that already implements this logic? > 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. Don't worry too much. Just make it work for yourself. If someone else wants to build Haiku on Darwin PPC he'll simply have to have a look. > On to the > next error. :) Probably <regex.h>. :-P Good luck! BTW, for build related stuff you can as well mail me privately. I guess most of this list's subscribers aren't interested that much in the details. :-) CU, Ingo ------------------------------------------------------------------------- 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