[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: PATCH: Lua5.1-work3 loadlib cleanups
- From: Adrián Pérez <copylight@...>
- Date: Wed, 08 Dec 2004 02:14:11 +0100
El 08/12/2004, a las 0:23, Mike Pall escribió:
Hello,
I tend to write the test for MacOS X like:
#if defined(__APPLE__) && defined(__ppc__)
/* MacOS X code goes here */
#endif
Well, but there is a Darwin port to x86. So when dynamic library
support
is concerned the proper way is to test for __APPLE__ and __MACH__.
Incidentially that is exactly what Lua 5.1-work3 does. My patch just
rearranges the autodetection and wraps a #ifndef NO_LOADLIB around it.
Good point, sure! I have never dealed with Darwin, and I'm usually
interested in checking for OSX exclusively (not for Darwin in general).
So maybe I should rewrite my tests like:
#if defined(__APPLE__) && defined(__MACH__)
# ifdef __ppc__
/* MacOS X-only stuff */
/* (maybe things not present in standard Darwin) */
# else
/* Darwin stuff */
# endif
#endif
Thanks for making me being aware of the existance of Darwin ;-)
-ap
Attachment:
PGP.sig
Description: Mensaje firmado digitalmente