svn commit: r259283 - stable/9/contrib/libstdc++/include/std
Pedro F. Giffuni
pfg at FreeBSD.org
Fri Dec 13 02:21:33 UTC 2013
Author: pfg
Date: Fri Dec 13 02:21:32 2013
New Revision: 259283
URL: http://svnweb.freebsd.org/changeset/base/259283
Log:
MFC r244673:
Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.
This seems to be needed by newer compilers.
Modified:
stable/9/contrib/libstdc++/include/std/std_limits.h
Directory Properties:
stable/9/ (props changed)
stable/9/contrib/libstdc++/ (props changed)
Modified: stable/9/contrib/libstdc++/include/std/std_limits.h
==============================================================================
--- stable/9/contrib/libstdc++/include/std/std_limits.h Fri Dec 13 01:35:31 2013 (r259282)
+++ stable/9/contrib/libstdc++/include/std/std_limits.h Fri Dec 13 02:21:32 2013 (r259283)
@@ -134,10 +134,11 @@
#define __glibcxx_signed(T) ((T)(-1) < 0)
#define __glibcxx_min(T) \
- (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0)
+ (__glibcxx_signed (T) ? (((T)1 << (__glibcxx_digits (T) - 1)) << 1) : (T)0)
#define __glibcxx_max(T) \
- (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0)
+ (__glibcxx_signed (T) ? \
+ (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
#define __glibcxx_digits(T) \
(sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
More information about the svn-src-stable-9
mailing list