Aarch64: Replace macro __x86_64__ with generic macro __LP64__ 07/20507/1 tizen submit/tizen_common/20140521.163740
authorIlya Palachev <i.palachev@samsung.com>
Thu, 8 May 2014 10:03:15 +0000 (14:03 +0400)
committerIlya Palachev <i.palachev@samsung.com>
Thu, 8 May 2014 10:03:15 +0000 (14:03 +0400)
Package wrt-plugins-common cannot be built for the architecture
aarch64 because of the following error:

error: 'std::string WrtDeviceApis::CommonsJavaScript::Converter::toString(std::size_t)' cannot be overloaded

For architecture x86_64 this error also occurs, but the build of
erroneous function is disabled by the use of macro __x86_64__, which
is defined when the build is performed for x86_64 architecture.

We decided to disable the build of this function for aarch64, too.
It is done by replacement of macro __x86_64__ with more generic macro
__LP64__, which is defined both for x86_64 and aarch64 or any other
64-bit architecture.

The build for other architectures has been verified in the following
OBS project:

https://build.tizen.org/project/show?project=devel%3Aarm_toolchain%3AMobile%3Atest

Change-Id: I73ddd310431d77ad3df2da60a37bc454f36d2e7f
Signed-off-by: Ilya Palachev <i.palachev@samsung.com>
src/CommonsJavaScript/Converter.cpp
src/CommonsJavaScript/Converter.h

index 7e1dc9d..ed1d371 100644 (file)
@@ -119,7 +119,7 @@ std::string Converter::toString(long arg)
 {
     return toString_(arg);
 }
-#ifndef __x86_64__
+#ifndef __LP64__
 std::string Converter::toString(std::size_t arg)
 {
     return toString_(arg);
index b37383a..b5381bc 100644 (file)
@@ -141,7 +141,7 @@ class Converter : private DPL::Noncopyable
     std::string toString(unsigned long arg);
 
     std::string toString(long arg);
-#ifndef __x86_64__
+#ifndef __LP64__
 
     std::string toString(std::size_t arg);
 #endif