Re: glib\guitls.h, atexit and the windows DDK



Tor Lillqvist wrote:
Rick Jones writes:
 > int __cdecl atexit(void (__cdecl *)(void));

 > did indeed make the error go away when compiling under the DDK.

What compiler is used in that case, BTW, as I get no errors or
warnings when compiling a program that includes both stdlib.h (where
the official declaration of atexit() is) and gutils.h (without any
__cdecl) either with MSVC6 or MSVC8?

I'm using whatever compiler happens to come with the DDK. In this case it appears to be "Windows DDK 3790.1830" A/The DDK was used for netperf2, and was I believe used for libxml2. FWIW, the netperf2 code is I'm told also compilable with MSVCsomething, but I've not done that myself.

http://www.netperf.org/svn/netperf2/trunk/README.windows

I hope you aren't using some compiler switch that makes something else
than __cdecl the default calling convention for functions without
explicitly specified calling convention? Or do the DDK headers do
this, but don't pop the default back? The GLib (and GTK+, etc) headers
don't specify any calling convention, and things will go horribly
wrong if you compile code that calls GLib, GTK+ etc functions with the
wrong calling convention. We haven't wanted to uglify the GLib, GTK+,
etc headers by adding explicit calling convention decorations for
Win32's sake, and nobody has complained so far.

I've no idea. My port isn't far enough along to know if anything actually _works_ or not.

rick


--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]