On Thursday 16 August 2012, Raphael Kubo da Costa wrote:

> Raphael Kubo da Costa <rakuco@FreeBSD.org> writes:

> > Today I felt like doing some archeology work, and it looks like this

> > separation between the Linux/non-Linux case was added in SVN r501434

> > [1], when FindKDE4.cmake was still in kdesdk. At the time, strtoll(3)

> > failed on FreeBSD when -ansi was passed, and the behavior remains the

> > same to this day. It looks correct to me: to gcc, -ansi means C90 for C

> > files and C++98 for C++ files, strtoll is part of C99 and is only

> > available on Linux with -ansi because gcc/libstdc++ define _GNU_SOURCE

> > by default.

> >

> > Looking even further back in time, -ansi seems to have been originally

> > added by coolo to acinclude.m4.in in r50947 [2] only for glibc and when

> > building in debug mode.

> >

> > I see two options here: either go back to adding -ansi only for Linux

> > (and making all the other flags common to all systems using gcc), or

> > just dropping -ansi altogether and using the same flags for all systems.

> >

> > Thoughts?

> >

> > [1] http://websvn.kde.org/?view=revision&revision=501434

> > [2] http://websvn.kde.org/?view=revision&revision=50947

>

> Alex, do you have an opinion on this?

Not really, how much will break when changing this ?

Dropping -ansi doesn't sound too bad to me...

Alex