Reply-To: [EMAIL PROTECTED]
Hi all!
I'm interesting in porting shttpd to 64 bits (win/un*x). Under Windows
using -Wp64 we get a few warnings:
string.c(73) : warning C4267: '=' : conversion from 'size_t' to 'int',
possible loss of data
shttpd.c(106) : warning C4244: '=' : conversion from '__w64 int' to
'int', possible loss of data
shttpd.c(108) : warning C4267: '=' : conversion from 'size_t' to 'int',
possible loss of data
shttpd.c(150) : warning C4244: '=' : conversion from 'SOCKET' to 'int',
possible loss of data
...
Under Windows 64 bits sockets are 8 bytes, against the usual 4 bytes.
Sock variable declaration should abstract this.
#if defined WINDOWS
typedef SOCKET sock_t;
#else
typedef int sock_t;
#endif
...
sock_t sock = socket(PF_INET, SOCK_STREAM, 6);
The changes are trivial, but a patch will touch a lot of code. Do you
want me to go ahead and submit a patch ?
http://www.ibm.com/developerworks/library/l-port64.html
http://msdn2.microsoft.com/en-us/library/3b2e7499(VS.71).aspx
http://developers.sun.com/solaris/articles/ILP32toLP64Issues.html
http://en.wikipedia.org/wiki/64-bit
Best Regards,
Rui
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general