diff --git a/src/utils.cc b/src/utils.cc index 832a6243..fa7f618d 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -19,9 +19,14 @@ #include #endif -//#define _STRINGIFY(x) #x -//#define ENSURE_STRING_MACRO_ARGUMENT(x) _STRINGIFY(x) +// DEFAULT_RESOURCE_DIRECTORY is passed with quotes for non-MSVC compilers, ie, +// foo vs "foo". +#if defined(_MSC_VER ) +#define _STRINGIFY(x) #x +#define ENSURE_STRING_MACRO_ARGUMENT(x) _STRINGIFY(x) +#else #define ENSURE_STRING_MACRO_ARGUMENT(x) x +#endif // See http://stackoverflow.com/a/217605 void TrimStart(std::string& s) {