I just downloaded 1.1.21 and I tried to compile it under Solaris.  The
build breaks early while compiling libgimp, with the following error:

gimp.c: In function `gimp_main':
gimp.c:202: `SA_NOMASK' undeclared (first use in this function)
gimp.c:202: (Each undeclared identifier is reported only once
gimp.c:202: for each function it appears in.)
make[2]: *** [gimp.lo] Error 1
make[2]: Leaving directory `/Local/build/gimp-1.1.21/libgimp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Local/build/gimp-1.1.21'
make: *** [all-recursive-am] Error 2

Fortunately, I have access to a Linux box from which I could see what
this mysterious SA_NOMASK was supposed to be.  A comment in the file
/usr/include/asm/signal.h says:

[...]
 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 * Unix names RESETHAND and NODEFER respectively.
 */

The file libgimp/gimp.c uses the correct SA_RESETHAND together with
the obsolete SA_NOMASK instead of SA_NODEFER.  Because of this, I
suppose that it is impossible to compile the Gimp on any UNIX-like
system except for Linux.

The patch, appended below, is trivial: simply replace all occurences
of SA_NOMASK with the correct symbol SA_NODEFER.  This solves the
problem under Solaris, at least.  But maybe it would not be more
appropriate to add some #ifdef HAVE_SA_xxx in the code, together with
some extra tests in configure.in.

Note: I am reporting this to the list because I am not sure if the
Gnome bug tracker and Xach's bug report form are working or not.  On
Friday, I tried to report a bug (about drawing straight lines in
different views of the same image) but I did not get the usual e-mail
confirmation and my bug report was probably lost.  Can anyone confirm
that the form and the bug tracker are working?

-Raphael


-----------------------------------------------------------------------------

--- libgimp/gimp.c~     Mon May  1 19:43:17 2000
+++ libgimp/gimp.c      Tue May  2 17:14:12 2000
@@ -199,21 +199,21 @@
    * has been built with MSVC, and the user has MSVC installed.
    */
   gimp_signal_private (SIGHUP,  gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGINT,  gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGQUIT, gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGBUS,  gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGSEGV, gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGPIPE, gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGTERM, gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
   gimp_signal_private (SIGFPE,  gimp_plugin_signalhandler,
-                      SA_RESETHAND | SA_NOMASK);
+                      SA_RESETHAND | SA_NODEFER);
 #endif
 
 #ifndef G_OS_WIN32

Reply via email to