Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1634990 > unrolled thread

[PATCH 04/10] perf tools: Move HAS_BOOL define to where perl headers are used

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2017-05-03 16:00 +0200
Last post2017-05-03 16:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 04/10] perf tools: Move HAS_BOOL define to where perl headers are used Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-05-03 16:00 +0200

#1634990 — [PATCH 04/10] perf tools: Move HAS_BOOL define to where perl headers are used

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-05-03 16:00 +0200
Subject[PATCH 04/10] perf tools: Move HAS_BOOL define to where perl headers are used
Message-ID<tD2YX-6a8-27@gated-at.bofh.it>
From: Arnaldo Carvalho de Melo <acme@redhat.com>

This is a perl specific hack, so move it from util.h to where perl
headers are used.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-4igctbinuom2sr6g4b03jqht@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/scripting-engines/trace-event-perl.c | 4 +++-
 tools/perf/util/util.h                               | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index 2b12bdb3ce33..7b79c413486b 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -28,7 +28,9 @@
 #include <linux/bitmap.h>
 #include <linux/time64.h>
 
-#include "../util.h"
+#include <stdbool.h>
+/* perl needs the following define, right after including stdbool.h */
+#define HAS_BOOL
 #include <EXTERN.h>
 #include <perl.h>
 
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 6855c454e5bc..622c2d251ad3 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -5,7 +5,6 @@
 #define _BSD_SOURCE 1
 /* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */
 #define _DEFAULT_SOURCE 1
-#define HAS_BOOL
 
 #include <fcntl.h>
 #include <stdbool.h>
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web