This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix aix build error with math.h in gcc/sreal.c
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Michael Haubenwallner <michael dot haubenwallner at ssi-schaefer dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 16 Dec 2014 19:28:14 +0100
- Subject: Re: fix aix build error with math.h in gcc/sreal.c
- Authentication-results: sourceware.org; auth=none
- References: <54905811 dot 50502 at ssi-schaefer dot com>
On Tue, Dec 16, 2014 at 5:04 PM, Michael Haubenwallner
<michael.haubenwallner@ssi-schaefer.com> wrote:
> Recent commit 218765 adding sreal::to_double() breaks on AIX due to math.h
> being included before _LARGE_FILES and __STDC_FORMAT_MACROS being defined
> later in config.h and system.h, respectively.
sreal.c shouldn't include math.h, if really really really needed
math.h needs to be
included from system.h at the appropriate place.
Richard,
> 2014-12-16 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
>
> Both config.h and system.h define ABI/API macros for system headers.
> * sreal.c: Include math.h later.
>
> Thanks!
> /haubi/