Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc

Issue 15974011: [NaCl SDK] Remove NACL_ARCH from commom makefiles. (Closed) Base URL: http://git.chromium.org/chromium/src.git@cleanup_genhttpfs
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/tools/host_vc.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
diff --git a/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc b/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
index 7d13a1028e127af76ede8fc425b0688c176baf6c..9291464165d2eb7d92d3ad2fffa260a91ce67eea 100644
--- a/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
+++ b/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
@@ -23,9 +23,15 @@
#define CONFIG_NAME "Release"
#endif
-#define XSTRINGIFY(x) STRINGIFY(x)
-#define STRINGIFY(x) #x
-#define NACL_ARCH_STRING XSTRINGIFY(NACL_ARCH)
+#if defined __arm__
+#define NACL_ARCH "arm"
+#elif defined __i686__
+#define NACL_ARCH "x86_32"
+#elif defined __x86_64__
+#define NACL_ARCH "x86_64"
+#else
+#error "Unknown arch"
+#endif
class DlOpenInstance : public pp::Instance {
public:
@@ -66,7 +72,7 @@ class DlOpenInstance : public pp::Instance {
// dlclose, which would close the shared object and unload it from memory.
void LoadLibrary() {
const char reverse_so_path[] =
- "/http/glibc/" CONFIG_NAME "/libreverse_" NACL_ARCH_STRING ".so";
+ "/http/glibc/" CONFIG_NAME "/libreverse_" NACL_ARCH ".so";
const int32_t IMMEDIATELY = 0;
eightball_so_ = dlopen("libeightball.so", RTLD_LAZY);
reverse_so_ = dlopen(reverse_so_path, RTLD_LAZY);
« no previous file with comments | « no previous file | native_client_sdk/src/tools/host_vc.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698