Fix build/dependency issue.

bug 10427951

Change-Id: I798a0014f299b22c26bea3205823fcbb64f7ec70
diff --git a/cpp/BaseObj.cpp b/cpp/BaseObj.cpp
index efcb83a..80d9414 100644
--- a/cpp/BaseObj.cpp
+++ b/cpp/BaseObj.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "RenderScript.h"
+#include "rsCppInternal.h"
 
 using namespace android;
 using namespace RSC;
diff --git a/cpp/Element.cpp b/cpp/Element.cpp
index 8223f99..db7df64 100644
--- a/cpp/Element.cpp
+++ b/cpp/Element.cpp
@@ -18,6 +18,7 @@
 #include <string.h>
 
 #include "RenderScript.h"
+#include "rsCppInternal.h"
 
 using namespace android;
 using namespace RSC;
diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp
index 6ab2240..fb72738 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -20,6 +20,7 @@
 
 #include "RenderScript.h"
 #include "rsCppStructs.h"
+#include "rsCppInternal.h"
 
 #include <dlfcn.h>
 
@@ -27,9 +28,6 @@
 #include <cutils/properties.h>
 #endif
 
-#define LOG_NDEBUG 0
-#define LOG_TAG "rsC++"
-
 using namespace android;
 using namespace RSC;
 
diff --git a/cpp/Type.cpp b/cpp/Type.cpp
index bc86a94..07da0c5 100644
--- a/cpp/Type.cpp
+++ b/cpp/Type.cpp
@@ -18,6 +18,7 @@
 #include <string.h>
 
 #include "RenderScript.h"
+#include "rsCppInternal.h"
 
 // from system/graphics.h
 enum {
diff --git a/cpp/rsCppInternal.h b/cpp/rsCppInternal.h
index 3f1e130..904c5ab 100644
--- a/cpp/rsCppInternal.h
+++ b/cpp/rsCppInternal.h
@@ -17,6 +17,8 @@
 #ifndef ANDROID_RS_CPP_INTERNAL_H
 #define ANDROID_RS_CPP_INTERNAL_H
 
+#include "rsCppUtils.h"
+
 #define tryDispatch(rs, dispatch)               \
     if (rs->getError() == RS_SUCCESS) {         \
         dispatch;                               \
@@ -25,4 +27,9 @@
 #define createDispatch(rs, dispatch) \
     rs->getError() == RS_SUCCESS ? dispatch : NULL
 
+#undef LOG_TAG
+#undef LOG_NDEBUG
+#define LOG_NDEBUG 0
+#define LOG_TAG "rsC++"
+
 #endif
diff --git a/cpp/rsCppStructs.h b/cpp/rsCppStructs.h
index 1a04a5c..9ec8076 100644
--- a/cpp/rsCppStructs.h
+++ b/cpp/rsCppStructs.h
@@ -18,7 +18,6 @@
 #define ANDROID_RSCPPSTRUCTS_H
 
 #include "rsDefines.h"
-#include "rsCppUtils.h"
 #include "util/RefBase.h"
 #include "rsDispatch.h"