summarylogtreecommitdiffstats
path: root/004-graphite2-1.3.8-dllimport-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to '004-graphite2-1.3.8-dllimport-fix.patch')
-rw-r--r--004-graphite2-1.3.8-dllimport-fix.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/004-graphite2-1.3.8-dllimport-fix.patch b/004-graphite2-1.3.8-dllimport-fix.patch
new file mode 100644
index 00000000000..76ff44df5a6
--- /dev/null
+++ b/004-graphite2-1.3.8-dllimport-fix.patch
@@ -0,0 +1,84 @@
+--- graphite2-1.3.8/include/graphite2/Types.h.orig 2016-09-16 23:16:38.006355900 -0400
++++ graphite2-1.3.8/include/graphite2/Types.h 2016-09-16 23:18:12.217540500 -0400
+@@ -40,6 +40,31 @@
+ gr_utf8 = 1/*sizeof(uint8)*/, gr_utf16 = 2/*sizeof(uint16)*/, gr_utf32 = 4/*sizeof(uint32)*/
+ };
+
++#if defined(__GNUC__) || defined(__clang__)
++#define GR_MAYBE_UNUSED __attribute__((unused))
++#else
++#define GR_MAYBE_UNUSED
++#endif
++
++#if defined(__clang__) && __cplusplus >= 201103L
++ /* clang's fallthrough annotations are only available starting in C++11. */
++ #define GR_FALLTHROUGH [[clang::fallthrough]]
++#elif defined(_MSC_VER)
++ /*
++ * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
++ * https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
++ */
++ #include <sal.h>
++ #define GR_FALLTHROUGH __fallthrough
++#else
++ #define GR_FALLTHROUGH /* fallthrough */
++#endif
++
++#ifdef _MSC_VER
++#pragma warning(disable: 4800)
++#pragma warning(disable: 4355)
++#endif
++
+ // Definitions for library publicly exported symbols
+ #if defined _WIN32 || defined __CYGWIN__
+ #if defined GRAPHITE2_STATIC
+--- graphite2-1.3.8/src/inc/Main.h.orig 2016-09-16 23:15:44.029355200 -0400
++++ graphite2-1.3.8/src/inc/Main.h 2016-09-16 23:18:14.601872400 -0400
+@@ -120,27 +120,3 @@
+ void operator delete[] (void * p)throw() { free(p); } \
+ void operator delete[] (void *, void *) throw() {}
+
+-#if defined(__GNUC__) || defined(__clang__)
+-#define GR_MAYBE_UNUSED __attribute__((unused))
+-#else
+-#define GR_MAYBE_UNUSED
+-#endif
+-
+-#if defined(__clang__) && __cplusplus >= 201103L
+- /* clang's fallthrough annotations are only available starting in C++11. */
+- #define GR_FALLTHROUGH [[clang::fallthrough]]
+-#elif defined(_MSC_VER)
+- /*
+- * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
+- * https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
+- */
+- #include <sal.h>
+- #define GR_FALLTHROUGH __fallthrough
+-#else
+- #define GR_FALLTHROUGH /* fallthrough */
+-#endif
+-
+-#ifdef _MSC_VER
+-#pragma warning(disable: 4800)
+-#pragma warning(disable: 4355)
+-#endif
+--- graphite2-1.3.8/include/graphite2/Log.h.orig 2016-09-16 23:28:23.462998100 -0400
++++ graphite2-1.3.8/include/graphite2/Log.h 2016-09-16 23:31:58.675576600 -0400
+@@ -56,7 +56,7 @@
+ * @param face the gr_face whose segments you want to log to the given file
+ * @param log_path a utf8 encoded file name and path to log to.
+ */
+-GR2_API bool gr_start_logging(gr_face * face, const char *log_path);
++GR2_API bool gr_start_logging(GR_MAYBE_UNUSED gr_face * face, const char *log_path);
+
+
+ /** Stop logging on the given face. This will close the log file created by
+@@ -64,7 +64,7 @@
+ *
+ * @param face the gr_face whose segments you want to stop logging
+ */
+-GR2_API void gr_stop_logging(gr_face * face);
++GR2_API void gr_stop_logging(GR_MAYBE_UNUSED gr_face * face);
+
+ /** Start logging to a FILE object.
+ * This function is deprecated as of 1.2.0, use the _face versions instead.