From: kprzemek at coig dot katowice dot pl
Operating system: IBM AIX 5.3
PHP version: 5.2.0
PHP Bug Type: Compile Failure
Bug description: Some error in C/C++ syntax
Description:
------------
Since the release of version 5.0 the same errors still appear in the
repository. These are the C/C++ syntax error, which are ignored by GCC.
However, while compiling the code under IBM C/C++ they cause critical
errors and STOP the compilation. These are just several errors. Could you
please correct them, I'm sure that everyone compiling without GCC will be
grateful for that. Below you can find the list of files and location of
the errors and my fixes(diff).
Reproduce code:
---------------
# diff openssl.c new/openssl.c
61c61
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
72c72
< OPENSSL_KEYTYPE_DEFAULT = OPENSSL_KEYTYPE_RSA,
---
> OPENSSL_KEYTYPE_DEFAULT = OPENSSL_KEYTYPE_RSA
==============
type redefine:
# diff parse_date.c new/parse_date.c
88c88,91
< typedef unsigned char uchar;
---
> /* Type exist in sys/types.h !!
> *
> * typedef unsigned char uchar;
> */
=================
# diff php_hash_tiger.h new/php_hash_tiger.h
28,29c28,29
< unsigned char passes:1;
< unsigned char length:7;
---
> unsigned int passes:1;
> unsigned int length:7;
===================
Last table element:
# diff php_pcre.c new/php_pcre.c
55c55
< PHP_PCRE_BAD_UTF8_ERROR,
---
> PHP_PCRE_BAD_UTF8_ERROR
=================
# diff php_spl.c new/php_spl.c
646c646
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
653c653
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
====================
Last table element:
# api.h new/php_stream_filter_api.h <
65c65
< PSFS_PASS_ON, /* filter generated output buckets; pass them on
to next in chain */
---
> PSFS_PASS_ON /* filter generated output buckets; pass them on
to next in chain */
=====================
Last table element:
# diff spl_directory.h new/spl_directory.h
38c38
< SPL_FS_FILE,
---
> SPL_FS_FILE
======================
C is NOT php:
# diff spl_iterators.c new/spl_iterators.c
754c754
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
759c759
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
764c764
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1484c1484
< return;// NULL
---
> return; /* NULL */
1640c1640
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1657c1657
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1684c1684
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1689c1689
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1694c1694
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1699c1699
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1720c1720
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1852c1852
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1864c1864
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
1869c1869
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2232c2232
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2237c2237
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2242c2242
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2248c2248
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2307c2307
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2326c2326
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2410c2410
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
2643c2643
< ZEND_END_ARG_INFO();
---
> ZEND_END_ARG_INFO()
===============
last table element:
# diff spl_iterators.h new/spl_iterators.h
95c95
< REGIT_USE_KEY = 0x00000001,
---
> REGIT_USE_KEY = 0x00000001
104c104
< REGIT_MODE_MAX,
---
> REGIT_MODE_MAX
=====================
Add for IBM C/C++:
# diff zend_alloc.c new/zend_alloc.c
265a266
> #if ZEND_DEBUG
272a274
> # endif
---
#if ZEND_DEBUG
typedef enum _mem_magic {
MEM_BLOCK_VALID = 0x7312F8DC,
MEM_BLOCK_FREED = 0x99954317,
MEM_BLOCK_CACHED = 0xFB8277DC,
MEM_BLOCK_GUARD = 0x2A8FCC84,
MEM_BLOCK_LEAK = 0x6C5E8F2D
} mem_magic;
# endif
--
Edit bug report at http://bugs.php.net/?id=39975&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39975&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39975&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39975&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39975&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39975&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39975&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39975&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39975&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39975&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39975&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39975&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39975&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39975&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39975&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39975&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39975&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39975&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39975&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39975&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39975&r=mysqlcfg