Skip to content

Rename HAVE_DECL_ARC4RANDOM_BUF to HAVE_ARC4RANDOM_BUF #14565

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

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

petk
Copy link
Member

@petk petk commented Jun 13, 2024

AC_CHECK_DECLS defines HAVE_DECL_ARC4RANDOM_BUF to 0 or 1. On Windows this isn't defined to 0. To avoid the undefined state, the AC_CHECK_DECL is used to manually define the HAVE_ARC4RANDOM_BUF to 1 if declaration is found, otherwise undefined.

In the future on current platforms, also AC_CHECK_FUNCS can be used instead since the arc4random_buf is located in default libraries (C) with declaration available in headers.

AC_CHECK_DECLS defines HAVE_DECL_ARC4RANDOM_BUF to 0 or 1. On Windows
this isn't defined to 0. To avoid the undefined state, the AC_CHECK_DECL
is used to manually define the HAVE_ARC4RANDOM_BUF to 1 if declaration
is found, otherwise undefined.

In the future on current platforms, also AC_CHECK_FUNCS can be used
instead since the arc4random_buf is located in default libraries (C)
with declaration available in headers.
@petk petk merged commit 3b951e7 into php:master Jun 13, 2024
10 of 11 checks passed
@petk petk deleted the patch-HAVE_DECL_ARC4RANDOM_BUF branch June 13, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants