199 lines
5.1 KiB
Diff
199 lines
5.1 KiB
Diff
Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/48a858e7ec54d7c3dceeb520883e4a5f36b4f284/main/perl-tk/gcc14.patch
|
|
|
|
--- config/signedchar.c
|
|
+++ ./config/signedchar.c
|
|
@@ -1,4 +1,4 @@
|
|
-main()
|
|
+int main()
|
|
{
|
|
signed char x = 'a';
|
|
return (x - 'a');
|
|
--- config/unsigned.c
|
|
+++ ./config/unsigned.c
|
|
@@ -1,3 +1,5 @@
|
|
+#include <stdlib.h>
|
|
+
|
|
int main()
|
|
{
|
|
char x[] = "\377";
|
|
--- pTk/config/Hstrdup.c
|
|
+++ ./pTk/config/Hstrdup.c
|
|
@@ -1,4 +1,5 @@
|
|
#include <string.h>
|
|
+#include <stdlib.h>
|
|
|
|
#define STRING "Whatever"
|
|
|
|
--- pTk/config/Hstrtoul.c
|
|
+++ ./pTk/config/Hstrtoul.c
|
|
@@ -1,3 +1,4 @@
|
|
+#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
int main()
|
|
--- pTk/mTk/generic/tkEvent.c
|
|
+++ ./pTk/mTk/generic/tkEvent.c
|
|
@@ -1153,6 +1153,7 @@ TkEventDeadWindow(winPtr)
|
|
Time
|
|
TkCurrentTime(dispPtr, fallbackCurrent)
|
|
TkDisplay *dispPtr; /* Display for which the time is desired. */
|
|
+ int fallbackCurrent;
|
|
{
|
|
register XEvent *eventPtr;
|
|
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
|
|
--- pTk/mTk/generic/tkImage.c
|
|
+++ ./pTk/mTk/generic/tkImage.c
|
|
@@ -1083,6 +1083,8 @@ int x;
|
|
int y;
|
|
int width;
|
|
int height;
|
|
+int imgWidth;
|
|
+int imgHeight;
|
|
{
|
|
Tk_Tile tile = (Tk_Tile) clientData;
|
|
Tk_TileChange *handler;
|
|
--- Event/Event.xs
|
|
+++ ./Event/Event.xs
|
|
@@ -1532,7 +1532,7 @@ PROTOTYPES: DISABLE
|
|
BOOT:
|
|
{
|
|
#ifdef pWARN_NONE
|
|
- SV *old_warn = PL_curcop->cop_warnings;
|
|
+ char *old_warn = PL_curcop->cop_warnings;
|
|
PL_curcop->cop_warnings = pWARN_NONE;
|
|
#endif
|
|
newXS("Tk::Event::INIT", XS_Tk__Event_INIT, file);
|
|
--- config/pregcomp2.c
|
|
+++ ./config/pregcomp2.c
|
|
@@ -4,5 +4,5 @@
|
|
|
|
int main() {
|
|
SV* sv = newSViv(0);
|
|
- regexp* rx = pregcomp(sv, 0);
|
|
+ void *rx = (void *) pregcomp(sv, 0);
|
|
}
|
|
--- pTk/Xlib.t
|
|
+++ ./pTk/Xlib.t
|
|
@@ -331,7 +331,7 @@ VFUNC(int,XIntersectRegion,V_XIntersectR
|
|
#endif /* !DO_X_EXCLUDE */
|
|
|
|
#ifndef XKeycodeToKeysym
|
|
-VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
|
|
+VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned char, int)))
|
|
#endif /* #ifndef XKeycodeToKeysym */
|
|
|
|
#ifndef XKeysymToString
|
|
--- pTk/mTk/generic/tkCanvText.c
|
|
+++ ./pTk/mTk/generic/tkCanvText.c
|
|
@@ -1250,7 +1250,7 @@ GetTextIndex(interp, canvas, itemPtr, ob
|
|
goto doxy;
|
|
}
|
|
|
|
- string = Tcl_GetStringFromObj(obj, &length);
|
|
+ string = Tcl_GetStringFromObj(obj, NULL);
|
|
c = string[0];
|
|
length = strlen(string);
|
|
|
|
--- tkGlue.c
|
|
+++ ./tkGlue.c
|
|
@@ -5549,7 +5549,7 @@ _((pTHX))
|
|
#define COP_WARNINGS_TYPE SV*
|
|
#endif
|
|
#ifdef pWARN_NONE
|
|
- COP_WARNINGS_TYPE old_warn = PL_curcop->cop_warnings;
|
|
+ char *old_warn = PL_curcop->cop_warnings;
|
|
PL_curcop->cop_warnings = pWARN_NONE;
|
|
#endif
|
|
|
|
From 061e4744c01dd2ed461fd0009cb1699c4f37f131 Mon Sep 17 00:00:00 2001
|
|
From: Randy Eckenrode <randy@largeandhighquality.com>
|
|
Date: Thu, 7 Sep 2023 05:17:32 +0200
|
|
Subject: [PATCH 1/2] jpeg: fix build with clang 16
|
|
|
|
The jpeg `configure` script fails to detect clang as a functioning C
|
|
compiler because it uses a test with a `main` that returns an implicit
|
|
`int`, which results in an error with clang 16.
|
|
---
|
|
JPEG/jpeg/configure | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/JPEG/jpeg/configure b/JPEG/jpeg/configure
|
|
index 35c9db5c..ce76b557 100755
|
|
--- a/JPEG/jpeg/configure
|
|
+++ b/JPEG/jpeg/configure
|
|
@@ -623,7 +623,7 @@ cross_compiling=$ac_cv_prog_cc_cross
|
|
cat > conftest.$ac_ext <<EOF
|
|
#line 625 "configure"
|
|
#include "confdefs.h"
|
|
-main(){return(0);}
|
|
+int main(){return(0);}
|
|
EOF
|
|
if { (eval echo configure:629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
ac_cv_prog_cc_works=yes
|
|
|
|
From 3c5126df9b06bd6c87211d762b081cc801368fa5 Mon Sep 17 00:00:00 2001
|
|
From: Christopher Chavez <chrischavez@gmx.us>
|
|
Date: Thu, 14 Sep 2023 06:27:52 -0500
|
|
Subject: [PATCH 2/2] jpeg: more fixes for clang 16
|
|
|
|
---
|
|
JPEG/jpeg/configure | 17 ++++++++++++++---
|
|
1 file changed, 14 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/JPEG/jpeg/configure b/JPEG/jpeg/configure
|
|
index ce76b557..c5593f2f 100755
|
|
--- a/JPEG/jpeg/configure
|
|
+++ b/JPEG/jpeg/configure
|
|
@@ -1281,6 +1281,10 @@ else
|
|
#line 1282 "configure"
|
|
#include "confdefs.h"
|
|
|
|
+#include <stdio.h>
|
|
+#ifdef HAVE_STDLIB_H
|
|
+#include <stdlib.h>
|
|
+#endif
|
|
#ifdef HAVE_PROTOTYPES
|
|
int is_char_signed (int arg)
|
|
#else
|
|
@@ -1298,7 +1302,7 @@ int is_char_signed (arg)
|
|
return 1; /* assume char is signed otherwise */
|
|
}
|
|
char signed_char_check = (char) (-67);
|
|
-main() {
|
|
+int main() {
|
|
exit(is_char_signed((int) signed_char_check));
|
|
}
|
|
EOF
|
|
@@ -1327,6 +1331,10 @@ else
|
|
#line 1328 "configure"
|
|
#include "confdefs.h"
|
|
|
|
+#include <stdio.h>
|
|
+#ifdef HAVE_STDLIB_H
|
|
+#include <stdlib.h>
|
|
+#endif
|
|
#ifdef HAVE_PROTOTYPES
|
|
int is_shifting_signed (long arg)
|
|
#else
|
|
@@ -1350,7 +1358,7 @@ int is_shifting_signed (arg)
|
|
printf("I fear the JPEG software will not work at all.\n\n");
|
|
return 0; /* try it with unsigned anyway */
|
|
}
|
|
-main() {
|
|
+int main() {
|
|
exit(is_shifting_signed(-0x7F7E80B1L));
|
|
}
|
|
EOF
|
|
@@ -1380,7 +1388,10 @@ else
|
|
#include "confdefs.h"
|
|
|
|
#include <stdio.h>
|
|
-main() {
|
|
+#ifdef HAVE_STDLIB_H
|
|
+#include <stdlib.h>
|
|
+#endif
|
|
+int main() {
|
|
if (fopen("conftestdata", "wb") != NULL)
|
|
exit(0);
|
|
exit(1);
|