This file is part of MXE. See LICENSE.md for licensing information.Contains ad hoc patches for cross building.From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Mark Brand <mabrand@mabrand.nl>Date: Wed, 18 May 2022 12:59:35 +0200Subject: [PATCH 1/2] add missing prototype for strsignalBorrowed from:https://www.mail-archive.com/cygwin@cygwin.com/msg169420.htmlhttps://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=sim/common/nrun.c;h=1ceb0837e2c21aa081043bf62cc3f53aae235bd5;hp=0caa82062a240fa3609d7b221463ec9e07bbb5a5;hb=fe3486178040db782f18d67a95a1e63bdf68eedf;hpb=2a83fd8f4806f8580d86057dc00bfdb5efcfa1f6diff --git a/gdb/event-top.c b/gdb/event-top.cindex 1111111..2222222 100644--- a/gdb/event-top.c+++ b/gdb/event-top.c@@ -80,6 +80,11 @@ static void async_sigtstp_handler (gdb_client_data); #endif static void async_sigterm_handler (gdb_client_data arg);+#ifndef HAVE_STRSIGNAL+/* While libiberty provides a fallback, it doesn't provide a prototype. */+extern "C" char *strsignal (int __signo);+#endif+ /* Instead of invoking (and waiting for) readline to read the command line and pass it back for processing, we use readline's alternate interface, via callback functions, so that the event loop can reactFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Mark Brand <mabrand@mabrand.nl>Date: Mon, 20 Jan 2025 14:37:14 +0100Subject: [PATCH 2/2] fix test for HAVE_DECL_GETPAGESIZEThis is set to 0 or 1 by configure. Testing with #ifndef did not work,leading to a warning about undeclared function 'alarm'. On gcc14 this isan error.diff --git a/libbacktrace/mmap.c b/libbacktrace/mmap.cindex 1111111..2222222 100644--- a/libbacktrace/mmap.c+++ b/libbacktrace/mmap.c@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "backtrace.h" #include "internal.h"-#ifndef HAVE_DECL_GETPAGESIZE+#if HAVE_DECL_GETPAGESIZE < 1 extern int getpagesize (void); #endifdiff --git a/libbacktrace/mmapio.c b/libbacktrace/mmapio.cindex 1111111..2222222 100644--- a/libbacktrace/mmapio.c+++ b/libbacktrace/mmapio.c@@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "backtrace.h" #include "internal.h"-#ifndef HAVE_DECL_GETPAGESIZE+#if HAVE_DECL_GETPAGESIZE < 1 extern int getpagesize (void); #endif
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Wed, 18 May 2022 12:59:35 +0200
Subject: [PATCH 1/2] add missing prototype for strsignal
Borrowed from:
https://www.mail-archive.com/cygwin@cygwin.com/msg169420.html
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=sim/common/nrun.c;h=1ceb0837e2c21aa081043bf62cc3f53aae235bd5;hp=0caa82062a240fa3609d7b221463ec9e07bbb5a5;hb=fe3486178040db782f18d67a95a1e63bdf68eedf;hpb=2a83fd8f4806f8580d86057dc00bfdb5efcfa1f6
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 1111111..2222222 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -80,6 +80,11 @@ static void async_sigtstp_handler (gdb_client_data);
#endif
static void async_sigterm_handler (gdb_client_data arg);
+#ifndef HAVE_STRSIGNAL
+/* While libiberty provides a fallback, it doesn't provide a prototype. */
+extern "C" char *strsignal (int __signo);
+#endif
+
/* Instead of invoking (and waiting for) readline to read the command
line and pass it back for processing, we use readline's alternate
interface, via callback functions, so that the event loop can react
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 20 Jan 2025 14:37:14 +0100
Subject: [PATCH 2/2] fix test for HAVE_DECL_GETPAGESIZE
This is set to 0 or 1 by configure. Testing with #ifndef did not work,
leading to a warning about undeclared function 'alarm'. On gcc14 this is
an error.
diff --git a/libbacktrace/mmap.c b/libbacktrace/mmap.c
index 1111111..2222222 100644
--- a/libbacktrace/mmap.c
+++ b/libbacktrace/mmap.c
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "backtrace.h"
#include "internal.h"
-#ifndef HAVE_DECL_GETPAGESIZE
+#if HAVE_DECL_GETPAGESIZE < 1
extern int getpagesize (void);
#endif
diff --git a/libbacktrace/mmapio.c b/libbacktrace/mmapio.c
index 1111111..2222222 100644
--- a/libbacktrace/mmapio.c
+++ b/libbacktrace/mmapio.c
@@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "backtrace.h"
#include "internal.h"
-#ifndef HAVE_DECL_GETPAGESIZE
+#if HAVE_DECL_GETPAGESIZE < 1
extern int getpagesize (void);
#endif