aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2000-01-28 14:36:13 +0800
committerjkoshy <jkoshy@FreeBSD.org>2000-01-28 14:36:13 +0800
commitceca1ef7a285e73da50c283e5a74052c0963202f (patch)
tree928ccd3fc0a6378c105cf68b147e18d0eef7a802
parent00887d5c4eee4c1733272c8f07ff1eb6c5586e82 (diff)
downloadfreebsd-ports-gnome-ceca1ef7a285e73da50c283e5a74052c0963202f.tar.gz
freebsd-ports-gnome-ceca1ef7a285e73da50c283e5a74052c0963202f.tar.zst
freebsd-ports-gnome-ceca1ef7a285e73da50c283e5a74052c0963202f.zip
Fix building of SML/NJ under 4-CURRENT after 1999/7/25.
The trap handler returns different information after this date for numeric error conditions. Since kern.osreldate is not a reliable indicator of when this change occurred, we revert to checking for the presence of a particular #define in <machine/trap.h> to decide if the SML/NJ runtime sources need to use the newer interface. Submitted by: Tom <tcrimi@andrew.cmu.edu> (in part)
-rw-r--r--lang/sml-nj-devel/files/extra-patch-signals21
-rw-r--r--lang/sml-nj-devel/files/patch-ab12
-rw-r--r--lang/sml-nj/files/extra-patch-signals21
-rw-r--r--lang/sml-nj/files/patch-ab12
4 files changed, 60 insertions, 6 deletions
diff --git a/lang/sml-nj-devel/files/extra-patch-signals b/lang/sml-nj-devel/files/extra-patch-signals
new file mode 100644
index 000000000000..5546f0e4f7e8
--- /dev/null
+++ b/lang/sml-nj-devel/files/extra-patch-signals
@@ -0,0 +1,21 @@
+*** src.old/runtime/mach-dep/signal-sysdep.h Sat Jan 22 18:15:21 2000
+--- src/runtime/mach-dep/signal-sysdep.h Sun Jan 23 01:46:53 2000
+***************
+*** 396,403 ****
+ # elif defined(OPSYS_FREEBSD)
+ /** x86, FreeBSD **/
+ # define SIG_FAULT1 SIGFPE
+! # define INT_DIVZERO(s, c) (((s) == SIGFPE) && ((c) == FPE_INTDIV_TRAP))
+! # define INT_OVFLW(s, c) (((s) == SIGFPE) && ((c) == FPE_INTOVF_TRAP))
+
+ # define SIG_GetCode(info, scp) (info)
+ # define SIG_GetPC(scp) ((scp)->sc_pc)
+--- 396,403 ----
+ # elif defined(OPSYS_FREEBSD)
+ /** x86, FreeBSD **/
+ # define SIG_FAULT1 SIGFPE
+! # define INT_DIVZERO(s, c) (((s) == SIGFPE) && ((c) == FPE_INTDIV))
+! # define INT_OVFLW(s, c) (((s) == SIGFPE) && ((c) == FPE_INTOVF))
+
+ # define SIG_GetCode(info, scp) (info)
+ # define SIG_GetPC(scp) ((scp)->sc_pc)
diff --git a/lang/sml-nj-devel/files/patch-ab b/lang/sml-nj-devel/files/patch-ab
index 122da2bf99a8..d8af8af38993 100644
--- a/lang/sml-nj-devel/files/patch-ab
+++ b/lang/sml-nj-devel/files/patch-ab
@@ -1,15 +1,21 @@
--- config/install.sh.orig Wed Aug 5 13:43:43 1998
-+++ config/install.sh Tue Feb 2 12:57:13 1999
-@@ -181,6 +181,12 @@
++++ config/install.sh Sat Jan 29 20:46:09 2000
+@@ -181,6 +181,18 @@
if [ "$?" != "0" ]; then
exit $?
fi
+# we need to patch just before build
++echo "applying source patches"
+patch_file="${FILESDIR}/patch-global-names"
+if [ -f $patch_file ]; then
-+ echo "applying source patches"
+ $PATCH $PATCH_ARGS < $patch_file
+fi
++if grep -w FPE_INTDIV /usr/include/machine/trap.h > /dev/null 2>&1; then
++ patch_file="${FILESDIR}/patch-signals"
++ if [ -f $patch_file ]; then
++ $PATCH $PATCH_ARGS < $patch_file
++ fi
++fi
if [ ! -x $RUNDIR/run.$ARCH-$OPSYS ]; then
cd $SRCDIR/runtime/objs
echo "compiling the run-time system"
diff --git a/lang/sml-nj/files/extra-patch-signals b/lang/sml-nj/files/extra-patch-signals
new file mode 100644
index 000000000000..5546f0e4f7e8
--- /dev/null
+++ b/lang/sml-nj/files/extra-patch-signals
@@ -0,0 +1,21 @@
+*** src.old/runtime/mach-dep/signal-sysdep.h Sat Jan 22 18:15:21 2000
+--- src/runtime/mach-dep/signal-sysdep.h Sun Jan 23 01:46:53 2000
+***************
+*** 396,403 ****
+ # elif defined(OPSYS_FREEBSD)
+ /** x86, FreeBSD **/
+ # define SIG_FAULT1 SIGFPE
+! # define INT_DIVZERO(s, c) (((s) == SIGFPE) && ((c) == FPE_INTDIV_TRAP))
+! # define INT_OVFLW(s, c) (((s) == SIGFPE) && ((c) == FPE_INTOVF_TRAP))
+
+ # define SIG_GetCode(info, scp) (info)
+ # define SIG_GetPC(scp) ((scp)->sc_pc)
+--- 396,403 ----
+ # elif defined(OPSYS_FREEBSD)
+ /** x86, FreeBSD **/
+ # define SIG_FAULT1 SIGFPE
+! # define INT_DIVZERO(s, c) (((s) == SIGFPE) && ((c) == FPE_INTDIV))
+! # define INT_OVFLW(s, c) (((s) == SIGFPE) && ((c) == FPE_INTOVF))
+
+ # define SIG_GetCode(info, scp) (info)
+ # define SIG_GetPC(scp) ((scp)->sc_pc)
diff --git a/lang/sml-nj/files/patch-ab b/lang/sml-nj/files/patch-ab
index 122da2bf99a8..d8af8af38993 100644
--- a/lang/sml-nj/files/patch-ab
+++ b/lang/sml-nj/files/patch-ab
@@ -1,15 +1,21 @@
--- config/install.sh.orig Wed Aug 5 13:43:43 1998
-+++ config/install.sh Tue Feb 2 12:57:13 1999
-@@ -181,6 +181,12 @@
++++ config/install.sh Sat Jan 29 20:46:09 2000
+@@ -181,6 +181,18 @@
if [ "$?" != "0" ]; then
exit $?
fi
+# we need to patch just before build
++echo "applying source patches"
+patch_file="${FILESDIR}/patch-global-names"
+if [ -f $patch_file ]; then
-+ echo "applying source patches"
+ $PATCH $PATCH_ARGS < $patch_file
+fi
++if grep -w FPE_INTDIV /usr/include/machine/trap.h > /dev/null 2>&1; then
++ patch_file="${FILESDIR}/patch-signals"
++ if [ -f $patch_file ]; then
++ $PATCH $PATCH_ARGS < $patch_file
++ fi
++fi
if [ ! -x $RUNDIR/run.$ARCH-$OPSYS ]; then
cd $SRCDIR/runtime/objs
echo "compiling the run-time system"