os_dep.c 

Tyson Richard DOWD trd at cs.mu.oz.au
Fri Aug 8 00:48:31 AEST 1997


(This is mostly for fjh's benefit, since we have been discussing some
patches needed to get boehm_gc/os_dep.c to work under glibc 2.0. For
everyone else, at very least it's yet another example of why switching
on the operating system doesn't work).

Ok, here's the error message when compiling:

In file included from /usr/include/signal.h:45,
                 from os_dep.c:34:
/usr/include/signum.h:23: warning: `SIG_ERR' redefined
/usr/include/asm/signal.h:84: warning: this is the location of the
previous definition
/usr/include/signum.h:24: warning: `SIG_DFL' redefined
/usr/include/asm/signal.h:82: warning: this is the location of the
previous definition
/usr/include/signum.h:25: warning: `SIG_IGN' redefined
/usr/include/asm/signal.h:83: warning: this is the location of the
previous definition
In file included from /usr/include/signal.h:201,
                 from os_dep.c:34:
/usr/include/sigaction.h:47: warning: `SA_NOMASK' redefined
/usr/include/asm/signal.h:60: warning: this is the location of the
previous definition
/usr/include/sigaction.h:48: warning: `SA_ONESHOT' redefined
/usr/include/asm/signal.h:61: warning: this is the location of the
previous definition
In file included from os_dep.c:34:
/usr/include/signal.h:48: warning: redefinition of `__sighandler_t'
/usr/include/asm/signal.h:80: warning: `__sighandler_t' previously
declared here
/usr/include/signal.h:164: conflicting types for `sigset_t'
/usr/include/asm/signal.h:4: previous declaration of `sigset_t'
In file included from /usr/include/signal.h:201,
                 from os_dep.c:34:
/usr/include/sigaction.h:22: redefinition of `struct sigaction'
make[1]: *** [os_dep.o] Error 1
make[1]: Leaving directory
`/usr/home/trd/mercury/rotd/mercury-rotd-1997-07-28/boehm_gc'
make: *** [submake] Error 2


This patch will allow it to compile cleanly (and work, I dare say).

cvs diff: in directory .:
cvs diff: ignoring CVS/Root because it specifies a non-existent
repository /home/staff/zs/imp
cvs server: Diffing .
Index: os_dep.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/os_dep.c,v
retrieving revision 1.9
diff -u -r1.9 os_dep.c
--- os_dep.c    1997/03/06 02:51:19     1.9
+++ os_dep.c    1997/08/07 14:14:26
@@ -23,9 +23,11 @@
     /* for some early 1.3.X releases.  Will hopefully go away soon.  */
     /* in some later Linux releases, asm/sigcontext.h may have to */
     /* be included instead.  */
+# if 0
 #   define __KERNEL__
 #   include <asm/signal.h>
 #   undef __KERNEL__
+# endif
 # endif
 # if !defined(OS2) && !defined(PCR) && !defined(AMIGA) &&
!defined(MACOS)
 #   include <sys/types.h>

This stops it working under hydra or mercury, however.

I don't think there's an easy solution to this just yet, so perhaps
we could supply a patch for use with glibc 2.

-- 
       Tyson Dowd           #          Another great idea from the 
                            #            people who brought you
      trd at .cs.mu.oz.au      #               Beer Milkshakes!
http://www.cs.mu.oz.au/~trd #	         Confidence --- Red Dwarf



More information about the developers mailing list