From: tip-bot for Irina Tirdea <irina.tirdea@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
mingo@redhat.com, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, penberg@kernel.org, namhyung.kim@lge.com,
rostedt@goodmis.org, irina.tirdea@intel.com,
irina.tirdea@gmail.com, dsahern@gmail.com, tglx@linutronix.de
Subject: [tip:perf/core] perf tools: include __WORDSIZE definition
Date: Thu, 13 Sep 2012 22:56:28 -0700 [thread overview]
Message-ID: <tip-3f34f6c0233ae055b592e8f8da23d873b82070bb@git.kernel.org> (raw)
In-Reply-To: <1347315303-29906-4-git-send-email-irina.tirdea@intel.com>
Commit-ID: 3f34f6c0233ae055b592e8f8da23d873b82070bb
Gitweb: http://git.kernel.org/tip/3f34f6c0233ae055b592e8f8da23d873b82070bb
Author: Irina Tirdea <irina.tirdea@gmail.com>
AuthorDate: Tue, 11 Sep 2012 01:15:00 +0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 11 Sep 2012 11:47:45 -0300
perf tools: include __WORDSIZE definition
__WORDSIZE is GLibC-specific and is not defined on all systems or glibc
versions (e.g. Android's bionic does not define it).
In file included from util/include/linux/bitmap.h:5:0,
from util/header.h:10,
from util/session.h:6,
from util/build-id.h:4,
from util/annotate.c:11:
util/include/linux/bitops.h: In function 'set_bit':
util/include/linux/bitops.h:25:12: error:
'__WORDSIZE' undeclared (first use in this function)
util/include/linux/bitops.h:25:12: note:
each undeclared identifier is reported only once for each function it appears in
util/include/linux/bitops.h:23:51: error:
parameter 'addr' set but not used [-Werror=unused-but-set-parameter]
util/include/linux/bitops.h: In function 'clear_bit':
util/include/linux/bitops.h:30:12: error:
'__WORDSIZE' undeclared (first use in this function)
util/include/linux/bitops.h:28:53: error:
parameter 'addr' set but not used [-Werror=unused-but-set-parameter]
In file included from util/header.h:10:0,
from util/session.h:6,
from util/build-id.h:4,
from util/annotate.c:11:
util/include/linux/bitmap.h: In function 'bitmap_zero':
util/include/linux/bitmap.h:22:6: error:
'__WORDSIZE' undeclared (first use in this function)
Defining __WORDSIZE in perf's headers if it is not already defined.
Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Suggested-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Irina Tirdea <irina.tirdea@intel.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1347315303-29906-4-git-send-email-irina.tirdea@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/include/linux/bitops.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h
index 587a230..a55d8cf 100644
--- a/tools/perf/util/include/linux/bitops.h
+++ b/tools/perf/util/include/linux/bitops.h
@@ -5,6 +5,10 @@
#include <linux/compiler.h>
#include <asm/hweight.h>
+#ifndef __WORDSIZE
+#define __WORDSIZE (__SIZEOF_LONG__ * 8)
+#endif
+
#define BITS_PER_LONG __WORDSIZE
#define BITS_PER_BYTE 8
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
next prev parent reply other threads:[~2012-09-14 5:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 22:14 [PATCH v3 0/6] Porting perf to Android Irina Tirdea
2012-09-10 22:14 ` [PATCH v3 1/6] perf tools: include wrapper for magic.h Irina Tirdea
2012-09-14 5:53 ` [tip:perf/core] " tip-bot for Irina Tirdea
2012-09-10 22:14 ` [PATCH v3 2/6] perf tools: update types definitions for Android Irina Tirdea
2012-09-14 5:55 ` [tip:perf/core] perf tools: Update " tip-bot for Irina Tirdea
2012-09-10 22:15 ` [PATCH v3 3/6] perf tools: include __WORDSIZE definition Irina Tirdea
2012-09-14 5:56 ` tip-bot for Irina Tirdea [this message]
2012-09-10 22:15 ` [PATCH v3 4/6] perf tools: fix ALIGN redefinition in system headers Irina Tirdea
2012-09-14 5:57 ` [tip:perf/core] " tip-bot for Irina Tirdea
2012-09-10 22:15 ` [PATCH v3 5/6] perf tools: fix no return in non-void function Irina Tirdea
2012-09-10 22:15 ` [PATCH v3 6/6] perf tools: Use __maybe_used for unused variables Irina Tirdea
2012-09-14 6:02 ` [tip:perf/core] " tip-bot for Irina Tirdea
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=tip-3f34f6c0233ae055b592e8f8da23d873b82070bb@git.kernel.org \
--to=irina.tirdea@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=irina.tirdea@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.org \
--cc=penberg@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).