More symbol work.

This commit is contained in:
Andrey Hristov 1999-08-02 16:06:13 +00:00
parent 05585132ca
commit 33d27f5bfe
12 changed files with 260 additions and 249 deletions

View File

@ -32,12 +32,12 @@ function_entry mhash_functions[] = {
{0},
};
static int php_minit_mhash(INIT_FUNC_ARGS);
static PHP_MINIT_FUNCTION(mhash);
zend_module_entry mhash_module_entry = {
"mhash",
mhash_functions,
php_minit_mhash, NULL,
PHP_MINIT(mhash), NULL,
NULL, NULL,
NULL,
STANDARD_MODULE_PROPERTIES,
@ -45,7 +45,7 @@ zend_module_entry mhash_module_entry = {
#define MHASH_FAILED_MSG "mhash initialization failed"
static int php_minit_mhash(INIT_FUNC_ARGS)
static PHP_MINIT_FUNCTION(mhash)
{
int i;
char *name;

View File

@ -64,60 +64,64 @@ msql_module php3_msql_module;
function_entry msql_functions[] = {
{"msql_connect", php3_msql_connect, NULL},
{"msql_pconnect", php3_msql_pconnect, NULL},
{"msql_close", php3_msql_close, NULL},
{"msql_select_db", php3_msql_select_db, NULL},
{"msql_create_db", php3_msql_create_db, NULL},
{"msql_drop_db", php3_msql_drop_db, NULL},
{"msql_query", php3_msql_query, NULL},
{"msql_db_query", php3_msql_db_query, NULL},
{"msql_list_dbs", php3_msql_list_dbs, NULL},
{"msql_list_tables", php3_msql_list_tables, NULL},
{"msql_list_fields", php3_msql_list_fields, NULL},
{"msql_error", php3_msql_error, NULL},
{"msql_result", php3_msql_result, NULL},
{"msql_num_rows", php3_msql_num_rows, NULL},
{"msql_num_fields", php3_msql_num_fields, NULL},
{"msql_fetch_row", php3_msql_fetch_row, NULL},
{"msql_fetch_array", php3_msql_fetch_array, NULL},
{"msql_fetch_object", php3_msql_fetch_object, NULL},
{"msql_data_seek", php3_msql_data_seek, NULL},
{"msql_fetch_field", php3_msql_fetch_field, NULL},
{"msql_field_seek", php3_msql_field_seek, NULL},
{"msql_free_result", php3_msql_free_result, NULL},
{"msql_field_name", php3_msql_field_name, NULL},
{"msql_field_table", php3_msql_field_table, NULL},
{"msql_field_len", php3_msql_field_len, NULL},
{"msql_field_type", php3_msql_field_type, NULL},
{"msql_field_flags", php3_msql_field_flags, NULL},
{"msql_fieldname", php3_msql_field_name, NULL},
{"msql_fieldtable", php3_msql_field_table, NULL},
{"msql_fieldlen", php3_msql_field_len, NULL},
{"msql_fieldtype", php3_msql_field_type, NULL},
{"msql_fieldflags", php3_msql_field_flags, NULL},
PHP_FE(msql_connect, NULL)
PHP_FE(msql_pconnect, NULL)
PHP_FE(msql_close, NULL)
PHP_FE(msql_select_db, NULL)
PHP_FE(msql_create_db, NULL)
PHP_FE(msql_drop_db, NULL)
PHP_FE(msql_query, NULL)
PHP_FE(msql_db_query, NULL)
PHP_FE(msql_list_dbs, NULL)
PHP_FE(msql_list_tables, NULL)
PHP_FE(msql_list_fields, NULL)
PHP_FE(msql_error, NULL)
PHP_FE(msql_result, NULL)
PHP_FE(msql_num_rows, NULL)
PHP_FE(msql_num_fields, NULL)
PHP_FE(msql_fetch_row, NULL)
PHP_FE(msql_fetch_array, NULL)
PHP_FE(msql_fetch_object, NULL)
PHP_FE(msql_data_seek, NULL)
PHP_FE(msql_fetch_field, NULL)
PHP_FE(msql_field_seek, NULL)
PHP_FE(msql_free_result, NULL)
PHP_FE(msql_field_name, NULL)
PHP_FE(msql_field_table, NULL)
PHP_FE(msql_field_len, NULL)
PHP_FE(msql_field_type, NULL)
PHP_FE(msql_field_flags, NULL)
PHP_FALIAS(msql_fieldname, msql_field_name, NULL)
PHP_FALIAS(msql_fieldtable, msql_field_table, NULL)
PHP_FALIAS(msql_fieldlen, msql_field_len, NULL)
PHP_FALIAS(msql_fieldtype, msql_field_type, NULL)
PHP_FALIAS(msql_fieldflags, msql_field_flags, NULL)
PHP_FALIAS(msql_regcase, sql_regcase, NULL)
PHP_FALIAS(msql_affected_rows, msql_affected_rows, NULL)
{"msql_regcase", php3_sql_regcase, NULL},
{"msql_affected_rows", php3_msql_affected_rows, NULL},
/* for downwards compatability */
{"msql", php3_msql_db_query, NULL},
{"msql_selectdb", php3_msql_select_db, NULL},
{"msql_createdb", php3_msql_create_db, NULL},
{"msql_dropdb", php3_msql_drop_db, NULL},
{"msql_freeresult", php3_msql_free_result, NULL},
{"msql_numfields", php3_msql_num_fields, NULL},
{"msql_numrows", php3_msql_num_rows, NULL},
{"msql_listdbs", php3_msql_list_dbs, NULL},
{"msql_listtables", php3_msql_list_tables, NULL},
{"msql_listfields", php3_msql_list_fields, NULL},
{"msql_dbname", php3_msql_result, NULL},
{"msql_tablename", php3_msql_result, NULL},
PHP_FALIAS(msql, msql_db_query, NULL)
PHP_FALIAS(msql_selectdb, msql_select_db, NULL)
PHP_FALIAS(msql_createdb, msql_create_db, NULL)
PHP_FALIAS(msql_dropdb, msql_drop_db, NULL)
PHP_FALIAS(msql_freeresult, msql_free_result, NULL)
PHP_FALIAS(msql_numfields, msql_num_fields, NULL)
PHP_FALIAS(msql_numrows, msql_num_rows, NULL)
PHP_FALIAS(msql_listdbs, msql_list_dbs, NULL)
PHP_FALIAS(msql_listtables, msql_list_tables, NULL)
PHP_FALIAS(msql_listfields, msql_list_fields, NULL)
PHP_FALIAS(msql_dbname, msql_result, NULL)
PHP_FALIAS(msql_tablename, msql_result, NULL)
{NULL, NULL, NULL}
};
php3_module_entry msql_module_entry = {
"mSQL", msql_functions, php3_minit_msql, php3_mshutdown_msql, php3_rinit_msql, NULL, php3_info_msql, STANDARD_MODULE_PROPERTIES
"mSQL", msql_functions, PHP_MINIT(msql), PHP_MSHUTDOWN(msql), PHP_RINIT(msql), NULL,
PHP_MINFO(msql), STANDARD_MODULE_PROPERTIES
};
@ -205,7 +209,7 @@ static void _close_msql_plink(int link)
MSQL_GLOBAL(php3_msql_module).num_links--;
}
DLEXPORT int php3_minit_msql(INIT_FUNC_ARGS)
DLEXPORT PHP_MINIT_FUNCTION(msql)
{
#ifdef THREAD_SAFE
msql_global_struct *msql_globals;
@ -247,7 +251,7 @@ DLEXPORT int php3_minit_msql(INIT_FUNC_ARGS)
return SUCCESS;
}
DLEXPORT int php3_mshutdown_msql(SHUTDOWN_FUNC_ARGS){
DLEXPORT PHP_MSHUTDOWN_FUNCTION(msql)
#ifdef THREAD_SAFE
msql_global_struct *msql_globals;
msql_globals = TlsGetValue(MSQLTls);
@ -267,7 +271,7 @@ DLEXPORT int php3_mshutdown_msql(SHUTDOWN_FUNC_ARGS){
return SUCCESS;
}
DLEXPORT int php3_rinit_msql(INIT_FUNC_ARGS)
DLEXPORT PHP_RINIT_FUNCTION(msql)
{
MSQL_TLS_VARS;
MSQL_GLOBAL(php3_msql_module).default_link=-1;
@ -276,7 +280,7 @@ DLEXPORT int php3_rinit_msql(INIT_FUNC_ARGS)
return SUCCESS;
}
DLEXPORT void php3_info_msql(ZEND_MODULE_INFO_FUNC_ARGS)
DLEXPORT PHP_MINFO_FUNCTION(msql)
{
char maxp[16],maxl[16];
MSQL_TLS_VARS;

View File

@ -45,10 +45,11 @@ extern php3_module_entry msql_module_entry;
#define msql_module_ptr &msql_module_entry
/* mSQL functions */
extern DLEXPORT int php3_minit_msql(INIT_FUNC_ARGS);
extern DLEXPORT int php3_rinit_msql(INIT_FUNC_ARGS);
extern DLEXPORT int php3_mshutdown_msql(SHUTDOWN_FUNC_ARGS);
extern DLEXPORT void php3_info_msql(ZEND_MODULE_INFO_FUNC_ARGS);
extern DLEXPORT PHP_MINIT_FUNCTION(msql);
extern DLEXPORT PHP_RINIT_FUNCTION(msql);
extern DLEXPORT PHP_MSHUTDOWN_FUNCTION(msql);
extern DLEXPORT PHP_MINFO_FUNCTION(msql);
extern DLEXPORT PHP_FUNCTION(msql_connect);
extern DLEXPORT PHP_FUNCTION(msql_pconnect);
extern DLEXPORT PHP_FUNCTION(msql_close);

View File

@ -78,63 +78,65 @@ static int le_result,le_link,le_plink;
#define MYSQL_BOTH (MYSQL_ASSOC|MYSQL_NUM)
function_entry mysql_functions[] = {
{"mysql_connect", php3_mysql_connect, NULL},
{"mysql_pconnect", php3_mysql_pconnect, NULL},
{"mysql_close", php3_mysql_close, NULL},
{"mysql_select_db", php3_mysql_select_db, NULL},
{"mysql_create_db", php3_mysql_create_db, NULL},
{"mysql_drop_db", php3_mysql_drop_db, NULL},
{"mysql_query", php3_mysql_query, NULL},
{"mysql_db_query", php3_mysql_db_query, NULL},
{"mysql_list_dbs", php3_mysql_list_dbs, NULL},
{"mysql_list_tables", php3_mysql_list_tables, NULL},
{"mysql_list_fields", php3_mysql_list_fields, NULL},
{"mysql_error", php3_mysql_error, NULL},
PHP_FE(mysql_connect, NULL)
PHP_FE(mysql_pconnect, NULL)
PHP_FE(mysql_close, NULL)
PHP_FE(mysql_select_db, NULL)
PHP_FE(mysql_create_db, NULL)
PHP_FE(mysql_drop_db, NULL)
PHP_FE(mysql_query, NULL)
PHP_FE(mysql_db_query, NULL)
PHP_FE(mysql_list_dbs, NULL)
PHP_FE(mysql_list_tables, NULL)
PHP_FE(mysql_list_fields, NULL)
PHP_FE(mysql_error, NULL)
#ifdef mysql_errno
{"mysql_errno", php3_mysql_errno, NULL},
PHP_FE(mysql_errno, NULL)
#endif
{"mysql_affected_rows", php3_mysql_affected_rows, NULL},
{"mysql_insert_id", php3_mysql_insert_id, NULL},
{"mysql_result", php3_mysql_result, NULL},
{"mysql_num_rows", php3_mysql_num_rows, NULL},
{"mysql_num_fields", php3_mysql_num_fields, NULL},
{"mysql_fetch_row", php3_mysql_fetch_row, NULL},
{"mysql_fetch_array", php3_mysql_fetch_array, NULL},
{"mysql_fetch_object", php3_mysql_fetch_object, NULL},
{"mysql_data_seek", php3_mysql_data_seek, NULL},
{"mysql_fetch_lengths", php3_mysql_fetch_lengths, NULL},
{"mysql_fetch_field", php3_mysql_fetch_field, NULL},
{"mysql_field_seek", php3_mysql_field_seek, NULL},
{"mysql_free_result", php3_mysql_free_result, NULL},
{"mysql_field_name", php3_mysql_field_name, NULL},
{"mysql_field_table", php3_mysql_field_table, NULL},
{"mysql_field_len", php3_mysql_field_len, NULL},
{"mysql_field_type", php3_mysql_field_type, NULL},
{"mysql_field_flags", php3_mysql_field_flags, NULL},
PHP_FE(mysql_affected_rows, NULL)
PHP_FE(mysql_insert_id, NULL)
PHP_FE(mysql_result, NULL)
PHP_FE(mysql_num_rows, NULL)
PHP_FE(mysql_num_fields, NULL)
PHP_FE(mysql_fetch_row, NULL)
PHP_FE(mysql_fetch_array, NULL)
PHP_FE(mysql_fetch_object, NULL)
PHP_FE(mysql_data_seek, NULL)
PHP_FE(mysql_fetch_lengths, NULL)
PHP_FE(mysql_fetch_field, NULL)
PHP_FE(mysql_field_seek, NULL)
PHP_FE(mysql_free_result, NULL)
PHP_FE(mysql_field_name, NULL)
PHP_FE(mysql_field_table, NULL)
PHP_FE(mysql_field_len, NULL)
PHP_FE(mysql_field_type, NULL)
PHP_FE(mysql_field_flags, NULL)
/* for downwards compatability */
{"mysql", php3_mysql_db_query, NULL},
{"mysql_fieldname", php3_mysql_field_name, NULL},
{"mysql_fieldtable", php3_mysql_field_table, NULL},
{"mysql_fieldlen", php3_mysql_field_len, NULL},
{"mysql_fieldtype", php3_mysql_field_type, NULL},
{"mysql_fieldflags", php3_mysql_field_flags, NULL},
{"mysql_selectdb", php3_mysql_select_db, NULL},
{"mysql_createdb", php3_mysql_create_db, NULL},
{"mysql_dropdb", php3_mysql_drop_db, NULL},
{"mysql_freeresult", php3_mysql_free_result, NULL},
{"mysql_numfields", php3_mysql_num_fields, NULL},
{"mysql_numrows", php3_mysql_num_rows, NULL},
{"mysql_listdbs", php3_mysql_list_dbs, NULL},
{"mysql_listtables", php3_mysql_list_tables, NULL},
{"mysql_listfields", php3_mysql_list_fields, NULL},
{"mysql_db_name", php3_mysql_result, NULL},
{"mysql_dbname", php3_mysql_result, NULL},
{"mysql_tablename", php3_mysql_result, NULL},
PHP_FALIAS(mysql, mysql_db_query, NULL)
PHP_FALIAS(mysql_fieldname, mysql_field_name, NULL)
PHP_FALIAS(mysql_fieldtable, mysql_field_table, NULL)
PHP_FALIAS(mysql_fieldlen, mysql_field_len, NULL)
PHP_FALIAS(mysql_fieldtype, mysql_field_type, NULL)
PHP_FALIAS(mysql_fieldflags, mysql_field_flags, NULL)
PHP_FALIAS(mysql_selectdb, mysql_select_db, NULL)
PHP_FALIAS(mysql_createdb, mysql_create_db, NULL)
PHP_FALIAS(mysql_dropdb, mysql_drop_db, NULL)
PHP_FALIAS(mysql_freeresult, mysql_free_result, NULL)
PHP_FALIAS(mysql_numfields, mysql_num_fields, NULL)
PHP_FALIAS(mysql_numrows, mysql_num_rows, NULL)
PHP_FALIAS(mysql_listdbs, mysql_list_dbs, NULL)
PHP_FALIAS(mysql_listtables, mysql_list_tables, NULL)
PHP_FALIAS(mysql_listfields, mysql_list_fields, NULL)
PHP_FALIAS(mysql_db_name, mysql_result, NULL)
PHP_FALIAS(mysql_dbname, mysql_result, NULL)
PHP_FALIAS(mysql_tablename, mysql_result, NULL)
{NULL, NULL, NULL}
};
php3_module_entry mysql_module_entry = {
"MySQL", mysql_functions, php3_minit_mysql, php3_mshutdown_mysql, php3_rinit_mysql, NULL, php3_info_mysql, STANDARD_MODULE_PROPERTIES
"MySQL", mysql_functions, PHP_MINIT(mysql), PHP_MSHUTDOWN(mysql), PHP_RINIT(mysql), NULL,
PHP_MINFO(mysql), STANDARD_MODULE_PROPERTIES
};
#ifdef ZTS
@ -263,7 +265,7 @@ static void php_mysql_init_globals(php_mysql_globals *mysql_globals)
#endif
int php3_minit_mysql(INIT_FUNC_ARGS)
PHP_MINIT_FUNCTION(mysql)
{
#ifdef ZTS
mysql_globals_id = ts_allocate_id(sizeof(php_mysql_globals), php_mysql_init_globals, NULL);
@ -285,14 +287,14 @@ int php3_minit_mysql(INIT_FUNC_ARGS)
}
int php3_mshutdown_mysql(SHUTDOWN_FUNC_ARGS)
PHP_MSHUTDOWN_FUNCTION(mysql)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
int php3_rinit_mysql(INIT_FUNC_ARGS)
PHP_RINIT_FUNCTION(mysql)
{
MySLS_FETCH();
@ -302,7 +304,7 @@ int php3_rinit_mysql(INIT_FUNC_ARGS)
}
void php3_info_mysql(ZEND_MODULE_INFO_FUNC_ARGS)
PHP_MINFO_FUNCTION(mysql)
{
char maxp[16],maxl[16];
MySLS_FETCH();

View File

@ -56,10 +56,11 @@
extern php3_module_entry mysql_module_entry;
#define mysql_module_ptr &mysql_module_entry
extern int php3_minit_mysql(INIT_FUNC_ARGS);
extern int php3_rinit_mysql(INIT_FUNC_ARGS);
extern int php3_mshutdown_mysql(SHUTDOWN_FUNC_ARGS);
void php3_info_mysql(ZEND_MODULE_INFO_FUNC_ARGS);
extern PHP_MINIT_FUNCTION(mysql);
extern PHP_RINIT_FUNCTION(mysql);
extern PHP_MSHUTDOWN_FUNCTION(mysql);
PHP_MINFO_FUNCTION(mysql);
PHP_FUNCTION(mysql_connect);
PHP_FUNCTION(mysql_pconnect);
PHP_FUNCTION(mysql_close);

View File

@ -152,11 +152,11 @@ BOOL WINAPI DllMain(HANDLE hModule, DWORD ul_reason_for_call,
#define ZEND_MODULE_INFO_FUNC_ARGS void
#endif
int php3_minit_oci8(INIT_FUNC_ARGS);
int php3_rinit_oci8(INIT_FUNC_ARGS);
int php3_mshutdown_oci8(SHUTDOWN_FUNC_ARGS);
int php3_rshutdown_oci8(SHUTDOWN_FUNC_ARGS);
void php3_info_oci8(ZEND_MODULE_INFO_FUNC_ARGS);
PHP_MINIT_FUNCTION(oci8);
PHP_RINIT_FUNCTION(oci8);
PHP_MSHUTDOWN_FUNCTION(oci8);
PHP_RSHUTDOWN_FUNCTION(oci8);
PHP_MINFO_FUNCTION(oci8);
static ub4 oci8_error(OCIError *err_p, char *what, sword status);
/* static int oci8_ping(oci8_connection *conn); XXX NYI */
@ -289,11 +289,11 @@ function_entry oci8_functions[] = {
php3_module_entry oci8_module_entry = {
"OCI8", /* extension name */
oci8_functions, /* extension function list */
php3_minit_oci8, /* extension-wide startup function */
php3_mshutdown_oci8, /* extension-wide shutdown function */
php3_rinit_oci8, /* per-request startup function */
php3_rshutdown_oci8, /* per-request shutdown function */
php3_info_oci8, /* information function */
PHP_MINIT(oci8), /* extension-wide startup function */
PHP_MSHUTDOWN(oci8), /* extension-wide shutdown function */
PHP_RINIT(oci8), /* per-request startup function */
PHP_RSHUTDOWN(oci8), /* per-request shutdown function */
PHP_MINFO(oci8), /* information function */
STANDARD_MODULE_PROPERTIES
};
@ -327,7 +327,7 @@ CONST void ocifree(dvoid *ctx, dvoid *ptr)
/* }}} */
/* {{{ startup, shutdown and info functions */
int php3_minit_oci8(INIT_FUNC_ARGS)
PHP_MINIT_FUNCTION(oci8)
{
#ifdef THREAD_SAFE
oci8_global_struct *oci8_globals;
@ -443,7 +443,7 @@ int php3_minit_oci8(INIT_FUNC_ARGS)
/* ----------------------------------------------------------------- */
int php3_rinit_oci8(INIT_FUNC_ARGS)
PHP_RINIT_FUNCTION(oci8)
{
OCI8_TLS_VARS;
@ -473,7 +473,7 @@ static int _server_pcleanup(oci8_server *server)
return 1;
}
int php3_mshutdown_oci8(SHUTDOWN_FUNC_ARGS)
PHP_MSHUTDOWN_FUNCTION(oci8)
{
oci8_debug("php3_mshutdown_oci8");
@ -546,7 +546,7 @@ static int _server_cleanup(oci8_server *server)
return 1;
}
int php3_rshutdown_oci8(SHUTDOWN_FUNC_ARGS)
PHP_RSHUTDOWN_FUNCTION(oci8)
{
OCI8_TLS_VARS;
@ -561,7 +561,7 @@ int php3_rshutdown_oci8(SHUTDOWN_FUNC_ARGS)
}
void php3_info_oci8(ZEND_MODULE_INFO_FUNC_ARGS)
PHP_MINFO_FUNCTION(oci8)
{
#if !(WIN32|WINNT)
php3_printf("Oracle version: %s<br>\n"

View File

@ -80,11 +80,11 @@ function_entry odbc_functions[] = {
php3_module_entry odbc_module_entry = {
"ODBC",
odbc_functions,
php3_minit_odbc,
php3_mshutdown_odbc,
php3_rinit_odbc,
PHP_MINIT(odbc),
PHP_MSHUTDOWN(odbc),
PHP_RINIT(odbc),
NULL,
php3_info_odbc,
PHP_MINFO(odbc),
STANDARD_MODULE_PROPERTIES
};
@ -209,7 +209,7 @@ PHP_INI_BEGIN()
PHP_INI_END()
int php3_minit_odbc(INIT_FUNC_ARGS)
PHP_MINIT_FUNCTION(odbc)
{
#ifdef SQLANY_BUG
HDBC foobar;
@ -256,7 +256,7 @@ int php3_minit_odbc(INIT_FUNC_ARGS)
}
int php3_rinit_odbc(INIT_FUNC_ARGS)
PHP_RINIT_FUNCTION(odbc)
{
ODBC_TLS_VARS;
@ -266,7 +266,7 @@ int php3_rinit_odbc(INIT_FUNC_ARGS)
return SUCCESS;
}
int php3_mshutdown_odbc(SHUTDOWN_FUNC_ARGS)
PHP_MSHUTDOWN_FUNCTION(odbc)
{
ODBC_TLS_VARS;
@ -276,7 +276,7 @@ int php3_mshutdown_odbc(SHUTDOWN_FUNC_ARGS)
}
void php3_info_odbc(ZEND_MODULE_INFO_FUNC_ARGS)
PHP_MINFO_FUNCTION(odbc)
{
ODBC_TLS_VARS;

View File

@ -117,10 +117,11 @@ extern php3_module_entry odbc_module_entry;
/* user functions */
extern int php3_minit_odbc(INIT_FUNC_ARGS);
extern int php3_mshutdown_odbc(SHUTDOWN_FUNC_ARGS);
extern int php3_rinit_odbc(INIT_FUNC_ARGS);
void php3_info_odbc(ZEND_MODULE_INFO_FUNC_ARGS);
extern PHP_MINIT_FUNCTION(odbc);
extern PHP_MSHUTDOWN_FUNCTION(odbc);
extern PHP_RINIT_FUNCTION(odbc);
PHP_MINFO_FUNCTION(odbc);
PHP_FUNCTION(odbc_setoption);
PHP_FUNCTION(odbc_autocommit);
PHP_FUNCTION(odbc_close);

View File

@ -74,10 +74,11 @@ extern php3_module_entry velocis_module_entry;
#define velocis_module_ptr &velocis_module_entry
/* velocis.c functions */
extern int php3_minit_velocis(INIT_FUNC_ARGS);
extern int php3_rinit_velocis(INIT_FUNC_ARGS);
void php3_info_velocis(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_shutdown_velocis(SHUTDOWN_FUNC_ARGS);
extern PHP_MINIT_FUNCTION(velocis);
extern PHP_RINIT_FUNCTION(velocis);
PHP_MINFO_FUNCTION(velocis);
extern PHP_MSHUTDOWN_FUNCTION(velocis);
PHP_FUNCTION(velocis_connect);
PHP_FUNCTION(velocis_close);
PHP_FUNCTION(velocis_exec);

View File

@ -30,24 +30,24 @@
#if HAVE_VELOCIS && !HAVE_UODBC
function_entry velocis_functions[] = {
{"velocis_connect", php3_velocis_connect, NULL},
{"velocis_close", php3_velocis_close, NULL},
{"velocis_exec", php3_velocis_exec, NULL},
{"velocis_fetch", php3_velocis_fetch, NULL},
{"velocis_result", php3_velocis_result, NULL},
{"velocis_freeresult", php3_velocis_freeresult, NULL},
{"velocis_autocommit", php3_velocis_autocommit, NULL},
{"velocis_off_autocommit", php3_velocis_off_autocommit, NULL},
{"velocis_commit", php3_velocis_commit, NULL},
{"velocis_rollback", php3_velocis_rollback, NULL},
{"velocis_fieldnum", php3_velocis_fieldnum, NULL},
{"velocis_fieldname", php3_velocis_fieldname, NULL},
PHP_FE(velocis_connect, NULL)
PHP_FE(velocis_close, NULL)
PHP_FE(velocis_exec, NULL)
PHP_FE(velocis_fetch, NULL)
PHP_FE(velocis_result, NULL)
PHP_FE(velocis_freeresult, NULL)
PHP_FE(velocis_autocommit, NULL)
PHP_FE(velocis_off_autocommit, NULL)
PHP_FE(velocis_commit, NULL)
PHP_FE(velocis_rollback, NULL)
PHP_FE(velocis_fieldnum, NULL)
PHP_FE(velocis_fieldname, NULL)
{NULL, NULL, NULL}
};
php3_module_entry velocis_module_entry = {
"Velocis", velocis_functions, php3_minit_velocis, php3_shutdown_velocis,
php3_rinit_velocis, NULL, php3_info_velocis, STANDARD_MODULE_PROPERTIES
"Velocis", velocis_functions, PHP_MINIT(velocis), PHP_MSHUTDOWN(velocis),
PHP_RINIT(velocis), NULL, PHP_MINFO(velocis), STANDARD_MODULE_PROPERTIES
};
@ -80,7 +80,7 @@ static void _free_velocis_result(Vresult *res)
}
}
int php3_minit_velocis(INIT_FUNC_ARGS)
PHP_MINIT_FUNCTION(velocis)
{
SQLAllocEnv(&henv);
if ( cfg_get_long("velocis.max_links",&php3_velocis_module.max_links) == FAILURE ) {
@ -93,18 +93,18 @@ int php3_minit_velocis(INIT_FUNC_ARGS)
return SUCCESS;
}
int php3_rinit_velocis(INIT_FUNC_ARGS)
PHP_RINIT_FUNCTION(velocis)
{
return SUCCESS;
}
void php3_info_velocis(ZEND_MODULE_INFO_FUNC_ARGS)
PHP_MINFO_FUNCTION(velocis)
{
php3_printf("RAIMA Velocis Support Active");
}
int php3_shutdown_velocis(void)
PHP_MSHUTDOWN_FUNCTION(velocis)
{
SQLFreeEnv(henv);
return SUCCESS;

View File

@ -115,40 +115,40 @@ int ora_set_param_values(oraCursor *cursor, int isout);
void php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAMETERS, int persistent);
function_entry oracle_functions[] = {
{"ora_bind", php3_Ora_Bind, NULL},
{"ora_close", php3_Ora_Close, NULL},
{"ora_commit", php3_Ora_Commit, NULL},
{"ora_commitoff", php3_Ora_CommitOff, NULL},
{"ora_commiton", php3_Ora_CommitOn, NULL},
{"ora_do", php3_Ora_Do, NULL},
{"ora_error", php3_Ora_Error, NULL},
{"ora_errorcode", php3_Ora_ErrorCode, NULL},
{"ora_exec", php3_Ora_Exec, NULL},
{"ora_fetch", php3_Ora_Fetch, NULL},
{"ora_fetch_into", php3_Ora_FetchInto, NULL},
{"ora_columntype", php3_Ora_ColumnType, NULL},
{"ora_columnname", php3_Ora_ColumnName, NULL},
{"ora_columnsize", php3_Ora_ColumnSize, NULL},
{"ora_getcolumn", php3_Ora_GetColumn, NULL},
{"ora_numcols", php3_Ora_NumCols, NULL},
{"ora_numrows", php3_Ora_NumRows, NULL},
{"ora_logoff", php3_Ora_Logoff, NULL},
{"ora_logon", php3_Ora_Logon, NULL},
{"ora_plogon", php3_Ora_PLogon, NULL},
{"ora_open", php3_Ora_Open, NULL},
{"ora_parse", php3_Ora_Parse, NULL},
{"ora_rollback", php3_Ora_Rollback, NULL},
PHP_FE(ora_bind, NULL)
PHP_FE(ora_close, NULL)
PHP_FE(ora_commit, NULL)
PHP_FE(ora_commitoff, NULL)
PHP_FE(ora_commiton, NULL)
PHP_FE(ora_do, NULL)
PHP_FE(ora_error, NULL)
PHP_FE(ora_errorcode, NULL)
PHP_FE(ora_exec, NULL)
PHP_FE(ora_fetch, NULL)
PHP_FE(ora_fetch_into, NULL)
PHP_FE(ora_columntype, NULL)
PHP_FE(ora_columnname, NULL)
PHP_FE(ora_columnsize, NULL)
PHP_FE(ora_getcolumn, NULL)
PHP_FE(ora_numcols, NULL)
PHP_FE(ora_numrows, NULL)
PHP_FE(ora_logoff, NULL)
PHP_FE(ora_logon, NULL)
PHP_FE(ora_plogon, NULL)
PHP_FE(ora_open, NULL)
PHP_FE(ora_parse, NULL)
PHP_FE(ora_rollback, NULL)
{NULL, NULL, NULL}
};
php3_module_entry oracle_module_entry = {
"Oracle",
oracle_functions,
php3_minit_oracle,
php3_mshutdown_oracle,
php3_rinit_oracle,
php3_rshutdown_oracle,
php3_info_oracle,
PHP_MINIT(oracle), /* extension-wide startup function */
PHP_MSHUTDOWN(oracle), /* extension-wide shutdown function */
PHP_RINIT(oracle), /* per-request startup function */
PHP_RSHUTDOWN(oracle), /* per-request shutdown function */
PHP_MINFO(oracle),
STANDARD_MODULE_PROPERTIES
};
@ -269,7 +269,7 @@ static int _close_oracur(oraCursor *cur)
return 1;
}
int php3_minit_oracle(INIT_FUNC_ARGS)
PHP_MINIT_FUNCTION(oracle)
{
#if defined(THREAD_SAFE)
oracle_global_struct *oracle_globals;
@ -333,7 +333,7 @@ int php3_minit_oracle(INIT_FUNC_ARGS)
return SUCCESS;
}
int php3_rinit_oracle(INIT_FUNC_ARGS)
PHP_RINIT_FUNCTION(oracle)
{
ORACLE_TLS_VARS;
@ -348,7 +348,7 @@ int php3_rinit_oracle(INIT_FUNC_ARGS)
}
int php3_mshutdown_oracle(SHUTDOWN_FUNC_ARGS)
PHP_MSHUTDOWN_FUNCTION(oracle)
{
ORACLE_TLS_VARS;
@ -371,7 +371,7 @@ int php3_mshutdown_oracle(SHUTDOWN_FUNC_ARGS)
return SUCCESS;
}
int php3_rshutdown_oracle(SHUTDOWN_FUNC_ARGS)
PHP_RSHUTDOWN_FUNCTION(oracle)
{
ORACLE_TLS_VARS;
@ -403,7 +403,7 @@ static int _ora_ping(oraConnection *conn)
/* {{{ proto int ora_logon(string user, string password)
Open an Oracle connection */
void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_logon)
{
php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
@ -411,7 +411,7 @@ void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_plogon(string user, string password)
Open a persistant Oracle connection */
void php3_Ora_PLogon(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_plogon)
{
php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
@ -589,7 +589,7 @@ void php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAMETERS, int persistent)
/* {{{ proto int ora_logoff(int connection)
Close an Oracle connection */
void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_logoff)
{ /* conn_index */
int type, ind;
oraConnection *conn;
@ -614,7 +614,7 @@ void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_open(int connection)
Open an Oracle cursor */
void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_open)
{ /* conn_index */
pval *arg;
oraConnection *conn = NULL;
@ -652,7 +652,7 @@ void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_close(int cursor)
Close an Oracle cursor */
void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_close)
{ /* conn_index */
pval *arg;
@ -669,7 +669,7 @@ void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_commitoff(int connection)
Disable automatic commit */
void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_commitoff)
{ /* conn_index */
pval *arg;
oraConnection *conn;
@ -694,7 +694,7 @@ void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_commiton(int connection)
Enable automatic commit */
void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_commiton)
{ /* conn_index */
pval *arg;
oraConnection *conn;
@ -719,7 +719,7 @@ void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_commit(int connection)
Commit an Oracle transaction */
void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_commit)
{ /* conn_index */
pval *arg;
oraConnection *conn;
@ -744,7 +744,7 @@ void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_rollback(int connection)
Roll back an Oracle transaction */
void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_rollback)
{ /* conn_index */
pval *arg;
oraConnection *conn;
@ -769,7 +769,7 @@ void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_parse(int cursor, string sql_statement [, int defer])
Parse an Oracle SQL statement */
void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_parse)
{
/* cursor_ind, sql_statement [, defer] */
int argc;
@ -826,7 +826,7 @@ void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_bind(int cursor, string php_variable_name, string sql_parameter_name, int length [, int type])
Bind a PHP variable to an Oracle parameter */
void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_bind)
{ /* cursor_ind, php_var_name, sql_var_name, data_len [, inout]*/
/* inout: 0 = in/out, 1 = in, 2 = out */
int argc;
@ -928,7 +928,7 @@ void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS)
*/
/* {{{ proto int ora_exec(int cursor)
Execute a parsed statement */
void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_exec)
{ /* cursor_index */
pval *arg;
oraCursor *cursor = NULL;
@ -972,7 +972,7 @@ void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_numcols(int cursor)
Returns the numbers of columns in a result */
void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_numcols)
{ /* cursor_index */
pval *arg;
oraCursor *cursor = NULL;
@ -992,7 +992,7 @@ void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_numrows(int cursor)
Returns the number of rows in a result */
void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_numrows)
{ /* cursor_index */
pval *arg;
oraCursor *cursor = NULL;
@ -1013,7 +1013,7 @@ void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS)
/* prepares/executes/fetches 1st row if avail*/
/* {{{ proto int ora_do(int connection, int cursor)
Parse and execute a statement and fetch first result row */
void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_do)
{
pval *argv[2];
oraConnection *conn = NULL;
@ -1096,7 +1096,7 @@ void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_fetch(int cursor)
Fetch a row of result data from a cursor */
void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_fetch)
{ /* cursor_index */
pval *arg;
oraCursor *cursor;
@ -1131,7 +1131,7 @@ void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_fetch_into(int cursor, array result [ , int flags ])
Fetch a row into the specified result array */
void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_fetch_into)
{
pval *arg1, *arr, *flg, *tmp;
oraCursor *cursor;
@ -1297,7 +1297,7 @@ void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto string ora_columnname(int cursor, int column)
Get the name of an Oracle result column */
void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_columnname)
{ /* cursor_index, column_index */
pval *argv[2];
int cursor_ind;
@ -1338,7 +1338,7 @@ void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto string ora_columntype(int cursor, int column)
Get the type of an Oracle result column */
void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_columntype)
{ /* cursor_index, column_index */
pval *argv[2];
int cursor_ind, colno;
@ -1411,7 +1411,7 @@ void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_columnsize(int cursor, int column)
Return the size of the column */
void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_columnsize)
{ /* cursor_index, column_index */
pval *argv[2];
int cursor_ind;
@ -1451,7 +1451,7 @@ void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto mixed ora_getcolumn(int cursor, int column)
Get data from a fetched row */
void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_getcolumn)
{ /* cursor_index, column_index */
pval *argv[2];
int colno;
@ -1586,7 +1586,7 @@ void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto string ora_error(int cursor_or_connection)
Get an Oracle error message */
void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_error)
{
pval *arg;
oraCursor *cursor;
@ -1611,7 +1611,7 @@ void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS)
/* {{{ proto int ora_errorcode(int cursor_or_connection)
Get an Oracle error code */
void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(ora_errorcode)
{
pval *arg;
oraCursor *cursor;
@ -1630,7 +1630,7 @@ void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS)
}
/* }}} */
void php3_info_oracle(ZEND_MODULE_INFO_FUNC_ARGS)
PHP_MINFO_FUNCTION(oracle)
{
#if !(WIN32|WINNT)
php3_printf("Oracle version: %s<br>\n"

View File

@ -113,34 +113,35 @@ typedef struct {
HashTable *conns;
} oracle_module;
extern void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_PLogon(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS);
extern int php3_minit_oracle(INIT_FUNC_ARGS);
extern int php3_mshutdown_oracle(SHUTDOWN_FUNC_ARGS);
extern int php3_rshutdown_oracle(SHUTDOWN_FUNC_ARGS);
extern void php3_info_oracle(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_rinit_oracle(INIT_FUNC_ARGS);
extern PHP_FUNCTION(Ora_Bind);
extern PHP_FUNCTION(Ora_Close);
extern PHP_FUNCTION(Ora_Commit);
extern PHP_FUNCTION(Ora_CommitOff);
extern PHP_FUNCTION(Ora_CommitOn);
extern PHP_FUNCTION(Ora_Do);
extern PHP_FUNCTION(Ora_Error);
extern PHP_FUNCTION(Ora_ErrorCode);
extern PHP_FUNCTION(Ora_Exec);
extern PHP_FUNCTION(Ora_Fetch);
extern PHP_FUNCTION(Ora_FetchInto);
extern PHP_FUNCTION(Ora_ColumnType);
extern PHP_FUNCTION(Ora_ColumnName);
extern PHP_FUNCTION(Ora_ColumnSize);
extern PHP_FUNCTION(Ora_GetColumn);
extern PHP_FUNCTION(Ora_NumCols);
extern PHP_FUNCTION(Ora_NumRows);
extern PHP_FUNCTION(Ora_Logoff);
extern PHP_FUNCTION(Ora_Logon);
extern PHP_FUNCTION(Ora_PLogon);
extern PHP_FUNCTION(Ora_Open);
extern PHP_FUNCTION(Ora_Parse);
extern PHP_FUNCTION(Ora_Rollback);
extern PHP_MINIT_FUNCTION(oracle);
extern PHP_RINIT_FUNCTION(oracle);
extern PHP_MSHUTDOWN_FUNCTION(oracle);
extern PHP_RSHUTDOWN_FUNCTION(oracle);
extern PHP_MINFO_FUNCTION(oracle);
#else