|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-05-06 19:45 UTC] levim@php.net
-Package: Feature/Change Request
+Package: *General Issues
[2014-05-06 19:48 UTC] levim@php.net
-Status: Open
+Status: Closed
-Operating System: *
+Operating System: Irrelevant
-Assigned To:
+Assigned To: levim
[2014-05-06 19:48 UTC] levim@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 16:00:01 2025 UTC |
Description: ------------ try to write an extension in C++ using the ISO C99 standard, gcc 3.3 or later is a good choice for compiler. Reproduce code: --------------- standard skeleton extension code as a C++ code Expected result: ---------------- build properly Actual result: -------------- 1) use "const char **(*aliases)" instead of "const char *(*aliases)[]" In file included from /usr/src/php-5.0.1/Zend/zend_globals.h:40, from /usr/src/php-5.0.1/Zend/zend_list.h:26, from /usr/src/php-5.0.1/Zend/zend_API.h:27, from /usr/src/php-5.0.1/main/php.h:38, from phpext/polylook.cc:6: /usr/src/php-5.0.1/Zend/zend_multibyte.h:45: error: ISO C++ forbids zero-size array `aliases' 2) use system-declared 64bit integer types instead of hacking some own types. where you have stdint.h use [u]int(8|16|32|64)_t instead of messing with (long )* int. these types are provided for using them. include stdint.h, and use int64_t and uin64_t instead of long long [int] /usr/src/php-5.0.1/main/snprintf.h:116: error: ISO C++ does not support `long long' /usr/src/php-5.0.1/main/snprintf.h:117: error: ISO C++ does not support `long long' 3) just remove the trailing coma /usr/src/php-5.0.1/main/streams/php_stream_filter_api.h:66: error: comma at end of enumerator list