Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in PHP-CParser to support Ubuntu 18.04 (and modern libc) #46

Open
ircmaxell opened this issue Apr 22, 2019 · 0 comments
Open

Fix bug in PHP-CParser to support Ubuntu 18.04 (and modern libc) #46

ircmaxell opened this issue Apr 22, 2019 · 0 comments

Comments

@ircmaxell
Copy link
Owner

ircmaxell commented Apr 22, 2019

Currently, PHP-CParser uses a hand-rolled parser for C pre-processor declarations. This turns out to be buggy on 18.04 since they use ternary if statements. Specifically, /usr/include/features.h contains:

#if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11
# define __GLIBC_USE_DEPRECATED_GETS 0
#else
# define __GLIBC_USE_DEPRECATED_GETS 1
#endif

The current parser syntax errors at the >= symbol since it's not expecting arbitrary nested expressions...

@ircmaxell ircmaxell changed the title Fix bug in PHP-CParser to support Ubuntu 18.04's GLIBC Fix bug in PHP-CParser to support Ubuntu 18.04 (and modern libc) Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant