mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-25 07:08:13 -07:00
dev-libs/libuninum: fix incompatible pointer type
Closes: https://bugs.gentoo.org/920524 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
37
dev-libs/libuninum/files/libuninum-2.7-64bit.patch
Normal file
37
dev-libs/libuninum/files/libuninum-2.7-64bit.patch
Normal file
@@ -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
|
||||
30
dev-libs/libuninum/files/libuninum-2.7-c99.patch
Normal file
30
dev-libs/libuninum/files/libuninum-2.7-c99.patch
Normal file
@@ -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
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -13,6 +13,14 @@ KEYWORDS="amd64 x86"
|
||||
LICENSE="GPL-2 GPL-2+ LGPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="dev-libs/gmp:="
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.7-64bit.patch"
|
||||
"${FILESDIR}/${PN}-2.7-c99.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
Reference in New Issue
Block a user