Bug #76574 [Com]: use of undeclared identifiers INT_MAX and LONG_MAX
| From: | php-bugs-2018 at ryandesign dot com | Date: | Wed, 04 Jul 2018 05:24:42 +0000 |
| Subject: | Bug #76574 [Com]: use of undeclared identifiers INT_MAX and LONG_MAX | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216125@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76574&edit=1
ID: 76574
Comment by: php-bugs-2018 at ryandesign dot com
Reported by: php-bugs-2018 at ryandesign dot com
Summary: use of undeclared identifiers INT_MAX and LONG_MAX
Status: Open
Type: Bug
Package: mbstring related
Operating System: macOS 10.12.6
PHP Version: 7.3.0alpha2
Block user comment: N
Private report: N
New Comment:
I do not see the problem when I build oniguruma 6.7.1 by itself outside of PHP.
It looks like one needs to #include <limits.h> in order to get the definitions of INT_MAX and
LONG_MAX. The oniguruma source code does do that, but only if its configure script determined that
the header exists; it sets HAVE_LIMITS_H when that's the case. It doesn't look like PHP
runs oniguruma's configure script, so it's not set.
I am able to build successfully by adding "-DHAVE_LIMITS_H=1" to CFLAGS, but of course I
shouldn't have to do that.
Previous Comments:
------------------------------------------------------------------------
[2018-07-03 18:56:04] php-bugs-2018 at ryandesign dot com
Description:
------------
ext/mbstring/oniguruma/src/regparse.c:206:11: error: use of undeclared identifier
'INT_MAX'
if (x < INT_MAX / y)
^
ext/mbstring/oniguruma/src/regparse.c:6760:49: error: use of undeclared identifier
'LONG_MAX'
r = parse_long(enc, buf, bufend, 1, LONG_MAX, &rl);
^
2 errors generated.
make: *** [oniguruma/src/regparse.lo] Error 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76574&edit=1