ast-ksh: fix compilation on NetBSD, possibly linux too.
Fix "storage size of buf is not known" likely caused by it being defined to be something with sizeof(). add LDFLAGS -lm to all operating systems (I see undefined reference to frexpl/ldexpl), remove duplicate from other operating systems. bump PKGREVISION sinze L_tmpnam will be changed for the few who can build the package.
This commit is contained in:
parent
5a69745cd9
commit
12f1d725ce
4 changed files with 28 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.22 2014/11/06 12:25:36 joerg Exp $
|
||||
# $NetBSD: Makefile,v 1.23 2017/02/19 20:18:16 maya Exp $
|
||||
|
||||
.include "../../shells/ast-ksh/Makefile.common"
|
||||
|
||||
PKGREVISION= 1
|
||||
PKGREVISION= 2
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.common,v 1.34 2016/03/22 19:31:15 richard Exp $
|
||||
# $NetBSD: Makefile.common,v 1.35 2017/02/19 20:18:16 maya Exp $
|
||||
#
|
||||
# used by shells/ast-ksh/Makefile
|
||||
# used by shells/static-ast-ksh/Makefile
|
||||
|
@ -36,17 +36,14 @@ PDKSH= /bin/ksh
|
|||
# this is kind of a hack -
|
||||
# better would be to fix the 'meta makefile' to pass this
|
||||
# or to use the ksh-provided math routines.
|
||||
|
||||
.if ${OPSYS} == "DragonFly"
|
||||
KSH93_MAKEFLAGS+= CCFLAGS=-lm
|
||||
.endif
|
||||
KSH93_MAKEFLAGS+= LDFLAGS=-lm
|
||||
|
||||
.if ${OPSYS} == "SunOS"
|
||||
# need c99 and _XPG6 in order to avoid patching libast/features/standards
|
||||
# __EXTENSIONS__ is needed in case of __STDC__ == 1 (i.e. -std=c99 not gnu99)
|
||||
# for things like mamake, ratz and some others for now.
|
||||
USE_LANGUAGES+= c99
|
||||
KSH93_MAKEFLAGS+= LDFLAGS=-lm CCFLAGS="-D_XPG6 -D__EXTENSIONS__"
|
||||
USE_LANGUAGES+= c99
|
||||
KSH93_MAKEFLAGS+= CCFLAGS="-D_XPG6 -D__EXTENSIONS__"
|
||||
.endif
|
||||
|
||||
PKG_SHELL= bin/ksh93
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.19 2015/11/02 23:00:34 agc Exp $
|
||||
$NetBSD: distinfo,v 1.20 2017/02/19 20:18:16 maya Exp $
|
||||
|
||||
SHA1 (INIT.2012-08-01.tgz) = 0b472a615db384fe707042baaa3347dc1aa1c81e
|
||||
RMD160 (INIT.2012-08-01.tgz) = 48f1830bc85a26125dd986256d38be435668d445
|
||||
|
@ -10,6 +10,7 @@ SHA512 (ast-ksh.2012-08-01.tgz) = 244df8c4cbcd719da24bfc6e52272488e0a06a7274725c
|
|||
Size (ast-ksh.2012-08-01.tgz) = 2053532 bytes
|
||||
SHA1 (patch-ab) = 98ec5d5e90f3f9bf45bdbd7199f85e932e07eada
|
||||
SHA1 (patch-ad) = a85c7ac72c3443e4c140ee36bbc35b2a4eb42062
|
||||
SHA1 (patch-src_lib_libast_comp_tmpnam.c) = 829fbedaffb46a5a2dd18dc4782cb7074521357d
|
||||
SHA1 (patch-src_lib_libast_features_lib) = 28bee8d00364a415c46bef63899329bc3326fe34
|
||||
SHA1 (patch-src_lib_libast_features_map.c) = efc25164d5e153ee3fc3b519d4d2abbc7c3f2f6b
|
||||
SHA1 (patch-src_lib_libast_features_sys) = 32a3f793395bb06e23c58e31ef534415da0d626b
|
||||
|
|
20
shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c
Normal file
20
shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-src_lib_libast_comp_tmpnam.c,v 1.1 2017/02/19 20:18:16 maya Exp $
|
||||
|
||||
Workaround "storage size of 'buf' isn't known",
|
||||
likely from #define P_tmpdir in ast_stdio.h.
|
||||
|
||||
just define it to be a sensible size.
|
||||
|
||||
--- src/lib/libast/comp/tmpnam.c.orig 2006-09-22 15:28:13.000000000 +0000
|
||||
+++ src/lib/libast/comp/tmpnam.c
|
||||
@@ -38,9 +38,8 @@
|
||||
#define extern __EXPORT__
|
||||
#endif
|
||||
|
||||
-#ifndef L_tmpnam
|
||||
+#undef L_tmpnam /* Defined as sizeof(P_tmpdir) but P_tmpdir is defined as empty */
|
||||
#define L_tmpnam 25
|
||||
-#endif
|
||||
|
||||
extern char*
|
||||
tmpnam(char* s)
|
Loading…
Reference in a new issue