Bug #10263 Updated: Use of istdiostream w/o HAVE_CLASS_ISTDIOSTREAM protection

From: Date: Sat, 18 Aug 2001 16:05:53 +0000
Subject: Bug #10263 Updated: Use of istdiostream w/o HAVE_CLASS_ISTDIOSTREAM protection
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63594@lists.php.net to get a copy of this message
ID: 10263 Updated by: zeev Reported By: spc@sgi.com Old Status: Assigned Status: Closed Bug Type: iPlanet related Operating System: SGI IRIX 6.5.x PHP Version: 4.0.4pl1 Assigned To: zeev New Comment: We no longer use C++ for the thread safe scanner, as of 4.0.7 (due out soon), so this problem should be gone. Previous Comments: ------------------------------------------------------------------------ [2001-05-23 06:13:50] sniper@php.net Assigning this to Zeev. He knows the Zend stuff best. --Jani ------------------------------------------------------------------------ [2001-04-10 12:00:43] spc@sgi.com I am trying to build the NSAPI module for use on SGI MIPS/IRIX hardware, using SGI's MIPSpro compilers (we provide binaries in SGI's "inst" format on our Freeware web site at <URL:http://freeware.sgi.com>). Since NSAPI is built using the Zend Thread Safety enabled, some stdiostream code is included. Configure is correctly determining that HAVE_STDIOSTREAM_H should be defined (include file <stdiostream.h> is found), and that HAVE_CLASS_ISTDIOSTREAM should be undefined (no class istdiostream exists in the compiler version I am using). This is correctly being done in the main/php_config.h file. In the source file zend_language_scanner_cc.cc, there is a section which reads #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 so that later code in that file will correctly build and work when class istdiostream is used. In the source file zend_ini_scanner_cc.cc, though, the class istdiostream is used in/around line 511, without the protection of HAVE_CLASS_ISTDIOSTREAM. Since this class doesn't exist, the build fails. I have been able to work around this by adding a section to the #ifdef ZTS region starting in/around line 408: #ifdef ZTS # ifdef HAVE_STDIOSTR_H # include <stdiostr.h> # endif # ifdef HAVE_STDIOSTREAM_H # include <stdiostream.h> # endif # ifdef ZEND_WIN32 # include <strstrea.h> # else # include <strstream.h> # endif /* new stuff starts here.... */ # ifndef 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 /* ... and ends here */ #endif After this change, the NSAPI module successfully builds---I haven't had the chance to test it yet. regards, Steve Crockett spc@sgi.com P.S. Is there a way to get information on the IRIX build of PHP into your manual? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=10263&edit=1

« previous php.dev (#63594) next »