PHP 4.0 Bug #9703 Updated: missing alloca-prototype in AIX
| From: | andreas at erestor dot f2s dot com | Date: | Tue, 13 Mar 2001 17:18:55 +0000 |
| Subject: | PHP 4.0 Bug #9703 Updated: missing alloca-prototype in AIX | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48815@lists.php.net to get a copy of this message | ||
ID: 9703
User Update by: andreas@erestor.f2s.com
Status: Open
Bug Type: Compile Failure
Description: missing alloca-prototype in AIX
The alloca.h file, I wrote, is this:
#ifndef _H_ALLOCA
#define _H_ALLOCA
#pragma alloca
#ifdef _NO_PROTO
extern void *alloca();
#else /* _NO_PROTO */
#include <stdlib.h> /*size_t is defined in here*/
extern void *alloca(size_t);
#endif /* _NO_PROTO */
#endif /* _H_ALLOCA */
Regards
Andreas Pistoor
Previous Comments:
---------------------------------------------------------------------------
[2001-03-12 08:29:42] andreas@erestor.f2s.com
Hi, I got this symptom by compiling PHP:
xlc -I. -I/home/pistoor/php-4.0.4pl1/main -I/home/pistoor/php-4.0.4pl1/main
-I/home/pistoor/php-4.0.4pl1 -I/home/pistoor/php-4.0.4pl1/Zend
-I/home/pistoor/php-4.0.4pl1/ext/mysql/libmysql -I/home/pistoor/php-4.0.4pl1/ext/xml/expat/xmltok
-I/home/pistoor/php-4.0.4pl1/ext/xml/expat/xmlparse -I/home/pistoor/php-4.0.4pl1/TSRM
-DXML_BYTE_ORDER=21 -qsource -qshowinc -c main.c && touch main.lo
"main.c", line 1181.17: 1506-068 (S) Operation between types "char*" and
"int" is not allowed.
"main.c", line 1250.47: 1506-280 (E) Function argument assignment between types
"const unsigned char*" and "const char*" is not allowed.
"main.c", line 1250.22: 1506-068 (E) Operation between types "char*" and
"unsigned char*" is not allowed.
I use the xlc-version of the C Set ++ for AIX compiler, as it is more ANSI-C than the cc-version.
It also shows more errors.
My configuration of PHP (as a CGI-program to be used by Lynx):
CC=xlc ./configure --prefix=/home/pistoor/php
--with-config-file-path=/home/pistoor/php --enable-debug
--enable-sigchild --enable-calendar --enable-ftp
--enable-trans-sid --enable-shmop --with-regex=php
--enable-sysvsem --enable-sysvshm --enable-wddx
--enable-yp
I found, that the prototype of alloca was missing. It is not in any file in /usr/include at my
computer. This causes the warning in line 1181. So I wrote the prototype myself into a headerfile
alloca.h, edited (again) config.cache and rerun configure.
The errors on line 1250 were caused by the mix of char and unsigned char at the call to
php_base64_decode. I inserted type casts there.
Regard
Andreas Pistoor
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=9703