Index: builtin.c =================================================================== RCS file: /cvsroot/xmlgawk/xmlgawk/builtin.c,v retrieving revision 1.6 diff -b -u -p -r1.6 builtin.c --- builtin.c 14 Nov 2005 15:27:24 -0000 1.6 +++ builtin.c 20 Dec 2005 14:45:38 -0000 @@ -937,16 +937,15 @@ check_pos: goto pr_tail; if (tmpval < 0) { - if (tmpval < INTMAX_MIN) + uval = -tmpval; + if (-(AWKNUM)uval != tmpval) goto out_of_range; sgn = TRUE; - uval = - (uintmax_t) (intmax_t) tmpval; } else { /* Use !, so that NaNs are out of range. */ - if (! (tmpval <= UINTMAX_MAX)) + if ((uval = (uintmax_t) tmpval) != tmpval) goto out_of_range; sgn = FALSE; - uval = (uintmax_t) tmpval; } ii = jj = 0; do {