Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Nan <wangnan0@huawei.com>
To: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: ptesarik@suse.cz, kumagai-atsushi@mxc.nes.nec.co.jp,
	kexec@lists.infradead.org, sdu.liu@huawei.com,
	hui.geng@huawei.com
Subject: Re: [PATCH 3/4] makedumpfile: add -D_GNU_SOURCE to CFLAGS
Date: Sun, 4 May 2014 09:28:15 +0800	[thread overview]
Message-ID: <536597AF.6070908@huawei.com> (raw)
In-Reply-To: <20140430.205510.528575789.d.hatayama@jp.fujitsu.com>

On 2014/4/30 19:55, HATAYAMA Daisuke wrote:
> From: Wang Nan <wangnan0@huawei.com>
> Subject: [PATCH 3/4] makedumpfile: add -D_GNU_SOURCE to CFLAGS
> Date: Sat, 26 Apr 2014 12:07:08 +0800
> 
>> This patch is preparation for introduce pread/pwrite.
>>
> 
> Do you explain more about _GNU_SOURCE? Did you need to define this on
> your environment to build makedumpfile with pread/pwrite?
> 
> I tried to build a very simple test program using pread like
> 
> int main(void)
> {
>    printf("%p\n", pread);
> }
> 
> on RHEL5.4, RHEL6.5 and fc20, and all were done successfully without
> _GNU_SOURCE. They are all on x86_64.
> 
> I checked man pread and man pwrite on each environments for
> _GNU_SOURCE but I didn't find it. What I found was _XOPEN_SOURCE
> description only. For example this is man pread on RHEL6.5.
> 
> $ LANG=C man pread
> PREAD(2)                   Linux Programmer's Manual                  PREAD(2)
> 
> NAME
>        pread, pwrite - read from or write to a file descriptor at a given offset
> 
> SYNOPSIS
>        #define _XOPEN_SOURCE 500

I define _GNU_SOURCE because it introduces _XOPEN_SOURCE. It also introduces others which
I thought may help further improvements.

Do you mean use only _XOPEN_SOURCE for pread/pwrite?

> 
>        #include <unistd.h>
> 
>        ssize_t pread(int fd, void *buf, size_t count, off_t offset);
> 
>        ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
> 
> Note that just as I said the above, building was successfully done on
> this environment.
> 
> --
> Thanks.
> HATAYAMA, Daisuke
> 



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2014-05-04  1:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-26  4:07 [PATCH 0/4] Replace lseek..write/read to pwrite/pread Wang Nan
2014-04-26  4:07 ` [PATCH 1/4] makedumpfile: redefine numerical limitaction macros Wang Nan
2014-04-28 14:23   ` Petr Tesarik
2014-04-28 22:21     ` Wang Nan
2014-04-26  4:07 ` [PATCH 2/4] makedumpfile: cleanup non-standard ULONGLONG_MAX macros Wang Nan
2014-04-26  4:07 ` [PATCH 3/4] makedumpfile: add -D_GNU_SOURCE to CFLAGS Wang Nan
2014-04-30 11:55   ` HATAYAMA Daisuke
2014-05-04  1:28     ` Wang Nan [this message]
2014-04-26  4:07 ` [PATCH 4/4] makedumpfile: use pread/pwrite to eliminate lseek Wang Nan
2014-04-30 11:41 ` [PATCH 0/4] Replace lseek..write/read to pwrite/pread HATAYAMA Daisuke
2014-04-30 11:53   ` Petr Tesarik
2014-04-30 12:19     ` HATAYAMA Daisuke
2014-04-30 13:21       ` Petr Tesarik

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=536597AF.6070908@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=hui.geng@huawei.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=ptesarik@suse.cz \
    --cc=sdu.liu@huawei.com \
    /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