6 Commits
0.1 ... 0.2

Author SHA1 Message Date
michael
45c984eb53 new package
git-svn-id: https://svn.php.net/repository/pecl/expect/trunk@200385 c90b9560-bf6c-de11-be94-00142212c4b1
2005-11-12 09:39:22 +00:00
michael
a0786b31c2 fixed #5941 (Segfault on INI handlers in ZTS mode)
git-svn-id: https://svn.php.net/repository/pecl/expect/trunk@200384 c90b9560-bf6c-de11-be94-00142212c4b1
2005-11-12 09:38:03 +00:00
michael
b6e7f4d085 fixed error message typo
git-svn-id: https://svn.php.net/repository/pecl/expect/trunk@198767 c90b9560-bf6c-de11-be94-00142212c4b1
2005-10-19 09:09:24 +00:00
michael
ab6a35e71b fixed OnUpdateLong for Zend Engine 1
git-svn-id: https://svn.php.net/repository/pecl/expect/trunk@197345 c90b9560-bf6c-de11-be94-00142212c4b1
2005-10-02 11:46:06 +00:00
michael
269bc73f95 fixed for situation, when there'are wrong library/header in /usr/, but we
really need other path, like: /usr/local/expect-...


git-svn-id: https://svn.php.net/repository/pecl/expect/trunk@197344 c90b9560-bf6c-de11-be94-00142212c4b1
2005-10-02 11:43:18 +00:00
michael
4deb2dcbaf removed unneeded check for exp_popen
git-svn-id: https://svn.php.net/repository/pecl/expect/trunk@197342 c90b9560-bf6c-de11-be94-00142212c4b1
2005-10-02 09:57:52 +00:00
4 changed files with 21 additions and 24 deletions

View File

@@ -3,32 +3,23 @@ dnl $Id$
dnl
PHP_ARG_WITH(expect,for expect support,
[ --with-expect[=DIR] Include expect support (requires libexpect).])
[ --with-expect[=DIR] Include expect support (requires libexpect >= 5.43.0).])
if test "$PHP_EXPECT" != "no"; then
for i in $PHP_EXPECT /usr/local /usr ; do
if test -f $i/include/expect.h; then
LIBEXPECT_DIR=$i
LIBEXPECT_INCDIR=$i/include
break
fi
done
if test -z "$LIBEXPECT_DIR"; then
AC_MSG_ERROR(Cannot find libexpect)
AC_MSG_ERROR(expect extension requires libexpect version >= 5.43.0)
fi
LIBEXPECT_LIBDIR=$LIBEXPECT_DIR/lib
PHP_ADD_LIBRARY_WITH_PATH(expect, $LIBEXPECT_DIR/lib, EXPECT_SHARED_LIBADD)
PHP_ADD_INCLUDE($LIBEXPECT_DIR/include)
PHP_CHECK_LIBRARY(expect, exp_popen,
[ AC_DEFINE(HAVE_LIBEXPECT, 1, "") ],
[ AC_MSG_ERROR(expect module requires libexpect.) ],
[ -L$LIBEXPECT_LIBDIR ]
)
PHP_ADD_LIBRARY_WITH_PATH(expect, $LIBEXPECT_LIBDIR, EXPECT_SHARED_LIBADD)
PHP_ADD_INCLUDE($LIBEXPECT_INCDIR)
PHP_SUBST(EXPECT_SHARED_LIBADD)
PHP_NEW_EXTENSION(expect, expect.c expect_fopen_wrapper.c, $ext_shared)
PHP_SUBST(EXPECT_SHARED_LIBADD)
fi

View File

@@ -4,8 +4,7 @@
ARG_WITH('expect' , 'expect support', 'no');
if (PHP_EXPECT != "no") {
if (CHECK_HEADER_ADD_INCLUDE("expect.h", "CFLAGS_EXPECT", PHP_EXPECT) &&
CHECK_LIB("expect.lib", "expect", PHP_EXPECT)) {
if (CHECK_HEADER_ADD_INCLUDE("expect.h", "CFLAGS_EXPECT", PHP_EXPECT) && CHECK_LIB("expect.lib", "expect", PHP_EXPECT)) {
EXTENSION("expect", "expect.c", PHP_EXPECT_SHARED, null, "php_expect.dll");
} else {
WARNING("expect not enabled; libraries and headers not found");

View File

@@ -49,12 +49,13 @@ zend_module_entry expect_module_entry = {
ZEND_GET_MODULE(expect)
#endif
/* {{{ PHP_INI_MH
* */
static PHP_INI_MH(OnSetExpectTimeout)
{
return OnUpdateLong (entry, new_value, new_value_length, &exp_timeout, mh_arg2, mh_arg3, stage TSRMLS_CC);
if (new_value) {
exp_timeout = atoi(new_value);
}
}
/* }}} */
@@ -63,7 +64,13 @@ static PHP_INI_MH(OnSetExpectTimeout)
* */
static PHP_INI_MH(OnSetExpectLogUser)
{
return OnUpdateBool (entry, new_value, new_value_length, &exp_loguser, mh_arg2, mh_arg3, stage TSRMLS_CC);
if (new_value) {
if (strncasecmp("on", new_value, sizeof("on"))) {
exp_loguser = atoi(new_value);
} else {
exp_loguser = 1;
}
}
}
/* }}} */
@@ -198,7 +205,7 @@ PHP_FUNCTION(expect_expectl)
if (Z_TYPE_PP(z_case) != IS_ARRAY) {
efree (ecases);
php_error_docref (NULL TSRMLS_CC, E_ERROR, "expression case must be an array");
php_error_docref (NULL TSRMLS_CC, E_ERROR, "expect case must be an array");
return;
}

View File

@@ -14,10 +14,10 @@
</maintainers>
<release>
<version>0.1</version>
<date>2005-10-01</date>
<version>0.2</version>
<date>2005-11-12</date>
<state>beta</state>
<notes>Initial release. Try it out!</notes>
<notes>Fixed #5941</notes>
</release>
<filelist>