This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to libiberty: portably include time headers
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: PATCH to libiberty: portably include time headers
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sun, 23 Jul 00 15:44:01 CDT
Jeffrey A Law <law@cygnus.com> wrote:
> You're still unconditionally including time.h [...]
Well, it isn't *unconditional*, it won't be included if <sys/time.h> is present
and the two cannot be included together (the case on 4.3BSD).
What would happen if *neither* <sys/time.h> nor <time.h> is present? Hmm. That
would mean a system without any time facilities at all, right? I don't think
that code using time facilities can be ported to such a system...
> [...] which makes the whole point
> of testing for its existence in autoconf kind of silly.
Hmm, I thought this check was needed for AC_HEADER_TIME to work correctly.
> I've lifted the code to handle this stuff from gcc/system.h and installed
> it. It's basically the same as yours except that we conditionally include
> time.h and formatting differences.
OK. The variant I used was borrowed from somewhere else in the toolchain (I
can't remember where), so if you think your variant is better you might want to
use it in other places too.
--
Michael Sokolov Harhan Engineering Laboratory
Public Service Agent International Free Computing Task Force
International Engineering and Science Task Force
615 N GOOD LATIMER EXPY STE #4
DALLAS TX 75204-5852 USA
Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)