Compilation issue with mysql/php & HP-ux

php.internals

David Hill (php.net)

23 years ago
Hi gents, The hp-ux compiler has an issue with a couple of lines in ext/mysql/libmysql/my_tempnam.c in the php 4_3 & PHP5 code stream. There are two uneeded lvalue casts that the compiler chokes on. Any chance that you guys can fix this ? Diff attached. thanks, Dave

Zak Greant

23 years ago
On April 24, 2003 13:40, David Hill wrote:
> Hi gents, > The hp-ux compiler has an issue with a couple of lines in > ext/mysql/libmysql/my_tempnam.c in the php 4_3 & PHP5 code stream. There > are two uneeded lvalue casts that the compiler chokes on. > > Any chance that you guys can fix this ?
Hi David, The odd cast was used as a way to force some systems to let us update environ with a char ** pointer. In versions of the code later than this, we have had to switch to: (*(char***) &environ)=(char**) temp_env; as a way to deal with the IBM compiler under AIX not allowing us to cast the value of environ. How does this change work out for you? --zak

Jani Taskinen

23 years ago
Zak, you're late. I already updated this file to one from Mysql 4.0.12. :) --Jani On Mon, 28 Apr 2003, Zak Greant wrote:
>On April 24, 2003 13:40, David Hill wrote: >> Hi gents, >> The hp-ux compiler has an issue with a couple of lines in >> ext/mysql/libmysql/my_tempnam.c in the php 4_3 & PHP5 code stream. There >> are two uneeded lvalue casts that the compiler chokes on. >> >> Any chance that you guys can fix this ? > > Hi David, > > The odd cast was used as a way to force some systems to let us update > environ with a char ** pointer. > > In versions of the code later than this, we have had to switch to: > > (*(char***) &environ)=(char**) temp_env; > > as a way to deal with the IBM compiler under AIX not allowing us to cast the > value of environ. > > How does this change work out for you? > > --zak > >
-- <- For Sale! ->

Sascha Schumann

23 years ago
On Mon, 28 Apr 2003, Jani Taskinen wrote:
> > Zak, you're late. I already updated this file to one from > Mysql 4.0.12. :)
Not good. The client library in MySQL 4.x is GPLed code. If you really copied over the whole file, then our repository is tainted now with the GPL. Such infected pieces need to be removed immediately. - Sascha