Porting sccs.c to AT&T UNIX V.2.

Guy Harris guy at auspex.auspex.com
Fri Jun 9 04:55:27 AEST 1989


>    I am in the process of porting Eric Allman's "sccs.c" - human-oriented
>front end to the SCCS system program, to a UNISYS 5000/80 mini, running
>AT&T UNIX V.2 Operating System.  ... Upon compilation
>I get the following error message:
>
>	undefined symbol - sys_siglist
>
>    Does anyone have this library routine for AT&T UNIX V.2 ?

It's not a library routine; it's an array of pointers to "char" that
contain descriptions of signals, indexed by the signal number.

For the benefit of anybody else doing the port, here's a version for S5R3,
based on the 4.3-tahoe version and the S5R3 "sys/signal.h".

For S5R2, you'll probably have to cut some of the entries off, since
NSIG may be smaller. 

For systems other than vanilla AT&T ones, you may either have to 1)
rearrange the list, because signal numbers may be different or 2) add
new entries for added signals. 

For S5R4, you'll have to put the job control signals and SIGWINCH back
:-) - unless, of course, it comes with "sys_siglist"....

/*
 * Copyright (c) 1980 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 */

#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)siglist.c	5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint

#include <signal.h>

char	*sys_siglist[NSIG] = {
	"Signal 0",
	"Hangup",			/* SIGHUP */
	"Interrupt",			/* SIGINT */
	"Quit",				/* SIGQUIT */
	"Illegal instruction",		/* SIGILL */
	"Trace/BPT trap",		/* SIGTRAP */
	"IOT trap",			/* SIGIOT */
	"EMT trap",			/* SIGEMT */
	"Floating point exception",	/* SIGFPE */
	"Killed",			/* SIGKILL */
	"Bus error",			/* SIGBUS */
	"Segmentation fault",		/* SIGSEGV */
	"Bad system call",		/* SIGSYS */
	"Broken pipe",			/* SIGPIPE */
	"Alarm clock",			/* SIGALRM */
	"Terminated",			/* SIGTERM */
	"User defined signal 1",	/* SIGUSR1 */
	"User defined signal 2"		/* SIGUSR2 */
	"Child exited",			/* SIGCLD */
	"Power failure",		/* SIGPWR */
	"Window changed",		/* SIGWIND - UNIX PC */
	"Handset/line status change",	/* SIGPHONE - UNIX PC */
	"Pollable event occurred",	/* SIGPOLL */
};



More information about the Comp.unix.questions mailing list