Bug 966814 - Build with disabled X11 on linux failing to compile. r=ted
authorOleg Romashin <romaxa@gmail.com>
Tue, 29 Jul 2014 19:21:08 +0200
changeset 196608 b697c227effeb4b04d809ccdc60ba9ca5f27b728
parent 196607 6d31e024845ffab1f2c7ed701a7d2d7b63143400
child 196609 17d70e1ff57b28a4208e37cefcab1ff9deaa7464
push id46922
push usergpascutto@mozilla.com
push dateTue, 29 Jul 2014 17:21:29 +0000
treeherdermozilla-inbound@b697c227effe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs966814
milestone34.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 966814 - Build with disabled X11 on linux failing to compile. r=ted
configure.in
netwerk/protocol/http/nsHttpHandler.cpp
--- a/configure.in
+++ b/configure.in
@@ -8005,20 +8005,23 @@ if test "$MOZ_TREE_CAIRO"; then
     fi
 
     # Define macros for cairo-features.h
     TEE_SURFACE_FEATURE="#define CAIRO_HAS_TEE_SURFACE 1"
     if test "$MOZ_X11"; then
         XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1"
         XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1"
         PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1"
+    fi
+    if test "$_HAVE_FREETYPE2"; then
         FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
         MOZ_ENABLE_CAIRO_FT=1
         CAIRO_FT_CFLAGS="$FT2_CFLAGS"
     fi
+
     case "$MOZ_WIDGET_TOOLKIT" in
       qt)
         QT_SURFACE_FEATURE="#define CAIRO_HAS_QT_SURFACE 1"
         ;;
       cocoa | uikit)
         QUARTZ_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_SURFACE 1"
         QUARTZ_IMAGE_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1"
         QUARTZ_FONT_FEATURE="#define CAIRO_HAS_QUARTZ_FONT 1"
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -672,17 +672,21 @@ nsHttpHandler::InitUserAgentComponents()
     // Gather platform.
     mPlatform.AssignLiteral(
 #if defined(ANDROID)
     "Android"
 #elif defined(XP_WIN)
     "Windows"
 #elif defined(XP_MACOSX)
     "Macintosh"
-#elif defined(MOZ_X11)
+#elif defined(XP_UNIX)
+    // We historically have always had X11 here,
+    // and there seems little a webpage can sensibly do
+    // based on it being something else, so use X11 for
+    // backwards compatibility in all cases.
     "X11"
 #endif
     );
 #endif
 
 #if defined(ANDROID) || defined(MOZ_B2G)
     nsCOMPtr<nsIPropertyBag2> infoService = do_GetService("@mozilla.org/system-info;1");
     MOZ_ASSERT(infoService, "Could not find a system info service");