summarylogtreecommitdiffstats
path: root/004-graphite2-1.3.8-dllimport-fix.patch
blob: 76ff44df5a6f1409319375e2b0859f23dbf9f39f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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.