From: Jonathan Cameron <jic23@kernel.org>
To: Roberta Dobrescu <roberta.dobrescu@gmail.com>, linux-iio@vger.kernel.org
Cc: daniel.baluta@intel.com, octavian.purdila@intel.com,
knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net
Subject: Re: [PATCH 4/5] tools: iio: Define _GNU_SOURCE in Makefile
Date: Mon, 09 Mar 2015 17:18:05 +0000 [thread overview]
Message-ID: <54FDD5CD.4050708@kernel.org> (raw)
In-Reply-To: <1424940567-24877-5-git-send-email-roberta.dobrescu@gmail.com>
On 26/02/15 08:49, Roberta Dobrescu wrote:
> Definition of _GNU_SOURCE is needed to get rid of some warnings, such
> as:
> warning: implicit declaration of function `asprintf'.
>
> generic_buffer.c and iio_event_monitor.c define _GNU_SOURCE,
> but it is also needed in lsiio.c and iio_utils.c. For this reason,
> this patch adds the definition in Makefile and removes it from where
> it already exists.
>
> Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Hmm. I wondered about whether it was better to have this in the individual
files but came down in the end on the same side you did.
Cleaner in the makefile.
Applied to the togreg branch of iio.git
Thanks,
> ---
> tools/iio/Makefile | 2 +-
> tools/iio/generic_buffer.c | 2 --
> tools/iio/iio_event_monitor.c | 2 --
> 3 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> index 83813ad..bf7ae6d 100644
> --- a/tools/iio/Makefile
> +++ b/tools/iio/Makefile
> @@ -1,5 +1,5 @@
> CC = gcc
> -CFLAGS = -Wall -g
> +CFLAGS = -Wall -g -D_GNU_SOURCE
>
> all: iio_event_monitor lsiio generic_buffer
>
> diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
> index 01266c2..8f8f058 100644
> --- a/tools/iio/generic_buffer.c
> +++ b/tools/iio/generic_buffer.c
> @@ -18,8 +18,6 @@
> *
> */
>
> -#define _GNU_SOURCE
> -
> #include <unistd.h>
> #include <stdlib.h>
> #include <dirent.h>
> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> index f19cff1..427c271 100644
> --- a/tools/iio/iio_event_monitor.c
> +++ b/tools/iio/iio_event_monitor.c
> @@ -16,8 +16,6 @@
> *
> */
>
> -#define _GNU_SOURCE
> -
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdbool.h>
>
next prev parent reply other threads:[~2015-03-09 17:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 8:49 [PATCH 0/5] iio: Move iio userspace applications out of staging Roberta Dobrescu
2015-02-26 8:49 ` [PATCH 1/5] staging: iio: Documentation: iio_event_monitor: Include linux/iio/types.h Roberta Dobrescu
2015-03-09 17:12 ` Jonathan Cameron
2015-02-26 8:49 ` [PATCH 2/5] staging: iio: Documentation: Introduce iio_utils.c Roberta Dobrescu
2015-03-09 17:14 ` Jonathan Cameron
2015-02-26 8:49 ` [PATCH 3/5] iio: Move iio userspace applications out of staging Roberta Dobrescu
2015-03-09 17:16 ` Jonathan Cameron
2015-05-02 23:21 ` Hartmut Knaack
2015-05-12 19:44 ` Jonathan Cameron
2015-02-26 8:49 ` [PATCH 4/5] tools: iio: Define _GNU_SOURCE in Makefile Roberta Dobrescu
2015-03-09 17:18 ` Jonathan Cameron [this message]
2015-02-26 8:49 ` [PATCH 5/5] tools: iio: lsiio: Remove unused variables Roberta Dobrescu
2015-03-09 17:23 ` Jonathan Cameron
2015-03-10 16:03 ` Roberta Dobrescu
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=54FDD5CD.4050708@kernel.org \
--to=jic23@kernel.org \
--cc=daniel.baluta@intel.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=pmeerw@pmeerw.net \
--cc=roberta.dobrescu@gmail.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;
as well as URLs for NNTP newsgroup(s).