[libcxx] r177310 - Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
Marshall Clow
mclow at qualcomm.com
Mon Mar 18 12:34:07 PDT 2013
Author: marshall
Date: Mon Mar 18 14:34:07 2013
New Revision: 177310
URL: http://llvm.org/viewvc/llvm-project?rev=177310&view=rev
Log:
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
Modified:
libcxx/trunk/include/__config
libcxx/trunk/include/__locale
libcxx/trunk/include/locale
libcxx/trunk/src/thread.cpp
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=177310&r1=177309&r2=177310&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Mon Mar 18 14:34:07 2013
@@ -272,7 +272,7 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
-#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
+#if defined(__FreeBSD__) && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
#endif
@@ -451,18 +451,18 @@ template <unsigned> struct __static_asse
#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
#endif
-#if defined(__APPLE__) || __FreeBSD__ || _WIN32 || __sun__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
-#if __FreeBSD__
+#ifdef __FreeBSD__
#define _DECLARE_C99_LDBL_MATH 1
#endif
-#if defined(__APPLE__) || __FreeBSD__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#define _LIBCPP_HAS_DEFAULTRUNELOCALE
#endif
-#if defined(__APPLE__) || __FreeBSD__ || __sun__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
#define _LIBCPP_WCTYPE_IS_MASK
#endif
Modified: libcxx/trunk/include/__locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=177310&r1=177309&r2=177310&view=diff
==============================================================================
--- libcxx/trunk/include/__locale (original)
+++ libcxx/trunk/include/__locale Mon Mar 18 14:34:07 2013
@@ -21,7 +21,7 @@
#include <locale.h>
#ifdef _WIN32
# include <support/win32/locale_win32.h>
-#elif (__GLIBC__ || defined(__APPLE__) || __FreeBSD__ || __sun__)
+#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__))
# include <xlocale.h>
#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_
@@ -315,7 +315,7 @@ locale::operator()(const basic_string<_C
class _LIBCPP_TYPE_VIS ctype_base
{
public:
-#if __GLIBC__
+#ifdef __GLIBC__
typedef unsigned short mask;
static const mask space = _ISspace;
static const mask print = _ISprint;
@@ -339,10 +339,10 @@ public:
static const mask punct = _PUNCT;
static const mask xdigit = _HEX;
static const mask blank = _BLANK;
-#elif (__APPLE__ || __FreeBSD__)
-#if __APPLE__
+#elif (defined(__APPLE__) || defined(__FreeBSD__))
+#ifdef __APPLE__
typedef __uint32_t mask;
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
typedef unsigned long mask;
#endif
static const mask space = _CTYPE_S;
@@ -355,7 +355,7 @@ public:
static const mask punct = _CTYPE_P;
static const mask xdigit = _CTYPE_X;
static const mask blank = _CTYPE_B;
-#elif __sun__
+#elif defined(__sun__)
typedef unsigned int mask;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
Modified: libcxx/trunk/include/locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/locale?rev=177310&r1=177309&r2=177310&view=diff
==============================================================================
--- libcxx/trunk/include/locale (original)
+++ libcxx/trunk/include/locale Mon Mar 18 14:34:07 2013
@@ -204,7 +204,7 @@ template <class charT> class messages_by
_LIBCPP_BEGIN_NAMESPACE_STD
-#if defined(__APPLE__) || __FreeBSD__
+#if defined(__APPLE__) || defined(__FreeBSD__)
# define _LIBCPP_GET_C_LOCALE 0
#else
# define _LIBCPP_GET_C_LOCALE __cloc()
Modified: libcxx/trunk/src/thread.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/thread.cpp?rev=177310&r1=177309&r2=177310&view=diff
==============================================================================
--- libcxx/trunk/src/thread.cpp (original)
+++ libcxx/trunk/src/thread.cpp Mon Mar 18 14:34:07 2013
@@ -14,7 +14,7 @@
#include "limits"
#include <sys/types.h>
#if !defined(_WIN32)
-#if !__sun__ && !__linux__
+#if !defined(__sun__) && !defined(__linux__)
#include <sys/sysctl.h>
#else
#include <unistd.h>
More information about the cfe-commits
mailing list