diff options
-rw-r--r-- | cmd-line-utils/libedit/config.h | 2 | ||||
-rw-r--r-- | cmd-line-utils/readline/terminal.c | 2 | ||||
-rw-r--r-- | configure.in | 23 | ||||
-rw-r--r-- | include/my_sys.h | 4 | ||||
-rw-r--r-- | sql/sql_bitmap.h | 2 |
5 files changed, 29 insertions, 4 deletions
diff --git a/cmd-line-utils/libedit/config.h b/cmd-line-utils/libedit/config.h index b6f002d5b9e..642123d1ddc 100644 --- a/cmd-line-utils/libedit/config.h +++ b/cmd-line-utils/libedit/config.h @@ -2,8 +2,10 @@ #include "my_config.h" #include "sys.h" +#if defined(LIBC_SCCS) && !defined(lint) #define __RCSID(x) #define __COPYRIGHT(x) +#endif #define __RENAME(x) #define _DIAGASSERT(x) diff --git a/cmd-line-utils/readline/terminal.c b/cmd-line-utils/readline/terminal.c index a506fa6de09..b2bcf5f146c 100644 --- a/cmd-line-utils/readline/terminal.c +++ b/cmd-line-utils/readline/terminal.c @@ -346,7 +346,7 @@ get_term_capabilities (bp) register unsigned int i; for (i = 0; i < NUM_TC_STRINGS; i++) -# ifdef __LCC__ +# if defined(__LCC__) || defined(__MWERKS__) *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp); # else *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp); diff --git a/configure.in b/configure.in index 6efdc56d450..b37f0b3c537 100644 --- a/configure.in +++ b/configure.in @@ -127,8 +127,25 @@ AC_PROG_MAKE_SET # This generates rules for webpage generation for the MySQL homepage. AM_CONDITIONAL(LOCAL, test -d ../web/SitePages) -# This is need before AC_PROG_CC -# +############################################################################## +# The below section needs to be done before AC_PROG_CC +############################################################################## + +# Hack for OS X/Darwin and Metrowerks CodeWarrior +AC_ARG_WITH(darwin-mwcc, +[ --with-darwin-mwcc Use Metrowerks CodeWarrior wrappers on OS X/Darwin],[ + builddir=`pwd` + ccwrapper="$builddir/support-files/MacOSX/mwcc-wrapper" + arwrapper="$builddir/support-files/MacOSX/mwar-wrapper" + CC="$ccwrapper" + CXX="$ccwrapper" + LD="$ccwrapper" + AR="$arwrapper" + RANLIB=: + export CC CXX LD AR RANLIB + AC_SUBST(AR) + AC_SUBST(RANLIB) +]) if test "x${CFLAGS-}" = x ; then cflags_is_set=no @@ -148,6 +165,8 @@ else ldflags_is_set=yes fi +################ End of section to be done before AC_PROG_CC ################# + # The following hack should ensure that configure doesn't add optimizing # or debugging flags to CFLAGS or CXXFLAGS # C_EXTRA_FLAGS are flags that are automaticly added to both diff --git a/include/my_sys.h b/include/my_sys.h index 7ead643a9c6..c9552f8558b 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -163,6 +163,10 @@ extern char *my_strdup_with_length(const byte *from, uint length, #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #pragma alloca #endif /* _AIX */ +#if defined(__MWERKS__) +#undef alloca +#define alloca __alloca +#endif /* __MWERKS__ */ #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) #define alloca __builtin_alloca #endif /* GNUC */ diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 5c51f3ecb67..2fd603d9381 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -91,7 +91,7 @@ template <> class Bitmap<64> ulonglong map; public: Bitmap<64>() { } -#if defined(__NETWARE__) +#if defined(__NETWARE__) || defined(__MWERKS__) /* Metwork compiler gives error on Bitmap<64> Changed to Bitmap, since in this case also it will proper construct |