From 23beb3bfbfb56406cde665b762d7185c1dc8a370 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 23 Feb 2015 18:46:55 +0100 Subject: [PATCH] Bug 1135138 - Remove UNICODE from DEFINES in moz.build rather than Makefile.in; r=mshal This was made possible by bug 928709. --- gfx/2d/Makefile.in | 10 ---------- gfx/2d/moz.build | 7 +++++++ gfx/gl/Makefile.in | 7 ------- gfx/gl/moz.build | 3 +++ gfx/thebes/Makefile.in | 2 -- gfx/thebes/moz.build | 3 +++ 6 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 gfx/2d/Makefile.in delete mode 100644 gfx/gl/Makefile.in diff --git a/gfx/2d/Makefile.in b/gfx/2d/Makefile.in deleted file mode 100644 index 711879fa1b9..00000000000 --- a/gfx/2d/Makefile.in +++ /dev/null @@ -1,10 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -include $(topsrcdir)/config/rules.mk - -# Due to bug 796023, we can't have -DUNICODE and -D_UNICODE; defining those -# macros changes the type of LOGFONT to LOGFONTW instead of LOGFONTA. This -# changes the symbol names of exported C++ functions that use LOGFONT. -DEFINES := $(filter-out -DUNICODE -D_UNICODE,$(DEFINES)) diff --git a/gfx/2d/moz.build b/gfx/2d/moz.build index 9ce208ec9d0..ebff459dd4b 100644 --- a/gfx/2d/moz.build +++ b/gfx/2d/moz.build @@ -170,3 +170,10 @@ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'): CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] + +if CONFIG['OS_ARCH'] == 'WINNT': + # Due to bug 796023, we can't have -DUNICODE and -D_UNICODE; defining those + # macros changes the type of LOGFONT to LOGFONTW instead of LOGFONTA. This + # changes the symbol names of exported C++ functions that use LOGFONT. + del DEFINES['UNICODE'] + del DEFINES['_UNICODE'] diff --git a/gfx/gl/Makefile.in b/gfx/gl/Makefile.in deleted file mode 100644 index cd8516cacf1..00000000000 --- a/gfx/gl/Makefile.in +++ /dev/null @@ -1,7 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -include $(topsrcdir)/config/rules.mk - -DEFINES := $(filter-out -DUNICODE,$(DEFINES)) diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build index be9c3e5844b..efc7498a092 100644 --- a/gfx/gl/moz.build +++ b/gfx/gl/moz.build @@ -157,3 +157,6 @@ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['TK_CFLAGS'] CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CFLAGS += CONFIG['TK_CFLAGS'] + +if CONFIG['OS_ARCH'] == 'WINNT': + del DEFINES['UNICODE'] diff --git a/gfx/thebes/Makefile.in b/gfx/thebes/Makefile.in index 1cc0023601d..d3fb8a7c4fc 100644 --- a/gfx/thebes/Makefile.in +++ b/gfx/thebes/Makefile.in @@ -4,7 +4,5 @@ include $(topsrcdir)/config/rules.mk -DEFINES := $(filter-out -DUNICODE,$(DEFINES)) - DeprecatedPremultiplyTables.h: $(srcdir)/genTables.py $(PYTHON) $(srcdir)/genTables.py diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index c006c408008..791bc25ccf5 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -302,3 +302,6 @@ DEFINES['GRAPHITE2_STATIC'] = True if CONFIG['GKMEDIAS_SHARED_LIBRARY']: DEFINES['OTS_DLL'] = True + +if CONFIG['OS_ARCH'] == 'WINNT': + del DEFINES['UNICODE']