浏览代码

Xing Xue: Some minor changes for IBM XLC++/AIX.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189623 91177308-0d34-0410-b5e6-96231b3b80d8
Howard Hinnant 12 年之前
父节点
当前提交
5143722d14
共有 3 个文件被更改,包括 6 次插入3 次删除
  1. 1 1
      include/__locale
  2. 0 2
      include/support/ibm/xlocale.h
  3. 5 0
      src/locale.cpp

+ 1 - 1
include/__locale

@@ -363,7 +363,7 @@ public:
 # else
     static const mask blank  = _CTYPE_B;
 # endif
-#elif defined(__sun__)
+#elif defined(__sun__) && defined(_AIX)
     typedef unsigned int mask;
     static const mask space  = _ISSPACE;
     static const mask print  = _ISPRINT;

+ 0 - 2
include/support/ibm/xlocale.h

@@ -263,8 +263,6 @@ size_t wcsxfrm_l(wchar_t *__ws1, const wchar_t *__ws2, size_t __n,
 }
 #endif // !defined(_AIX71)
 
-locale_t cloc(void);
-
 // strftime_l() is defined by POSIX. However, AIX 7.1 does not have it
 // implemented yet.
 static inline

+ 5 - 0
src/locale.cpp

@@ -109,6 +109,11 @@ countof(const T * const begin, const T * const end)
 
 }
 
+#if defined(_AIX)
+// Set priority to INT_MIN + 256 + 150
+# pragma priority ( -2147483242 )
+#endif
+
 const locale::category locale::none;
 const locale::category locale::collate;
 const locale::category locale::ctype;