Date: Sun, 5 Nov 2006 14:11:32 -0500 From: "John Merryweather Cooper" <john_m_cooper@yahoo.com> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/105182: Follow-Up to ports/46487 (Fix to devel/cbind varargs --> stdarg conversion) Message-ID: <1162753892.4691@borgdemon2.13tentmillln.home> Resent-Message-ID: <200611051920.kA5JKIWZ009658@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 105182 >Category: ports >Synopsis: Follow-Up to ports/46487 (Fix to devel/cbind varargs --> stdarg conversion) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 05 19:20:18 GMT 2006 >Closed-Date: >Last-Modified: >Originator: John Merryweather Cooper >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD 6.2-PRERELEASE #27: Sun Oct 29 18:14:27 EST 2006 root@borgdemon2.13tentmillln.home:/usr/obj/usr/src/sys/P4 >Description: Fix to ports/46487 to make it use stdargs.h >How-To-Repeat: N/A >Fix: --- cbind.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # devel # devel/cbind # devel/cbind/Makefile # devel/cbind/distinfo # devel/cbind/files # devel/cbind/files/patch-Makefile # devel/cbind/files/patch-allocate.c # devel/cbind/files/patch-buffer.c # devel/cbind/files/patch-cbind.c # devel/cbind/files/patch-cdep.c # devel/cbind/files/patch-errors.c # devel/cbind/files/patch-files.c # devel/cbind/files/patch-hostinfo # devel/cbind/files/patch-htype.c # devel/cbind/files/patch-units.c # devel/cbind/files/patch-nodeop.c # devel/cbind/pkg-plist # devel/cbind/pkg-descr # echo c - devel mkdir -p devel > /dev/null 2>&1 echo c - devel/cbind mkdir -p devel/cbind > /dev/null 2>&1 echo x - devel/cbind/Makefile sed 's/^X//' >devel/cbind/Makefile << 'END-of-devel/cbind/Makefile' X# New ports collection makefile for: cbind X# Date created: 23 December 2002 X# Whom: David Holm <david@realityrift.com> X# X# $FreeBSD$ X# X XPORTNAME= cbind XPORTVERSION= 6 XCATEGORIES= devel XMASTER_SITES= ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/cdrom/ase02_02/tools/cbind/ \ X ftp://ftp.cnam.fr/pub2/Ada/PAL/swtools/cbind/ XCOMMENT= Translator for "thin" Ada bindings to C XDISTNAME= ${PORTNAME}${PORTVERSION} X XMAINTAINER= david@realityrift.com X XUSE_ZIP= yes X X${WRKSRC}= ${WRKDIR}/${PORTNAME} X X#do-extract: X# @${RM} -rf ${WRKDIR} X# @${MKDIR} ${WRKDIR} X# @(cd ${WRKDIR} && unzip ${PORTSDIR}/distfiles/${DISTNAME}${EXTRACT_SUFX}) X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/cbind ${PREFIX}/bin X @${INSTALL_PROGRAM} ${WRKSRC}/cbfe ${PREFIX}/bin X @${INSTALL_PROGRAM} ${WRKSRC}/cbpp ${PREFIX}/bin X @${MKDIR} ${PREFIX}/share/cbind X @${INSTALL_DATA} ${WRKSRC}/DOCS ${PREFIX}/share/cbind X @${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/cbind X X.include <bsd.port.mk> END-of-devel/cbind/Makefile echo x - devel/cbind/distinfo sed 's/^X//' >devel/cbind/distinfo << 'END-of-devel/cbind/distinfo' XMD5 (cbind6.zip) = 250a2db4799376d3586070c175d6c279 END-of-devel/cbind/distinfo echo c - devel/cbind/files mkdir -p devel/cbind/files > /dev/null 2>&1 echo x - devel/cbind/files/patch-Makefile sed 's/^X//' >devel/cbind/files/patch-Makefile << 'END-of-devel/cbind/files/patch-Makefile' X--- Makefile.orig Fri Sep 22 12:21:32 1995 X+++ Makefile Sun Nov 5 13:48:50 2006 X@@ -1,8 +1,8 @@ X VERSION = 6 X X-CFLAGS= -g -DPUBLIC X+CFLAGS+= -DPUBLIC X LIBS = X-LINKER = cc X+LINKER = $(CC) X X MAKEFILE= Makefile X X@@ -139,7 +139,7 @@ X touch:; touch $(GENED_SRC) X X hostinfo.h: htype hostinfo X- hostinfo $@ X+ ./hostinfo $@ X X c_perf.c: c.prf X gperf -N c_rsvd -t -p c.prf > $@ END-of-devel/cbind/files/patch-Makefile echo x - devel/cbind/files/patch-allocate.c sed 's/^X//' >devel/cbind/files/patch-allocate.c << 'END-of-devel/cbind/files/patch-allocate.c' X--- allocate.c.orig Fri May 19 16:53:10 1995 X+++ allocate.c Mon Dec 23 08:38:17 2002 X@@ -4,7 +4,7 @@ X #include <sys/types.h> X #include <unistd.h> X #include <string.h> X-#include <malloc.h> X+#include <stdlib.h> X #include "ansi.h" X #include "config.h" X #include "allocate.h" END-of-devel/cbind/files/patch-allocate.c echo x - devel/cbind/files/patch-buffer.c sed 's/^X//' >devel/cbind/files/patch-buffer.c << 'END-of-devel/cbind/files/patch-buffer.c' X--- buffer.c.orig Fri May 19 16:53:44 1995 X+++ buffer.c Mon Dec 23 08:38:17 2002 X@@ -5,7 +5,7 @@ X */ X X #include <sys/types.h> X-#include <malloc.h> X+#include <stdlib.h> X #include "ansi.h" X #include "buffer.h" X #include "allocate.h" END-of-devel/cbind/files/patch-buffer.c echo x - devel/cbind/files/patch-cbind.c sed 's/^X//' >devel/cbind/files/patch-cbind.c << 'END-of-devel/cbind/files/patch-cbind.c' X--- cbind.c.orig Fri May 19 17:17:06 1995 X+++ cbind.c Mon Dec 23 08:38:17 2002 X@@ -6,7 +6,7 @@ X #include <sys/types.h> X #include <string.h> X #include <unistd.h> X-#include <malloc.h> X+#include <stdlib.h> X X #undef NULL X #define NULL 0 END-of-devel/cbind/files/patch-cbind.c echo x - devel/cbind/files/patch-cdep.c sed 's/^X//' >devel/cbind/files/patch-cdep.c << 'END-of-devel/cbind/files/patch-cdep.c' X--- cdep.c.orig Fri May 19 19:19:36 1995 X+++ cdep.c Mon Dec 23 08:38:17 2002 X@@ -12,6 +12,7 @@ X #include "cpp.h" X #include "cpp_hide.h" X #include "allocate.h" X+#include "host.h" X X #undef NULL X #define NULL 0 END-of-devel/cbind/files/patch-cdep.c echo x - devel/cbind/files/patch-errors.c sed 's/^X//' >devel/cbind/files/patch-errors.c << 'END-of-devel/cbind/files/patch-errors.c' X--- errors.c.orig Fri Oct 28 19:44:44 1994 X+++ errors.c Sat Nov 4 22:03:45 2006 X@@ -1,5 +1,5 @@ X #include <stdio.h> X-#include <varargs.h> X+#include <stdarg.h> X #include <errno.h> X X int Num_Errors; X@@ -33,75 +33,63 @@ X } X X void X-fatal(f, l, fmt, va_alist) X- char *f, *fmt; X- int l; X- va_dcl X+fatal(char *f, int l, char *fmt, ...) X { X- va_list args; X+ va_list ap; X X- va_start(args); X+ va_start(ap, fmt); X X prefix(f,l,"Internal error"); X- vfprintf(stderr, fmt, args); X+ vfprintf(stderr, fmt, ap); X endmsg(); X X- va_end(args); X+ va_end(ap); X X exit(1); X } X X void X-error(f, l, fmt, va_alist) X- char *f, *fmt; X- int l; X- va_dcl X+error(char *f, int l, char *fmt, ...) X { X- va_list args; X+ va_list ap; X X- va_start(args); X+ va_start(ap, fmt); X X Num_Errors++; X prefix(f,l,"Error"); X- vfprintf(stderr, fmt, args); X+ vfprintf(stderr, fmt, ap); X endmsg(); X X- va_end(args); X+ va_end(ap); X } X X void X-warning(f, l, fmt, va_alist) X- char *f, *fmt; X- int l; X- va_dcl X+warning(char *f, int l, char *fmt, ...) X { X- va_list args; X+ va_list ap; X X- va_start(args); X+ va_start(ap, fmt); X X Num_Warnings++; X prefix(f,l,"Warning"); X- vfprintf(stderr, fmt, args); X+ vfprintf(stderr, fmt, ap); X endmsg(); X X- va_end(args); X+ va_end(ap); X } X X void X-inform(f, l, fmt, va_alist) X- char *f, *fmt; X- int l; X- va_dcl X+inform(char *f, int l, char *fmt, ...) X { X- va_list args; X+ va_list ap; X X- va_start(args); X+ va_start(ap, fmt); X X prefix(f,l,"Info"); X- vfprintf(stderr, fmt, args); X+ vfprintf(stderr, fmt, ap); X endmsg(); X X- va_end(args); X+ va_end(ap); X } X X void X@@ -118,9 +106,6 @@ X static void X unix_error() X { X- extern char *sys_errlist[]; X- extern int sys_nerr; X- X if (errno != 0) { X if (errno > 0 && errno < sys_nerr) { X fputs(sys_errlist[errno], stderr); END-of-devel/cbind/files/patch-errors.c echo x - devel/cbind/files/patch-files.c sed 's/^X//' >devel/cbind/files/patch-files.c << 'END-of-devel/cbind/files/patch-files.c' X--- files.c.orig Fri May 19 16:45:30 1995 X+++ files.c Mon Dec 23 08:38:17 2002 X@@ -1,5 +1,6 @@ X #include "ansi.h" X #include "hostinfo.h" X+#include "host.h" X #include "config.h" X X #include <sys/types.h> X@@ -11,7 +12,7 @@ X #include <sys/mman.h> X #else X #include <unistd.h> X-#include <malloc.h> X+#include <stdlib.h> X #endif X X #undef NULL END-of-devel/cbind/files/patch-files.c echo x - devel/cbind/files/patch-hostinfo sed 's/^X//' >devel/cbind/files/patch-hostinfo << 'END-of-devel/cbind/files/patch-hostinfo' X--- hostinfo.orig Thu Apr 7 15:03:16 1994 X+++ hostinfo Mon Dec 23 08:38:17 2002 X@@ -4,7 +4,7 @@ X X echo '/* This file is automatically generated */' > $1 X echo '#define _H_HOSTINFO_' >> $1 X-htype >> $1 X+./htype >> $1 X X cat > llchk.c << _STOP X main() END-of-devel/cbind/files/patch-hostinfo echo x - devel/cbind/files/patch-htype.c sed 's/^X//' >devel/cbind/files/patch-htype.c << 'END-of-devel/cbind/files/patch-htype.c' X--- htype.c.orig Fri May 19 16:52:08 1995 X+++ htype.c Mon Dec 23 08:38:17 2002 X@@ -132,10 +132,14 @@ X printf("\n#define CHARS_ARE_%sSIGNED\n", (((char)-1) < 0) ? "" : "UN"); X X if (*p == 1) { X+ puts("#ifndef BIG_ENDIAN"); X puts("#define BIG_ENDIAN"); X+ puts("#endif"); X } X else { X+ puts("#ifndef LITTLE_ENDIAN"); X puts("#define LITTLE_ENDIAN"); X+ puts("#endif"); X } X X return 0; END-of-devel/cbind/files/patch-htype.c echo x - devel/cbind/files/patch-units.c sed 's/^X//' >devel/cbind/files/patch-units.c << 'END-of-devel/cbind/files/patch-units.c' X--- units.c.orig Fri Sep 22 12:06:46 1995 X+++ units.c Mon Dec 23 08:38:17 2002 X@@ -2,6 +2,7 @@ X #include <sys/types.h> X #include <sys/stat.h> X #include <stdio.h> X+#include "host.h" X #include "ansi.h" X #include "files.h" X #include "units.h" END-of-devel/cbind/files/patch-units.c echo x - devel/cbind/files/patch-nodeop.c sed 's/^X//' >devel/cbind/files/patch-nodeop.c << 'END-of-devel/cbind/files/patch-nodeop.c' X--- nodeop.c.orig Fri May 19 16:50:54 1995 X+++ nodeop.c Sun Nov 5 13:39:44 2006 X@@ -1,5 +1,5 @@ X #include <sys/types.h> X-#include <varargs.h> X+#include <stdarg.h> X #include <stdio.h> X #include "ansi.h" X #include "host.h" X@@ -85,52 +85,50 @@ X } X X node_t* X-new_node(kind, va_alist) X- node_kind_t kind; X- va_dcl X+new_node(node_kind_t kind, ...) X { X- va_list args; X+ va_list ap; X node_t *n; X X- va_start(args); X+ va_start(ap, kind); X X n = alloc_node(kind); X X switch (node_classof(kind)) { X case _Binary: X- n->node.binary.l = va_arg(args, node_t*); X- n->node.binary.r = va_arg(args, node_t*); X+ n->node.binary.l = va_arg(ap, node_t*); X+ n->node.binary.r = va_arg(ap, node_t*); X break; X case _Unary: X- n->node.unary = va_arg(args, node_t*); X+ n->node.unary = va_arg(ap, node_t*); X break; X case _Pointer: X- n->node.id.name = va_arg(args, char*); X+ n->node.id.name = va_arg(ap, char*); X break; X case _Other: X switch (kind) { X case _Elipsis: X break; X case _String: X- n->node.str.form = va_arg(args, char*); X- n->node.str.len = va_arg(args, int); X+ n->node.str.form = va_arg(ap, char*); X+ n->node.str.len = va_arg(ap, int); X break; X case _Sym: X- n->node.sym = va_arg(args, symbol_t*); X+ n->node.sym = va_arg(ap, symbol_t*); X break; X case _Type: X- n->node.typ = va_arg(args, typeinfo_t*); X+ n->node.typ = va_arg(ap, typeinfo_t*); X break; X case _Cond: X- n->node.cond.bool = va_arg(args, node_t*); X- n->node.cond.tru = va_arg(args, node_t*); X- n->node.cond.fals = va_arg(args, node_t*); X+ n->node.cond.bool = va_arg(ap, node_t*); X+ n->node.cond.tru = va_arg(ap, node_t*); X+ n->node.cond.fals = va_arg(ap, node_t*); X break; X case _FP_Number: X- n->node.fval = va_arg(args, host_float_t); X+ n->node.fval = va_arg(ap, host_float_t); X break; X case _Int_Number: X- n->node.ival = va_arg(args, host_int_t); X+ n->node.ival = va_arg(ap, host_int_t); X break; X default: X fatal(__FILE__,__LINE__,"Unandled noded - (%d)", kind); X@@ -142,7 +140,7 @@ X break; X } X X- va_end(args); X+ va_end(ap); X X return n; X } END-of-devel/cbind/files/patch-nodeop.c echo x - devel/cbind/pkg-plist sed 's/^X//' >devel/cbind/pkg-plist << 'END-of-devel/cbind/pkg-plist' Xbin/cbfe Xbin/cbind Xbin/cbpp Xshare/cbind/DOCS Xshare/cbind/README X@dirrm share/cbind END-of-devel/cbind/pkg-plist echo x - devel/cbind/pkg-descr sed 's/^X//' >devel/cbind/pkg-descr << 'END-of-devel/cbind/pkg-descr' XThis tool is designed to AID in the creation of Ada bindings to C. XThe code is provided "as is" without any warranty whatsoever. The Xcode is NOT copyrighted but is instead published to the public domain Xas free software. Any attempt to copyright the tool will be refutable Xin a court of law. X XI am NOT intending to imply that the bindings generated by this Xtranslator will be complete. This tool MAY/MAY NOT be useful as an XAID to generating bindings. Hopefully it can do a lot of the grunt Xwork for you. X X- David Holm Xdavid@realityrift.com END-of-devel/cbind/pkg-descr exit --- cbind.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1162753892.4691>