Skip to content

Commit

Permalink
Void NaN and infinity on VAX. Only fixes build, not usage. See:
Browse files Browse the repository at this point in the history
  • Loading branch information
jklos committed Jan 2, 2025
1 parent d8dbb1e commit b385e9c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lang/perl5/distinfo
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
$NetBSD: distinfo,v 1.185 2024/11/20 07:35:44 wiz Exp $
$NetBSD: distinfo,v 1.186 2025/01/02 15:24:13 jklos Exp $

BLAKE2s (perl-5.40.0.tar.xz) = 6d1a2dc936370f834497bd6ac1b117c3038925c513a81568e1ba1b6f448ad2bc
SHA512 (perl-5.40.0.tar.xz) = a2fb1a24c6367b4043f4e929b2d74fc3bad1415e53b791ed1f219f1701064ae21b2bd3164ba95fcf24eaf458bd54433024ccae43725c0bb82a1ec6a98dc7052d
Size (perl-5.40.0.tar.xz) = 13804184 bytes
SHA1 (patch-Configure) = f3bd324a90254405b3ce8e29846b4ddc9ebf7d73
SHA1 (patch-Makefile.SH) = 56203aea57c429a94760f039a978463b8859b0a9
SHA1 (patch-builtin.c) = 7ac5821ab3f4c9ae29d2cbe9db0407560aee2328
SHA1 (patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__BeOS.pm) = 79e5aeccfa272ca5ec08bffc616d8053ae90ac51
SHA1 (patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm) = 6171a21a24e3bea312155b1d5f692d76ef733d23
SHA1 (patch-cpan_ExtUtils-MakeMaker_t_MM__BeOS.t) = 9b0e7ab85fdab4887b1754599a8879bd7d9f36cc
Expand Down
50 changes: 50 additions & 0 deletions lang/perl5/patches/patch-builtin.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
$NetBSD: patch-builtin.c,v 1.1 2025/01/02 15:24:13 jklos Exp $

--- builtin.c.orig 2025-01-01 21:26:38.327210188 +0000
+++ builtin.c
@@ -90,6 +90,7 @@ XS(XS_builtin_false)
XSRETURN_NO;
}

+#ifndef __vax__
XS(XS_builtin_inf);
XS(XS_builtin_inf)
{
@@ -109,12 +110,15 @@ XS(XS_builtin_nan)
EXTEND(SP, 1);
XSRETURN_NV(NV_NAN);
}
+#endif

enum {
BUILTIN_CONST_FALSE,
BUILTIN_CONST_TRUE,
+#ifndef __vax__
BUILTIN_CONST_INF,
BUILTIN_CONST_NAN,
+#endif
};

static OP *ck_builtin_const(pTHX_ OP *entersubop, GV *namegv, SV *ckobj)
@@ -135,8 +139,10 @@ static OP *ck_builtin_const(pTHX_ OP *en
switch(builtin->ckval) {
case BUILTIN_CONST_FALSE: constval = &PL_sv_no; break;
case BUILTIN_CONST_TRUE: constval = &PL_sv_yes; break;
+#ifndef __vax__
case BUILTIN_CONST_INF: constval = newSVnv(NV_INF); break;
case BUILTIN_CONST_NAN: constval = newSVnv(NV_NAN); break;
+#endif
default:
DIE(aTHX_ "panic: unrecognised builtin_const value %" IVdf,
builtin->ckval);
@@ -546,8 +552,10 @@ static const struct BuiltinFuncDescripto
/* constants */
{ "true", SHORTVER(5,39), &XS_builtin_true, &ck_builtin_const, BUILTIN_CONST_TRUE, false },
{ "false", SHORTVER(5,39), &XS_builtin_false, &ck_builtin_const, BUILTIN_CONST_FALSE, false },
+#ifndef __vax__
{ "inf", NO_BUNDLE, &XS_builtin_inf, &ck_builtin_const, BUILTIN_CONST_INF, true },
{ "nan", NO_BUNDLE, &XS_builtin_nan, &ck_builtin_const, BUILTIN_CONST_NAN, true },
+#endif

/* unary functions */
{ "is_bool", NO_BUNDLE, &XS_builtin_func1_scalar, &ck_builtin_func1, OP_IS_BOOL, true },

0 comments on commit b385e9c

Please sign in to comment.