The following patch solves problems with win32 build. I don't know what it breaks :)
Edin Btw. vc++ 6.0 spits out these warnings: c:\php4build\HEAD\ext\pgsql\pgsql.c(1073) : warning C4018: '==' : signed/unsigned mismatch c:\php4build\HEAD\ext\pgsql\pgsql.c(3196) : warning C4244: '=' : conversion from 'double ' to 'long ', possible loss of data c:\php4build\HEAD\ext\pgsql\pgsql.c(3761) : warning C4005: 'MAX_LENGTH_OF_LONG' : macro redefinition ..\..\Zend\zend_operators.h(36) : see previous definition of 'MAX_LENGTH_OF_LONG' c:\php4build\HEAD\ext\pgsql\pgsql.c(3762) : warning C4005: 'MAX_LENGTH_OF_DOUBLE' : macro redefinition ..\..\Zend\zend_operators.h(37) : see previous definition of 'MAX_LENGTH_OF_DOUBLE' c:\php4build\HEAD\ext\pgsql\pgsql.c(4525) : warning C4018: '<' : signed/unsigned mismatch ----- Original Message ----- From: "Edin Kadribasic" <[EMAIL PROTECTED]> To: "Yasuo Ohgaki" <[EMAIL PROTECTED]>; "PHP developer list" <[EMAIL PROTECTED]> Sent: Saturday, April 20, 2002 2:59 AM Subject: [PHP-DEV] ext/pgsql build broken on win32 (HEAD) > Same error in the following functions: > > php_pgsql_metadata > php_pgsql_convert > php_pgsql_insert > php_pgsql_update > php_pgsql_delete > php_pgsql_result2array > php_pgsql_select > > The error is: > > error C2491: 'php_pgsql_metadata' : definition of dllimport function not > allowed > > Edin > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > > >
Index: php_pgsql.h =================================================================== RCS file: /repository/php4/ext/pgsql/php_pgsql.h,v retrieving revision 1.42 diff -u -b -B -r1.42 php_pgsql.h --- php_pgsql.h 8 Apr 2002 01:37:37 -0000 1.42 +++ php_pgsql.h 20 Apr 2002 01:35:36 -0000 @@ -129,12 +129,12 @@ PHP_FUNCTION(pg_delete); PHP_FUNCTION(pg_select); -PHPAPI int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta TSRMLS_DC); -PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result TSRMLS_DC); -PHPAPI int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, zend_bool convert, zend_bool async TSRMLS_DC); -PHPAPI int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_bool convert, zend_bool async TSRMLS_DC); -PHPAPI int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_bool convert, zend_bool async TSRMLS_DC); -PHPAPI int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_bool convert TSRMLS_DC); +static int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta +TSRMLS_DC); +static int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval +*values, zval *result TSRMLS_DC); +static int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, +zend_bool convert, zend_bool async TSRMLS_DC); +static int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval +*ids, zend_bool convert, zend_bool async TSRMLS_DC); +static int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_bool +convert, zend_bool async TSRMLS_DC); +static int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval +*ret_array, zend_bool convert TSRMLS_DC); static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent); /* static int php_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS); */ Index: pgsql.c =================================================================== RCS file: /repository/php4/ext/pgsql/pgsql.c,v retrieving revision 1.180 diff -u -b -B -r1.180 pgsql.c --- pgsql.c 19 Apr 2002 13:09:09 -0000 1.180 +++ pgsql.c 20 Apr 2002 01:35:37 -0000 @@ -2726,7 +2726,7 @@ /* {{{ php_pgsql_metadata */ -PHPAPI int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta TSRMLS_DC) +static int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta +TSRMLS_DC) { PGresult *pg_result; char query_buf[QUERY_BUF_SIZE+1], *tmp_name; @@ -2967,7 +2967,7 @@ /* {{{ php_pgsql_convert * check and convert array values (fieldname=>vlaue pair) for sql */ -PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result TSRMLS_DC) +static int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval +*values, zval *result TSRMLS_DC) { HashPosition pos; char *field = NULL; @@ -3763,7 +3763,7 @@ /* {{{ php_pgsql_insert */ -PHPAPI int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var_array, zend_bool convert, zend_bool async TSRMLS_DC) +static int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var_array, +zend_bool convert, zend_bool async TSRMLS_DC) { zval **val, *converted = NULL; char *query_tpl = "INSERT INTO %s (%s) VALUES (%s);"; @@ -3984,7 +3984,7 @@ /* {{{ php_pgsql_update */ -PHPAPI int php_pgsql_update(PGconn *pg_link, const char *table, zval *var_array, zval *ids_array, zend_bool convert, zend_bool async TSRMLS_DC) +static int php_pgsql_update(PGconn *pg_link, const char *table, zval *var_array, zval +*ids_array, zend_bool convert, zend_bool async TSRMLS_DC) { zval **val, *var_converted = NULL, *ids_converted = NULL; char *query_tpl = "UPDATE %s SET %s WHERE %s;"; @@ -4311,7 +4311,7 @@ /* {{{ php_pgsql_delete */ -PHPAPI int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids_array, zend_bool convert, zend_bool async TSRMLS_DC) +static int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids_array, +zend_bool convert, zend_bool async TSRMLS_DC) { zval **val, *ids_converted = NULL; char *query_tpl = "DELETE FROM %s WHERE %s;"; @@ -4507,7 +4507,7 @@ /* {{{ php_pgsql_result2array */ -PHPAPI int php_pgsql_result2array(PGresult *pg_result, zval *ret_array TSRMLS_DC) +static int php_pgsql_result2array(PGresult *pg_result, zval *ret_array TSRMLS_DC) { zval *row; char *field_name, *element, *data; @@ -4548,7 +4548,7 @@ /* {{{ php_pgsql_select */ -PHPAPI int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids_array, zval *ret_array, zend_bool convert TSRMLS_DC) +static int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids_array, zval +*ret_array, zend_bool convert TSRMLS_DC) { zval **val, *ids_converted = NULL; char *query_tpl = "SELECT * FROM %s WHERE %s;";
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php