Subject: m4-1.4 patch
To: None <port-pmax@NetBSD.ORG>
From: None <gord@engg.ucalgary.ca>
List: port-pmax
Date: 02/21/1996 17:01:13
Hi!
The following is a carbon copy of what was sent to bug-gnu-utils Re:
my m4 compilation problems:
=====================
m4 compilation fails on NetBSD/pmax 1.1A because stack_t (really
struct sigaltstack) doesn't have a member named ss_sp.
The following patch gets configure to detect when stack_t.ss_sp is an
error, and to #define ss_sp ss_base in these situations (since
struct sigaltstack has an ss_base member in NetBSD 1.1).
--Gord
--
Gord Matzigkeit | This is my NetBSD development account
gord@engg.ucalgary.ca | Please send mail to gord@enci.ucalgary.ca
diff -u m4-1.4/ChangeLog.orig m4-1.4/ChangeLog
--- m4-1.4/ChangeLog.orig Sat Nov 5 20:43:23 1994
+++ m4-1.4/ChangeLog Wed Feb 21 16:09:44 1996
@@ -1,3 +1,10 @@
+Wed Feb 21 16:07:56 1996 Gordon Matzigkeit <gord@b21.engg.ucalgary.ca>
+
+ * acconfig.h: Added declaration of ss_sp.
+
+ * configure.in (use_stackovf): Added test for ss_sp member in
+ stack_t. If not found, #define ss_sp ss_base.
+
Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
* Release 1.4.
diff -u m4-1.4/acconfig.h.orig m4-1.4/acconfig.h
--- m4-1.4/acconfig.h.orig Wed Feb 21 15:47:44 1996
+++ m4-1.4/acconfig.h Wed Feb 21 15:58:32 1996
@@ -25,6 +25,9 @@
/* Define to struct sigaltstack if stack_t is not defined in sys/signal.h */
#undef stack_t
+/* Define to ss_base, if stack_t doesn't have an ss_sp member */
+#undef ss_sp
+
/* Define to 1 if using stack overflow detection. */
#undef USE_STACKOVF
diff -u m4-1.4/configure.in.orig m4-1.4/configure.in
--- m4-1.4/configure.in.orig Sat Nov 5 20:40:38 1994
+++ m4-1.4/configure.in Wed Feb 21 15:58:30 1996
@@ -69,6 +69,9 @@
AC_EGREP_HEADER(rlim_t, sys/resource.h, , AC_DEFINE(rlim_t, int))
AC_EGREP_HEADER(stack_t, signal.h, , AC_DEFINE(stack_t, struct sigaltstack))
AC_EGREP_HEADER(sigcontext, signal.h, AC_DEFINE(HAVE_SIGCONTEXT))
+ AC_TRY_COMPILE([#include <signal.h>],
+ [stack_t ss; ss.ss_sp;],,
+ AC_DEFINE(ss_sp, ss_base))
fi
AC_MSG_CHECKING(if changeword is wanted)