diff --git a/include/my_global.h b/include/my_global.h index 19ba37fd58bb9f78e7a5ffa7cf42db4e24dc6c99..2a2b4a2ba99d3ebd3b487a22391cdd2248ed1310 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -92,6 +92,42 @@ #define NETWARE_SET_SCREEN_MODE(A) #endif +/* + The macros below are used to allow build of Universal/fat binaries of + MySQL and MySQL applications under darwin. +*/ +#ifdef TARGET_FAT_BINARY +# undef SIZEOF_CHARP +# undef SIZEOF_INT +# undef SIZEOF_LONG +# undef SIZEOF_LONG_LONG +# undef SIZEOF_OFF_T +# undef SIZEOF_SHORT + +#if defined(__i386__) +# undef WORDS_BIGENDIAN +# define SIZEOF_CHARP 4 +# define SIZEOF_INT 4 +# define SIZEOF_LONG 4 +# define SIZEOF_LONG_LONG 8 +# define SIZEOF_OFF_T 8 +# define SIZEOF_SHORT 2 + +#elif defined(__ppc__) +# define WORDS_BIGENDIAN +# define SIZEOF_CHARP 4 +# define SIZEOF_INT 4 +# define SIZEOF_LONG 4 +# define SIZEOF_LONG_LONG 8 +# define SIZEOF_OFF_T 8 +# define SIZEOF_SHORT 2 + +#else +# error Building FAT binary for an unknown architecture. +#endif +#endif /* TARGET_FAT_BINARY */ + + /* The macros below are borrowed from include/linux/compiler.h in the Linux kernel. Use them to indicate the likelyhood of the truthfulness