more changes for XDCTOOLS-326

negative parse.precis was sneaking in printfExtend
diff --git a/src/packages/xdc/runtime/System.c b/src/packages/xdc/runtime/System.c
index b34e243..958573a 100644
--- a/src/packages/xdc/runtime/System.c
+++ b/src/packages/xdc/runtime/System.c
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
+#include <limits.h>
 
 /*
  *  ======== OUTMAX ========
@@ -499,9 +500,18 @@
 
                  /* check if enough buffer space available */
                 if (n > 1U) {
-                    /* parse.precis should account for the buffer size */
+                    /* parse.precis should account for the buffer size. We are
+                     * assuming that SIZE_MAX>=INT_MAX because it's true for
+                     * the compilers we care about. A longer discussion is here:
+                     * https://stackoverflow.com/questions/46508831/is-the-max-value-of-size-t-size-max-defined-relative-to-the-other-integer-type?rq=1
+                    */
                     if ((parse.precis == -1) || ((SizeT)parse.precis >= n)) {
-                         parse.precis = (Int)n;
+                         if (n < INT_MAX) {
+                             parse.precis = (Int)n;
+                         }
+                         else {
+                             parse.precis = INT_MAX;
+                         }
                     }
                     else {
                          /* Have enough space, increment to account for '\0' */