From: Zeev Suraski Date: Tue, 26 Dec 2000 22:15:13 +0000 (+0000) Subject: - Use supplied istdiostream definition for the INI scanner too X-Git-Tag: php-4.0.5RC1~787 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc2f1d9db78d835bdf0bd5b25e18ac834b7c22c6;p=php - Use supplied istdiostream definition for the INI scanner too - Add Release_TSDbg configuration --- diff --git a/Zend/ZendTS.dsp b/Zend/ZendTS.dsp index 6f280803c9..435faf43ae 100644 --- a/Zend/ZendTS.dsp +++ b/Zend/ZendTS.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=ZendTS - Win32 Release_TS_inline +CFG=ZendTS - Win32 Release_TSDbg !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,13 +13,14 @@ CFG=ZendTS - Win32 Release_TS_inline !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 "ZendTS.mak" CFG="ZendTS - Win32 Release_TS_inline" +!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library") !MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library") !MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library") +!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -95,6 +96,29 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo +!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg" + +# PROP BASE Use_MFC 0 +# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg" +# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Output_Dir "Release_TSDbg" +# PROP Intermediate_Dir "Release_TSDbg" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x40d /d "NDebug_TS" +# ADD RSC /l 0x40d /d "NDebug_TS" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + !ENDIF # Begin Target @@ -102,6 +126,7 @@ LIB32=link.exe -lib # Name "ZendTS - Win32 Release_TS" # Name "ZendTS - Win32 Debug_TS" # Name "ZendTS - Win32 Release_TS_inline" +# Name "ZendTS - Win32 Release_TSDbg" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" @@ -392,6 +417,24 @@ BuildCmds= \ if "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p ini_ zend_ini_parser.y \ +"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg" + +# Begin Custom Build +InputDir=. +InputPath=.\zend_ini_parser.y + +BuildCmds= \ + if not "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p ini_ zend_ini_parser.y \ + if "X%CYGWIN%"=="X" bison --output=zend_ini_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p ini_ zend_ini_parser.y \ + + "$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) @@ -453,6 +496,24 @@ BuildCmds= \ if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \ +"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg" + +# Begin Custom Build +InputDir=. +InputPath=".\zend_language_parser.y" + +BuildCmds= \ + if not "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend_language_parser.y \ + if "X%CYGWIN%"=="X" bison --output=zend_language_parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend_language_parser.y \ + + "$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) @@ -501,6 +562,16 @@ InputPath=.\zend_ini_scanner.l # End Custom Build +!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg" + +# Begin Custom Build +InputPath=.\zend_ini_scanner.l + +"zend_ini_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + flex -+ -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.cpp zend_ini_scanner.l + +# End Custom Build + !ENDIF # End Source File @@ -538,6 +609,16 @@ InputPath=".\zend_language_scanner.l" # End Custom Build +!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg" + +# Begin Custom Build +InputPath=".\zend_language_scanner.l" + +"zend_language_scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + flex -+ -B -i -Sflex.skl -Pzend -ozend_language_scanner.cpp zend_language_scanner.l + +# End Custom Build + !ENDIF # End Source File diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index af407b2372..e891ea206f 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -45,6 +45,9 @@ #define YY_DECL int ini_lex(zval *ini_lval) #endif +#include "zend_istdiostream.h" + + #ifndef ZTS static char *ini_filename; diff --git a/Zend/zend_istdiostream.h b/Zend/zend_istdiostream.h new file mode 100644 index 0000000000..1796abf15f --- /dev/null +++ b/Zend/zend_istdiostream.h @@ -0,0 +1,15 @@ +#ifndef _ZEND_STDIOSTREAM +#define _ZEND_STDIOSTREAM + +#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM) +class istdiostream : public istream +{ +private: + stdiobuf _file; +public: + istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); } + stdiobuf* rdbuf()/* const */ { return &_file; } +}; +#endif + +#endif \ No newline at end of file diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index c88a3805e8..8b3d8ea5da 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -87,16 +87,7 @@ # define MY_INPUT input #endif -#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM) -class istdiostream : public istream -{ -private: - stdiobuf _file; -public: - istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); } - stdiobuf* rdbuf()/* const */ { return &_file; } -}; -#endif +#include "zend_istdiostream.h" #define YY_FATAL_ERROR zend_fatal_scanner_error