This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Weird linking-problem


deas@uni-hamburg.de (Andreas Steffan) writes:

|> Preprocessed:
|> 
|> gcc -ggdb -O2 -Wall -Woverloaded-virtual -Wno-unused -Wno-uninitialized  -I. -I..   -c  -I/usr/X11R6/include -I/usr/include saveload.cpp -E >saveload.cpp.pre

This is the bad line:

    struct stat statbuf; extern int errno;

After preprocessing this expands to:

    struct stat statbuf; extern int (*__errno_location ()) ;

This is a no-no.  You cannot use the identifier errno any more in any
declaration after you have included <errno.h>.

Andreas.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]