Skip to content

Commit 5275ccd

Browse files
wx4stgDerThorsten
andauthored
M4 3.1.73 (#1917)
* m4 draft 3.1.73 * m4 draft 3.1.73 * fixes for m4 --------- Co-authored-by: DerThorsten <derthorstenbeier@gmail.com>
1 parent c7e1d72 commit 5275ccd

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
autoreconf -f
2+
emconfigure ./configure --prefix=${PREFIX} --host=${HOST} ac_cv_have_decl_alarm=no gl_cv_func_sleep_works=yes MAKEINFO=true
3+
emmake make -j${CPU_COUNT}
4+
emmake make install
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From 1d3f4daa3a9a357612cdd2dbc6e22f6f73d1173f Mon Sep 17 00:00:00 2001
2+
From: Sam Gardner <sam@wx4stg.com>
3+
Date: Wed, 19 Feb 2025 19:27:18 -0600
4+
Subject: [PATCH] patches for emscripten-forge build
5+
6+
---
7+
lib/obstack.c | 10 ++++++++--
8+
lib/obstack.h | 6 +++++-
9+
2 files changed, 13 insertions(+), 3 deletions(-)
10+
11+
diff --git a/lib/obstack.c b/lib/obstack.c
12+
index 6e7b52c..66b4f1f 100644
13+
--- a/lib/obstack.c
14+
+++ b/lib/obstack.c
15+
@@ -76,6 +76,12 @@
16+
MAX (sizeof (uintmax_t), \
17+
sizeof (void *)))
18+
19+
+__attribute__((noreturn)) void obstack_default_failed_handler(void) {
20+
+ abort();
21+
+}
22+
+
23+
+__attribute__((noreturn)) void (*obstack_alloc_failed_handler)(void) = obstack_default_failed_handler;
24+
+
25+
/* Call functions with either the traditional malloc/free calling
26+
interface, or the mmalloc/mfree interface (that adds an extra first
27+
argument), based on the value of use_extra_arg. */
28+
@@ -348,7 +354,7 @@ print_and_abort (void)
29+
abort gracefully or use longjump - but shouldn't return. This
30+
variable by default points to the internal function
31+
'print_and_abort'. */
32+
-__attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
33+
- = print_and_abort;
34+
+// __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
35+
+// = print_and_abort;
36+
# endif /* !_OBSTACK_NO_ERROR_HANDLER */
37+
#endif /* !_OBSTACK_ELIDE_CODE */
38+
diff --git a/lib/obstack.h b/lib/obstack.h
39+
index e558133..f9033b3 100644
40+
--- a/lib/obstack.h
41+
+++ b/lib/obstack.h
42+
@@ -227,7 +227,11 @@ extern _OBSTACK_SIZE_T _obstack_memory_used (struct obstack *)
43+
more memory. This can be set to a user defined function which
44+
should either abort gracefully or use longjump - but shouldn't
45+
return. The default action is to print a message and abort. */
46+
-extern __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void);
47+
+//extern __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void);
48+
+#ifndef obstack_alloc_failed_handler
49+
+extern __attribute__((noreturn)) void (*obstack_alloc_failed_handler)(void);
50+
+#endif
51+
+
52+
53+
/* Exit value used when 'print_and_abort' is used. */
54+
extern int obstack_exit_failure;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
context:
2+
version: "1.4.18"
3+
name: "m4"
4+
package:
5+
name: ${{name}}
6+
version: ${{ version }}
7+
8+
source:
9+
url: http://ftp.gnu.org/gnu/m4/m4-${{ version }}.tar.gz
10+
sha256: ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab
11+
patches:
12+
- obstack_alloc_fail.patch
13+
build:
14+
number: 0
15+
16+
requirements:
17+
build:
18+
- "${{ compiler('c') }}"
19+
- make
20+
- libtool
21+
- autoconf
22+
- automake
23+
24+
about:
25+
homepage: http://www.gnu.org/software/m4/
26+
license: LGPL-3.0
27+
license_file: COPYING
28+
summary: 'Implementation of the traditional Unix macro processor.'
29+

0 commit comments

Comments
 (0)