php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9703 missing alloca-prototype in AIX
Submitted: 2001-03-12 08:29 UTC Modified: 2001-06-02 20:42 UTC
From: andreas at erestor dot f2s dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4pl1 OS: AIX 4.3
Private report: No CVE-ID: None
 [2001-03-12 08:29 UTC] andreas at erestor dot f2s dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-13 18:18 UTC] andreas at erestor dot f2s dot com
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
 [2001-06-02 20:42 UTC] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

-Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 04:01:29 2024 UTC