This leaves the question as to what macros it is safe to use before calling
g_thread_init.

I can look up the current definition of MIN and see, that yes it does
not involve
a function call, but that could change without notice in the next point release.

I guess that macros that are advertised to be constant in the sense that they
can be used at the preprocessor level are safe.  But all in all, this situation
is a bit of a mess.

M.


And in case you wonder.  I need to run this code before threads get initialized:

#ifdef HAVE_SYS_RESOURCE_H
        struct rlimit rlim;

        if (getrlimit (RLIMIT_STACK, &rlim) == 0) {
                rlim_t our_lim = 64 * 1024 * 1024;
                if (rlim.rlim_max != RLIM_INFINITY)
                        our_lim = MIN (our_lim, rlim.rlim_max);
                if (rlim.rlim_cur != RLIM_INFINITY &&
                    rlim.rlim_cur < our_lim) {
                        rlim.rlim_cur = our_lim;
                        (void)setrlimit (RLIMIT_STACK, &rlim);
                }
        }
#endif
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to