Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 2 Sep 2012 13:10:33 -0400
From: Rich Felker <>
Subject: Re: Best bikeshed ever (feature test macros)

On Sun, Sep 02, 2012 at 10:00:27AM -0700, wrote:
> > Much like the last thread I created to assess opinion (the license
> > one), this is all fairly open-ended and not necessarily going to lead
> > to any short- or long-term change in direction, but then again it
> > could... Replies don't have to be of the form 1/2/3; alternative ideas
> > are welcome, as are replies that just address which goals/criteria are
> > most important to you.
> Leave it as is, this actually helps find bugs in software. A real
> world example is accidentally utilizing gnu extensions in mruby (see
> github mruby bug page for more info).

I'm glad to hear of a real-world example where somebody was actually
happy about catching bugs like this. However I don't see how the
current default contributes to finding such bugs. If you're compiling
an app that's targetting POSIX or POSIX+XSI portability, the current
default will not handle that; you need to add feature test macros like
-D_POSIX_C_SOURCE=200809L, and that would work just as well if we
changed the default. Or do you mean to say that the fact that it broke
by default prompted you to add -D_POSIX_C_SOURCE=200809L manually, and
then when you tried compiling again and got an error message, you
realized the issue was a GNU extension that was being used?

Can you clarify? As I'm reading the situation, it sounds to me like
providing POSIX or POSIX+XSI by default would be just as likely to
catch such bugs (if nor moreso, since it would eliminate the case
where somebody adds -D_GNU_SOURCE "just to be safe").


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.