summaryrefslogtreecommitdiff
path: root/Build/source/libs/teckit/TLpatches/patch-07-warnings-and-static
blob: 12ed8b7ecd1631b43db6d32e2c6793c244d0ff9f (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff -ur teckit-2.5.10/source/Compiler.cpp teckit-src/source/Compiler.cpp
--- teckit-2.5.10/source/Compiler.cpp	Tue May 05 23:09:53 2020
+++ teckit-src/source/Compiler.cpp	Wed May 06 09:00:34 2020
@@ -189,7 +189,7 @@
 		free(table);
 }
 
-char*
+const char*
 WINAPI
 TECkit_GetUnicodeName(UInt32 usv)
 {
diff -ur teckit-2.5.10/source/Compiler.h teckit-src/source/Compiler.h
--- teckit-2.5.10/source/Compiler.h	Tue May 05 23:09:53 2020
+++ teckit-src/source/Compiler.h	Wed May 06 08:59:40 2020
@@ -229,7 +229,7 @@
 		vector<UInt32>		byteClassLines;
 		vector<UInt32>		uniClassLines;
 
-		long				passType;
+		UInt32				passType;
 		UInt32				uniDefault;
 		UInt8				byteDefault;
 		bool				supplementaryChars;
diff -ur teckit-2.5.10/source/Engine.cpp teckit-src/source/Engine.cpp
--- teckit-2.5.10/source/Engine.cpp	Tue May 05 23:09:53 2020
+++ teckit-src/source/Engine.cpp	Wed May 06 09:06:24 2020
@@ -51,12 +51,6 @@
 #	define NOSERVICE
 #	define NOMCX
 #	include <windows.h>
-
-	BOOL WINAPI
-	DllMain(HINSTANCE /*hInst*/, DWORD /*wDataSeg*/, LPVOID /*lpReserved*/)
-	{
-		return true;
-	}
 #endif
 
 #include "Engine.h"
diff -ur teckit-2.5.10/source/Public-headers/TECkit_Compiler.h teckit-src/source/Public-headers/TECkit_Compiler.h
--- teckit-2.5.10/source/Public-headers/TECkit_Compiler.h	Tue May 05 23:09:53 2020
+++ teckit-src/source/Public-headers/TECkit_Compiler.h	Wed May 06 09:07:40 2020
@@ -29,6 +29,9 @@
 #ifdef _WIN32
 /* MS compiler has predefined _WIN32, so assume Windows target  */
 #include <windows.h>	// apparently just using windef.h fails on VC++6
+#undef WINAPI
+#define WINAPI
+#define EXPORTED
 #else
 /* not the MS compiler, so try Metrowerks' platform macros */
 #ifndef __APPLE__
@@ -55,7 +58,7 @@
 #define kCompilerOpts_Compress	0x00000010	/* generate compressed mapping table */
 #define kCompilerOpts_XML		0x00000020	/* instead of a compiled binary table, generate an XML representation of the mapping */
 
-typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, char* msg, char* param, UInt32 line);
+typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, const char* msg, const char* param, UInt32 line);
 
 TECkit_Status
 WINAPI EXPORTED
@@ -74,7 +77,7 @@
 TECkit_GetCompilerVersion();
 
 /* new APIs for looking up Unicode names (as NUL-terminated C strings) */
-char*
+const char*
 WINAPI EXPORTED
 TECkit_GetUnicodeName(UInt32 usv);
 	/* returns the Unicode name of usv, if available, else NULL */
diff -ur teckit-2.5.10/source/Public-headers/TECkit_Engine.h teckit-src/source/Public-headers/TECkit_Engine.h
--- teckit-2.5.10/source/Public-headers/TECkit_Engine.h	Tue May 05 23:09:53 2020
+++ teckit-src/source/Public-headers/TECkit_Engine.h	Wed May 06 09:08:34 2020
@@ -79,6 +79,9 @@
 #ifdef _WIN32
 /* MS compiler has predefined _WIN32, so assume Windows target  */
 #include <windows.h>
+#undef WINAPI
+#define WINAPI
+#define EXPORTED
 #else
 /* not the MS compiler, so try Metrowerks' platform macros */
 #ifndef __APPLE__
diff -ur teckit-2.5.10/source/Sample-tools/TECkit_Compile.cpp teckit-src/source/Sample-tools/TECkit_Compile.cpp
--- teckit-2.5.10/source/Sample-tools/TECkit_Compile.cpp	Tue May 05 23:09:53 2020
+++ teckit-src/source/Sample-tools/TECkit_Compile.cpp	Wed May 06 09:05:22 2020
@@ -24,13 +24,13 @@
 #endif
 
 extern "C" {
-	static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line);
+	static void CALLBACK errFunc(void* userData, const char* msg, const char* param, UInt32 line);
 };
 
 static
 void
 CALLBACK
-errFunc(void* /*userData*/, char* msg, char* param, UInt32 line)
+errFunc(void* /* userData */, const char* msg, const char* param, UInt32 line)
 {
 	fprintf(stderr, "%s", msg);
 	if (param != 0)