msvc-libcxx.patch 822 B

1234567891011121314151617181920212223242526272829303132
  1. Use locate_t defined by libc++.
  2. --- a/include/fmt/format.h
  3. +++ b/include/fmt/format.h
  4. @@ -339,1 +339,1 @@
  5. -#if defined(_SECURE_SCL) && _SECURE_SCL
  6. +#if defined(_SECURE_SCL) && _SECURE_SCL && !defined(_LIBCPP_VERSION)
  7. --- a/include/fmt/os.h
  8. +++ b/include/fmt/os.h
  9. @@ -23,6 +23,10 @@
  10. # include <xlocale.h> // for LC_NUMERIC_MASK on OS X
  11. #endif
  12. +#if defined(_WIN32)
  13. +# include <locale> // for libc++ locale_win32.h
  14. +#endif
  15. +
  16. #include "format.h"
  17. // UWP doesn't provide _pipe.
  18. @@ -348,5 +352,5 @@
  19. class locale {
  20. private:
  21. -# ifdef _WIN32
  22. +# if defined(_WIN32) && !defined(_LIBCPP_VERSION)
  23. using locale_t = _locale_t;
  24. @@ -367,3 +371,3 @@ class locale {
  25. locale() {
  26. -# ifndef _WIN32
  27. +# if !defined(_WIN32) || defined(_LIBCPP_VERSION)
  28. locale_ = FMT_SYSTEM(newlocale(LC_NUMERIC_MASK, "C", nullptr));