Here's a fix for building on SunOS4

Thanks to a hint from Tom Tromey, I'm off and running on SunOS4.

I'd like to submit a patch that enables building gtk on this
platform, but I need some help:

	1. where should I send it?

	2. I am inexperienced with autoconf, and thus I don't
	   quite understand how to change the configuration
	   scripts to accomodate this fix. Details below.

The problem is that SunOS4 does not have atexit. However, it
does have on_exit, which seems to be a superset of the atexit

In glib.h, there is a definition:

    #ifndef ATEXIT
    #define ATEXIT(proc)   (atexit (proc))

I think one can reasonably say, on SunOS4:

    #define ATEXIT(proc)   (on_exit(proc, 0))

Therefore a more general approach in glib.h might be:

    #ifndef HAVE_ATEXIT
    #ifdef HAVE_ON_EXIT
    #define ATEXIT(proc)   (on_exit(proc, 0))

    #ifndef ATEXIT
    #define ATEXIT(proc)   (atexit (proc))

This would require the configure script to set up HAVE_ATEXIT and/or
HAVE_ON_EXIT. It looks like there need to be some little C fragments
to check for these functions, but I'm not enough of an autoconf hacker
to understand how to make this happen in a sane way - can anyone help?

G. Paul Ziemba

"The first TV I ever owned...I threw from a third story window at a burglar"

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