* Add a few functions to PHP's API.
* Get the MySQL extension up-to-date and thread safe.
* Add a project for building the MySQL extension under Win32.
--- /dev/null
+MySQL Extension for PHP 4.0 - Win32 README
+------------------------------------------
+
+In order to compile this extension, MySQL must be installed in a parrallel directory
+to that of PHP 4.0. For example, if you have PHP 4.0's source tree set up in
+C:\Projects\php4, you must have MySQL set up in C:\Projects\MySQL. The compiler
+will look for include files in C:\Projects\MySQL\include and for the library
+files in C:\Projects\MySQL\lib.
+
+You can change this by editing the project settings, but it's not recommended, since
+you will have to do it every time you obtain a new version of the PHP 4.0 source tree.
+
+
+[4/6/1999 zeev@zend.com]
\ No newline at end of file
*/
#if COMPILE_DL
-# if PHP_31
-# include "../phpdl.h"
-# else
-# include "dl/phpdl.h"
-# endif
+#include "dl/phpdl.h"
#endif
#include "php.h"
#include "php_globals.h"
#include "ext/standard/php3_standard.h"
#include "php3_mysql.h"
+#include "php_globals.h"
#if WIN32|WINNT
#ifdef ZTS
int mysql_globals_id;
#else
-php_mysql_globals mysql_globals;
+PHP_MYSQL_API php_mysql_globals mysql_globals;
#endif
#ifdef COMPILE_DL
int php3_minit_mysql(INIT_FUNC_ARGS)
{
#ifdef ZTS
- mysql_globals_id = tsrm_allocate_id(sizeof(php_mysql_globals), php_mysql_init_globals, NULL);
+ mysql_globals_id = ts_allocate_id(sizeof(php_mysql_globals), php_mysql_init_globals, NULL);
#else
MySG(num_persistent)=0;
#endif
int hashed_details_length,port;
MYSQL *mysql;
MySLS_FETCH();
+ PLS_FETCH();
if (PG(sql_safe_mode)) {
if (ARG_COUNT(ht)>0) {
return MySG(default_link);
}
+
/* {{{ proto int mysql_connect([string hostname[:port]] [, string username] [, string password])
Open a connection to a MySQL Server */
PHP_FUNCTION(mysql_connect)
}
/* }}} */
+
/* {{{ proto int mysql_pconnect([string hostname[:port]] [, string username] [, string password])
Open a persistent connection to a MySQL Server */
PHP_FUNCTION(mysql_pconnect)
}
/* }}} */
+
/* {{{ proto int mysql_close([int link_identifier])
Close a MySQL connection */
PHP_FUNCTION(mysql_close)
pval *mysql_link;
int id,type;
MYSQL *mysql;
+ MySLS_FETCH();
switch (ARG_COUNT(ht)) {
case 0:
}
/* }}} */
+
/* {{{ proto int mysql_select_db(string database_name [, int link_identifier])
Select a MySQL database */
PHP_FUNCTION(mysql_select_db)
pval *db,*mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
}
/* }}} */
+
/* {{{ proto int mysql_create_db(string database_name [, int link_identifier])
Create a MySQL database */
PHP_FUNCTION(mysql_create_db)
pval *db,*mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
}
/* }}} */
+
/* {{{ proto int mysql_drop_db(string database_name [, int link_identifier])
Drop (delete) a MySQL database */
PHP_FUNCTION(mysql_drop_db)
pval *db,*mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
}
/* }}} */
+
/* {{{ proto int mysql_query(string query [, int link_identifier])
Send an SQL query to MySQL */
PHP_FUNCTION(mysql_query)
int id,type;
MYSQL *mysql;
MYSQL_RES *mysql_result;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
}
/* }}} */
+
/* {{{ proto int mysql_db_query(string database_name, string query [, int link_identifier])
Send an SQL query to MySQL */
PHP_FUNCTION(mysql_db_query)
int id,type;
MYSQL *mysql;
MYSQL_RES *mysql_result;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
}
/* }}} */
+
/* {{{ proto int mysql_list_dbs([int link_identifier])
List databases available on a MySQL server */
PHP_FUNCTION(mysql_list_dbs)
int id,type;
MYSQL *mysql;
MYSQL_RES *mysql_result;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 0:
}
/* }}} */
+
/* {{{ proto int mysql_list_tables(string database_name [, int link_identifier])
List tables in a MySQL database */
PHP_FUNCTION(mysql_list_tables)
int id,type;
MYSQL *mysql;
MYSQL_RES *mysql_result;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
}
/* }}} */
+
/* {{{ proto int mysql_list_fields(string database_name, string table_name [, int link_identifier])
List MySQL result fields */
PHP_FUNCTION(mysql_list_fields)
int id,type;
MYSQL *mysql;
MYSQL_RES *mysql_result;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
}
/* }}} */
+
/* {{{ proto string mysql_error([int link_identifier])
Returns the text of the error message from previous MySQL operation */
PHP_FUNCTION(mysql_error)
pval *mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 0:
}
/* }}} */
+
/* {{{ proto int mysql_errno([int link_identifier])
Returns the number of the error message from previous MySQL operation */
#ifdef mysql_errno
pval *mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 0:
#endif
/* }}} */
+
/* {{{ proto int mysql_affected_rows([int link_identifier])
Get number of affected rows in previous MySQL operation */
PHP_FUNCTION(mysql_affected_rows)
pval *mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 0:
}
/* }}} */
+
/* {{{ proto int mysql_insert_id([int link_identifier])
Get the id generated from the previous INSERT operation */
PHP_FUNCTION(mysql_insert_id)
pval *mysql_link;
int id,type;
MYSQL *mysql;
-
+ MySLS_FETCH();
switch(ARG_COUNT(ht)) {
case 0:
}
/* }}} */
+
/* {{{ proto int mysql_result(int result, int row [, mixed field])
Get result data */
PHP_FUNCTION(mysql_result)
}
/* }}} */
+
/* {{{ proto int mysql_num_rows(int result)
Get number of rows in a result */
PHP_FUNCTION(mysql_num_rows)
}
/* }}} */
+
/* {{{ proto array mysql_fetch_row(int result)
Get a result row as an enumerated array */
PHP_FUNCTION(mysql_fetch_row)
}
/* }}} */
+
static PHP_FUNCTION(mysql_fetch_hash)
{
pval *result;
}
}
+
/* {{{ proto object mysql_fetch_object(int result)
Fetch a result row as an object */
PHP_FUNCTION(mysql_fetch_object)
if (return_value->type==IS_ARRAY) {
return_value->type=IS_OBJECT;
return_value->value.obj.properties = return_value->value.ht;
- return_value->value.obj.ce = &standard_class;
+ return_value->value.obj.ce = &zend_standard_class_def;
}
}
/* }}} */
+
/* {{{ proto array mysql_fetch_array(int result)
Fetch a result row as an associative array */
PHP_FUNCTION(mysql_fetch_array)
}
/* }}} */
+
/* {{{ proto int mysql_data_seek(int result, int row_number)
Move internal result pointer */
PHP_FUNCTION(mysql_data_seek)
}
/* }}} */
+
/* {{{ proto array mysql_fetch_lengths(int result)
Get max data size of each column in a result */
PHP_FUNCTION(mysql_fetch_lengths)
}
/* }}} */
+
static char *php3_mysql_get_field_name(int field_type)
{
switch(field_type) {
}
}
+
/* {{{ proto object mysql_fetch_field(int result [, int field_offset])
Get column information from a result and return as an object */
PHP_FUNCTION(mysql_fetch_field)
}
/* }}} */
+
/* {{{ proto int mysql_field_seek(int result, int field_offset)
Set result pointer to a specific field offset */
PHP_FUNCTION(mysql_field_seek)
}
/* }}} */
+
#define PHP3_MYSQL_FIELD_NAME 1
#define PHP3_MYSQL_FIELD_TABLE 2
#define PHP3_MYSQL_FIELD_LEN 3
#define PHP3_MYSQL_FIELD_TYPE 4
#define PHP3_MYSQL_FIELD_FLAGS 5
+
static void php3_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
pval *result, *field;
}
}
+
/* {{{ proto string mysql_field_name(int result, int field_index)
Get the name of the specified field in a result */
PHP_FUNCTION(mysql_field_name)
}
/* }}} */
+
/* {{{ proto string mysql_field_table(int result, int field_offset)
Get name of the table the specified field is in */
PHP_FUNCTION(mysql_field_table)
}
/* }}} */
+
/* {{{ proto int mysql_field_len(int result, int field_offet)
Returns the length of the specified field */
PHP_FUNCTION(mysql_field_len)
}
/* }}} */
+
/* {{{ proto string mysql_field_type(int result, int field_offset)
Get the type of the specified field in a result */
PHP_FUNCTION(mysql_field_type)
}
/* }}} */
+
/* {{{ proto string mysql_field_flags(int result, int field_offset)
Get the flags associated with the specified field in a result */
PHP_FUNCTION(mysql_field_flags)
}
/* }}} */
+
/* {{{ proto int mysql_free_result(int result)
Free result memory */
PHP_FUNCTION(mysql_free_result)
--- /dev/null
+# Microsoft Developer Studio Project File - Name="mysql" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
+\r
+CFG=mysql - Win32 Debug_TS\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "mysql.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "mysql.mak" CFG="mysql - Win32 Debug_TS"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "mysql - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "mysql - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "mysql - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "mysql - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+MTL=midl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "mysql - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /YX /FD /c\r
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\libzend" /I "..\..\..\bindlib_w32" /I "..\..\..\MySQL\include" /I "..\..\..\TSRM" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /D "COMPILE_DL" /D HAVE_MYSQL=1 /YX /FD /c\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x40d /d "NDEBUG"\r
+# ADD RSC /l 0x40d /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libmySQL.lib php4nts.lib /nologo /dll /machine:I386 /out:"Release/php_mysql.dll" /libpath:"..\..\..\MySQL\lib\opt" /libpath:"..\..\Release"\r
+\r
+!ELSEIF "$(CFG)" == "mysql - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /YX /FD /GZ /c\r
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\libzend" /I "..\..\..\bindlib_w32" /I "..\..\..\MySQL\include" /I "..\..\..\TSRM" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /D "COMPILE_DL" /D HAVE_MYSQL=1 /D ZEND_DEBUG=1 /FR /YX /FD /GZ /c\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x40d /d "_DEBUG"\r
+# ADD RSC /l 0x40d /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libmySQL.lib php4nts.lib /nologo /dll /debug /machine:I386 /out:"Debug/php_mysql.dll" /pdbtype:sept /libpath:"..\..\..\MySQL\lib\debug" /libpath:"..\..\Debug"\r
+\r
+!ELSEIF "$(CFG)" == "mysql - Win32 Debug_TS"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug_TS"\r
+# PROP BASE Intermediate_Dir "Debug_TS"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug_TS"\r
+# PROP Intermediate_Dir "Debug_TS"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\libzend" /I "..\..\..\bindlib_w32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /D "COMPILE_DL" /D HAVE_MYSQL=1 /FR /YX /FD /GZ /c\r
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\libzend" /I "..\..\..\bindlib_w32" /I "..\..\..\MySQL\include" /I "..\..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /D "COMPILE_DL" /D HAVE_MYSQL=1 /D "ZTS" /FR /YX /FD /GZ /c\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x40d /d "_DEBUG"\r
+# ADD RSC /l 0x40d /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libmySQL.lib php4ts.lib /nologo /dll /debug /machine:I386 /out:"Debug_TS/php_mysql.dll" /pdbtype:sept /libpath:"..\..\..\MySQL\lib\debug" /libpath:"..\..\Debug_TS"\r
+\r
+!ELSEIF "$(CFG)" == "mysql - Win32 Release_TS"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release_TS"\r
+# PROP BASE Intermediate_Dir "Release_TS"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release_TS"\r
+# PROP Intermediate_Dir "Release_TS"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\libzend" /I "..\..\..\bindlib_w32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /D "COMPILE_DL" /D HAVE_MYSQL=1 /YX /FD /c\r
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\libzend" /I "..\..\..\bindlib_w32" /I "..\..\..\MySQL\include" /I "..\..\..\TSRM" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYSQL_EXPORTS" /D "COMPILE_DL" /D HAVE_MYSQL=1 /D "ZTS" /YX /FD /c\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x40d /d "NDEBUG"\r
+# ADD RSC /l 0x40d /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libmySQL.lib php4ts.lib /nologo /dll /machine:I386 /out:"Release_TS/php_mysql.dll" /libpath:"..\..\..\MySQL\lib\opt" /libpath:"..\..\Release_TS"\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "mysql - Win32 Release"\r
+# Name "mysql - Win32 Debug"\r
+# Name "mysql - Win32 Debug_TS"\r
+# Name "mysql - Win32 Release_TS"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\mysql.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=.\php3_mysql.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+# End Group\r
+# Begin Source File\r
+\r
+SOURCE=.\Readme_w32.txt\r
+# End Source File\r
+# End Target\r
+# End Project\r
#if COMPILE_DL
#undef HAVE_MYSQL
#define HAVE_MYSQL 1
+# if WIN32||WINNT
+# define PHP_MYSQL_API __declspec(dllexport)
+# endif
#endif
#if HAVE_MYSQL
#define DLEXPORT
#endif
+#ifdef ZTS
+#include "TSRM.h"
+#endif
+
extern php3_module_entry mysql_module_entry;
#define mysql_module_ptr &mysql_module_entry
# define MySLS_CC
# define MySG(v) (mysql_globals.v)
# define MySLS_FETCH()
-extern ZEND_API php_mysql_globals mysql_globals;
+extern PHP_MYSQL_API php_mysql_globals mysql_globals;
#endif
---------------------------------------------------------------*/
#if !defined(COMPILE_DL)
#define HAVE_SNMP 0
-#define HAVE_MYSQL 0
# define HAVE_ERRMSG_H 0 /*needed for mysql 3.21.17 and up*/
#define HAVE_LDAP 0
#define DBASE 0
#endif
#if HAVE_PWD_H
-# if MSVC5
+# if WIN32||WINNT
#include "win32/pwd.h"
#include "win32/param.h"
# else
extern char **environ;
#endif
-extern PHPAPI int le_index_ptr; /* list entry type for index pointers */
-
extern void phperror(char *error);
extern PHPAPI void php3_error(int type, const char *format,...);
extern PHPAPI int php3_printf(const char *format,...);
# define PLS_CC , PLS_C
# define PG(v) (core_globals->v)
# define PLS_FETCH() php_core_globals *core_globals = ts_resource(core_globals_id)
-PHPAPI extern int core_globals_id;
+extern PHPAPI int core_globals_id;
#else
# define PLS_D
# define PLS_DC
/* Standard message handlers */
-PHP_INI_MH(OnUpdateInt)
+PHPAPI PHP_INI_MH(OnUpdateInt)
{
long *p;
#ifndef ZTS
}
-PHP_INI_MH(OnUpdateReal)
+PHPAPI PHP_INI_MH(OnUpdateReal)
{
double *p;
#ifndef ZTS
}
-PHP_INI_MH(OnUpdateString)
+PHPAPI PHP_INI_MH(OnUpdateString)
{
char **p;
#ifndef ZTS
}
-PHP_INI_MH(OnUpdateStringUnempty)
+PHPAPI PHP_INI_MH(OnUpdateStringUnempty)
{
char **p;
#ifndef ZTS
/* Standard message handlers */
-PHP_INI_MH(OnUpdateInt);
-PHP_INI_MH(OnUpdateReal);
-PHP_INI_MH(OnUpdateString);
-PHP_INI_MH(OnUpdateStringUnempty);
+PHPAPI PHP_INI_MH(OnUpdateInt);
+PHPAPI PHP_INI_MH(OnUpdateReal);
+PHPAPI PHP_INI_MH(OnUpdateString);
+PHPAPI PHP_INI_MH(OnUpdateStringUnempty);
#define PHP_INI_DISPLAY_ORIG 1
--- /dev/null
+Microsoft Developer Studio Workspace File, Format Version 6.00\r
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
+\r
+###############################################################################\r
+\r
+Project: "mysql"=.\ext\mysql\mysql.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Global:\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<3>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r