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

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

 



Tor Lillqvist wrote:
Rick Jones writes:
> the first complaint out of the > compiler (among many :) is that in line 239 of gutils.h atexit is being > redefined with different type modifiers (error C2373)
Hmm, does it help to make the declaration
 int __cdecl atexit(void (__cdecl *)(void));
instead?
I thought about trying that, which then got me in the "fun" of trying to 
use notepad :)  I'll see about moving the file around to where it can be 
edited with something useful.
 > Notepad is useless for looking at the include file (pointers on that 
 > score most welcome)
Notepad doesn't handle the Unixish line-endings of just one newline
(linefeed) character. Wordpad handles them fine, but presumably you
want some real text editor instead. (Or an IDE, even.)
Got emacs?-)  I'd not heard of wordpad - and it doesn't seem to be on 
the system to which I have access - pointer?  I'm enough of a stone 
knives and bearskins type I don't really care to get involved in an IDE.
 > #ifdef G_OS_WIN32
 > /* It's a bad idea to wrap atexit() on Windows. If the GLib DLL calls
 >   * atexit(), the function will be called when the GLib DLL is detached
 >   * from the program, which is not what the caller wants. The caller
 >   * wants the function to be called when it *itself* exits (or is
 >   * detached, in case the caller, too, is a DLL).
 >   */
 > int atexit (void (*)(void));
 > #define g_atexit(func) atexit(func)
 > #endif
> > am I just missing something really simple? I would have thought that > would be an extern int right?
"an" extern int? atexit() is a function.
sloppy wording on my part, sorry.

all the good discussion of g_atexit deleted.  indeed, in my previous 
searches of the archives etc I did come across those points about 
g_atexit/atexit.  At present I've no particular plans to use [g_]atexit, 
just want to get the DDK compiler happy with the .h file :)
thanks,

rick jones

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux