[libcxx-commits] [PATCH] D91328: [libcxx] Add missing _LIBCPP_FUNC_VIS on a couple win32 locale functions

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 12 01:00:19 PST 2020


mstorsjo created this revision.
mstorsjo added a reviewer: libc++.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91328

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


Index: libcxx/include/support/win32/locale_win32.h
===================================================================
--- libcxx/include/support/win32/locale_win32.h
+++ libcxx/include/support/win32/locale_win32.h
@@ -201,8 +201,8 @@
 #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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91328.304743.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201112/b5ae9eb1/attachment.bin>


More information about the libcxx-commits mailing list