Don't define __locale_raii if we are not going to be using it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Chisnall 2012-02-29 13:00:07 +00:00
parent 1e8b3f96c0
commit 8fa14e97ca

View File

@ -211,7 +211,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
typedef _VSTD::remove_pointer<locale_t>::type __locale_struct; typedef _VSTD::remove_pointer<locale_t>::type __locale_struct;
typedef _VSTD::unique_ptr<__locale_struct, decltype(&freelocale)> __locale_unique_ptr; typedef _VSTD::unique_ptr<__locale_struct, decltype(&freelocale)> __locale_unique_ptr;
#ifndef _LIBCPP_LOCALE__L_EXTENSIONS
typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii; typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii;
#endif
// OSX has nice foo_l() functions that let you turn off use of the global // OSX has nice foo_l() functions that let you turn off use of the global
// locale. Linux, not so much. The following functions avoid the locale when // locale. Linux, not so much. The following functions avoid the locale when