qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Raymond <cerbere@gmail.com>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V2 1/3] Darwin: Fix incorrect check for fdatasync() in configure
Date: Sun, 29 May 2011 20:09:13 -0400	[thread overview]
Message-ID: <BANLkTinr-jHMsL9oN3u1_pF5Mk=gmt37gA@mail.gmail.com> (raw)
In-Reply-To: <3DEA5664-CC27-46CF-B8BB-7EBE079143BD@web.de>

Sure, I'm fine with that. I wasn't sure how much detail you actually
wanted in this commit message :)

Alexandre

On Sun, May 29, 2011 at 7:36 PM, Andreas Färber <andreas.faerber@web.de> wrote:
> Am 30.05.2011 um 00:22 schrieb Alexandre Raymond:
>
>> Under darwin (OS X 10.6.7), a symbol exists for the fdatasync() method
>> but it is not supported because _POSIX_SYNCHRONIZED_IO is set to '-1'.
>
> Question: How did you notice? Did anything break that we could mention, or
> did you just review the code?
>
>> Enable fdatasync() only if _POSIX_SYNCHRONIZED_IO is '>0', as per
>> The Open Group Base Specifications Issue 7.
>
> Not quite what I meant. ;) Would you be okay with the following:
>
> configure: Fix check for fdatasync()
>
> Under Darwin, a symbol exists for the fdatasync() function, but it is
> not supported. Yada yada. _POSIX_SYNCHRONIZED_IO is set to '-1'.
>
> According to POSIX:2008, a value of -1 means the feature is not supported.
> A value of 0 means supported at compilation time, and a value greater 0
> means supported at both compilation and run time.
>
> Enable fdatasync() only if _POSIX_SYNCHRONIZED_IO is '>0'.
>
> Andreas
>
>> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
>> ---
>> configure |    8 +++++++-
>> 1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/configure b/configure
>> index a318d37..b21ef75 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2477,7 +2477,13 @@ fi
>> fdatasync=no
>> cat > $TMPC << EOF
>> #include <unistd.h>
>> -int main(void) { return fdatasync(0); }
>> +int main(void) {
>> +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0
>> +return fdatasync(0);
>> +#else
>> +#abort Not supported
>> +#endif
>> +}
>> EOF
>> if compile_prog "" "" ; then
>>    fdatasync=yes
>> --
>> 1.7.5
>>
>
>

  reply	other threads:[~2011-05-30  0:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 22:22 [Qemu-devel] [PATCH V2 0/3] Fix compilation issues under darwin Alexandre Raymond
2011-05-29 22:22 ` [Qemu-devel] [PATCH V2 1/3] Darwin: Fix incorrect check for fdatasync() in configure Alexandre Raymond
2011-05-29 23:36   ` Andreas Färber
2011-05-30  0:09     ` Alexandre Raymond [this message]
2011-05-30  2:32       ` Alexandre Raymond
2011-06-01 22:26         ` Andreas Färber
2011-05-29 22:22 ` [Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help' Alexandre Raymond
2011-05-29 22:32   ` Peter Maydell
2011-05-29 22:40     ` Alexandre Raymond
2011-06-01 23:05     ` Andreas Färber
2011-06-02  6:10       ` Peter Maydell
2011-06-01 22:16   ` Andreas Färber
2011-05-29 22:22 ` [Qemu-devel] [PATCH V2 3/3] Remove warning in printf due to type mismatch Alexandre Raymond
2011-06-01 21:13   ` Andreas Färber
2011-06-02  7:18   ` Stefan Weil

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='BANLkTinr-jHMsL9oN3u1_pF5Mk=gmt37gA@mail.gmail.com' \
    --to=cerbere@gmail.com \
    --cc=andreas.faerber@web.de \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).