Building PHP. Clean builds. Noisy redefines.
| From: | Richard Quadling | Date: | Tue, 22 Apr 2008 11:01:05 +0000 |
| Subject: | Building PHP. Clean builds. Noisy redefines. | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-37160@lists.php.net to get a copy of this message | ||
Hi.
Probably much to all your annoyance, I've finally managed to compile
PHP on windows and I have a few questions.I'm very much just learning.
I notice that there are a LOT of warnings when I'm compiling. The huge
majority are benign.
But, is there a reason to not fix the issue and make the code unambiguous?
Things like (just grabbed from screen) ...
main\streams\userspace.c(823) : warning C4244: '=' : conversion from
'long' to '_ino_t', possible loss of data
main\streams\userspace.c(824) : warning C4244: '=' : conversion from
'long' to 'unsigned short', possible loss of data
main\streams\userspace.c(825) : warning C4244: '=' : conversion from
'long' to 'short', possible loss of data
The way I look at this, is that a long was used for some reason, so,
theoretically, it could hold a value which cannot be converted to the
destination type without a problem.
Another warning is that some of the constants are redefined to a
different value from the ones that are part of the compiler. The
/TRSM/readdir.h, _WIN32_WINNT is redefined from 0x0600 in C:\Program
Files\Microsoft SDKs\Windows\v6.1\include\sdkddkver.h(186).
This 1 #define causes a LOT of noise during compilation. I know I
could suppress all the warnings, but with so much noise, how does
anyone see the true warnings in the noise?
By adding a #undef _WIN32_WINNT before #define _WIN32_WINNT 0x0400,
this removes the warning. It is more or less every .c compile.
Regards,
Richard Quadling.
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"