diff options
author | 2024-01-05 22:04:36 +0100 | |
---|---|---|
committer | 2024-01-05 22:07:42 +0100 | |
commit | ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5 (patch) | |
tree | 1dc78935267107a84ffdc495a148c02d8f4b6725 /dev-libs/libuninum/files | |
parent | games-puzzle/gnome-sudoku: drop 45.1, 45.2 (diff) | |
download | gentoo-ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5.tar.gz gentoo-ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5.tar.bz2 gentoo-ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5.zip |
dev-libs/libuninum: fix incompatible pointer type
Closes: https://bugs.gentoo.org/920524
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-libs/libuninum/files')
-rw-r--r-- | dev-libs/libuninum/files/libuninum-2.7-64bit.patch | 37 | ||||
-rw-r--r-- | dev-libs/libuninum/files/libuninum-2.7-c99.patch | 30 |
2 files changed, 67 insertions, 0 deletions
diff --git a/dev-libs/libuninum/files/libuninum-2.7-64bit.patch b/dev-libs/libuninum/files/libuninum-2.7-64bit.patch new file mode 100644 index 000000000000..65a8b67389ba --- /dev/null +++ b/dev-libs/libuninum/files/libuninum-2.7-64bit.patch @@ -0,0 +1,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 diff --git a/dev-libs/libuninum/files/libuninum-2.7-c99.patch b/dev-libs/libuninum/files/libuninum-2.7-c99.patch new file mode 100644 index 000000000000..5e68d8bec148 --- /dev/null +++ b/dev-libs/libuninum/files/libuninum-2.7-c99.patch @@ -0,0 +1,30 @@ +Avoid an implicit declaration of exit in the configure script. This +ensures that the package continues to build with future compilers +which do not support such implicit declarations by default. + +diff --git a/configure b/configure +index 8fd0eed37cb997de..f5ebc89db38d88f4 100755 +--- a/configure ++++ b/configure +@@ -4323,8 +4323,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -18747,8 +18747,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext |