add workaround for buggy solaris systems

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30887 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-06-29 07:02:27 +00:00
parent 26f5110852
commit 9a8cb3c0bb
2 changed files with 11 additions and 5 deletions

View file

@ -509,8 +509,12 @@ static NSMapTable *globalClassMap = 0;
{
int64_t i = [self decodeInt64ForKey: aKey];
#if (INTPTR_MAX < INT64_MAX)
if (i > INTPTR_MAX || i < INTPTR_MIN)
/* Older Solaris systems define INTPTR_MAX incorrectly ... so we use the
* void pointer size we determined at configure time to decide whether
* we need to check for overflow.
*/
#if (GS_SIZEOF_VOIDP < 8)
if (i > INT32_MAX || i < INT32_MIN)
{
[NSException raise: NSRangeException
format: @"[%@ +%@]: value for key(%@) is out of range",