Gerrit Voss wrote:
Hi,
On Mon, 2004-09-27 at 12:53, Chad Austin wrote:
Gerrit Voss wrote:
> [snip]
We are including windows.h which should be enough as it
includes winsock2.h, which contains slightly different declarations from
winsock.h and both are not well protected from each other giving a lot
of fun if things go wrong.
Just FYI, windows.h does not include winsock.h if WIN32_LEAN_AND_MEAN is
defined, so it's generally a good idea to include it directly if you
really want it.
not really, try the follwoing :
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock.h>
#include <winsock2.h>
and enjoy. Distributing not well protected headers with similar
declarations throughout your code is, well, going to be funny sooner
or later. BTW reversing the include order of winsock.h and winsock2.h
works. And you can bet sooner or later you will find both includes and
somebody starts changing include orders slightly and the fun starts ;-))
That's why I prefer to let windows.h take care of all these interesting
approaches MS used for windows.
Or you could sidestep the issue entirely and not even include those evil
headers in OpenSG headers at all... ;) Make an osgntohl, etc. in some
cpp file and use that instead of ntohl.
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users