lkml.org 
[lkml]   [2017]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 27/28] perf tools: Remove regex.h and fnmatch.h from util.h
Date
From: Arnaldo Carvalho de Melo <acme@redhat.com>

The users of regex and fnmatch functions should include those headers
instead.

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-ixzm5kuamsq1ixbkuv6kmwzj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 1 +
tools/perf/util/machine.c | 1 +
tools/perf/util/sort.c | 1 +
tools/perf/util/sort.h | 2 +-
tools/perf/util/util.h | 2 --
5 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index f50738e0006e..5bbd4b2ef6d2 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -41,6 +41,7 @@
#include <dlfcn.h>
#include <errno.h>
#include <inttypes.h>
+#include <regex.h>
#include <linux/bitmap.h>
#include <linux/stringify.h>

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 46411742d03c..988e84ce6f88 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1,6 +1,7 @@
#include <dirent.h>
#include <errno.h>
#include <inttypes.h>
+#include <regex.h>
#include "callchain.h"
#include "debug.h"
#include "event.h"
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 4df228ab4db1..fe4fd7b5f8e0 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1,5 +1,6 @@
#include <errno.h>
#include <inttypes.h>
+#include <regex.h>
#include <sys/mman.h>
#include "sort.h"
#include "hist.h"
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 421232a27e7b..8bcec05ee578 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -2,7 +2,7 @@
#define __PERF_SORT_H
#include "../builtin.h"

-#include "util.h"
+#include <regex.h>

#include "color.h"
#include <linux/list.h>
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index c0574e2763b7..d79f3c23dd02 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -23,9 +23,7 @@
#include <sys/time.h>
#include <time.h>
#include <signal.h>
-#include <fnmatch.h>
#include <assert.h>
-#include <regex.h>
#include <utime.h>
#include <sys/wait.h>
#include <poll.h>
--
2.9.3
\
 
 \ /
  Last update: 2017-04-19 18:19    [W:2.253 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site