]> granicus.if.org Git - php/commitdiff
let ext\shmop build under win32
authorDaniel Beulshausen <dbeu@php.net>
Tue, 7 Aug 2001 13:33:27 +0000 (13:33 +0000)
committerDaniel Beulshausen <dbeu@php.net>
Tue, 7 Aug 2001 13:33:27 +0000 (13:33 +0000)
ext/shmop/php_shmop.h
ext/shmop/shmop.c
ext/shmop/shmop.dsp [new file with mode: 0644]
php.ini-dist
php.ini-optimized
php.ini-recommended
win32/php_modules.dsw

index 65ed03c27bbed6acb88de9f61c06da6bf32dd3bb..ac8ce0423008598f0ae8080fc347244d18b73ee5 100644 (file)
@@ -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;
index 42ccf66dbc0716d5dc97b5192a036f2304456869..a19dd1203713c08cdf14e913e5667f716b5b0dda 100644 (file)
 #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 (file)
index 0000000..4915c64
--- /dev/null
@@ -0,0 +1,107 @@
+# Microsoft Developer Studio Project File - Name="shmop" - 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=shmop - 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 "shmop.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 "shmop.mak" CFG="shmop - Win32 Debug_TS"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "shmop - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "shmop - Win32 Debug_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)" == "shmop - 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 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SHMOP_EXPORTS" /YX /FD /c\r
+# 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\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x407 /d "NDEBUG"\r
+# ADD RSC /l 0x407 /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 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"\r
+\r
+!ELSEIF  "$(CFG)" == "shmop - 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 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SHMOP_EXPORTS" /YX /FD /GZ /c\r
+# 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\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x407 /d "_DEBUG"\r
+# ADD RSC /l 0x407 /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 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"\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "shmop - Win32 Release_TS"\r
+# Name "shmop - Win32 Debug_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=.\shmop.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=.\php_shmop.h\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
index 9d61b913f1fbe256a89fe92388e92a2c5edca34f..8931b2fc09a462e1a1b337043e4f8074600d2f0c 100644 (file)
@@ -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
index e9698521b7abccce321735d5cf6e8b2a6cb332a6..15e1ddf385d52f8d9861f253108b792769253642 100644 (file)
@@ -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
index e9698521b7abccce321735d5cf6e8b2a6cb332a6..15e1ddf385d52f8d9861f253108b792769253642 100644 (file)
@@ -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
index cdf73c51d39f311b4ea56da9d88d6576b26c5aa8..64e6892a9ab7632106d155f6d31256668e87057c 100644 (file)
@@ -483,6 +483,18 @@ Package=<4>
 \r
 ###############################################################################\r
 \r
+Project: "shmop"=..\ext\shmop\shmop.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
 Project: "snmp"=..\ext\snmp\snmp.dsp - Package Owner=<4>\r
 \r
 Package=<5>\r