svn commit: r301035 - head/include

Ed Schouten ed at FreeBSD.org
Tue May 31 12:29:22 UTC 2016


Author: ed
Date: Tue May 31 12:29:21 2016
New Revision: 301035
URL: https://svnweb.freebsd.org/changeset/base/301035

Log:
  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_.

Modified:
  head/include/monetary.h

Modified: head/include/monetary.h
==============================================================================
--- head/include/monetary.h	Tue May 31 11:32:09 2016	(r301034)
+++ head/include/monetary.h	Tue May 31 12:29:21 2016	(r301035)
@@ -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, ...);


More information about the svn-src-all mailing list