From 810283f2a2140dc40b8747b8de548cbb9138598b Mon Sep 17 00:00:00 2001 From: "Ben \"root\" Anderson" Date: Thu, 24 Oct 2013 19:23:46 -0500 Subject: [PATCH] a) LUA_USE_LINUX doesn't sound MinGW friendly. Remind me to investigate exactly what that enables. b) Nobody uses VC2003 anymore. Bring back UNIQUE_NAME. --- configure.ac | 4 +++- src/global.h | 10 +++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 4570ae7430..0900026b6d 100644 --- a/configure.ac +++ b/configure.ac @@ -135,7 +135,9 @@ case $host_os in unix=yes ;; esac -AC_DEFINE(LUA_USE_LINUX, 1, [Linux for Lua]) +if test $host_os != mingw32; then + AC_DEFINE(LUA_USE_LINUX, 1, [Linux for Lua]) +fi AM_CONDITIONAL(UNIX, test "$unix" = "yes" ) AM_CONDITIONAL(LINUX, test "$linux" = "yes" ) AM_CONDITIONAL(BSD, test "$bsd" = "yes" ) diff --git a/src/global.h b/src/global.h index 4b96dc83ed..1a39940763 100644 --- a/src/global.h +++ b/src/global.h @@ -154,13 +154,9 @@ void ShowWarningOrTrace( const char *file, int line, const char *message, bool b /* Use UNIQUE_NAME to get the line number concatenated to x. This is useful for * generating unique identifiers in other macros. */ -/* XXX: VC2003 expanding __LINE__ to nothing in the first version. Investigate why. -Chris */ -//#define UNIQUE_NAME3(x,line) x##line -//#define UNIQUE_NAME2(x,line) UNIQUE_NAME3(x, line) -//#define UNIQUE_NAME(x) UNIQUE_NAME2(x, __LINE__) -#define UNIQUE_NAME3(x) x -#define UNIQUE_NAME2(x) UNIQUE_NAME3(x) -#define UNIQUE_NAME(x) UNIQUE_NAME2(x) +#define UNIQUE_NAME3(x,line) x##line +#define UNIQUE_NAME2(x,line) UNIQUE_NAME3(x, line) +#define UNIQUE_NAME(x) UNIQUE_NAME2(x, __LINE__) template struct CompileAssert; template <> struct CompileAssert { };