From de6c9f35a1caa5e76d830b341d099007e3b68a9b Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Wed, 23 Feb 2000 21:10:18 +0000 Subject: [PATCH] - MySQL now compiles right into the PHP 4 binary on Windows --- ext/mysql/libmysql/libmysql.dsp | 433 ++++++++++++++++++++++++++++++-- ext/mysql/libmysql/my_wincond.c | 139 ++++++++++ main/config.w32.h | 3 + main/internal_functions_win32.c | 4 +- php4dllts.dsp | 20 +- php4ts.dsw | 18 ++ 6 files changed, 586 insertions(+), 31 deletions(-) create mode 100644 ext/mysql/libmysql/my_wincond.c diff --git a/ext/mysql/libmysql/libmysql.dsp b/ext/mysql/libmysql/libmysql.dsp index 4eaea585c8..1630067bb6 100644 --- a/ext/mysql/libmysql/libmysql.dsp +++ b/ext/mysql/libmysql/libmysql.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=libmysql - Win32 Debug +CFG=libmysql - Win32 Debug_TS !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,13 @@ CFG=libmysql - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "libmysql.mak" CFG="libmysql - Win32 Debug" +!MESSAGE NMAKE /f "libmysql.mak" CFG="libmysql - Win32 Debug_TS" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "libmysql - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "libmysql - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "libmysql - Win32 Debug_TS" (based on "Win32 (x86) Static Library") +!MESSAGE "libmysql - Win32 Release_TS" (based on "Win32 (x86) Static Library") +!MESSAGE "libmysql - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -28,20 +29,43 @@ CFG=libmysql - Win32 Debug CPP=cl.exe RSC=rc.exe -!IF "$(CFG)" == "libmysql - Win32 Release" +!IF "$(CFG)" == "libmysql - Win32 Debug_TS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_TS" +# PROP BASE Intermediate_Dir "Debug_TS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_TS" +# PROP Intermediate_Dir "Debug_TS" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "__WIN32__" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "__WIN32__" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libmysql - Win32 Release_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" +# PROP BASE Output_Dir "Release_TS" +# PROP BASE Intermediate_Dir "Release_TS" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir "Release_TS" +# PROP Intermediate_Dir "Release_TS" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "__WIN32__" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "__WIN32__" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -51,22 +75,22 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo -!ELSEIF "$(CFG)" == "libmysql - Win32 Debug" +!ELSEIF "$(CFG)" == "libmysql - Win32 Release_TS_inline" # PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "libmysql___Win32_Debug" -# PROP BASE Intermediate_Dir "libmysql___Win32_Debug" +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_TS_inline" +# PROP BASE Intermediate_Dir "Release_TS_inline" # PROP BASE Target_Dir "" # PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "libmysql___Win32_Debug" -# PROP Intermediate_Dir "libmysql___Win32_Debug" +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_TS_inline" +# PROP Intermediate_Dir "Release_TS_inline" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" +# ADD BASE CPP /nologo /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "__WIN32__" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "__WIN32__" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -78,15 +102,376 @@ LIB32=link.exe -lib # Begin Target -# Name "libmysql - Win32 Release" -# Name "libmysql - Win32 Debug" +# Name "libmysql - Win32 Debug_TS" +# Name "libmysql - Win32 Release_TS" +# Name "libmysql - Win32 Release_TS_inline" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\array.c +# End Source File +# Begin Source File + +SOURCE=.\bchange.c +# End Source File +# Begin Source File + +SOURCE=.\bmove.c +# End Source File +# Begin Source File + +SOURCE=.\bmove_upp.c +# End Source File +# Begin Source File + +SOURCE=.\ct_init.c +# End Source File +# Begin Source File + +SOURCE=".\ctype-latin1.c" +# End Source File +# Begin Source File + +SOURCE=.\dbug.c +# End Source File +# Begin Source File + +SOURCE=.\default.c +# End Source File +# Begin Source File + +SOURCE=.\dll.c +# End Source File +# Begin Source File + +SOURCE=.\errmsg.c +# End Source File +# Begin Source File + +SOURCE=.\errors.c +# End Source File +# Begin Source File + +SOURCE=.\get_password.c +# End Source File +# Begin Source File + +SOURCE=.\int2str.c +# End Source File +# Begin Source File + +SOURCE=.\is_prefix.c +# End Source File +# Begin Source File + +SOURCE=.\libmysql.c +# End Source File +# Begin Source File + +SOURCE=.\list.c +# End Source File +# Begin Source File + +SOURCE=.\longlong2str.c +# End Source File +# Begin Source File + +SOURCE=.\mf_casecnv.c +# End Source File +# Begin Source File + +SOURCE=.\mf_dirname.c +# End Source File +# Begin Source File + +SOURCE=.\mf_fn_ext.c +# End Source File +# Begin Source File + +SOURCE=.\mf_format.c +# End Source File +# Begin Source File + +SOURCE=.\mf_loadpath.c +# End Source File +# Begin Source File + +SOURCE=.\mf_pack.c +# End Source File +# Begin Source File + +SOURCE=.\mf_path.c +# End Source File +# Begin Source File + +SOURCE=.\mf_unixpath.c +# End Source File +# Begin Source File + +SOURCE=.\mf_wcomp.c +# End Source File +# Begin Source File + +SOURCE=.\mulalloc.c +# End Source File +# Begin Source File + +SOURCE=.\my_alloc.c +# End Source File +# Begin Source File + +SOURCE=.\my_compress.c +# End Source File +# Begin Source File + +SOURCE=.\my_create.c +# End Source File +# Begin Source File + +SOURCE=.\my_delete.c +# End Source File +# Begin Source File + +SOURCE=.\my_div.c +# End Source File +# Begin Source File + +SOURCE=.\my_error.c +# End Source File +# Begin Source File + +SOURCE=.\my_fopen.c +# End Source File +# Begin Source File + +SOURCE=.\my_getwd.c +# End Source File +# Begin Source File + +SOURCE=.\my_init.c +# End Source File +# Begin Source File + +SOURCE=.\my_malloc.c +# End Source File +# Begin Source File + +SOURCE=.\my_messnc.c +# End Source File +# Begin Source File + +SOURCE=.\my_net.c +# End Source File +# Begin Source File + +SOURCE=.\my_once.c +# End Source File +# Begin Source File + +SOURCE=.\my_open.c +# End Source File +# Begin Source File + +SOURCE=.\my_pthread.c +# End Source File +# Begin Source File + +SOURCE=.\my_read.c +# End Source File +# Begin Source File + +SOURCE=.\my_realloc.c +# End Source File +# Begin Source File + +SOURCE=.\my_static.c +# End Source File +# Begin Source File + +SOURCE=.\my_tempnam.c +# End Source File +# Begin Source File + +SOURCE=.\my_thr_init.c +# End Source File +# Begin Source File + +SOURCE=.\my_wincond.c +# End Source File +# Begin Source File + +SOURCE=.\my_write.c +# End Source File +# Begin Source File + +SOURCE=.\net.c +# End Source File +# Begin Source File + +SOURCE=.\password.c +# End Source File +# Begin Source File + +SOURCE=.\safemalloc.c +# End Source File +# Begin Source File + +SOURCE=.\str2int.c +# End Source File +# Begin Source File + +SOURCE=.\strcend.c +# End Source File +# Begin Source File + +SOURCE=.\strcont.c +# End Source File +# Begin Source File + +SOURCE=.\strend.c +# End Source File +# Begin Source File + +SOURCE=.\strfill.c +# End Source File +# Begin Source File + +SOURCE=.\string.c +# End Source File +# Begin Source File + +SOURCE=.\strinstr.c +# End Source File +# Begin Source File + +SOURCE=.\strmake.c +# End Source File +# Begin Source File + +SOURCE=.\strmov.c +# End Source File +# Begin Source File + +SOURCE=.\strnmov.c +# End Source File +# Begin Source File + +SOURCE=.\strtoll.c +# End Source File +# Begin Source File + +SOURCE=.\strtoull.c +# End Source File +# Begin Source File + +SOURCE=.\strxmov.c +# End Source File +# Begin Source File + +SOURCE=.\thr_mutex.c +# End Source File +# Begin Source File + +SOURCE=.\typelib.c +# End Source File +# Begin Source File + +SOURCE=.\violite.c +# End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\acconfig.h +# End Source File +# Begin Source File + +SOURCE=".\config-win32.h" +# End Source File +# Begin Source File + +SOURCE=.\dbug.h +# End Source File +# Begin Source File + +SOURCE=.\errmsg.h +# End Source File +# Begin Source File + +SOURCE=.\global.h +# End Source File +# Begin Source File + +SOURCE=.\m_ctype.h +# End Source File +# Begin Source File + +SOURCE=.\m_string.h +# End Source File +# Begin Source File + +SOURCE=.\my_alarm.h +# End Source File +# Begin Source File + +SOURCE=.\my_dir.h +# End Source File +# Begin Source File + +SOURCE=.\my_list.h +# End Source File +# Begin Source File + +SOURCE=.\my_net.h +# End Source File +# Begin Source File + +SOURCE=.\my_pthread.h +# End Source File +# Begin Source File + +SOURCE=.\my_static.h +# End Source File +# Begin Source File + +SOURCE=.\my_sys.h +# End Source File +# Begin Source File + +SOURCE=.\mysql.h +# End Source File +# Begin Source File + +SOURCE=.\mysql_com.h +# End Source File +# Begin Source File + +SOURCE=.\mysql_version.h +# End Source File +# Begin Source File + +SOURCE=.\mysqld_error.h +# End Source File +# Begin Source File + +SOURCE=.\mysys_err.h +# End Source File +# Begin Source File + +SOURCE=.\mysys_priv.h +# End Source File +# Begin Source File + +SOURCE=.\thr_alarm.h +# End Source File +# Begin Source File + +SOURCE=.\violite.h +# End Source File # End Group # End Target # End Project diff --git a/ext/mysql/libmysql/my_wincond.c b/ext/mysql/libmysql/my_wincond.c new file mode 100644 index 0000000000..f33a197298 --- /dev/null +++ b/ext/mysql/libmysql/my_wincond.c @@ -0,0 +1,139 @@ +/* Copyright (C) 2000 Monty Program KB + + This software is distributed with NO WARRANTY OF ANY KIND. No author or + distributor accepts any responsibility for the consequences of using it, or + for whether it serves any particular purpose or works at all, unless he or + she says so in writing. Refer to the Free Public License (the "License") + for full details. + + Every copy of this file must include a copy of the License, normally in a + plain ASCII text file named PUBLIC. The License grants you the right to + copy, modify and redistribute this file, but only under certain conditions + described in the License. Among other things, the License requires that + the copyright notice and this notice be preserved on all copies. */ + + +/***************************************************************************** +** The following is a simple implementation of posix conditions +*****************************************************************************/ + +#include "mysys_priv.h" +#if defined(THREAD) && defined(__WIN32__) +#include +#undef getpid +#include +#include + +int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) +{ + cond->waiting=0; + cond->semaphore=CreateSemaphore(NULL,0,0x7FFFFFFF,NullS); + if (!cond->semaphore) + return ENOMEM; + return 0; +} + +int pthread_cond_destroy(pthread_cond_t *cond) +{ + return CloseHandle(cond->semaphore) ? 0 : EINVAL; +} + + +int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +{ + InterlockedIncrement(&cond->waiting); + LeaveCriticalSection(mutex); + WaitForSingleObject(cond->semaphore,INFINITE); + InterlockedDecrement(&cond->waiting); + EnterCriticalSection(mutex); + return 0 ; +} + +int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + struct timespec *abstime) +{ + struct _timeb curtime; + int result; + long timeout; + _ftime(&curtime); + timeout= ((long) (abstime->tv_sec - curtime.time)*1000L + + (long)((abstime->tv_nsec/1000) - curtime.millitm)/1000L); + if (timeout < 0) /* Some safety */ + timeout = 0L; + InterlockedIncrement(&cond->waiting); + LeaveCriticalSection(mutex); + result=WaitForSingleObject(cond->semaphore,timeout); + InterlockedDecrement(&cond->waiting); + EnterCriticalSection(mutex); + + return result == WAIT_TIMEOUT ? ETIMEDOUT : 0; +} + + +int pthread_cond_signal(pthread_cond_t *cond) +{ + long prev_count; + if (cond->waiting) + ReleaseSemaphore(cond->semaphore,1,&prev_count); + return 0; +} + + +int pthread_cond_broadcast(pthread_cond_t *cond) +{ + long prev_count; + if (cond->waiting) + ReleaseSemaphore(cond->semaphore,cond->waiting,&prev_count); + return 0 ; +} + + +int pthread_attr_init(pthread_attr_t *connect_att) +{ + connect_att->dwStackSize = 0; + connect_att->dwCreatingFlag = 0; + connect_att->priority = 0; + return 0; +} + +int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack) +{ + connect_att->dwStackSize=stack; + return 0; +} + +int pthread_attr_setprio(pthread_attr_t *connect_att,int priority) +{ + connect_att->priority=priority; + return 0; +} + +int pthread_attr_destroy(pthread_attr_t *connect_att) +{ + bzero((gptr) connect_att,sizeof(*connect_att)); + return 0; +} + +/**************************************************************************** +** Fix localtime_r() to be a bit safer +****************************************************************************/ + +struct tm *localtime_r(const time_t *timep,struct tm *tmp) +{ + if (*timep == (time_t) -1) /* This will crash win32 */ + { + bzero(tmp,sizeof(*tmp)); + } + else + { + struct tm *res=localtime(timep); + if (!res) /* Wrong date */ + { + bzero(tmp,sizeof(*tmp)); /* Keep things safe */ + return 0; + } + *tmp= *res; + } + return tmp; +} +#endif /* __WIN32__ */ diff --git a/main/config.w32.h b/main/config.w32.h index 5ed74e38d4..f078785d3d 100644 --- a/main/config.w32.h +++ b/main/config.w32.h @@ -12,6 +12,9 @@ /* set to enable bcmath */ #define WITH_BCMATH 1 +/* set to enable mysql */ +#define HAVE_MYSQL 1 + /* set to enable bundled PCRE library */ #define HAVE_BUNDLED_PCRE 1 diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c index fd378a3dff..2903c80d4b 100644 --- a/main/internal_functions_win32.c +++ b/main/internal_functions_win32.c @@ -55,6 +55,7 @@ #include "ext/odbc/php_odbc.h" #include "ext/session/php_session.h" #include "ext/xml/php_xml.h" +#include "ext/mysql/php_mysql.h" /* SNMP has to be moved to ext */ /* #include "dl/snmp/php_snmp.h" */ @@ -89,7 +90,8 @@ zend_module_entry *php_builtin_extensions[] = { phpext_output_ptr, phpext_array_ptr, phpext_assert_ptr, - phpext_xml_ptr + phpext_xml_ptr, + phpext_mysql_ptr }; #define EXTCOUNT (sizeof(php_builtin_extensions)/sizeof(zend_module_entry *)) diff --git a/php4dllts.dsp b/php4dllts.dsp index 151c92935d..48ac55c033 100644 --- a/php4dllts.dsp +++ b/php4dllts.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=1 /D "MSVC5" /D "ZTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /I "ext\mysql\libmysql" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=1 /D "MSVC5" /D "ZTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40d /d "_DEBUG" @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # 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 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libc" /out:"Debug_TS/php4ts_debug.dll" /pdbtype:sept /libpath:"TSRM\Debug_TS" /libpath:"Zend\Debug_TS" /libpath:"..\bindlib_w32\Debug" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libc" /out:"Debug_TS/php4ts_debug.dll" /pdbtype:sept /libpath:"TSRM\Debug_TS" /libpath:"Zend\Debug_TS" /libpath:"..\bindlib_w32\Debug" /libpath:"ext\mysql\libmysql\Debug_TS" !ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" @@ -70,7 +70,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=0 /D "MSVC5" /D "ZTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /I "ext\mysql\libmysql" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=0 /D "MSVC5" /D "ZTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40d /d "NDEBUG" @@ -80,7 +80,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # 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 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /out:"Release_TS/php4ts.dll" /libpath:"TSRM\Release_TS" /libpath:"Zend\Release_TS" /libpath:"..\bindlib_w32\Release" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /out:"Release_TS/php4ts.dll" /libpath:"TSRM\Release_TS" /libpath:"Zend\Release_TS" /libpath:"..\bindlib_w32\Release" /libpath:"ext\mysql\libmysql\Release_TS" !ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS_inline" @@ -97,7 +97,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "MSVC5" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "MSVC5" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "regex" /I "..\bindlib_w32" /I "Zend" /I "tsrm" /I "ext\mysql\libmysql" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "MSVC5" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40d /d "NDEBUG" @@ -107,7 +107,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /out:"Release_TS/php4ts.dll" /libpath:"TSRM\Release_TS" /libpath:"Zend\Release_TS" /libpath:"..\bindlib_w32\Release" -# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /out:"Release_TS_inline/php4ts.dll" /libpath:"TSRM\Release_TS_inline" /libpath:"Zend\Release_TS_inline" /libpath:"..\bindlib_w32\Release" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /out:"Release_TS_inline/php4ts.dll" /libpath:"TSRM\Release_TS_inline" /libpath:"Zend\Release_TS_inline" /libpath:"..\bindlib_w32\Release" /libpath:"ext\mysql\libmysql\Release_TS_inline" !ENDIF @@ -437,6 +437,10 @@ SOURCE=.\ext\mcal\php_mcal.c # End Source File # Begin Source File +SOURCE=.\ext\mysql\php_mysql.c +# End Source File +# Begin Source File + SOURCE=.\ext\odbc\php_odbc.c # End Source File # Begin Source File @@ -590,6 +594,10 @@ SOURCE=.\ext\mcal\php_mcal.h # End Source File # Begin Source File +SOURCE=.\ext\mysql\php_mysql.h +# End Source File +# Begin Source File + SOURCE=.\ext\odbc\php_odbc.h # End Source File # Begin Source File diff --git a/php4ts.dsw b/php4ts.dsw index 519a96a539..754823300f 100644 --- a/php4ts.dsw +++ b/php4ts.dsw @@ -30,6 +30,18 @@ Package=<4> ############################################################################### +Project: "libmysql"=.\ext\mysql\libmysql\libmysql.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "php4dllts"=.\php4dllts.dsp - Package Owner=<4> Package=<5> @@ -44,6 +56,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name TSRM End Project Dependency + Begin Project Dependency + Project_Dep_Name libmysql + End Project Dependency }}} ############################################################################### @@ -74,6 +89,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name php4dllts End Project Dependency + Begin Project Dependency + Project_Dep_Name mysql + End Project Dependency }}} ############################################################################### -- 2.40.0