t/io/binmode.t
[p5sagit/p5-mst-13.2.git] / handy.h
diff --git a/handy.h b/handy.h
index 76cbf2e..d912735 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -116,6 +116,14 @@ Null SV pointer.
 
 #ifdef I_INTTYPES /* e.g. Linux has int64_t without <inttypes.h> */
 #   include <inttypes.h>
+#   ifdef INT32_MIN_BROKEN
+#       undef  INT32_MIN
+#       define INT32_MIN (-2147483647-1)
+#   endif
+#   ifdef INT64_MIN_BROKEN
+#       undef  INT64_MIN
+#       define INT64_MIN (-9223372036854775807LL-1)
+#   endif
 #endif
 
 typedef I8TYPE I8;
@@ -333,9 +341,9 @@ Converts the specified character to lowercase.
 #   define isLOWER(c)  ((c) >= 'a' && (c) <= 'z')
 #   define isALNUMC(c) (isALPHA(c) || isDIGIT(c))
 #   define isASCII(c)  ((c) <= 127)
-#   define isCNTRL(c)  ((c) < ' ')
+#   define isCNTRL(c)  ((c) < ' ' || (c) == 127)
 #   define isGRAPH(c)  (isALNUM(c) || isPUNCT(c))
-#   define isPRINT(c)  (((c) > 32 && (c) < 127) || isSPACE(c))
+#   define isPRINT(c)  (((c) > 32 && (c) < 127) || (c) == ' ')
 #   define isPUNCT(c)  (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64)  || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
 #   define isXDIGIT(c)  (isdigit(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
 #   define toUPPER(c)  (isLOWER(c) ? (c) - ('a' - 'A') : (c))
@@ -625,10 +633,12 @@ extern long lastxycount[MAXXCOUNT][MAXYCOUNT];
 #ifdef NEED_VA_COPY
 # ifdef va_copy
 #  define Perl_va_copy(s, d) va_copy(d, s)
-# elif defined(__va_copy)
-#  define Perl_va_copy(s, d) __va_copy(d, s)
 # else
-#  define Perl_va_copy(s, d) Copy(s, d, 1, va_list)
+#  if defined(__va_copy)
+#   define Perl_va_copy(s, d) __va_copy(d, s)
+#  else
+#   define Perl_va_copy(s, d) Copy(s, d, 1, va_list)
+#  endif
 # endif
 #endif