summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2016-05-31 12:29:21 +0000
committered <ed@FreeBSD.org>2016-05-31 12:29:21 +0000
commit968b0346dded50130f7a3fe8864178baf0f0cef8 (patch)
treec9c303cc55256bd44dd7e8b82281b19cf3a6e891 /include
parentb429ebef482139e9294958a13d2934d2af169043 (diff)
downloadFreeBSD-src-968b0346dded50130f7a3fe8864178baf0f0cef8.zip
FreeBSD-src-968b0346dded50130f7a3fe8864178baf0f0cef8.tar.gz
Make strfmon_l() work without requiring the use of <xlocale.h>.
The strfmon_l() function provided by <xlocale/_monetary.h> is also part of POSIX 2008's <monetary.h>, so it should be exposed by default. Change the check used in <monetary.h> to be similar to the one that's part of <wchar.h>, where we both test for __POSIX_VISIBLE and _XLOCALE_H_.
Diffstat (limited to 'include')
-rw-r--r--include/monetary.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/monetary.h b/include/monetary.h
index 93f82c1..bca607a 100644
--- a/include/monetary.h
+++ b/include/monetary.h
@@ -43,7 +43,7 @@ typedef __ssize_t ssize_t;
#endif
__BEGIN_DECLS
-#ifdef _XLOCALE_H_
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#include <xlocale/_monetary.h>
#endif
ssize_t strfmon(char * __restrict, size_t, const char * __restrict, ...);
OpenPOWER on IntegriCloud