Removed raw references to _WIN32; now just check to see if it is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e33c2d1926
commit
a22d2addb1
@ -96,7 +96,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
|
#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
|
||||||
|
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
// only really useful for a DLL
|
// only really useful for a DLL
|
||||||
#ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
|
#ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
# include <support/win32/locale_win32.h>
|
# include <support/win32/locale_win32.h>
|
||||||
#elif (__GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__)
|
#elif (__GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__)
|
||||||
# include <xlocale.h>
|
# include <xlocale.h>
|
||||||
@ -327,7 +327,7 @@ public:
|
|||||||
static const mask punct = _ISpunct;
|
static const mask punct = _ISpunct;
|
||||||
static const mask xdigit = _ISxdigit;
|
static const mask xdigit = _ISxdigit;
|
||||||
static const mask blank = _ISblank;
|
static const mask blank = _ISblank;
|
||||||
#elif _WIN32
|
#elif defined(_WIN32)
|
||||||
typedef unsigned short mask;
|
typedef unsigned short mask;
|
||||||
static const mask space = _SPACE;
|
static const mask space = _SPACE;
|
||||||
static const mask print = _BLANK|_PUNCT|_ALPHA|_DIGIT;
|
static const mask print = _BLANK|_PUNCT|_ALPHA|_DIGIT;
|
||||||
|
@ -106,7 +106,7 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
|
|||||||
#include <__config>
|
#include <__config>
|
||||||
#include <cwctype>
|
#include <cwctype>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
#include <support/win32/support.h> // pull in *swprintf defines
|
#include <support/win32/support.h> // pull in *swprintf defines
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ template <class charT> class messages_byname;
|
|||||||
#endif
|
#endif
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
#include <support/win32/locale_win32.h>
|
#include <support/win32/locale_win32.h>
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
#include <nl_types.h>
|
#include <nl_types.h>
|
||||||
@ -3799,7 +3799,7 @@ template <class _CharT>
|
|||||||
typename messages<_CharT>::catalog
|
typename messages<_CharT>::catalog
|
||||||
messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
|
messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
|
||||||
{
|
{
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
return -1;
|
return -1;
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
|
catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
|
||||||
@ -3814,7 +3814,7 @@ typename messages<_CharT>::string_type
|
|||||||
messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
|
messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
|
||||||
const string_type& __dflt) const
|
const string_type& __dflt) const
|
||||||
{
|
{
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
return __dflt;
|
return __dflt;
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
string __ndflt;
|
string __ndflt;
|
||||||
@ -3836,7 +3836,7 @@ template <class _CharT>
|
|||||||
void
|
void
|
||||||
messages<_CharT>::do_close(catalog __c) const
|
messages<_CharT>::do_close(catalog __c) const
|
||||||
{
|
{
|
||||||
#if !_WIN32
|
#if !defined(_WIN32)
|
||||||
if (__c != -1)
|
if (__c != -1)
|
||||||
__c <<= 1;
|
__c <<= 1;
|
||||||
nl_catd __cat = (nl_catd)__c;
|
nl_catd __cat = (nl_catd)__c;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "cstring"
|
#include "cstring"
|
||||||
#include "cwctype"
|
#include "cwctype"
|
||||||
#include "__sso_allocator"
|
#include "__sso_allocator"
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
#include <support/win32/locale_win32.h>
|
#include <support/win32/locale_win32.h>
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
@ -987,7 +987,7 @@ ctype<char>::classic_table() _NOEXCEPT
|
|||||||
return __cloc()->__ctype_b;
|
return __cloc()->__ctype_b;
|
||||||
#elif __sun__
|
#elif __sun__
|
||||||
return __ctype_mask;
|
return __ctype_mask;
|
||||||
#elif _WIN32
|
#elif defined(_WIN32)
|
||||||
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
|
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
|
||||||
// This is assumed to be safe, which is a nonsense assumption because we're
|
// This is assumed to be safe, which is a nonsense assumption because we're
|
||||||
// going to end up dereferencing it later...
|
// going to end up dereferencing it later...
|
||||||
@ -5779,7 +5779,7 @@ moneypunct_byname<char, true>::init(const char* nm)
|
|||||||
__frac_digits_ = lc->int_frac_digits;
|
__frac_digits_ = lc->int_frac_digits;
|
||||||
else
|
else
|
||||||
__frac_digits_ = base::do_frac_digits();
|
__frac_digits_ = base::do_frac_digits();
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
if (lc->p_sign_posn == 0)
|
if (lc->p_sign_posn == 0)
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
if (lc->int_p_sign_posn == 0)
|
if (lc->int_p_sign_posn == 0)
|
||||||
@ -5787,7 +5787,7 @@ moneypunct_byname<char, true>::init(const char* nm)
|
|||||||
__positive_sign_ = "()";
|
__positive_sign_ = "()";
|
||||||
else
|
else
|
||||||
__positive_sign_ = lc->positive_sign;
|
__positive_sign_ = lc->positive_sign;
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
if(lc->n_sign_posn == 0)
|
if(lc->n_sign_posn == 0)
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
if (lc->int_n_sign_posn == 0)
|
if (lc->int_n_sign_posn == 0)
|
||||||
@ -5799,7 +5799,7 @@ moneypunct_byname<char, true>::init(const char* nm)
|
|||||||
// the same places in curr_symbol since there's no way to
|
// the same places in curr_symbol since there's no way to
|
||||||
// represent anything else.
|
// represent anything else.
|
||||||
string_type __dummy_curr_symbol = __curr_symbol_;
|
string_type __dummy_curr_symbol = __curr_symbol_;
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
__init_pat(__pos_format_, __dummy_curr_symbol, true,
|
__init_pat(__pos_format_, __dummy_curr_symbol, true,
|
||||||
lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, ' ');
|
lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, ' ');
|
||||||
__init_pat(__neg_format_, __curr_symbol_, true,
|
__init_pat(__neg_format_, __curr_symbol_, true,
|
||||||
@ -5938,7 +5938,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
|
|||||||
__frac_digits_ = lc->int_frac_digits;
|
__frac_digits_ = lc->int_frac_digits;
|
||||||
else
|
else
|
||||||
__frac_digits_ = base::do_frac_digits();
|
__frac_digits_ = base::do_frac_digits();
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
if (lc->p_sign_posn == 0)
|
if (lc->p_sign_posn == 0)
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
if (lc->int_p_sign_posn == 0)
|
if (lc->int_p_sign_posn == 0)
|
||||||
@ -5958,7 +5958,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
|
|||||||
wbe = wbuf + j;
|
wbe = wbuf + j;
|
||||||
__positive_sign_.assign(wbuf, wbe);
|
__positive_sign_.assign(wbuf, wbe);
|
||||||
}
|
}
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
if (lc->n_sign_posn == 0)
|
if (lc->n_sign_posn == 0)
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
if (lc->int_n_sign_posn == 0)
|
if (lc->int_n_sign_posn == 0)
|
||||||
@ -5982,7 +5982,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
|
|||||||
// the same places in curr_symbol since there's no way to
|
// the same places in curr_symbol since there's no way to
|
||||||
// represent anything else.
|
// represent anything else.
|
||||||
string_type __dummy_curr_symbol = __curr_symbol_;
|
string_type __dummy_curr_symbol = __curr_symbol_;
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
__init_pat(__pos_format_, __dummy_curr_symbol, true,
|
__init_pat(__pos_format_, __dummy_curr_symbol, true,
|
||||||
lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, L' ');
|
lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, L' ');
|
||||||
__init_pat(__neg_format_, __curr_symbol_, true,
|
__init_pat(__neg_format_, __curr_symbol_, true,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "cstdlib"
|
#include "cstdlib"
|
||||||
#include "cwchar"
|
#include "cwchar"
|
||||||
#include "cerrno"
|
#include "cerrno"
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
#include "support/win32/support.h"
|
#include "support/win32/support.h"
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "future"
|
#include "future"
|
||||||
#include "limits"
|
#include "limits"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if !_WIN32
|
#if !defined(_WIN32)
|
||||||
#if !__sun__ && !__linux__
|
#if !__sun__ && !__linux__
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#else
|
#else
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#define PLATFORM_SUPPORT_H
|
#define PLATFORM_SUPPORT_H
|
||||||
|
|
||||||
// locale names
|
// locale names
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
// WARNING: Windows does not support UTF-8 codepages.
|
// WARNING: Windows does not support UTF-8 codepages.
|
||||||
// Locales are "converted" using http://docs.moodle.org/dev/Table_of_locales
|
// Locales are "converted" using http://docs.moodle.org/dev/Table_of_locales
|
||||||
#define LOCALE_en_US_UTF_8 "English_United States.1252"
|
#define LOCALE_en_US_UTF_8 "English_United States.1252"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user