[libcxx-commits] [libcxx] 83a0386 - [libcxx] Add missing _LIBCPP_FUNC_VIS on a few win32 locale functions

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 18 01:06:11 PST 2020


Author: Martin Storsjö
Date: 2020-11-18T11:04:55+02:00
New Revision: 83a03867da128bf9410ae15eb451500ed8c800f5

URL: https://github.com/llvm/llvm-project/commit/83a03867da128bf9410ae15eb451500ed8c800f5
DIFF: https://github.com/llvm/llvm-project/commit/83a03867da128bf9410ae15eb451500ed8c800f5.diff

LOG: [libcxx] Add missing _LIBCPP_FUNC_VIS on a few win32 locale functions

These functions are called directly from the public installed
headers, and thus need to be exported in DLL builds, just like
some other functions in the same header (e.g. snprintf_l).

This fixes e.g. test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
in mingw configurations.

Differential Revision: https://reviews.llvm.org/D91328

Added: 
    

Modified: 
    libcxx/include/support/win32/locale_win32.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/support/win32/locale_win32.h b/libcxx/include/support/win32/locale_win32.h
index 8d7779e0ccaf..897c36be70c6 100644
--- a/libcxx/include/support/win32/locale_win32.h
+++ b/libcxx/include/support/win32/locale_win32.h
@@ -201,8 +201,8 @@ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l );
 #define strtof_l _strtof_l
 #define strtold_l _strtold_l
 #else
-float strtof_l(const char*, char**, locale_t);
-long double strtold_l(const char*, char**, locale_t);
+_LIBCPP_FUNC_VIS float strtof_l(const char*, char**, locale_t);
+_LIBCPP_FUNC_VIS long double strtold_l(const char*, char**, locale_t);
 #endif
 inline _LIBCPP_INLINE_VISIBILITY
 int


        


More information about the libcxx-commits mailing list