summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2000-10-21 14:18:28 +0000
committerDaniel Beulshausen <dbeu@php.net>2000-10-21 14:18:28 +0000
commit9224f8e21106a3e1f39fa5f6f070332a936711ec (patch)
treecc13d2a563f68bf93d5c57ee380acc0b2edd4e7b
parentd12c4de6ba1bee877c08de8c090fe69488d82de0 (diff)
downloadphp-git-9224f8e21106a3e1f39fa5f6f070332a936711ec.tar.gz
made yaz compile under windows
-rw-r--r--ext/yaz/php_yaz.c36
-rw-r--r--ext/yaz/yaz.dsp111
-rw-r--r--win32/php_modules.dsw13
3 files changed, 131 insertions, 29 deletions
diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c
index 789fcac5dc..c2d86fffaa 100644
--- a/ext/yaz/php_yaz.c
+++ b/ext/yaz/php_yaz.c
@@ -21,6 +21,7 @@
#include "php.h"
#if HAVE_YAZ
+#include "ext/standard/info.h"
#include "php_yaz.h"
#include <yaz/proto.h>
@@ -30,6 +31,7 @@
#include <yaz/otherinfo.h>
#include <yaz/marcdisp.h>
#include <yaz/yaz-util.h>
+#include <yaz/yaz-version.h>
#define MAX_ASSOC 100
@@ -626,9 +628,6 @@ static int send_present (Yaz_Association t)
if (!t->resultSets->recordList) /* no records to retrieve at all .. */
{
-#if PHP_YAZ_DEBUG
- php_log_err("No records to retrieve...");
-#endif
return 0;
}
@@ -954,9 +953,6 @@ PHP_FUNCTION(yaz_search)
p = get_assoc (id);
if (!p)
{
-#if PHP_YAZ_DEBUG
- php_log_err ("get_assoc failed");
-#endif
RETURN_FALSE;
}
convert_to_string_ex (type);
@@ -974,9 +970,6 @@ PHP_FUNCTION(yaz_search)
{
yaz_resultset_destroy(r);
p->resultSets = 0;
-#if PHP_YAZ_DEBUG
- php_log_err ("bad rpn");
-#endif
RETURN_FALSE;
}
}
@@ -984,9 +977,6 @@ PHP_FUNCTION(yaz_search)
{
yaz_resultset_destroy(r);
p->resultSets = 0;
-#if PHP_YAZ_DEBUG
- php_log_err ("bad query type");
-#endif
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1376,7 +1366,6 @@ static void retval_grs1 (zval *return_value, Z_GenericRecord *p)
level++;
grs[level] = e->content->u.subtree;
eno[level] = -1;
- default:
}
zend_hash_next_index_insert (return_value->value.ht,
(void *) &my_zval, sizeof(zval *), NULL);
@@ -1443,7 +1432,6 @@ PHP_FUNCTION(yaz_record)
case VAL_TEXT_XML:
case VAL_APPLICATION_XML:
break;
- default:
}
RETVAL_STRINGL(buf, len, 1);
}
@@ -1552,9 +1540,6 @@ PHP_FUNCTION(yaz_range)
PHP_MINIT_FUNCTION(yaz)
{
int i;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_MINIT_FUNCTION yaz");
-#endif
nmem_init();
order_associations = 1;
shared_associations = xmalloc (sizeof(*shared_associations) * MAX_ASSOC);
@@ -1567,9 +1552,6 @@ PHP_MSHUTDOWN_FUNCTION(yaz)
{
int i;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_MSHUTDOWN_FUNCTION yaz");
-#endif
if (shared_associations)
{
for (i = 0; i<MAX_ASSOC; i++)
@@ -1583,17 +1565,16 @@ PHP_MSHUTDOWN_FUNCTION(yaz)
PHP_MINFO_FUNCTION(yaz)
{
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_MINFO_FUNCTION yaz");
-#endif
+ php_info_print_table_start();
+ php_info_print_table_row(2, "YAZ Support", "enabled");
+ php_info_print_table_row(2, "YAZ Version", YAZ_VERSION);
+ php_info_print_table_end();
}
PHP_RSHUTDOWN_FUNCTION(yaz)
{
int i;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_RSHUTDOWN yaz");
-#endif
+
if (shared_associations)
{
for (i = 0; i<MAX_ASSOC; i++)
@@ -1611,9 +1592,6 @@ PHP_RSHUTDOWN_FUNCTION(yaz)
PHP_RINIT_FUNCTION(yaz)
{
order_associations++;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_RINIT yaz");
-#endif
return SUCCESS;
}
diff --git a/ext/yaz/yaz.dsp b/ext/yaz/yaz.dsp
new file mode 100644
index 0000000000..ee9d6ee163
--- /dev/null
+++ b/ext/yaz/yaz.dsp
@@ -0,0 +1,111 @@
+# Microsoft Developer Studio Project File - Name="yaz" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=yaz - 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
+!MESSAGE NMAKE /f "yaz.mak".
+!MESSAGE
+!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 "yaz.mak" CFG="yaz - Win32 Debug_TS"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "yaz - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "yaz - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "yaz - Win32 Release_TS"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# 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_TS"
+# PROP Intermediate_Dir "Release_TS"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "YAZ_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_YAZ" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_YAZ=1 /D ZTS=1 /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# 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 php4ts.lib yaz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_yaz.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
+
+!ELSEIF "$(CFG)" == "yaz - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "YAZ_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_YAZ" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_YAZ=1 /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# 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 php4ts-debug.lib yaz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_yaz.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"
+
+!ENDIF
+
+# Begin Target
+
+# Name "yaz - Win32 Release_TS"
+# Name "yaz - Win32 Debug_TS"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\php_yaz.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\php_yaz.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Target
+# End Project
diff --git a/win32/php_modules.dsw b/win32/php_modules.dsw
index c18af97769..26591ab444 100644
--- a/win32/php_modules.dsw
+++ b/win32/php_modules.dsw
@@ -351,6 +351,19 @@ Package=<4>
###############################################################################
+Project: "yaz"="..\ext\yaz\yaz.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+
+###############################################################################
+
Project: "zlib"="..\ext\zlib\zlib.dsp" - Package Owner=<4>
Package=<5>