Skip to content

Commit 49713b4

Browse files
author
Howard Hinnant
committed
Some minor mingw64 porting tweaks from Glen.
llvm-svn: 163120
1 parent c38826c commit 49713b4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

libcxx/include/__undef_min_max

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
//===----------------------------------------------------------------------===//
1010

1111
#ifdef min
12-
#warning: macro min is incompatible with C++. #undef'ing min
12+
#warning: macro min is incompatible with C++. #undefing min
1313
#undef min
1414
#endif
1515

1616
#ifdef max
17-
#warning: macro max is incompatible with C++. #undef'ing max
17+
#warning: macro max is incompatible with C++. #undefing max
1818
#undef max
1919
#endif

libcxx/src/stdexcept.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@
1616
#include <cstddef>
1717
#include "system_error"
1818

19-
// Use <cxxabi.h> to determine whether we're linking against libc++abi.
20-
#if __has_include(<cxxabi.h>)
19+
#ifndef __has_include
20+
#define __has_include(inc) 0
21+
#endif
22+
23+
#if __APPLE__
24+
#include <cxxabi.h>
25+
#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
2126
#include <cxxabi.h>
2227
#endif
2328

0 commit comments

Comments
 (0)