1753512 Members
5799 Online
108795 Solutions
New Discussion юеВ

_sys_siglist

 
SOLVED
Go to solution
rajeshmsr
Advisor

_sys_siglist

We are migrating our app from SunOS 5.8 to HP-UX.

While compiling the C program, we are getting the error:

identifier "_sys_siglist" is undefined.

After searching through the net, I have added the headers:

#include
#include
#include

But still the error persists. When searching the hp forums for "_sys_siglist", there were no results for the keyword.

Do I need to add any other headers for this? or Is there an equivalent for "_sys_siglist" which I should use in HP Unix.
2 REPLIES 2
Steven Schweda
Honored Contributor
Solution

Re: _sys_siglist

> Do I need to add any other headers for this?

You would probably need to create your own
string array on HP-UX. The text seems to be
available in /usr/include/sys/signal.h. A
more modern approach would be to create and
use your own strsignal() function, instead of
trying to create and use sys_siglist (and
sys_siglistn) directly. You'd probably want
your own header file, too, to declare
whatever you create. (It could be a jacket
for .)

You should probably be using strsignal() on
Solaris, too, instead of looking directly at
sys_siglist. As /usr/include/errno.h says:

* The symbols _sys_errlist and _sys_nerr are not visible in the
* LP64 libc. Use strerror(3C) instead.

It looks to me like a trend. (HP-UX does
have strerror(), but apparently not
strsignal(), so you still need to do
something yourself on HP-UX.)
Dennis Handly
Acclaimed Contributor

Re: _sys_siglist

>Is there an equivalent for "_sys_siglist" which I should use in HP-UX?

Perhaps just create an array with "Signal 1", etc. in it. The names aren't that important vs the numbers.