[php-src] Issue #8142: Compilation error on cygwin
| From: | pgy866 | Date: | Wed, 16 Mar 2022 12:07:04 +0000 |
| Subject: | [php-src] Issue #8142: Compilation error on cygwin | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240362@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8142
Comment Author: pgy866
I am running php8.1.3 on DEEPIN 20.4, and the following error occurred
```
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/main/php.h:22,
from /home/yaoying/Desktop/php-8.1.3/php-8.1.3/ext/intl/intl_convertcpp.cpp:20:
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h: In function ‘void
zend_string_free(zend_string*)’:
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_alloc.h:195:48: error: third operand to the
conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor
of type ‘void’
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
^~~~
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h:306:3: note: in expansion of macro
‘pefree’
pefree(s, GC_FLAGS(s) & IS_STR_PERSISTENT);
^~~~~~
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h: In function ‘void
zend_string_release(zend_string*)’:
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_alloc.h:195:48: error: third operand to the
conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor
of type ‘void’
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
^~~~
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h:322:4: note: in expansion of macro
‘pefree’
pefree(s, GC_FLAGS(s) & IS_STR_PERSISTENT);
^~~~~~
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_hash.h: In function ‘void
zend_hash_release(zend_array*)’:
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_alloc.h:195:48: error: third operand to the
conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor
of type ‘void’
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
^~~~
/home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_hash.h:359:4: note: in expansion of macro
‘pefree’
pefree(array, GC_FLAGS(array) & IS_ARRAY_PERSISTENT);
^~~~~~
make: *** [Makefile:1490:ext/intl/intl_convertcpp.lo]
```