Gerrit Voss wrote:
> Hi,
> 
> On Sun, 2006-07-23 at 13:35 -0500, Dirk Reiners wrote:
>>      Hi all,
>>
>> On Sun, 2006-07-23 at 12:58 +0800, Gerrit Voss wrote:
>>> besides
>>>
>>> #ifdef WIN32_LEAN_AND_MEAN
>>> #undef WIN32_LEAN_AND_MEAN
>>> #endif 
>>>
>>> in OSGConfig.h ;-)
>> ;)
>>
>>> my favorite would be to make OpenSG use WIN32_LEAN_AND_MEAN as my hope 
>>> would be that if it works with this define set it should work without
>>> it. The other way round does not seem to work. The reason we had not to
>>> use WIN32_LEAN_AND_MEAN was that the MS winsock headers were not
>>> guarded properly so depending on your include order of windows.h,
>>> winsock.h and winsock2.h the compilation could fail. But this might
>>> have changed with more recent compiler versions. I'll give it a try
>>> once I'm in front of a windows machine again.

I am pretty sure that that isn't fixed. I have run into that problem myself
with Visual C++ 7.1.

>> I don't know if I want to depend on MS to fix problems in their
>> headers... Especially in header that they consider obsolete.
> 
> this was more a in case they have we could switch, if not than we have
> to find a different solution (and I guess patching MS headers does
> not count ;-)))
> 
>> I would rather try to keep our headers as MS-free as we can. In this,
>> case, move the implementation into the cpp, as the function is not
>> time-critical anyway.
> 
> unfortunately this is not as easy as it looks, from an older
> discussion :
> 
>>> Are you sure about this only GL/GLAux.h needs windows.h. Getting   
>>> rid of the windows.h include would be really nice.
>> GL/gl.h uses WINGDIAPI and APIENTRY which are defined in windows.h.  It's 
>> rather 
>> annoying.  :|

In my experience, everything on Windows seems to depend on windows.h being
included first.

> but these should be available even with WIN32_LEAN_AND_MEAN. So we still 
> could switch and
> as we moved the getHostname implementation to the cpp file it should not be a 
> problem.
> The only question would be to export or not to export the WIN32_LEAN_AND_MEAN 
> define from
> osgConfig. IMHO not would be the better choice as it allows the user to 
> choose. Also it would
> force us to keep OpenSG clean to avoid similar problems in future.

This sounds good to me.

 -Patrick


-- 
Patrick L. Hartling                    | VP Engineering, Infiscape Corp.
PGP: http://tinyurl.com/2msw3          | http://www.infiscape.com/

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to