Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2012 12:11:54 +0000 (UTC)
From:      David Chisnall <theraven@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233600 - head/include
Message-ID:  <201203281211.q2SCBsNm035197@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: theraven
Date: Wed Mar 28 12:11:54 2012
New Revision: 233600
URL: http://svn.freebsd.org/changeset/base/233600

Log:
  Correctly expose xlocale functions if people include the headers in the wrong
  order (as some ports apparently do).
  
  Approved by:	dim (mentor)

Modified:
  head/include/ctype.h
  head/include/inttypes.h
  head/include/langinfo.h
  head/include/monetary.h
  head/include/stdio.h
  head/include/stdlib.h
  head/include/string.h
  head/include/time.h
  head/include/wchar.h

Modified: head/include/ctype.h
==============================================================================
--- head/include/ctype.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/ctype.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -79,7 +79,7 @@ int	isrune(int);
 int	isspecial(int);
 #endif
 
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
 #include <xlocale/_ctype.h>
 #endif
 __END_DECLS

Modified: head/include/inttypes.h
==============================================================================
--- head/include/inttypes.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/inttypes.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -45,6 +45,9 @@ typedef struct {
 } imaxdiv_t;
 
 __BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_inttypes.h>
+#endif
 intmax_t	imaxabs(intmax_t) __pure2;
 imaxdiv_t	imaxdiv(intmax_t, intmax_t) __pure2;
 

Modified: head/include/langinfo.h
==============================================================================
--- head/include/langinfo.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/langinfo.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -131,7 +131,7 @@ typedef	__nl_item	nl_item;
 __BEGIN_DECLS
 char	*nl_langinfo(nl_item);
 
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
 #include <xlocale/_langinfo.h>
 #endif
 __END_DECLS

Modified: head/include/monetary.h
==============================================================================
--- head/include/monetary.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/monetary.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -43,6 +43,9 @@ typedef	__ssize_t	ssize_t;
 #endif
 
 __BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_monetary.h>
+#endif
 ssize_t	strfmon(char * __restrict, size_t, const char * __restrict, ...);
 __END_DECLS
 

Modified: head/include/stdio.h
==============================================================================
--- head/include/stdio.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/stdio.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -225,6 +225,9 @@ __END_DECLS
 #define	stderr	__stderrp
 
 __BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_stdio.h>
+#endif
 /*
  * Functions defined in ANSI C standard.
  */

Modified: head/include/stdlib.h
==============================================================================
--- head/include/stdlib.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/stdlib.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -72,6 +72,9 @@ typedef struct {
 #define	RAND_MAX	0x7fffffff
 
 __BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_stdlib.h>
+#endif
 extern int __mb_cur_max;
 extern int ___mb_cur_max(void);
 #define	MB_CUR_MAX	(___mb_cur_max())

Modified: head/include/string.h
==============================================================================
--- head/include/string.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/string.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -133,7 +133,7 @@ void	 swab(const void * __restrict, void
 
 #endif /* __BSD_VISIBLE */
 
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
 #include <xlocale/_string.h>
 #endif
 __END_DECLS

Modified: head/include/time.h
==============================================================================
--- head/include/time.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/time.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -184,7 +184,7 @@ time_t timelocal(struct tm * const);
 time_t timegm(struct tm * const);
 #endif /* __BSD_VISIBLE */
 
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
 #include <xlocale/_time.h>
 #endif
 __END_DECLS

Modified: head/include/wchar.h
==============================================================================
--- head/include/wchar.h	Wed Mar 28 11:37:06 2012	(r233599)
+++ head/include/wchar.h	Wed Mar 28 12:11:54 2012	(r233600)
@@ -225,7 +225,7 @@ size_t	wcslcat(wchar_t *, const wchar_t 
 size_t	wcslcpy(wchar_t *, const wchar_t *, size_t);
 #endif
 
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
 #include <xlocale/_wchar.h>
 #endif
 __END_DECLS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203281211.q2SCBsNm035197>