All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] build: define _DEFAULT_SOURCE if _BSD_SOURCE
Date: Thu, 2 Nov 2017 15:59:21 -0700	[thread overview]
Message-ID: <CAB=NE6XWiUEOhTn_XqDSifL2KK4a2+bdGaYzWBFVqqyAW2aMbQ@mail.gmail.com> (raw)
In-Reply-To: <D31D5414-876E-4251-B029-CD90FE4EB70E@sandeen.net>

On Thu, Nov 2, 2017 at 3:51 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
> On Nov 2, 2017, at 3:22 PM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
>>
>>> On Thu, Nov 2, 2017 at 1:04 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
>>>> On 10/26/17 12:28 PM, Luis R. Rodriguez wrote:
>>>> ./configure will leave traces of a complaint on config.log when
>>>> _BSD_SOURCE is defined but not _DEFAULT_SOURCE. _BSD_SOURCE is
>>>> deprecated so if defining _BSD_SOURCE also define _DEFAULT_SOURCE.
>>>>
>>>> From config.log:
>>>> /usr/include/features.h:183:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>>>
>>> Ok.  Or perhaps a more clear rationale is the preadv(5) manpage
>>> itself:
>>>
>>> preadv(), pwritev():
>>>        since glibc 2.19:
>>>                _DEFAULT_SOURCE
>>>        Glibc 2.19 and earlier:
>>>                _BSD_SOURCE
>>>
>>> But this is just a feature test macro in a configure script.
>>>
>>> What about the code itself, how do we handle this when we
>>> actually use preadv() in the codebase?
>>
>> Its not clear to me what the issue would be by defining this extra
>> _DEFAULT_SOURCE when _BSD_SOURCE is defined.
>>
> That's not the issue I was raising; I'm fine with defining both.  I pointed out the man page because it clearly describes the change.
>
> What I'm asking is this: one or the other of these defines is /required/ for preadv use, per the man page.  You are fixing one in the config test.  What about the actual use of preadv in the code itself?  Why does the issue exist only in the config test?

Beats me really, I ran into this pesky warning with modern compilers
and on old releases, and on old releases the complaint is actually on
most of the C files it compiles, with new code for some reason it only
complains on the configuration.

 Luis

  reply	other threads:[~2017-11-02 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 17:28 [PATCH] build: define _DEFAULT_SOURCE if _BSD_SOURCE Luis R. Rodriguez
2017-11-02 20:04 ` Eric Sandeen
2017-11-02 20:22   ` Luis R. Rodriguez
2017-11-02 22:51     ` Eric Sandeen
2017-11-02 22:59       ` Luis R. Rodriguez [this message]
2017-11-03  3:10         ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB=NE6XWiUEOhTn_XqDSifL2KK4a2+bdGaYzWBFVqqyAW2aMbQ@mail.gmail.com' \
    --to=mcgrof@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.