summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-14 18:26:08 +0000
committerMoonchild <moonchild@palemoon.org>2020-05-14 18:26:08 +0000
commitf05391a69f38107ff3f70431032a5520741147d8 (patch)
tree9da01715e46543747134ff5a0a1e028b3aa0642d
parenta89818f5c1cfefc3ae758ace18d8cbdbed90ac7d (diff)
downloaduxp-f05391a69f38107ff3f70431032a5520741147d8.tar.gz
Issue #80 - de-unify and fix up gfx/graphite2
With de-unified building we have to re-apply the fix-up for <cstdio>, and additionally the same for <cstring> to prevent the compiler picking the wrong versions of standard functions.
-rw-r--r--gfx/graphite2/moz-gr-update.sh7
-rw-r--r--gfx/graphite2/src/Code.cpp4
-rw-r--r--gfx/graphite2/src/Face.cpp2
-rw-r--r--gfx/graphite2/src/FeatureMap.cpp2
-rw-r--r--gfx/graphite2/src/FileFace.cpp2
-rw-r--r--gfx/graphite2/src/Pass.cpp2
-rw-r--r--gfx/graphite2/src/Segment.cpp2
-rw-r--r--gfx/graphite2/src/TtfUtil.cpp2
-rw-r--r--gfx/graphite2/src/call_machine.cpp2
-rw-r--r--gfx/graphite2/src/direct_machine.cpp2
-rw-r--r--gfx/graphite2/src/gr_logging.cpp2
-rw-r--r--gfx/graphite2/src/inc/Compression.h2
-rw-r--r--gfx/graphite2/src/inc/Face.h2
-rw-r--r--gfx/graphite2/src/inc/FeatureVal.h2
-rw-r--r--gfx/graphite2/src/inc/FileFace.h2
-rw-r--r--gfx/graphite2/src/inc/List.h2
-rw-r--r--gfx/graphite2/src/inc/Machine.h2
-rw-r--r--gfx/graphite2/src/inc/json.h2
-rw-r--r--gfx/graphite2/src/inc/locale2lcid.h2
-rw-r--r--gfx/graphite2/src/json.cpp2
-rw-r--r--gfx/graphite2/src/moz.build13
21 files changed, 28 insertions, 32 deletions
diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh
index faaab1b179..b14102d1f6 100644
--- a/gfx/graphite2/moz-gr-update.sh
+++ b/gfx/graphite2/moz-gr-update.sh
@@ -33,9 +33,10 @@ echo "$TARBALL" >> gfx/graphite2/README.mozilla
echo ""
echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
-# fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
-#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
-#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+# fix up includes because of BZ bug 721839 (cstdio) and BZ bug 803066 (Windows.h)
+# Additional issue with inclusion of <cstring> in non-unified mode (Issue #80)
+find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/<cstring>/<string.h>/;s/Windows.h/windows.h/;" {} \;
+find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/<cstring>/<string.h>/;s/Windows.h/windows.h/;" {} \;
# summarize what's been touched
echo Updated to $RELEASE.
diff --git a/gfx/graphite2/src/Code.cpp b/gfx/graphite2/src/Code.cpp
index 92ba92379c..119af9c85c 100644
--- a/gfx/graphite2/src/Code.cpp
+++ b/gfx/graphite2/src/Code.cpp
@@ -32,7 +32,7 @@ of the License or (at your option) any later version.
#include <cassert>
#include <cstddef>
#include <cstdlib>
-#include <cstring>
+#include <string.h>
#include "graphite2/Segment.h"
#include "inc/Code.h"
#include "inc/Face.h"
@@ -42,7 +42,7 @@ of the License or (at your option) any later version.
#include "inc/Rule.h"
#include "inc/Silf.h"
-#include <cstdio>
+#include <stdio.h>
#ifdef NDEBUG
#ifdef __GNUC__
diff --git a/gfx/graphite2/src/Face.cpp b/gfx/graphite2/src/Face.cpp
index 81b5ced8c1..45664ca8cd 100644
--- a/gfx/graphite2/src/Face.cpp
+++ b/gfx/graphite2/src/Face.cpp
@@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
-#include <cstring>
+#include <string.h>
#include "graphite2/Segment.h"
#include "inc/CmapCache.h"
#include "inc/debug.h"
diff --git a/gfx/graphite2/src/FeatureMap.cpp b/gfx/graphite2/src/FeatureMap.cpp
index d0fc55ddf5..ab3b447f98 100644
--- a/gfx/graphite2/src/FeatureMap.cpp
+++ b/gfx/graphite2/src/FeatureMap.cpp
@@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
-#include <cstring>
+#include <string.h>
#include "inc/Main.h"
#include "inc/bits.h"
diff --git a/gfx/graphite2/src/FileFace.cpp b/gfx/graphite2/src/FileFace.cpp
index d1510d3e9e..62b9c1fd2a 100644
--- a/gfx/graphite2/src/FileFace.cpp
+++ b/gfx/graphite2/src/FileFace.cpp
@@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
-#include <cstring>
+#include <string.h>
#include "inc/FileFace.h"
diff --git a/gfx/graphite2/src/Pass.cpp b/gfx/graphite2/src/Pass.cpp
index 683143c509..4e9085d486 100644
--- a/gfx/graphite2/src/Pass.cpp
+++ b/gfx/graphite2/src/Pass.cpp
@@ -28,7 +28,7 @@ of the License or (at your option) any later version.
#include "inc/debug.h"
#include "inc/Endian.h"
#include "inc/Pass.h"
-#include <cstring>
+#include <string.h>
#include <cstdlib>
#include <cassert>
#include <cmath>
diff --git a/gfx/graphite2/src/Segment.cpp b/gfx/graphite2/src/Segment.cpp
index 3020bfd36d..cb53de3564 100644
--- a/gfx/graphite2/src/Segment.cpp
+++ b/gfx/graphite2/src/Segment.cpp
@@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
#include "inc/UtfCodec.h"
-#include <cstring>
+#include <string.h>
#include <cstdlib>
#include "inc/bits.h"
diff --git a/gfx/graphite2/src/TtfUtil.cpp b/gfx/graphite2/src/TtfUtil.cpp
index 75e8da11c4..c2f9a4675b 100644
--- a/gfx/graphite2/src/TtfUtil.cpp
+++ b/gfx/graphite2/src/TtfUtil.cpp
@@ -43,7 +43,7 @@ Description
//#include <algorithm>
#include <cassert>
#include <cstddef>
-#include <cstring>
+#include <string.h>
#include <climits>
#include <cwchar>
//#include <stdexcept>
diff --git a/gfx/graphite2/src/call_machine.cpp b/gfx/graphite2/src/call_machine.cpp
index 09c2038c41..0afe9191ee 100644
--- a/gfx/graphite2/src/call_machine.cpp
+++ b/gfx/graphite2/src/call_machine.cpp
@@ -33,7 +33,7 @@ of the License or (at your option) any later version.
// opcodes) but is slower that the direct threaded interpreter by a factor of 2
#include <cassert>
-#include <cstring>
+#include <string.h>
#include <graphite2/Segment.h>
#include "inc/Machine.h"
#include "inc/Segment.h"
diff --git a/gfx/graphite2/src/direct_machine.cpp b/gfx/graphite2/src/direct_machine.cpp
index 7d80438fb4..597c2d2342 100644
--- a/gfx/graphite2/src/direct_machine.cpp
+++ b/gfx/graphite2/src/direct_machine.cpp
@@ -38,7 +38,7 @@ of the License or (at your option) any later version.
#include <cassert>
-#include <cstring>
+#include <string.h>
#include "inc/Machine.h"
#include "inc/Segment.h"
#include "inc/Slot.h"
diff --git a/gfx/graphite2/src/gr_logging.cpp b/gfx/graphite2/src/gr_logging.cpp
index 3e453ba8e2..a4afcc2a50 100644
--- a/gfx/graphite2/src/gr_logging.cpp
+++ b/gfx/graphite2/src/gr_logging.cpp
@@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
-#include <cstdio>
+#include <stdio.h>
#include "graphite2/Log.h"
#include "inc/debug.h"
diff --git a/gfx/graphite2/src/inc/Compression.h b/gfx/graphite2/src/inc/Compression.h
index 61351c416e..047df7a3dc 100644
--- a/gfx/graphite2/src/inc/Compression.h
+++ b/gfx/graphite2/src/inc/Compression.h
@@ -29,7 +29,7 @@ of the License or (at your option) any later version.
#include <cassert>
#include <cstddef>
-#include <cstring>
+#include <string.h>
namespace
{
diff --git a/gfx/graphite2/src/inc/Face.h b/gfx/graphite2/src/inc/Face.h
index 43ea431968..1ee39b0e3c 100644
--- a/gfx/graphite2/src/inc/Face.h
+++ b/gfx/graphite2/src/inc/Face.h
@@ -26,7 +26,7 @@ of the License or (at your option) any later version.
*/
#pragma once
-#include <cstdio>
+#include <stdio.h>
#include "graphite2/Font.h"
diff --git a/gfx/graphite2/src/inc/FeatureVal.h b/gfx/graphite2/src/inc/FeatureVal.h
index 5fbcf08206..c79392eaec 100644
--- a/gfx/graphite2/src/inc/FeatureVal.h
+++ b/gfx/graphite2/src/inc/FeatureVal.h
@@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
#pragma once
-#include <cstring>
+#include <string.h>
#include <cassert>
#include "inc/Main.h"
#include "inc/List.h"
diff --git a/gfx/graphite2/src/inc/FileFace.h b/gfx/graphite2/src/inc/FileFace.h
index 81e501bab2..dfcf3e8d37 100644
--- a/gfx/graphite2/src/inc/FileFace.h
+++ b/gfx/graphite2/src/inc/FileFace.h
@@ -32,7 +32,7 @@ of the License or (at your option) any later version.
#ifndef GRAPHITE2_NFILEFACE
-#include <cstdio>
+#include <stdio.h>
#include <cassert>
#include "graphite2/Font.h"
diff --git a/gfx/graphite2/src/inc/List.h b/gfx/graphite2/src/inc/List.h
index 020560235c..d3839441eb 100644
--- a/gfx/graphite2/src/inc/List.h
+++ b/gfx/graphite2/src/inc/List.h
@@ -30,7 +30,7 @@ of the License or (at your option) any later version.
#include <cstddef>
#include <cassert>
-#include <cstring>
+#include <string.h>
#include <cstdlib>
#include <new>
diff --git a/gfx/graphite2/src/inc/Machine.h b/gfx/graphite2/src/inc/Machine.h
index 1a01b7a43f..4ac62b9e1e 100644
--- a/gfx/graphite2/src/inc/Machine.h
+++ b/gfx/graphite2/src/inc/Machine.h
@@ -31,7 +31,7 @@ of the License or (at your option) any later version.
// interface.
#pragma once
-#include <cstring>
+#include <string.h>
#include <graphite2/Types.h>
#include "inc/Main.h"
diff --git a/gfx/graphite2/src/inc/json.h b/gfx/graphite2/src/inc/json.h
index 90b8573d65..e9826832e9 100644
--- a/gfx/graphite2/src/inc/json.h
+++ b/gfx/graphite2/src/inc/json.h
@@ -32,7 +32,7 @@ of the License or (at your option) any later version.
#include "inc/Main.h"
#include <cassert>
-#include <cstdio>
+#include <stdio.h>
#include "inc/List.h"
namespace graphite2 {
diff --git a/gfx/graphite2/src/inc/locale2lcid.h b/gfx/graphite2/src/inc/locale2lcid.h
index 25d5c0a3c8..ec5e867c4e 100644
--- a/gfx/graphite2/src/inc/locale2lcid.h
+++ b/gfx/graphite2/src/inc/locale2lcid.h
@@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
#pragma once
-#include <cstring>
+#include <string.h>
#include <cassert>
#include "inc/Main.h"
diff --git a/gfx/graphite2/src/json.cpp b/gfx/graphite2/src/json.cpp
index d6e5518a1c..48a563ce01 100644
--- a/gfx/graphite2/src/json.cpp
+++ b/gfx/graphite2/src/json.cpp
@@ -29,7 +29,7 @@ of the License or (at your option) any later version.
#if !defined GRAPHITE2_NTRACING
-#include <cstdio>
+#include <stdio.h>
#include <limits>
#include "inc/json.h"
diff --git a/gfx/graphite2/src/moz.build b/gfx/graphite2/src/moz.build
index c95c2089de..4cbb1f7ed3 100644
--- a/gfx/graphite2/src/moz.build
+++ b/gfx/graphite2/src/moz.build
@@ -13,16 +13,16 @@ EXPORTS.graphite2 += [
]
if CONFIG['GNU_CC']:
- UNIFIED_SOURCES += [
+ SOURCES += [
'direct_machine.cpp'
]
else:
- UNIFIED_SOURCES += [
+ SOURCES += [
'call_machine.cpp'
]
# This should contain all of the _SOURCES from files.mk, except *_machine.cpp
-UNIFIED_SOURCES += [
+SOURCES += [
'CachedFace.cpp',
'CmapCache.cpp',
'Code.cpp',
@@ -44,6 +44,7 @@ UNIFIED_SOURCES += [
'Intervals.cpp',
'json.cpp',
'Justifier.cpp',
+ 'NameTable.cpp',
'Pass.cpp',
'Position.cpp',
'SegCache.cpp',
@@ -57,12 +58,6 @@ UNIFIED_SOURCES += [
'UtfCodec.cpp',
]
-# Excluded from UNIFIED_SOURCES because <cmath> from other files breaks it,
-# see bug 1272647.
-SOURCES += [
- 'NameTable.cpp',
-]
-
# tell graphite2 not to export symbols, we'll be linking it directly with
# thebes
DEFINES['GRAPHITE2_STATIC'] = True