summaryrefslogtreecommitdiff
path: root/dev-libs/libuninum/files/libuninum-2.7-64bit.patch
blob: 65a8b67389baf939fad20eb3ba58293c5f35172a (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
--- libuninum-2.7.orig/uninum.c
+++ libuninum-2.7/uninum.c
@@ -35,11 +35,11 @@
  */
 
 
-#define ucslen(x) wcslen((signed long *) x)
-#define ucscpy(x,y) (UTF32 *)wcscpy((signed long *)x,(signed long *)y)
-#define ucscat(x,y) (UTF32 *)wcscat((signed long *)x,(signed long *)y)
-#define ucschr(x,y) (UTF32 *)wcschr((signed long *)x,(signed long)y)
-#define ucsrchr(x,y) (UTF32 *)wcsrchr((signed long *)x,(signed long)y)
+#define ucslen(x) wcslen((wchar_t *) x)
+#define ucscpy(x,y) (UTF32 *)wcscpy((wchar_t *)x,(wchar_t *)y)
+#define ucscat(x,y) (UTF32 *)wcscat((wchar_t *)x,(wchar_t *)y)
+#define ucschr(x,y) (UTF32 *)wcschr((wchar_t *)x,(wchar_t)y)
+#define ucsrchr(x,y) (UTF32 *)wcsrchr((wchar_t *)x,(wchar_t)y)
 
 #define UNINUM
 
--- libuninum-2.7.orig/unicode.h
+++ libuninum-2.7/unicode.h
@@ -1,8 +1,10 @@
-typedef unsigned long	UTF32;	/* at least 32 bits */
-typedef unsigned short	UTF16;	/* at least 16 bits */
-typedef unsigned short	UCS2;	/* at least 16 bits */
-typedef unsigned char	UTF8;	/* 8 bits */
-typedef unsigned char	Boolean; /* 0 or 1 */
+#include <stdint.h>
+
+typedef uint32_t	UTF32;	/* 32 bits */
+typedef uint16_t	UTF16;	/* 16 bits */
+typedef uint16_t	UCS2;	/* 16 bits */
+typedef uint8_t	UTF8;	/* 8 bits */
+typedef uint8_t	Boolean; /* 0 or 1 */
 
 #define UNI_MAX_ASCII (UTF32)0x0000007F 
 #define UNI_MAX_BMP   (UTF32)0x0000FFFF