mirror of
https://github.com/php/php-src.git
synced 2024-12-01 22:03:36 +08:00
Added mnogosearch version checking into config.m4.
Some proto fixes.
This commit is contained in:
parent
e4f4983cdc
commit
3fc482b207
@ -17,14 +17,36 @@ PHP_ARG_WITH(mnogosearch,for mnoGoSearch support,
|
||||
MNOGOSEARCH_LIBDIR=$PHP_MNOGOSEARCH/lib
|
||||
fi
|
||||
|
||||
AC_ADD_INCLUDE($MNOGOSEARCH_INCDIR)
|
||||
AC_MSG_CHECKING(for mnoGoSearch version)
|
||||
|
||||
if test -x "$MNOGOSEARCH_BINDIR/udm-config"; then
|
||||
MNOGOSEARCH_VERSION=`$MNOGOSEARCH_BINDIR/udm-config --version`
|
||||
MNOGOSEARCH_VERSION_ID=`$MNOGOSEARCH_BINDIR/udm-config -version-id`
|
||||
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_RESULT(<= 3.1.9)
|
||||
AC_MSG_ERROR(mnoGoSearch 3.1.10 at least required)
|
||||
fi
|
||||
|
||||
if test -l "$MNOGOSEARCH_VERSION_ID" -gt 6; then
|
||||
AC_MSG_RESULT(<= 3.1.9)
|
||||
AC_MSG_ERROR(mnoGoSearch 3.1.10 at least required)
|
||||
fi
|
||||
|
||||
if test "$MNOGOSEARCH_VERSION_ID" -lt 30110; then
|
||||
AC_MSG_RESULT(<= 3.1.9)
|
||||
AC_MSG_ERROR(mnoGoSearch 3.1.10 at least required)
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($MNOGOSEARCH_VERSION)
|
||||
|
||||
PHP_EVAL_LIBLINE(`$MNOGOSEARCH_BINDIR/udm-config --libs`, MNOGOSEARCH_SHARED_LIBADD)
|
||||
else
|
||||
AC_ADD_LIBRARY_WITH_PATH(udmsearch, $MNOGOSEARCH_LIBDIR, MNOGOSEARCH_SHARED_LIBADD)
|
||||
AC_MSG_ERROR(udm-config script not found in $MNOGOSEARCH_BINDIR)
|
||||
fi
|
||||
|
||||
AC_ADD_INCLUDE($MNOGOSEARCH_INCDIR)
|
||||
|
||||
AC_DEFINE(HAVE_MNOGOSEARCH,1,[ ])
|
||||
|
||||
PHP_SUBST(MNOGOSEARCH_SHARED_LIBADD)
|
||||
|
@ -682,53 +682,6 @@ DLEXPORT PHP_FUNCTION(udm_free_res)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto int udm_errno(int agent)
|
||||
mnoGoSearch error number */
|
||||
DLEXPORT PHP_FUNCTION(udm_errno)
|
||||
{
|
||||
pval ** yyagent;
|
||||
UDM_AGENT * Agent;
|
||||
switch(ZEND_NUM_ARGS()){
|
||||
case 1: {
|
||||
if (zend_get_parameters_ex(1, &yyagent)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link);
|
||||
RETURN_LONG(UdmDBErrorCode(Agent->db));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto string udm_error(int agent)
|
||||
mnoGoSearch error message */
|
||||
DLEXPORT PHP_FUNCTION(udm_error)
|
||||
{
|
||||
pval ** yyagent;
|
||||
UDM_AGENT * Agent;
|
||||
|
||||
switch(ZEND_NUM_ARGS()){
|
||||
case 1: {
|
||||
if (zend_get_parameters_ex(1, &yyagent)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link);
|
||||
RETURN_STRING(UdmDBErrorMsg(Agent->db),1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto int udm_free_agent(int agent)
|
||||
Free mnoGoSearch session */
|
||||
DLEXPORT PHP_FUNCTION(udm_free_agent)
|
||||
@ -754,6 +707,53 @@ DLEXPORT PHP_FUNCTION(udm_free_agent)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto int udm_errno(int agent)
|
||||
Get mnoGoSearch error number */
|
||||
DLEXPORT PHP_FUNCTION(udm_errno)
|
||||
{
|
||||
pval ** yyagent;
|
||||
UDM_AGENT * Agent;
|
||||
switch(ZEND_NUM_ARGS()){
|
||||
case 1: {
|
||||
if (zend_get_parameters_ex(1, &yyagent)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link);
|
||||
RETURN_LONG(UdmDBErrorCode(Agent->db));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto string udm_error(int agent)
|
||||
Get mnoGoSearch error message */
|
||||
DLEXPORT PHP_FUNCTION(udm_error)
|
||||
{
|
||||
pval ** yyagent;
|
||||
UDM_AGENT * Agent;
|
||||
|
||||
switch(ZEND_NUM_ARGS()){
|
||||
case 1: {
|
||||
if (zend_get_parameters_ex(1, &yyagent)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
break;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link);
|
||||
RETURN_STRING(UdmDBErrorMsg(Agent->db),1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user