# Compilation issue with mysql/php & HP-ux

- Thread: https://externals.io/message/1031
- Original archive: https://news-web.php.net/php.internals/1031
- Started by David Hill on 2003-04-24T19:40:07+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1031 — David Hill — 2003-04-24T19:40:07+00:00

URL: https://externals.io/message/1031#1031

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

---

## #1065 — Zak Greant — 2003-04-28T13:28:42+00:00

URL: https://externals.io/message/1031#1065 · In reply to: #1031

> 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

---

## #1070 — Jani Taskinen — 2003-04-28T16:09:25+00:00

URL: https://externals.io/message/1031#1070 · In reply to: #1065

Zak, you're late. I already updated this file to one from
    Mysql 4.0.12. :)
    
    --Jani
    



>
> > […]
>
>  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!

---

## #1072 — Sascha Schumann — 2003-04-28T16:21:27+00:00

URL: https://externals.io/message/1031#1072 · In reply to: #1070

>
>     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
