Skip to content

Commit b56e858

Browse files
author
Marshall Clow
committed
Removed raw references to __APPLE__; now just check to see if it is defined.
llvm-svn: 177297
1 parent e8f1cf4 commit b56e858

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

libcxx/include/__locale

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <locale.h>
2222
#ifdef _WIN32
2323
# include <support/win32/locale_win32.h>
24-
#elif (__GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__)
24+
#elif (__GLIBC__ || defined(__APPLE__) || __FreeBSD__ || __sun__)
2525
# include <xlocale.h>
2626
#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_
2727

libcxx/include/iterator

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ template <class T, size_t N> T* end(T (&array)[N]);
317317
#include <type_traits>
318318
#include <cstddef>
319319
#include <iosfwd>
320-
#if __APPLE__
320+
#ifdef __APPLE__
321321
#include <Availability.h>
322322
#endif
323323

libcxx/include/locale

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ template <class charT> class messages_byname;
181181
#include <streambuf>
182182
#include <iterator>
183183
#include <limits>
184-
#if !__APPLE__
184+
#ifndef __APPLE__
185185
#include <cstdarg>
186186
#endif
187187
#include <cstdlib>
@@ -192,7 +192,7 @@ template <class charT> class messages_byname;
192192
#include <nl_types.h>
193193
#endif // !_WIN32
194194

195-
#if __APPLE__
195+
#ifdef __APPLE__
196196
#include <Availability.h>
197197
#endif
198198

@@ -204,7 +204,7 @@ template <class charT> class messages_byname;
204204

205205
_LIBCPP_BEGIN_NAMESPACE_STD
206206

207-
#if __APPLE__ || __FreeBSD__
207+
#if defined(__APPLE__) || __FreeBSD__
208208
# define _LIBCPP_GET_C_LOCALE 0
209209
#else
210210
# define _LIBCPP_GET_C_LOCALE __cloc()

libcxx/src/chrono.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "chrono"
1111
#include <sys/time.h> //for gettimeofday and timeval
12-
#if __APPLE__
12+
#ifdef __APPLE__
1313
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
1414
#else /* !__APPLE__ */
1515
#include <cerrno> // errno
@@ -50,7 +50,7 @@ system_clock::from_time_t(time_t t) _NOEXCEPT
5050

5151
const bool steady_clock::is_steady;
5252

53-
#if __APPLE__
53+
#ifdef __APPLE__
5454
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
5555
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
5656
// are run time constants supplied by the OS. This clock has no relationship

libcxx/src/exception.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define __has_include(inc) 0
1515
#endif
1616

17-
#if __APPLE__
17+
#ifdef __APPLE__
1818
#include <cxxabi.h>
1919

2020
using namespace __cxxabiv1;
@@ -102,7 +102,7 @@ terminate() _NOEXCEPT
102102
#if !defined(LIBCXXRT) && !defined(__GLIBCXX__)
103103
bool uncaught_exception() _NOEXCEPT
104104
{
105-
#if __APPLE__ || defined(_LIBCPPABI_VERSION)
105+
#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)
106106
// on Darwin, there is a helper function so __cxa_get_globals is private
107107
return __cxa_uncaught_exception();
108108
#else // __APPLE__

libcxx/src/new.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define __has_include(inc) 0
1616
#endif
1717

18-
#if __APPLE__
18+
#ifdef __APPLE__
1919
#include <cxxabi.h>
2020

2121
#ifndef _LIBCPPABI_VERSION

libcxx/src/stdexcept.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define __has_include(inc) 0
2121
#endif
2222

23-
#if __APPLE__
23+
#ifdef __APPLE__
2424
#include <cxxabi.h>
2525
#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
2626
#include <cxxabi.h>

libcxx/src/typeinfo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define __has_include(inc) 0
1313
#endif
1414

15-
#if __APPLE__
15+
#ifdef __APPLE__
1616
#include <cxxabi.h>
1717
#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
1818
#include <cxxabi.h>
@@ -50,7 +50,7 @@ std::bad_typeid::what() const _NOEXCEPT
5050
return "std::bad_typeid";
5151
}
5252

53-
#if __APPLE__
53+
#ifdef __APPLE__
5454
// On Darwin, the cxa_bad_* functions cannot be in the lower level library
5555
// because bad_cast and bad_typeid are defined in his higher level library
5656
void __cxxabiv1::__cxa_bad_typeid() { throw std::bad_typeid(); }

libcxx/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24413,7 +24413,7 @@ void test12()
2441324413
output_iterator<char*> iter;
2441424414
std::locale lc = std::locale::classic();
2441524415
std::locale lg(lc, new my_numpunct);
24416-
#if __APPLE__
24416+
#ifdef __APPLE__
2441724417
// This test is failing on FreeBSD, possibly due to different representations
2441824418
// of the floating point numbers.
2441924419
const my_facet f(1);

libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ int main()
9393
assert(t.tm_hour == 23);
9494
assert(err == std::ios_base::eofbit);
9595
}
96-
#if __APPLE__
96+
#ifdef __APPLE__
9797
{
9898
const my_facet f("ru_RU", 1);
9999
const wchar_t in[] = L"\x441\x443\x431\x431\x43E\x442\x430"
@@ -128,7 +128,7 @@ int main()
128128
assert(t.tm_hour == 23);
129129
assert(err == std::ios_base::eofbit);
130130
}
131-
#if __APPLE__
131+
#ifdef __APPLE__
132132
{
133133
const my_facet f("zh_CN", 1);
134134
const wchar_t in[] = L"\x516D"

0 commit comments

Comments
 (0)