summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2001-08-07 13:33:27 +0000
committerDaniel Beulshausen <dbeu@php.net>2001-08-07 13:33:27 +0000
commit289770bf617b9f437461a9b3ea1edb1c7902b5cf (patch)
treed530e67305071cbaf30624137e2d581524f8f9f7
parenta118a1e7b051a61df3ae39692fea861dd63ac721 (diff)
downloadphp-git-289770bf617b9f437461a9b3ea1edb1c7902b5cf.tar.gz
let ext\shmop build under win32
-rw-r--r--ext/shmop/php_shmop.h4
-rw-r--r--ext/shmop/shmop.c13
-rw-r--r--ext/shmop/shmop.dsp107
-rw-r--r--php.ini-dist2
-rw-r--r--php.ini-optimized2
-rw-r--r--php.ini-recommended2
-rw-r--r--win32/php_modules.dsw12
7 files changed, 137 insertions, 5 deletions
diff --git a/ext/shmop/php_shmop.h b/ext/shmop/php_shmop.h
index 65ed03c27b..ac8ce04230 100644
--- a/ext/shmop/php_shmop.h
+++ b/ext/shmop/php_shmop.h
@@ -43,6 +43,10 @@ PHP_FUNCTION(shmop_size);
PHP_FUNCTION(shmop_write);
PHP_FUNCTION(shmop_delete);
+#ifdef PHP_WIN32
+typedef int key_t;
+#endif
+
struct php_shmop
{
int shmid;
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 42ccf66dbc..a19dd12037 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -25,8 +25,13 @@
#include "php.h"
#include "php_ini.h"
#include "php_shmop.h"
-#include <sys/ipc.h>
-#include <sys/shm.h>
+# ifndef PHP_WIN32
+# include <sys/ipc.h>
+# include <sys/shm.h>
+#else
+#include "tsrm_win32.h"
+#endif
+
#if HAVE_SHMOP
@@ -170,7 +175,7 @@ PHP_FUNCTION(shmop_open)
}
shmop->size = shm.shm_segsz;
-
+
rsid = zend_list_insert(shmop, shm_type);
RETURN_LONG(rsid);
}
@@ -246,8 +251,6 @@ PHP_FUNCTION(shmop_close)
RETURN_FALSE;
}
zend_list_delete((*shmid)->value.lval);
-
- RETURN_LONG(0);
}
/* }}} */
diff --git a/ext/shmop/shmop.dsp b/ext/shmop/shmop.dsp
new file mode 100644
index 0000000000..4915c64f1c
--- /dev/null
+++ b/ext/shmop/shmop.dsp
@@ -0,0 +1,107 @@
+# Microsoft Developer Studio Project File - Name="shmop" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=shmop - 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 "shmop.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 "shmop.mak" CFG="shmop - Win32 Debug_TS"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "shmop - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "shmop - 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)" == "shmop - 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 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SHMOP_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\main" /I "..\..\TSRM" /I "..\..\ZEND" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D "NDEBUG" /D "PHP_EXPORTS" /D "HAVE_SHMOP" /D COMPILE_DL_SHMOP=1 /D ZEND_DEBUG=0 /D "ZTS" /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 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 /out:"..\..\Release_TS/php_shmop.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
+
+!ELSEIF "$(CFG)" == "shmop - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SHMOP_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\\" /I "..\..\main" /I "..\..\TSRM" /I "..\..\ZEND" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_EXPORTS" /D "COMPILE_DL_SHMOP" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_SHMOP=1 /D ZTS=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 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 /out:"..\..\Debug_TS/php_shmop.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"
+
+!ENDIF
+
+# Begin Target
+
+# Name "shmop - Win32 Release_TS"
+# Name "shmop - Win32 Debug_TS"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\shmop.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\php_shmop.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/php.ini-dist b/php.ini-dist
index 9d61b913f1..8931b2fc09 100644
--- a/php.ini-dist
+++ b/php.ini-dist
@@ -439,7 +439,9 @@ allow_url_fopen = On
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
+;extension=php_shmop.dll
;extension=php_snmp.dll
+;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
diff --git a/php.ini-optimized b/php.ini-optimized
index e9698521b7..15e1ddf385 100644
--- a/php.ini-optimized
+++ b/php.ini-optimized
@@ -316,7 +316,9 @@ allow_url_fopen = On ; Whether to allow the treatment of URLs (li
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
+;extension=php_shmop.dll
;extension=php_snmp.dll
+;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
diff --git a/php.ini-recommended b/php.ini-recommended
index e9698521b7..15e1ddf385 100644
--- a/php.ini-recommended
+++ b/php.ini-recommended
@@ -316,7 +316,9 @@ allow_url_fopen = On ; Whether to allow the treatment of URLs (li
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
+;extension=php_shmop.dll
;extension=php_snmp.dll
+;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
diff --git a/win32/php_modules.dsw b/win32/php_modules.dsw
index cdf73c51d3..64e6892a9a 100644
--- a/win32/php_modules.dsw
+++ b/win32/php_modules.dsw
@@ -483,6 +483,18 @@ Package=<4>
###############################################################################
+Project: "shmop"=..\ext\shmop\shmop.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "snmp"=..\ext\snmp\snmp.dsp - Package Owner=<4>
Package=<5>