Files
loongoffice/external/graphite/graphite2.win64.patch.1
Martin Hosken 23b9febbd8 Fix Graphite windows build static
Change-Id: I6feb3805e79f7cae4a8df7efa665fd97c56411c2
Reviewed-on: https://gerrit.libreoffice.org/18654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Martin Hosken <martin_hosken@sil.org>
2015-09-17 06:10:12 +00:00

58 lines
2.9 KiB
Groff

diff -ur graphite.org/src/inc/Main.h graphite/src/inc/Main.h
--- graphite.org/src/inc/Main.h 2015-09-07 20:09:25.572279671 +0700
--- graphite/src/inc/Main.h 2015-09-07 20:09:25.572279671 +0700
@@ -25,6 +25,7 @@
of the License or (at your option) any later version.
*/
#pragma once
+#pragma warning(disable: 4510 4610)
#include <cstdlib>
#include "graphite2/Types.h"
diff -ur graphite.org/src/inc/json.h graphite/src/inc/json.h
--- graphite.org/src/inc/json.h 2015-02-03 14:49:24.408101900 +0100
+++ graphite/src/inc/json.h 2015-02-03 14:50:59.697552200 +0100
@@ -85,6 +85,9 @@
json & operator << (string) throw();
json & operator << (number) throw();
json & operator << (integer) throw();
+#ifdef _WIN64
+ json & operator << (size_t) throw();
+#endif
json & operator << (long unsigned int d) throw();
json & operator << (boolean) throw();
json & operator << (_null_t) throw();
diff -ur graphite.org/src/json.cpp graphite/src/json.cpp
--- graphite.org/src/json.cpp 2015-02-03 14:49:24.409102000 +0100
+++ graphite/src/json.cpp 2015-02-03 14:50:49.814986900 +0100
@@ -134,5 +134,8 @@
json & json::operator << (json::integer d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; }
json & json::operator << (long unsigned d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; }
+#ifdef _WIN64
+json & json::operator << (size_t d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; }
+#endif
json & json::operator << (json::boolean b) throw() { context(seq); fputs(b ? "true" : "false", _stream); return *this; }
json & json::operator << (json::_null_t) throw() { context(seq); fputs("null",_stream); return *this; }
diff -ur graphite.org/src/Pass.cpp graphite/src/Pass.cpp
--- graphite.org/src/Pass.cpp 2015-02-03 14:49:24.413102200 +0100
+++ graphite/src/Pass.cpp 2015-02-03 14:50:37.873303900 +0100
@@ -544,7 +544,7 @@
if (r->rule->preContext > fsm.slots.context())
continue;
*fsm.dbgout << json::flat << json::object
- << "id" << r->rule - m_rules
+ << "id" << static_cast<size_t>(r->rule - m_rules)
<< "failed" << true
<< "input" << json::flat << json::object
<< "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, -r->rule->preContext)))
@@ -558,7 +558,7 @@
void Pass::dumpRuleEventOutput(const FiniteStateMachine & fsm, Machine & m, const Rule & r, Slot * const last_slot) const
{
*fsm.dbgout << json::item << json::flat << json::object
- << "id" << &r - m_rules
+ << "id" << static_cast<size_t>(&r - m_rules)
<< "failed" << false
<< "input" << json::flat << json::object
<< "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, 0)))