pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/perl58 On VAX, feeding a base "NaN" to nawk cause...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e77fbd2d203e
branches:  trunk
changeset: 485429:e77fbd2d203e
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Dec 10 23:12:47 2004 +0000

description:
On VAX, feeding a base "NaN" to nawk causes nawk to core dump since
it tries to interpret it as a number, which causes an FP exception.
Fix this by replacing "NaN" with "*NaN*" which hides the problem.
This makes perl Configure and build correctly on NetBSD-2.0/vax.  Fix
provided by John Klos in private email.

diffstat:

 lang/perl58/hacks.mk |  18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r e910409aadd3 -r e77fbd2d203e lang/perl58/hacks.mk
--- a/lang/perl58/hacks.mk      Fri Dec 10 22:20:18 2004 +0000
+++ b/lang/perl58/hacks.mk      Fri Dec 10 23:12:47 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.3 2004/11/14 08:00:14 jlam Exp $
+# $NetBSD: hacks.mk,v 1.4 2004/12/10 23:12:47 jlam Exp $
 
 .include "../../mk/compiler.mk"
 
@@ -34,3 +34,19 @@
 PKG_HACKS+=            powerpc-codegen
 BUILDLINK_TRANSFORM+=  rm:-O[0-9]*
 .endif
+
+### [Fri Dec 10 18:09:51 EST 2004 : jlam]
+### On VAX, feeding a base "NaN" to nawk causes nawk to core dump since
+### it tries to interpret it as a number, which causes an FP exception.
+### Modify files that pass through nawk to not have bare "NaN"s.
+###
+.if !empty(MACHINE_PLATFORM:M*-*-vax)
+PKG_HACKS+=            NaN-vax-exception
+.PHONY: NaN-vax-exception
+pre-configure: NaN-vax-exception
+NaN-vax-exception:
+       cd ${WRKSRC}; for file in MANIFEST; do                          \
+               ${MV} $$file $$file.NaN;                                \
+               ${SED} -e "s,NaN,*NaN*,g" $$file.NaN > $$file;          \
+       done
+.endif



Home | Main Index | Thread Index | Old Index