This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use PERL_INT_MAX, this works in microperl
authorDavid Leadbeater <dgl@dgl.cx>
Sat, 18 Aug 2012 15:26:11 +0000 (16:26 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 10 Sep 2013 11:45:27 +0000 (13:45 +0200)
toke.c

diff --git a/toke.c b/toke.c
index 1e83419..297559a 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4293,14 +4293,7 @@ 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.  */
-    unsigned int correct_length
-       = maxlen < 0 ?
-#ifdef PERL_MICRO
-       0x7FFFFFFF
-#else
-       INT_MAX
-#endif
-       : maxlen;
+    unsigned int correct_length = maxlen < 0 ?  PERL_INT_MAX : maxlen;
 
     PERL_ARGS_ASSERT_FILTER_READ;