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]

tfformat.c: Including stdlib.h for exit ()


The change introduced on 2000-05-23 to include stdlib.h causes problems
under hpux 10.20.

Running ../../../../libio/testsuite/libio.tests/tfformat.exp ...
Executing on host: /xxx/gnu/gcc-2.96/objdir/gcc/xgcc -B/xxx/gnu/gcc-2.96/objdir/gcc/ ../../../../libio/testsuite/../tests/tfformat.c  -O3 -I.. -I../../../../libio/testsuite/..  -DTEST_LIBIO -DTEST_EXACTNESS -L/xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/threads/libio -L/xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/threads/libio -L/xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/threads/libiberty -g  -lio -liberty -lm   -threads -o /xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/libio/testsuite/tfformat    (timeout = 300)
In file included from /usr/include/pwd.h:74,
                 from /xxx/gnu/gcc-2.96/objdir/gcc/include/stdlib.h:337,
                 from ../../../../libio/testsuite/../tests/tfformat.c:11:
/xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:69:33: warning: "_IOFBF" redefined
../../../../libio/iostdio.h:47:1: warning: this is the location of the previous definition
/xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:72:33: warning: "_IONBF" redefined
../../../../libio/iostdio.h:49:1: warning: this is the location of the previous definition
/xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:76:33: warning: "_IOLBF" redefined
../../../../libio/iostdio.h:48:1: warning: this is the location of the previous definition
/xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:137:25: warning: "stdin" redefined
../../../../libio/iostdio.h:55:1: warning: this is the location of the previous definition
/xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:138:25: warning: "stdout" redefined
../../../../libio/iostdio.h:56:1: warning: this is the location of the previous definition
/xxx/gnu/gcc-2.96/objdir/gcc/include/stdio.h:139:25: warning: "stderr" redefined
../../../../libio/iostdio.h:57:1: warning: this is the location of the previous definition
...

As can be seen, stdlib.h includes pwd.h which includes stdio.h.  The test
can be fixed by providing a prototype for exit.  However, the incompatibility
between stdlib.h and iostdio.h needs fixing somehow.  Thoughts?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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