Add compilation support with Newlib nano for embedded targets

Remove the dependency on std::locale to reduce executable sizes

For embedded target the usage of locale bring a huge amount of code to the executable, just to get hold of the thousands separator. Using a static defined thousands separator makes libfmt embedded target friendly.
This commit is contained in:
Thomas Bernard
2018-08-19 07:40:34 -07:00
committed by Victor Zverovich
parent 18400503da
commit abde38b4fb
2 changed files with 14 additions and 3 deletions
+2 -1
View File
@@ -266,7 +266,8 @@ class file {
long getpagesize();
#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \
!defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__OpenBSD__)
!defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && \
!defined(__NEWLIB_H__)
# define FMT_LOCALE
#endif