Some minor mingw64 porting tweaks from Glen.

llvm-svn: 163120
This commit is contained in:
Howard Hinnant 2012-09-03 18:13:11 +00:00
parent c38826ccf3
commit 49713b442c
2 changed files with 9 additions and 4 deletions

View File

@ -9,11 +9,11 @@
//===----------------------------------------------------------------------===//
#ifdef min
#warning: macro min is incompatible with C++. #undef'ing min
#warning: macro min is incompatible with C++. #undefing min
#undef min
#endif
#ifdef max
#warning: macro max is incompatible with C++. #undef'ing max
#warning: macro max is incompatible with C++. #undefing max
#undef max
#endif

View File

@ -16,8 +16,13 @@
#include <cstddef>
#include "system_error"
// Use <cxxabi.h> to determine whether we're linking against libc++abi.
#if __has_include(<cxxabi.h>)
#ifndef __has_include
#define __has_include(inc) 0
#endif
#if __APPLE__
#include <cxxabi.h>
#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
#include <cxxabi.h>
#endif