From 8afa46d6c1d401fbd0f5aebe4cae112bca0d1bbd Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 1 Aug 2011 05:37:12 +0000 Subject: Fix void main, which clang won't accept. While here, fix an LP64 issue caught by gcc (malloc without stdlib.h) so bump PKGREVISION. --- devel/libtai/Makefile | 4 ++-- devel/libtai/distinfo | 6 ++++-- devel/libtai/patches/patch-aa | 24 ++++++++++++++++++++---- devel/libtai/patches/patch-trycpp_c | 12 ++++++++++++ devel/libtai/patches/patch-yearcal_c | 15 +++++++++++++++ 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 devel/libtai/patches/patch-trycpp_c create mode 100644 devel/libtai/patches/patch-yearcal_c (limited to 'devel/libtai') diff --git a/devel/libtai/Makefile b/devel/libtai/Makefile index 29c794840e7..d11ab5c601e 100644 --- a/devel/libtai/Makefile +++ b/devel/libtai/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.4 2008/07/30 10:36:27 schmonz Exp $ +# $NetBSD: Makefile,v 1.5 2011/08/01 05:37:12 dholland Exp $ # DISTNAME= libtai-0.60 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel MASTER_SITES= ${HOMEPAGE} diff --git a/devel/libtai/distinfo b/devel/libtai/distinfo index d85cb7d4846..614192d82d4 100644 --- a/devel/libtai/distinfo +++ b/devel/libtai/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2008/07/30 10:36:27 schmonz Exp $ +$NetBSD: distinfo,v 1.3 2011/08/01 05:37:12 dholland Exp $ SHA1 (libtai-0.60.tar.gz) = f4682fb2a98dd7d434aa0cecd9254a58a0bfd9fb RMD160 (libtai-0.60.tar.gz) = 706111781e5e5bd7ae888e3cdc169d1d8d29de6f Size (libtai-0.60.tar.gz) = 17300 bytes -SHA1 (patch-aa) = af02dc2acf416ae63f93de08bdafdad80faebc12 +SHA1 (patch-aa) = cc47ecdcbb4ac5259bfc7a3b05ed6c9560cbba17 +SHA1 (patch-trycpp_c) = 1bb21fc210ea713b0729ff92b09b6bd9e56e90ac +SHA1 (patch-yearcal_c) = 3935f1c00a2dacfb56f6eb0956c194e115d498dd diff --git a/devel/libtai/patches/patch-aa b/devel/libtai/patches/patch-aa index 5366dbf7c7f..db963f3af6e 100644 --- a/devel/libtai/patches/patch-aa +++ b/devel/libtai/patches/patch-aa @@ -1,12 +1,28 @@ -$NetBSD: patch-aa,v 1.1 2008/07/30 10:36:27 schmonz Exp $ +$NetBSD: patch-aa,v 1.2 2011/08/01 05:37:12 dholland Exp $ ---- leapsecs_read.c.orig 1998-09-04 22:33:37.000000000 -0400 +Use malloc correctly. +Don't declare own errno. +Needs unistd.h. + +--- leapsecs_read.c.orig 1998-10-13 16:52:20.000000000 +0000 +++ leapsecs_read.c -@@ -2,6 +2,7 @@ +@@ -2,7 +2,9 @@ #include #include #include +-extern int errno; ++#include +#include - extern int errno; ++ #include "tai.h" #include "leapsecs.h" + +@@ -29,7 +31,7 @@ int leapsecs_read() + + if (fstat(fd,&st) == -1) { close(fd); return -1; } + +- t = (struct tai *) malloc(st.st_size); ++ t = malloc(st.st_size); + if (!t) { close(fd); return -1; } + + n = read(fd,(char *) t,st.st_size); diff --git a/devel/libtai/patches/patch-trycpp_c b/devel/libtai/patches/patch-trycpp_c new file mode 100644 index 00000000000..3c5d5ed972d --- /dev/null +++ b/devel/libtai/patches/patch-trycpp_c @@ -0,0 +1,12 @@ +$NetBSD: patch-trycpp_c,v 1.1 2011/08/01 05:37:12 dholland Exp $ + +Fix illegal C. + +--- trycpp.c~ 1998-10-13 16:52:20.000000000 +0000 ++++ trycpp.c +@@ -1,4 +1,4 @@ +-void main() ++int main() + { + #ifdef NeXT + printf("nextstep\n"); exit(0); diff --git a/devel/libtai/patches/patch-yearcal_c b/devel/libtai/patches/patch-yearcal_c new file mode 100644 index 00000000000..984308c9b49 --- /dev/null +++ b/devel/libtai/patches/patch-yearcal_c @@ -0,0 +1,15 @@ +$NetBSD: patch-yearcal_c,v 1.1 2011/08/01 05:37:12 dholland Exp $ + +Fix illegal C. + +--- yearcal.c~ 1998-10-13 16:52:20.000000000 +0000 ++++ yearcal.c +@@ -16,7 +16,7 @@ char *montab[] = { + , "December" + } ; + +-void main(argc,argv) ++int main(argc,argv) + int argc; + char **argv; + { -- cgit v1.2.3