php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13611 Fix of #6756 breaks compiling on AIX
Submitted: 2001-10-09 07:27 UTC Modified: 2001-12-07 13:11 UTC
From: perske at uni-muenster dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.6 OS: AIX 4.3.3 with C compiler 3.x
Private report: No CVE-ID: None
 [2001-10-09 07:27 UTC] perske at uni-muenster dot de
configure --enable-discard-path --enable-force-cgi-redirect --enable-memory-limit --enable-dbase --enable-ftp --enable-calendar --enable-wddx --enable-socket ; make

ext/sockets/sockets.c line 38 causes the system-defined
_XOPEN_SOURCE_EXTENDED to be redefined from a numeric value to an empty value. This later breaks compilation because the numeric value will be used in another system header file containing a statement

#if _XOPEN_SOURCE_EXTENDED==1




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-21 07:12 UTC] mfischer@php.net
Can you try if this still happens with latest RC

http://www.php.net/~zeev/php-4.1.0RC3.tar.gz

If so, can you try replacing the line 

#define _XOPEN_SOURCE_EXTENDED

with

#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#endif

and see if it works?

Feedback.
 [2001-11-29 10:38 UTC] perske at uni-muenster dot de
Using my configure line reported earlier, PHP 4.1.0RC3 compiles without the reported bug.

(I'd like to see the #ifndef-#define-#endif construct nevertheless, it's the art of defensive programming :-) .)

But compilations succeeds only if you set

  CC='cc -ma' ; export CC

prior to running configure; otherwise make fails in the linkage step because alloca() is available only as a builtin function, not as a library function, on the given system/compiler environment. Perhaps it is possible to check the need for the -ma option during configuration?
(The only purpose of -ma on the given system ist to activate the builtin alloca().)

 [2001-11-29 10:41 UTC] mfischer@php.net
4.1.0RC3 works -> closed.
 [2001-12-07 13:11 UTC] sniper@php.net
Just to note that PHP 4.2.0 will also compile without -ma in CFLAGS.
You can test the latest CVS snapshot:

http://snaps.php.net/

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 01:01:31 2024 UTC