From: china at thewrittenword dot com
Operating system: Tru64 UNIX 4.0D
PHP version: 4.3.2
PHP Bug Type: Compile Failure
Bug description: va_arg macro error in Zend/zend.c
Description:
------------
Tru64 UNIX 4.0D doesn't have vsnprintf(). So, the following code in
Zend/zend.c is built:
strncpy(z_error_message->value.str.val, va_arg(format,
char *), ZEND_ERROR_BUFFER_SIZE);
Unfortunately, va_arg() in <varargs.h> on Tru64 UNIX expects the first
argument ("format" in this case) to be of type struct va_list. Hence the
error:
cc: Error: /opt/build/php-4.3.2/Zend/zend.c, line 763: In this
statement, "(format)" has a pointer type, but occurs in
a context that requires a union or struct. (needstruct)
strncpy(z_error_message->value.str.val, va_arg(format,
char *), ZEND_ERROR_BUFFER_SIZE);
----------------------------------------------------------------^
gmake: *** [Zend/zend.lo] Error 1
In <va_list.h>, va_list is defined as:
typedef struct {
char **_a0;
int _offset;
} va_list;
I checked out CVS head and replaced the offending 4.3.2 Zend/zend.c code
with CVS Zend/zend.c and it built ok. Is that the proper solution?
--
Edit bug report at http://bugs.php.net/?id=24182&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24182&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24182&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24182&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24182&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24182&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24182&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24182&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24182&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24182&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24182&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24182&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24182&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24182&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24182&r=gnused