The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
user login problem & Files listing problem. pernasivam AIX 1 06-18-2009 10:09 AM
problem in finding a hardware problem girish.batra SUN Solaris 8 09-09-2008 11:10 AM
sys_nerr and *sys_errlist[] in 64-bit vishalzone2002 SUN Solaris 2 11-16-2007 01:53 AM
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 11:10 AM
SSH Problem auth problem budrito UNIX for Advanced & Expert Users 1 03-17-2004 10:12 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-25-2009
eljuventino eljuventino is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 3
the sys_errlist.h problem

hi everyone !!!i hope that all the members are in good mood help me in my problem!!

when i'm trying to compile with gcc i got this problem:

Quote:
gcc -c -DLINUX -DUNIX_OPSYS -DDEBUG -I/home/oracle/Open2/COMMON/inc -I/home/oracle/Open2/dbg -I/home/oracle/Open2/syu/inc -I/home/oracle/Open2/syu/LGM/inc -I/usr/local/oracle/9.2.0/precomp/public -DLINUX -DUNIX_OPSYS -DDEBUG -I/home/oracle/Open2/COMMON/inc -I/home/oracle/Open2/dbg -I/home/oracle/Open2/syu/inc -I/home/oracle/Open2/syu/LGM/inc -I/usr/local/oracle/9.2.0/precomp/public -c -o su_lgm_lib_ctim.o su_lgm_lib_ctim.c
su_lgm_lib_ctim.c:39: erreur: conflicting types for ‘sys_errlist’
/usr/include/bits/sys_errlist.h:28: erreur: previous declaration of ‘sys_errlist’ was here
make: *** [su_lgm_lib_ctim.o] Erreur 1
when i go to the code there is nothing unusual :

Code:
/****************************************************************************/
/* Project: ePOST/Open2 */
/* File Name: su_lgm_lib_ctim.c */
/* Subsystem: System Utilities */
/* Module: LGM - Log Manager internal libraries */
/* Process: LGM */
/* Description: Log Manage common functions */
/* Author(s): R. Navone */
/* Created: 24-Set-1996 */
/****************************************************************************/
/* Modification History */
/* */
/* Revision Date Who modified Description */
/* ........ ..-...-.... ............. ............................... */
/****************************************************************************/

/****************************************************************************/
/* INCLUDEs and DEFINEs */
/****************************************************************************/

#include "su_lgm.h"
#include "su_debug.h"


/* What string. It must be defined in all source files */
static char lgmlib_c[]="@(#)$Workfile: su_lgm_lib_ctim.c $,$Revision: 2.0 $,$Modtime: 30 Jan 2003 15:36:32 $";

#ifdef FL_STATIC
static char *SrC_NAmE = __FILE__;
#define _FL SrC_NAmE,__LINE__
#else
#define _FL __FILE__,__LINE__
#endif

/****************************************************************************/
/* GLOBAL/EXTERNAL VARIABLES */
/****************************************************************************/
extern int errno, sys_nerr;
extern char *sys_errlist[];
extern int Debug;

/****************************************************************************/
/* FUNCTIONS DEFINITION */
/****************************************************************************/
/****************************************************************************/
/* Function: our_ctime */
/* L.M. Date: 24-Jun-1996 */
/* Description: Like the orginal ctime(), but the returned string doesn't */
/* contain new line (s). */
/****************************************************************************/
char *our_ctime(time_t t)
{
register char *p1, *p2;

p1 = p2 = (char *)ctime(&t);
while(*p1)
{
if (*p1 == '\n')
{
*p1 = 0;
return(p2);
}
p1++;
}
return(p2);
}
i tried to resolve this problem so i tried to go to the
/usr/include/bits/sys_errlist.h

and i open it but i didn't understand anything:
Code:
Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version.
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */

#ifndef _STDIO_H
# error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead."
#endif

/* sys_errlist and sys_nerr are deprecated. Use strerror instead. */

#ifdef __USE_BSD
extern int sys_nerr;
extern __const char *__const sys_errlist[];
#endif
#ifdef __USE_GNU
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
#endif
so i included the stdio.h in the file and nothing happen,i tried to use the -D OPTION to tell the complierv to use __USE_GNU

any idea for this problem!!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0