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!!

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. :wink: Try just commenting out the line:

//extern char *sys_errlist[];