[php-src] PR #15242: Fix bug #51558: shared readline build fails
| From: | petk | Date: | Mon, 05 Aug 2024 08:14:00 +0000 |
| Subject: | [php-src] PR #15242: Fix bug #51558: shared readline build fails | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-27673@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/15242
Author: petk
The 'rl_pending_input' is a variable in Readline library and checking it with
PHP_CHECK_LIBRARY wouldn't find it on some systems. This should fix the build on systems where
this caused issues, such as AIX.
Which works on most systems but not on AIX mentioned in the bug as it exports variables and
functions differently whereas the linker couldn't resolve the variable as a function.
The library check:
```c
char rl_pending_input ();
int main (void) {
return rl_pending_input ();
}
```
The declaration check:
```c
int main (void) {
(void) rl_pending_input;
(void) rl_pending_input;
;
return 0;
}
```
Closes https://bugs.php.net/51558