This revision was automatically updated to reflect the committed changes. Closed by commit rL281641: [libc++] Avoid <memory> include in locale_win32.h (authored by smeenai).
Changed prior to commit: https://reviews.llvm.org/D24374?vs=70899&id=71530#toc Repository: rL LLVM https://reviews.llvm.org/D24374 Files: libcxx/trunk/include/support/win32/locale_win32.h libcxx/trunk/src/support/win32/locale_win32.cpp Index: libcxx/trunk/src/support/win32/locale_win32.cpp =================================================================== --- libcxx/trunk/src/support/win32/locale_win32.cpp +++ libcxx/trunk/src/support/win32/locale_win32.cpp @@ -10,6 +10,11 @@ #include <locale> #include <cstdarg> // va_start, va_end +#include <memory> +#include <type_traits> + +typedef _VSTD::remove_pointer<locale_t>::type __locale_struct; +typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii; // FIXME: base currently unused. Needs manual work to construct the new locale locale_t newlocale( int mask, const char * locale, locale_t /*base*/ ) Index: libcxx/trunk/include/support/win32/locale_win32.h =================================================================== --- libcxx/trunk/include/support/win32/locale_win32.h +++ libcxx/trunk/include/support/win32/locale_win32.h @@ -17,7 +17,6 @@ #include "support/win32/support.h" #include "support/win32/locale_mgmt_win32.h" #include <stdio.h> -#include <memory> lconv *localeconv_l( locale_t loc ); size_t mbrlen_l( const char *__restrict s, size_t n, @@ -34,13 +33,10 @@ size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc); wint_t btowc_l( int c, locale_t loc ); int wctob_l( wint_t c, locale_t loc ); -typedef _VSTD::remove_pointer<locale_t>::type __locale_struct; -typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii; inline _LIBCPP_ALWAYS_INLINE decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ) { - __locale_raii __current( uselocale(__l), uselocale ); - return MB_CUR_MAX; + return ___mb_cur_max_l_func(__l); } // the *_l functions are prefixed on Windows, only available for msvcr80+, VS2005+
Index: libcxx/trunk/src/support/win32/locale_win32.cpp =================================================================== --- libcxx/trunk/src/support/win32/locale_win32.cpp +++ libcxx/trunk/src/support/win32/locale_win32.cpp @@ -10,6 +10,11 @@ #include <locale> #include <cstdarg> // va_start, va_end +#include <memory> +#include <type_traits> + +typedef _VSTD::remove_pointer<locale_t>::type __locale_struct; +typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii; // FIXME: base currently unused. Needs manual work to construct the new locale locale_t newlocale( int mask, const char * locale, locale_t /*base*/ ) Index: libcxx/trunk/include/support/win32/locale_win32.h =================================================================== --- libcxx/trunk/include/support/win32/locale_win32.h +++ libcxx/trunk/include/support/win32/locale_win32.h @@ -17,7 +17,6 @@ #include "support/win32/support.h" #include "support/win32/locale_mgmt_win32.h" #include <stdio.h> -#include <memory> lconv *localeconv_l( locale_t loc ); size_t mbrlen_l( const char *__restrict s, size_t n, @@ -34,13 +33,10 @@ size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc); wint_t btowc_l( int c, locale_t loc ); int wctob_l( wint_t c, locale_t loc ); -typedef _VSTD::remove_pointer<locale_t>::type __locale_struct; -typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii; inline _LIBCPP_ALWAYS_INLINE decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ) { - __locale_raii __current( uselocale(__l), uselocale ); - return MB_CUR_MAX; + return ___mb_cur_max_l_func(__l); } // the *_l functions are prefixed on Windows, only available for msvcr80+, VS2005+
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits