This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: Patch: tfformat.c doesn't compile under hpux 10.20



  In message <200009111848.OAA26783@hiauly1.hia.nrc.ca>you write:
  > >   In message <200009111654.MAA26451@hiauly1.hia.nrc.ca>you write:
  > >   > This patch fixes a problem compiling the test program tfformat.c unde
  > r
  > >   > hpux 10.20.  The include of stdlib.h has been removed because under h
  > pux
  > >   > it results in the inclusion of stdio.h.  The definitions in stdio.h
  > >   > conflict with those in iostdio.h.
  > >   > 
  > >   > The header stdlib.h was included for `exit'.  The single use of exit 
  > in
  > >   > the program has been changed to a return.  Tested under hpux and i686
  > >   > linux.
  > > I must have missed the original thread.  What definitions conflict and is
  > > it possible to fix the conflict?
  > 
  > The original thread was "libio testsuite: timeout compiling tFile.cc".  Bun
  > dled
  > with the patches to work around the timeout was a patch to fix the compile
  > problem for tfformat.
  > 
  > This problem was created by the following patch:
  > 
  > 2000-05-23  Zack Weinberg  <zack@wolery.cumb.org>
  > 
  >         * tfformat.c: Include stdlib.h.
  > 
  > Here is a sample of the conflicts:
[ ... ]
  > /xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:76:33: warning: "_IOLBF" redef
  > ined^M
  > ../../../../libio/iostdio.h:48:1: warning: this is the location of the prev
  > ious definition^M
  > 
  > I don't believe that the conflicts can be eliminated because the header
  > iostdio.h is supposed to define "a stdio-like environment".
Seems to me that wrapping the offending definitions in an 
#ifndef block or prefixing them with a #undef would be sufficient to
deal with this problem.

jeff


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