ports/46487: New port: cbind - Translator for "thin" Ada bindings to C

Edwin Groothuis edwin at FreeBSD.org
Sat Sep 27 06:59:32 UTC 2003


Synopsis: New port: cbind - Translator for "thin" Ada bindings to C

State-Changed-From-To: open->feedback
State-Changed-By: edwin
State-Changed-When: Fri Sep 26 23:57:13 PDT 2003
State-Changed-Why: 
Please see if you can fix the C code to use stdargs instead of
varargs and I will commit it. If you can't, I won't be able to
commit it.

Problem lies in nodeop.c line 88, there is no format string and I
don't know how to convert it. Here is the patch for errors.c:

--- errors.c.orig	Fri Oct 28 19:44:44 1994
+++ errors.c	Fri Sep 26 23:56:25 2003
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <errno.h>
 
 int Num_Errors;
@@ -33,14 +33,11 @@
 }
 
 void
-fatal(f, l, fmt, va_alist)
-	char *f, *fmt;
-	int l;
-	va_dcl
+fatal(char *f, int l, const char *fmt, ...)
 {
 	va_list args;
 
-	va_start(args);
+	va_start(args,fmt);
 
 	prefix(f,l,"Internal error");
 	vfprintf(stderr, fmt, args);
@@ -52,14 +49,11 @@
 }
 
 void
-error(f, l, fmt, va_alist)
-	char *f, *fmt;
-	int l;
-	va_dcl
+error(char *f, int l, char *fmt, ...)
 {
 	va_list args;
 
-	va_start(args);
+	va_start(args,fmt);
 
 	Num_Errors++;
 	prefix(f,l,"Error");
@@ -70,14 +64,11 @@
 }
 
 void
-warning(f, l, fmt, va_alist)
-	char *f, *fmt;
-	int l;
-	va_dcl
+warning(char *f, int l, char *fmt, ...)
 {
 	va_list args;
 
-	va_start(args);
+	va_start(args,fmt);
 
 	Num_Warnings++;
 	prefix(f,l,"Warning");
@@ -88,14 +79,11 @@
 }
 
 void
-inform(f, l, fmt, va_alist)
-	char *f, *fmt;
-	int l;
-	va_dcl
+inform(char *f, int l, char *fmt, ...)
 {
 	va_list args;
 
-	va_start(args);
+	va_start(args,fmt);
 
 	prefix(f,l,"Info");
 	vfprintf(stderr, fmt, args);
@@ -118,9 +106,6 @@
 static void
 unix_error()
 {
-	extern char *sys_errlist[];
-	extern int sys_nerr;
-
 	if (errno != 0) {
 		if (errno > 0 && errno < sys_nerr) {
 			fputs(sys_errlist[errno], stderr);



Responsible-Changed-From-To: freebsd-ports-bugs->edwin
Responsible-Changed-By: edwin
Responsible-Changed-When: Fri Sep 26 23:57:13 PDT 2003
Responsible-Changed-Why: 


http://www.freebsd.org/cgi/query-pr.cgi?pr=46487



More information about the freebsd-ports-bugs mailing list