svn commit: r303427 - in head/include: . xlocale

Ed Schouten ed at FreeBSD.org
Thu Jul 28 09:50:20 UTC 2016


Author: ed
Date: Thu Jul 28 09:50:19 2016
New Revision: 303427
URL: https://svnweb.freebsd.org/changeset/base/303427

Log:
  Change type of MB_CUR_MAX and MB_CUR_MAX_L() to size_t.
  
  POSIX requires that MB_CUR_MAX expands to an expression of type size_t.
  It currently expands to an int. As these are already macros, don't
  change the underlying type of these functions. There is no ned to touch
  those.
  
  Differential Revision:	https://reviews.freebsd.org/D6645

Modified:
  head/include/stdlib.h
  head/include/xlocale/_stdlib.h

Modified: head/include/stdlib.h
==============================================================================
--- head/include/stdlib.h	Thu Jul 28 09:09:55 2016	(r303426)
+++ head/include/stdlib.h	Thu Jul 28 09:50:19 2016	(r303427)
@@ -77,7 +77,7 @@ __BEGIN_DECLS
 #endif
 extern int __mb_cur_max;
 extern int ___mb_cur_max(void);
-#define	MB_CUR_MAX	(___mb_cur_max())
+#define	MB_CUR_MAX	((size_t)___mb_cur_max())
 
 _Noreturn void	 abort(void);
 int	 abs(int) __pure2;

Modified: head/include/xlocale/_stdlib.h
==============================================================================
--- head/include/xlocale/_stdlib.h	Thu Jul 28 09:09:55 2016	(r303426)
+++ head/include/xlocale/_stdlib.h	Thu Jul 28 09:50:19 2016	(r303427)
@@ -55,5 +55,5 @@ size_t			 wcstombs_l(char * __restrict,
 int			 wctomb_l(char *, wchar_t, locale_t);
 
 int			 ___mb_cur_max_l(locale_t);
-#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x))
+#define MB_CUR_MAX_L(x) ((size_t)___mb_cur_max_l(x))
 


More information about the svn-src-all mailing list