Problems compiling RCS sources
Jan Willem de Bruijn
jwdb at dutnak2..tudelft.nl
Thu Jul 19 01:57:47 AEST 1990
I have trouble with the building of the Revision Control System.
On both our CONVEX and a DEC3100 workstation compiling fails
with the source of 'rcsutil.c' with the following message:
cc -O -DV4_2BSD -DSIGNAL_TYPE=void -DSTRICT_LOCKING=0 -DDIFF='"/bin/diff"' \
-DCO='"/usr/local/bin/co"' -DMERGE='"/usr/local/bin/merge"' \
-c rcsutil.c -o rcsutil.o
ccom: Error: rcsutil.c, line 316: operands of : have incompatible types
signal(sig[i], ((void (*)())( 1))) == ((void (*)())( 1)) ?
((void (*)())( 1)) : catchsig;
ccom: Warning: rcsutil.c, line 316: illegal combination of pointer and integer,
op =
signal(sig[i], ((void (*)())( 1))) == ((void (*)())( 1)) ?
((void (*)())( 1)) : catchsig;
It obviously has something to do with the SIGNAL_TYPE, but both (void)
and (int) fail (although with slightly different error messages).
If someone with any experience can shed some light on this,
could (s)he please let me know.
Below are included the relevant parts of the source (where I have
added the line numbers of the lines as labels) :
static SIGNAL_TYPE catchsig(s)
{
ignoreints();
diagnose("\nRCS: cleaning up\n");
VOID cleanup();
exit(2);
#ifdef lint
catchsig(s);
#endif
}
static sig[] = {SIGINT,SIGHUP,SIGQUIT,SIGPIPE,SIGTERM};
#define SIGS (sizeof(sig)/sizeof(*sig))
static SIGNAL_TYPE (*catcher[SIGS])();
void catchints()
{
register i;
for (i=SIGS; 0<=--i; )
catcher[i] =
316: signal(sig[i],SIG_IGN) == SIG_IGN ? SIG_IGN : catchsig;
restoreints();
}
void ignoreints()
{
register i;
for (i=SIGS; 0<=--i; )
VOID signal(sig[i], SIG_IGN);
}
void restoreints()
{
register i;
for (i=SIGS; 0<=--i; )
331: if (catcher[i] != SIG_IGN)
VOID signal(sig[i], catcher[i]);
}
And from /usr/include/signal.h :
#define SIG_IGN ((void (*)())( 1))
Thanks for reading this far,
JanWillem de Bruijn ...!uunet!mcsun!hp4nl!dutrun!dutnak2!jwdb
Seismics and Acoustics jwdb at dutnak2.tudelft.nl
Faculty of Applied Physics Discipline is never an end in itself,
Delft University of Technology only a means to an end.
--
JanWillem de Bruijn ...!uunet!mcsun!hp4nl!dutrun!dutnak2!jwdb
Seismics and Acoustics jwdb at dutnak2.tudelft.nl
Faculty of Applied Physics Discipline is never an end in itself,
Delft University of Technology only a means to an end.
More information about the Comp.unix.questions
mailing list