[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sys_errlist definitions in libio stdin.h
From: |
Jeff Bailey |
Subject: |
sys_errlist definitions in libio stdin.h |
Date: |
Thu, 3 Jan 2002 07:34:05 -0800 |
User-agent: |
Mutt/1.2.5i |
Quick summary: libiberty gets confused building apps on libio. I just
got a call to run into work, but I wanted to post this now in case the
answer is obvious to everyone but me. I'll look at it more tonight.
There is no mention of sys_errlist in stdio.h on a stdio build,
however stdio.h contains the following on a libio build:
/* These variables normally should not be used directly. The `strerror'
function provides all the needed functionality. */
#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
libiberty gets confused by this. For some reason __USE_BSD appears to
be defined in the source, but not at configure time:
configure:2767: checking for sys_errlist
configure:2779: gcc -o conftest -g -O2 conftest.c -ldl 1>&5
/tmp/ccmx0suq.o: In function `main':
/disk1/build/binutils-2.11.92.0.12.3/build-tree/binutils-2.11.92.0.12.3/builddir-single/libiberty/configure:2775:
undefined reference to `sys_errlist'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2772 "configure"
#include "confdefs.h"
int *p;
int main() {
extern int sys_errlist; p = &sys_errlist;
; return 0; }
gcc -c -DHAVE_CONFIG_H -O2 -I. -I../../libiberty/../include -W -Wall
-Wtraditional -pedantic -fpic ../../libiberty/strerror.c -o pic/strerror.o; \
else true; fi
../../libiberty/strerror.c:465: warning: static declaration for `sys_nerr'
follows non-static
../../libiberty/strerror.c:466: conflicting types for `sys_errlist'
/include/stdio.h:552: previous declaration of `sys_errlist'
make[2]: *** [strerror.o] Error 1
--
`Patience' said Slartibartfast again. `Great things are afoot'.
`That's what you said last time we met' said Arthur.
`They were,' said Slartibartfast.
`Yes, that's true,' admitted Arthur.
- sys_errlist definitions in libio stdin.h,
Jeff Bailey <=