Bug 1276927: Define HAVE_ANDROID_OS before including 'android_filesystem_config.h', r=fabrice
authorThomas Zimmermann <tdz@users.sourceforge.net>
Thu, 16 Jun 2016 08:43:51 +0100
changeset 301954 442a1085cceef664ce96078f6f36c0265baeac45
parent 301953 bacf083383fe872b5f15d43c028b463fbbe67c35
child 301955 c009297005902ca508e9851274f618a72585da67
push id78511
push usertdz@users.sourceforge.net
push dateThu, 16 Jun 2016 07:44:15 +0000
treeherdermozilla-inbound@c00929700590 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1276927
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276927: Define HAVE_ANDROID_OS before including 'android_filesystem_config.h', r=fabrice The preprocessor token HAVE_ANDROID_OS configures 'android_filesystem_config.h' to include the correct header files from the environment. MozReview-Commit-ID: oKwdjzDjij
dom/system/gonk/moz.build
ipc/chromium/moz.build
security/sandbox/linux/broker/moz.build
widget/gonk/GonkPermission.cpp
widget/gonk/nativewindow/moz.build
--- a/dom/system/gonk/moz.build
+++ b/dom/system/gonk/moz.build
@@ -123,16 +123,18 @@ if CONFIG['MOZ_B2G_RIL']:
             'DataCallInterfaceService.js',
             'DataCallInterfaceService.manifest',
             'RadioInterfaceLayer.js',
             'RadioInterfaceLayer.manifest',
         ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+DEFINES['HAVE_ANDROID_OS'] = True
+
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/bluetooth/common',
     '/dom/geolocation',
     '/dom/wifi',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
@@ -130,16 +130,18 @@ if os_linux:
         'src/base/time_posix.cc',
     ]
     if CONFIG['OS_TARGET'] == 'Android':
         UNIFIED_SOURCES += [
             'src/base/message_pump_android.cc',
         ]
         DEFINES['ANDROID'] = True
         DEFINES['_POSIX_MONOTONIC_CLOCK'] = 0
+        if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+            DEFINES['HAVE_ANDROID_OS'] = True
 
 if os_bsd or os_linux:
     if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
         SOURCES += [
             'src/base/message_pump_glib.cc',
         ]
     if CONFIG['MOZ_ENABLE_QT']:
         SOURCES += [
--- a/security/sandbox/linux/broker/moz.build
+++ b/security/sandbox/linux/broker/moz.build
@@ -11,16 +11,20 @@ EXPORTS.mozilla += [
 ]
 
 SOURCES += [
     'SandboxBroker.cpp',
     'SandboxBrokerCommon.cpp',
     'SandboxBrokerPolicyFactory.cpp',
 ]
 
+if CONFIG['OS_TARGET'] == 'Android':
+    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+        DEFINES['HAVE_ANDROID_OS'] = True
+
 LOCAL_INCLUDES += [
     '/security/sandbox/linux', # SandboxLogging.h
     '/security/sandbox/linux/common', # SandboxInfo.h
 ]
 
 # Need this for mozilla::ipc::FileDescriptor etc.
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/widget/gonk/GonkPermission.cpp
+++ b/widget/gonk/GonkPermission.cpp
@@ -9,22 +9,26 @@
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
+#include "GonkPermission.h"
 #include <binder/IPCThreadState.h>
 #include <binder/ProcessState.h>
 #include <binder/IServiceManager.h>
 #include <binder/IPermissionController.h>
+
+#ifndef HAVE_ANDROID_OS
+#define HAVE_ANDROID_OS 1
+#endif
 #include <private/android_filesystem_config.h>
-#include "GonkPermission.h"
 
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/SyncRunnable.h"
 #include "nsIAppsService.h"
 #include "mozIApplication.h"
 #include "nsThreadUtils.h"
 
--- a/widget/gonk/nativewindow/moz.build
+++ b/widget/gonk/nativewindow/moz.build
@@ -92,16 +92,18 @@ include('/ipc/chromium/chromium-config.m
 
 if CONFIG['ANDROID_VERSION'] >= '18':
     LOCAL_INCLUDES += [
         '%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
             'frameworks/native/opengl/include',
         ]
     ]
 
+DEFINES['HAVE_ANDROID_OS'] = True
+
 # Suppress some GCC warnings being treated as errors:
 #  - about attributes on forward declarations for types that are already
 #    defined, which complains about an important MOZ_EXPORT for android::AString
 if CONFIG['GNU_CC']:
   CXXFLAGS += ['-Wno-error=attributes', '-Wno-overloaded-virtual']
 
 FINAL_LIBRARY = 'xul'