KDE/kdelibs/kdecore/network
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Wed Nov 21 13:38:21 CET 2007
> Von: Shane King
> Christian Ehrlicher wrote:
> > Ok, so it looks like the compiler errors only occur with PSDK 6.0
> (without a) - I know for sure that I got them (and switched back to PSDK 5.x
> afterwards because of this).
> >
> > I would suggest to fix this problem in kdewin32 library:
> > - define inet_pton/ntop to kde_inet_pton/ntop to avoid name clashing
> with PSDK > 6
> > - on first run check for inet_pton/ntop symbols in ws2_32.dll and use
> them if possible, otherwise use the kdewin32 implementation (= the same like
> in netsupp.cpp)
> > - to not change k3socketaddress.cpp sources we define kde_inet_ntop
> inet_ntop in kdewin32 header. It should work because winsock2 is included
> before the kdewin32 header
> >
> > Is this ok?
> >
> >
> > Christian
>
> Actually, now I look through it all again, this isn't quite the complete
> solution.
>
> The current inet_ntop/pton in kdewin32 is only being built if the PSDK
> isn't set for Vista (eg _WINNT_WIN32 < 0x600 and whatever associated
> defines get set). The problem is we never set _WINNT_WIN32, so if you
> have a vista capable PSDK it's automatically enabling everything. So we
> end up linking a version of those functions against ws2_32.lib. This
> compiles successfully, but wont run on non-vista machines.
>
> Since I assume we want ultimately our compiled binaries to run on XP and
> 2000, we probably should set _WINNT_WIN32 to 0x500, hence always build
> and link against our custom inet_ntop/pton.
>
> Does this sound reasonable? If so, where should _WINNT_WIN32 be defined?
> Ideally it should be in some global header so that things stay consistent.
>
You did not understand me.
I said that I'll implement a kde_inet_pton() in kdewin32 which replaces the current implementation there. Better: I just rename the two functions. Then the check for the PSDK version is not needed anymore.
Christian
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
More information about the Kde-windows
mailing list