"Hrvoje" == Hrvoje Niksic <hniksic(a)arsdigita.com>
Hrvoje> A third, and IMHO best, solution would be for XEmacs to raise its
Hrvoje> stack size if it notices it to be too small. It's
quite easy to
Hrvoje> for someone who has access to a Digital Unix system.
I think that once again Hrvoje is right. Althouh I have access to
Digital Unix system I'm afraid that fix is not easy enough that I
could do it, but I can try if no-one else will. For start, should
the stack size be checked when starting XEmacs or can stack size be
increased just when it has been exceeded?
I'm not sure if you can raise the stack size once your program has started.
I know that you can do it for threads on digital unix very simply. We could
put code like this where appropriate.
static int __check_stack_requirements(int necessary)
struct rlimit rl;
if (getrlimit(RLIMIT_STACK,&rl) == 0)
if (rl.rlim_cur >= necessary)
/* Everything will work just fine... */
if (rl.rlim_max < necessary)
/* Maximum stack size is still too small...
** Should we just fail to start?
rl.rlim_cur = necessary;
if (setrlimit(RLIMIT_STACK, &rl))
/* Error when setting new stack size... */
and then do something like:
stderr_out ("Your regexps will be hosed...\n");