Sponsored Content
Full Discussion: the sys_errlist.h problem
Top Forums Programming the sys_errlist.h problem Post 302356397 by Corona688 on Friday 25th of September 2009 10:59:42 AM
Old 09-25-2009
sys_errlist is already defined in something it included and doesn't need to be defined again in su_lgm_lib_ctim.c. They probably tried to avoid including anything that defined it, but somehow it did. Playing with -D won't stop your own code from defining something that already exists, and you shouldn't define GNU_SOURCE without understanding the effects it has anyway(lots -- it's saying "I use and want to use all nonstandard GNU extensions"). Nor will adding another header help when it's defined too many times already. Smilie Try just commenting out the line:

Code:
//extern char *sys_errlist[];

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies

2. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

3. Solaris

sys_nerr and *sys_errlist[] in 64-bit

The variables sys_nerr and *sys_errlist no more exist in 64-bit compiler option.I know one way is to use strerror() function.But I have very long interlinked code which i have to migrate from 32-bit to 64-bit .Can any one tell any other way of doing the same without modifying much od the... (2 Replies)
Discussion started by: vishalzone2002
2 Replies

4. Solaris

problem in finding a hardware problem

Hi I am right now facing a strange hardware problem. System get booted with the following error: Fatal Error Reset CPU 0000.0000.0000.0003 AFSR 0100.0000.0000.0000 SCE AFAR 0000.07c6.0000.1000 SC Alert: Host System has Reset It happen 4 or 5 times and get the same error every time.I... (8 Replies)
Discussion started by: girish.batra
8 Replies

5. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

6. UNIX for Dummies Questions & Answers

DHCP problem and eth1 problem

At work I am trying to get this one Linux machine (let's call it ctesgm07) to behave like another Linux machine that we have (let's call it test007). test007 returns the following version info: cat /etc/debian_version: lenny/sid uname -a: Linux test007 2.6.27-7-generic #1 SMP Tue Nov 4... (0 Replies)
Discussion started by: sllinux
0 Replies

7. AIX

AIX OS problem? network problem?

Dear ALL. I installed AIX OS on customer sites. but Only one site is too slow when I connected telnet, ftp.. Ping is too fast. but telnet and FTP is not connected.. of course i check the configuration file on aix but it's normal. Do any Idea?? thanks in advance. - Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies

8. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

9. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

10. IP Networking

Router problem or ISP problem ?

Hi everyone, I am experiencing discontinuity of Internet service, this started 1 month ago. Everything worked very well for 1 year of intensive use, but now, I have problems reaching my gateway. The gateway is not my router but a node belonging to my ISP and I share the same public IP with... (3 Replies)
Discussion started by: remic
3 Replies
PERROR(3)						     Linux Programmer's Manual							 PERROR(3)

NAME
perror - print a system error message SYNOPSIS
#include <stdio.h> void perror(const char *s); #include <errno.h> const char * const sys_errlist[]; int sys_nerr; int errno; /* Not really declared this way; see errno(3) */ Feature Test Macro Requirements for glibc (see feature_test_macros(7)): sys_errlist, sys_nerr: Since glibc 2.19: _DEFAULT_SOURCE Glibc 2.19 and earlier: _BSD_SOURCE DESCRIPTION
The perror() function produces a message on standard error describing the last error encountered during a call to a system or library func- tion. First (if s is not NULL and *s is not a null byte ('')), the argument string s is printed, followed by a colon and a blank. Then an error message corresponding to the current value of errno and a new-line. To be of most use, the argument string should include the name of the function that incurred the error. The global error list sys_errlist[], which can be indexed by errno, can be used to obtain the error message without the newline. The largest message number provided in the table is sys_nerr-1. Be careful when directly accessing this list, because new error values may not have been added to sys_errlist[]. The use of sys_errlist[] is nowadays deprecated; use strerror(3) instead. When a system call fails, it usually returns -1 and sets the variable errno to a value describing what went wrong. (These values can be found in <errno.h>.) Many library functions do likewise. The function perror() serves to translate this error code into human-readable form. Note that errno is undefined after a successful system call or library function call: this call may well change this variable, even though it succeeds, for example because it internally used some other library function that failed. Thus, if a failing call is not immedi- ately followed by a call to perror(), the value of errno should be saved. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------+---------------+---------------------+ |Interface | Attribute | Value | +----------+---------------+---------------------+ |perror() | Thread safety | MT-Safe race:stderr | +----------+---------------+---------------------+ CONFORMING TO
perror(), errno: POSIX.1-2001, POSIX.1-2008, C89, C99, 4.3BSD. The externals sys_nerr and sys_errlist derive from BSD, but are not specified in POSIX.1. NOTES
The externals sys_nerr and sys_errlist are defined by glibc, but in <stdio.h>. SEE ALSO
err(3), errno(3), error(3), strerror(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2017-09-15 PERROR(3)
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy