Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jul 2016 09:50:19 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303427 - in head/include: . xlocale
Message-ID:  <201607280950.u6S9oJ2E081486@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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))
 



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