# Bug #45068: SIZEOF_LONG, etc. when cross compiling

- Thread: https://externals.io/message/40199
- Original archive: https://news-web.php.net/php.internals/40199
- Started by Matt Wilmas on 2008-09-01T13:30:44+00:00
- Messages: 1
- 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

---

## #40199 — Matt Wilmas — 2008-09-01T13:30:44+00:00

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

Hi all,

SIZEOF_LONG is getting #define'd as 8 when compiling for 32-bit on 64-bit
(is it possible to do the opposite, maybe switched there too?).  It also
makes MAX_LENGTH_OF_LONG be set wrong, causing the problem in Bug #45068.
There are some other places in the code where incorrect code may be used
because of wrong SIZEOF_LONG.

Is this something that can be easily fixed by one of the build system
people?  If not, what about setting it (or checking and correcting if
needed) in a PHP .h file, instead of the configure script, according to the
value of LONG_MAX or something? *shrug*  BTW, it looks like the same thing
is probably happening for other SIZEOF_* #define's.

Well, hopefully someone can look into it! :-]


Thanks,
Matt
