SUMMARY: posix_signal error compiling elm 2.4 pl25

From: Michael Rush <Michael.Rush_at_jcu.edu.au>
Date: Wed, 19 Jun 1996 17:16:49 +1000 (EST)

The original query related to a problem compiling elm 2.4 pl25 under V3.2.
There was an error with a redeclaration of 'posix_signal'. The full text
of the query appears at the end of this message.

The solutions offered were:

1. In config.h undefine POSIX_SIGNALS and recompile. This gives a few
warnings on compilation. This is what I originally did.

2. In config.h, modify SIGHAND_TYPE from int to void and recompile.

3. When running Configure, shell escape to edit the config.sh when it
prompts you to do so. In this file, change sigtype from 'int' to 'void'
and continue to the end of Configure as normal. Then make as normal.

I tried the last suggestion and the make compiled cleanly with no
errors or warnings.

It seems like Configure determines the return type of signal to be int and
should be void.

Thanks to these people who kindly helped:
        Doug Johnson <drjohn_at_pizero.colorado.edu>
        David C. Tuttle" <dct_at_odin.mdacc.tmc.edu>
        Mahendra Vallabh (Mike) <mike_at_phys.waikato.ac.nz>

Cheers, Michael

The original query follows:

We're running DEC Unix V3.2 148 and trying to compile elm 2.4 pl25.
After running the Configure script I try to make all. Compiling
get_tz.c I get the error:

cc -O -I../hdrs -c get_tz.c
/usr/lib/cmplrs/cc/cfe: Error: /usr/include/sys/signal.h, line 74: redeclaration
 of 'posix_signal'; previous declaration at line 672 in file '../hdrs/defs.h'
 extern void (*posix_signal ()) ();
 --------------^
/usr/lib/cmplrs/cc/cfe: Error: /usr/include/sys/signal.h, line 74: Incompatible
function return type for this function
 extern void (*posix_signal ()) ();
 ---------------------------^
*** Exit 1
Stop.
*** Exit 1
Stop.

I can get around this problem by undefining POSIX_SIGNALS in
config.h (or undefining d_sigaction in config.sh), but I'm not sure if,
by doing this, it's going to muck things up further down the track.

Has anyone had this problem? Have I configured things wrongly? Is this
the best way of getting around the problem?

Cheers,
Michael
-------------------------------------------------------------------------
                           || || *
 _--_|\,-- From Townsville || Michael Rush || * *
/ \ in sunny || James Cook University || '
\_.--._/ North Queensland || Computer Centre || *
      v AUSTRALIA. ||Internet : michael.rush_at_jcu.edu.au ||
=========================================================================
Received on Wed Jun 19 1996 - 09:46:41 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT