This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix compilation of microperl, which doesn't have INT_MAX.
authorNicholas Clark <nick@ccl4.org>
Wed, 19 Apr 2006 07:55:18 +0000 (07:55 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 19 Apr 2006 07:55:18 +0000 (07:55 +0000)
p4raw-id: //depot/perl@27895

toke.c

diff --git a/toke.c b/toke.c
index dc94328..6076484 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2636,7 +2636,14 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen)
     /* This API is bad. It should have been using unsigned int for maxlen.
        Not sure if we want to change the API, but if not we should sanity
        check the value here.  */
-    const unsigned int correct_length = maxlen < 0 ? INT_MAX : maxlen;
+    const unsigned int correct_length
+       = maxlen < 0 ?
+#ifdef PERL_MICRO
+       0x7FFFFFFF
+#else
+       INT_MAX
+#endif
+       : maxlen;
 
     if (!PL_rsfp_filters)
        return -1;