lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

El 08/12/2004, a las 0:23, Mike Pall escribió:


I tend to write the test for MacOS X like:

#if defined(__APPLE__) && defined(__ppc__)
  /* MacOS X code goes here */

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

Thanks for making me being aware of the existance of Darwin ;-)


Attachment: PGP.sig
Description: Mensaje firmado digitalmente