From: Sam S. <sd...@gn...> - 2005-09-13 13:45:17
|
> * Dr. Werner Fink <jreare@fhfr.qr> [2005-09-13 11:46:00 +0200]: > >> > To make this work clisp.h should know about signals and the config.h >> > of clx about signal.h. >> > --- modules/clx/new-clx/clx.f >> > +++ modules/clx/new-clx/clx.f 2005-09-12 17:44:44.000000000 +0200 >> > @@ -421,6 +421,9 @@ >> > # include <time.h> >> > # endif >> > #endif >> > +#if defined(HAVE_SIGNAL_H) >> > +# include <signal.h> >> > +#endif >> > ##if WANT_XSHAPE >> > /* must include this before DEFMODULE so that DEFCHECKER will work */ >> > #include <X11/extensions/shape.h> so - why do you need to include signal.h? >> > @@ -1609,6 +1612,8 @@ >> > * Chapter 2 Displays >> > * ----------------------------------------------------------------------- */ >> > >> > +int xlib_error_handler (Display*, XErrorEvent*); >> > +int xlib_io_error_handler (Display*); >> > static Display *x_open_display (char* display_name, int display_number) { >> > Display *dpy; >> > >> > @@ -1627,6 +1632,9 @@ >> > DYNAMIC_ARRAY (cname, char, len + 5); >> > >> > begin_x_call(); >> > + /* Now link in the error handler: */ >> > + XSetErrorHandler (xlib_error_handler); >> > + XSetIOErrorHandler (xlib_io_error_handler); >> > if (strchr(display_name,':')) >> > strcpy(cname, display_name); >> > else >> > @@ -1645,8 +1653,6 @@ >> > return dpy; >> > } >> > >> > -int xlib_error_handler (Display*, XErrorEvent*); >> > -int xlib_io_error_handler (Display*); >> > DEFUN(XLIB:OPEN-DISPLAY, &rest args) >> > { /* (XLIB:OPEN-DISPLAY host &key :display &allow-other-keys) */ >> > char *display_name = NULL; /* the host to connect to */ >> > @@ -1679,12 +1685,6 @@ >> > { dpy = x_open_display(displayz,display_number); }); >> > } else dpy = x_open_display(NULL,display_number); >> > >> > - /* Now link in the error handler: */ >> > - begin_x_call(); >> > - XSetErrorHandler (xlib_error_handler); >> > - XSetIOErrorHandler (xlib_io_error_handler); >> > - end_x_call(); >> > - >> > # if !defined(RELY_ON_WRITING_TO_SUBPROCESS) >> > disable_sigpipe(); >> > # endif >> >> you are moving XSetErrorHandler/XSetIOErrorHandler from OPEN-DISPLAY >> to x_open_display - why? so, why? >> can then be called before XOpenDisplay? > AFAIK those handler can be set before XOpenDisplay(). ok. is there any benefit in doing so? > If the Xlib runs only on an error if the display > was opend with XOpenDisplay(). I don't understand this phrase. sorry. >> >> > @@ -7196,6 +7205,8 @@ >> > >> > pushSTACK(find_display (display)); >> > fehler (error, "IO Error on display ~S."); >> > + end_callback (); >> > + return 0; /* Make gcc4 happy */ >> > } >> > >> > int xlib_after_function (Display *display) >> >> fehler is declared to be non-returning. >> I don't see any gcc 4 warnings here. > > Nevertheless IMHO the end_callback() should > be called to be sure that writing_to_subprocess > is set to false. fehler does not return. whatever comes after it will not be executed anyway. >> > --- modules/clx/new-clx/config.h.in >> > --- modules/clx/new-clx/configure >> > --- src/unixconf.h.in >> >> these are generated files, please do not send a diff for them. > > Only modules/clx/new-clx/configure was generated > with autoconf and modules/clx/new-clx/config.h.in. > The patch includes the detection of signal.h > required for using writing_to_subprocess. I do not understand what you are talking about. all 3 files are generated by autoconf - just look at their headers. why is signal.h needed for writing_to_subprocess? -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.memri.org/> <http://truepeace.org> <http://www.iris.org.il> <http://www.palestinefacts.org/> <http://www.savegushkatif.org> An elephant is a mouse with an operating system. |