Skip to content

Commit 05a3b00

Browse files
committed
Adding scrypt_pickparams() function as wrapper to the pickparams() function. This will probably not work in Windows.
Signed-off-by: Tyler Anthony Romeo <[email protected]>
1 parent eb7337b commit 05a3b00

File tree

6 files changed

+697
-1
lines changed

6 files changed

+697
-1
lines changed

config.m4

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,21 @@ if test $PHP_SCRYPT != "no"; then
55
PHP_ADD_INCLUDE(crypto)
66
PHP_ADD_BUILD_DIR(crypto)
77

8+
AH_TEMPLATE(HAVE_SYSCTL_HW_USERMEM, [Define if the hw.usermem property exists in sysctl.])
9+
if sysctl hw.usermem >/dev/null 2>/dev/null; then
10+
AC_DEFINE(HAVE_SYSCTL_HW_USERMEM, 1)
11+
fi
12+
13+
AH_TEMPLATE(HAVE_CLOCK_GETTIME, [See if we have the clock_gettime function.])
14+
AH_TEMPLATE(HAVE_STRUCT_SYSINFO, [Define if the sysinfo struct exists.])
15+
AH_TEMPLATE(HAVE_STRUCT_SYSINFO_TOTALRAM, [Define if the sysinfo struct has a member for the total amount of RAM.])
16+
17+
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE(HAVE_CLOCK_GETTIME, 1)])
18+
AC_CHECK_MEMBER([struct sysinfo.uptime], [AC_DEFINE(HAVE_STRUCT_SYSINFO)])
19+
AC_CHECK_MEMBER([struct sysinfo.totalram], [AC_DEFINE(HAVE_STRUCT_SYSINFO_TOTALRAM)])
20+
821
version=nosse
922
AC_CHECK_HEADER([emmintrin.h], [version=sse], [version=nosse])
1023
AC_DEFINE(HAVE_SCRYPT, 1, [Whether you have scrypt])
11-
PHP_NEW_EXTENSION(scrypt, php_scrypt.c php_scrypt_utils.c crypto/sha256.c crypto/crypto_scrypt-$version.c, $ext_shared)
24+
PHP_NEW_EXTENSION(scrypt, php_scrypt.c php_scrypt_utils.c crypto/sha256.c crypto/crypto_scrypt-$version.c crypto/params.c, $ext_shared)
1225
fi

0 commit comments

Comments
 (0)