# Unfortunate macro expansions leading to incorrect function names

- Thread: https://externals.io/message/27071
- Original archive: https://news-web.php.net/php.internals/27071
- Started by Hannes Magnusson on 2006-12-18T19:29:30+00:00
- Messages: 2
- 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

---

## #27071 — Hannes Magnusson — 2006-12-18T19:29:30+00:00

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

Hi all

Looking over skipped tests I noticed, one minor version to late, that
 `inet_ntop()` and `inet_pton()` are not available on fbsd. The reason is
unfortunate macro expansion where inet_ntop & inet_pton get expanded
to __inet_ntop & __inet_pton ergo => inet_ntop/pton() are named
__inet_ntop/pton().

Attached is a patch adding ZEND_RAW_NAMED_FE/FENTRY macros fixing this
issue. It also fixes the never ending libiconv()/iconv() saga (which
can still be reproduced on fbsd with --with-iconv --with-xmlrpc).

Objections? Comments?

-Hannes

---

## #27074 — Ilia Alshanetsky — 2006-12-18T19:40:34+00:00

URL: https://externals.io/message/27071#27074 · In reply to: #27071

Looks fine to me.

+1




> Hi all
>
> Looking over skipped tests I noticed, one minor version to late, that
> `inet_ntop()` and `inet_pton()` are not available on fbsd. The reason is
> unfortunate macro expansion where inet_ntop & inet_pton get expanded
> to __inet_ntop & __inet_pton ergo => inet_ntop/pton() are named
> __inet_ntop/pton().
>
> Attached is a patch adding ZEND_RAW_NAMED_FE/FENTRY macros fixing this
> issue. It also fixes the never ending libiconv()/iconv() saga (which
> can still be reproduced on fbsd with --with-iconv --with-xmlrpc).
>
> Objections? Comments?
>
> -Hannes
> <macro.expand.patch.txt>
> -- 
> 
> 

Ilia Alshanetsky
