Fossil SCM

unbreak win32

jan.nijtmans 2012-11-29 08:57 UTC ticket-e399bc
Commit 0ff5b5ed0f6a3934aaa1d5dcd4be3e93bf5eff83
1 file changed +7 -4
+7 -4
--- src/utf8.c
+++ src/utf8.c
@@ -20,10 +20,13 @@
2020
** filesystem and operating system.
2121
*/
2222
#include "config.h"
2323
#include "utf8.h"
2424
#include <sqlite3.h>
25
+#ifdef _WIN32
26
+# include <windows.h>
27
+#endif
2528
2629
/*
2730
** Translate MBCS to UTF8. Return a pointer to the translated text.
2831
** Call fossil_mbcs_free() to deallocate any memory used to store the
2932
** returned pointer when done.
@@ -90,13 +93,13 @@
9093
9194
/*
9295
** Deallocate any memory that was previously allocated by
9396
** fossil_unicode_to_utf8().
9497
*/
95
-void fossil_unicode_free(char *pOld){
98
+void fossil_unicode_free(void *pOld){
9699
#ifdef _WIN32
97
- sqlite3_free(zOld);
100
+ sqlite3_free(pOld);
98101
#else
99102
/* No-op on unix */
100103
#endif
101104
}
102105
@@ -148,13 +151,13 @@
148151
** Deallocate any memory that was previously allocated by
149152
** fossil_filename_to_utf8().
150153
*/
151154
void fossil_filename_free(char *pOld){
152155
#if defined(_WIN32)
153
- sqlite3_free(zOld);
156
+ sqlite3_free(pOld);
154157
#elif defined(__APPLE__)
155
- fossil_free(zOld);
158
+ fossil_free(pOld);
156159
#else
157160
/* No-op on all other unix */
158161
#endif
159162
}
160163
161164
--- src/utf8.c
+++ src/utf8.c
@@ -20,10 +20,13 @@
20 ** filesystem and operating system.
21 */
22 #include "config.h"
23 #include "utf8.h"
24 #include <sqlite3.h>
 
 
 
25
26 /*
27 ** Translate MBCS to UTF8. Return a pointer to the translated text.
28 ** Call fossil_mbcs_free() to deallocate any memory used to store the
29 ** returned pointer when done.
@@ -90,13 +93,13 @@
90
91 /*
92 ** Deallocate any memory that was previously allocated by
93 ** fossil_unicode_to_utf8().
94 */
95 void fossil_unicode_free(char *pOld){
96 #ifdef _WIN32
97 sqlite3_free(zOld);
98 #else
99 /* No-op on unix */
100 #endif
101 }
102
@@ -148,13 +151,13 @@
148 ** Deallocate any memory that was previously allocated by
149 ** fossil_filename_to_utf8().
150 */
151 void fossil_filename_free(char *pOld){
152 #if defined(_WIN32)
153 sqlite3_free(zOld);
154 #elif defined(__APPLE__)
155 fossil_free(zOld);
156 #else
157 /* No-op on all other unix */
158 #endif
159 }
160
161
--- src/utf8.c
+++ src/utf8.c
@@ -20,10 +20,13 @@
20 ** filesystem and operating system.
21 */
22 #include "config.h"
23 #include "utf8.h"
24 #include <sqlite3.h>
25 #ifdef _WIN32
26 # include <windows.h>
27 #endif
28
29 /*
30 ** Translate MBCS to UTF8. Return a pointer to the translated text.
31 ** Call fossil_mbcs_free() to deallocate any memory used to store the
32 ** returned pointer when done.
@@ -90,13 +93,13 @@
93
94 /*
95 ** Deallocate any memory that was previously allocated by
96 ** fossil_unicode_to_utf8().
97 */
98 void fossil_unicode_free(void *pOld){
99 #ifdef _WIN32
100 sqlite3_free(pOld);
101 #else
102 /* No-op on unix */
103 #endif
104 }
105
@@ -148,13 +151,13 @@
151 ** Deallocate any memory that was previously allocated by
152 ** fossil_filename_to_utf8().
153 */
154 void fossil_filename_free(char *pOld){
155 #if defined(_WIN32)
156 sqlite3_free(pOld);
157 #elif defined(__APPLE__)
158 fossil_free(pOld);
159 #else
160 /* No-op on all other unix */
161 #endif
162 }
163
164

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button