ports/56190: textproc/glimpse: fix build on -current (varargs -> stdarg)
Michael Edenfield
kutulu at kutulu.org
Mon Sep 15 23:06:40 UTC 2003
* Mathieu Arnold <mat at FreeBSD.org> [030915 04:06]:
> Synopsis: textproc/glimpse: fix build on -current (varargs -> stdarg)
>
> State-Changed-From-To: open->feedback
> State-Changed-By: mat
> State-Changed-When: Mon Sep 15 01:05:12 PDT 2003
> State-Changed-Why:
> Without this patch, 4-STABLE builds and 5-CURRENT does not, with, none
> of them does anymore.
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=56190
Please try this patch instead, it just build glimpse successfully on two
different -CURRENT systems. I don't have access to any -STABLE to test,
unfortunately, but it should be ok.
diff -urN glimpse.orig/files/patch-libtemplate-include-util.h glimpse/files/patch-libtemplate-include-util.h
--- glimpse.orig/files/patch-libtemplate-include-util.h Wed Dec 31 19:00:00 1969
+++ glimpse/files/patch-libtemplate-include-util.h Mon Sep 15 18:54:52 2003
@@ -0,0 +1,19 @@
+--- libtemplate/include/util.h.orig Mon Sep 15 18:52:09 2003
++++ libtemplate/include/util.h Mon Sep 15 18:52:24 2003
+@@ -93,16 +93,10 @@
+ void init_log3 _PARAMS((char *,FILE *,FILE *)); /* Initialize log routines */
+ void log_errno _PARAMS((char *)); /* Same as perror(3) */
+ void fatal_errno _PARAMS((char *)); /* Same as perror(3) & exit */
+-#ifdef __STRICT_ANSI__
+ #include <stdarg.h>
+ void log _PARAMS((char *, ...)); /* Log a message */
+ void errorlog _PARAMS((char *, ...)); /* Log an error message */
+ void fatal _PARAMS((char *, ...)); /* Log error msg and exit */
+-#else
+-void log _PARAMS(());
+-void errorlog _PARAMS(());
+-void fatal _PARAMS(());
+-#endif
+
+ #ifdef NO_STRDUP
+ /* from strdup.c */
diff -urN glimpse.orig/files/patch-libtemplate-util-log.c glimpse/files/patch-libtemplate-util-log.c
--- glimpse.orig/files/patch-libtemplate-util-log.c Wed Dec 31 19:00:00 1969
+++ glimpse/files/patch-libtemplate-util-log.c Mon Sep 15 18:54:15 2003
@@ -0,0 +1,101 @@
+--- libtemplate/util/log.c.orig Mon Sep 15 18:49:26 2003
++++ libtemplate/util/log.c Mon Sep 15 18:50:25 2003
+@@ -55,11 +55,7 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <sys/file.h>
+-#if defined(__STRICT_ANSI__)
+ #include <stdarg.h>
+-#else
+-#include <varargs.h>
+-#endif
+ #include "util.h"
+
+ /* Local functions */
+@@ -119,7 +115,6 @@
+ /*
+ * log() - used like printf(3). Prints message to stdout.
+ */
+-#if defined(__STRICT_ANSI__)
+ void log(char *fmt,...)
+ {
+ va_list ap;
+@@ -128,19 +123,6 @@
+ return;
+
+ va_start(ap, fmt);
+-#else
+-void log(va_alist)
+-va_dcl
+-{
+- va_list ap;
+- char *fmt;
+-
+- if (fp_log == NULL)
+- return;
+-
+- va_start(ap);
+- fmt = va_arg(ap, char *);
+-#endif /* __STRICT_ANSI__ */
+ if (fp_log == NULL)
+ return;
+
+@@ -155,7 +137,6 @@
+ /*
+ * errorlog() - used like printf(3). Prints error message to stderr.
+ */
+-#if defined(__STRICT_ANSI__)
+ void errorlog(char *fmt,...)
+ {
+ va_list ap;
+@@ -164,20 +145,6 @@
+ return;
+
+ va_start(ap, fmt);
+-#else
+-void errorlog(va_alist)
+-va_dcl
+-{
+- va_list ap;
+- char *fmt;
+-
+- if (fp_errs == NULL)
+- return;
+-
+- va_start(ap);
+- fmt = va_arg(ap, char *);
+-#endif /* __STRICT_ANSI__ */
+-
+ if (fp_errs == NULL)
+ return;
+
+@@ -193,7 +160,6 @@
+ /*
+ * fatal() - used like printf(3). Prints error message to stderr and exits
+ */
+-#if defined(__STRICT_ANSI__)
+ void fatal(char *fmt,...)
+ {
+ va_list ap;
+@@ -202,21 +168,6 @@
+ exit(1);
+
+ va_start(ap, fmt);
+-#else
+-void fatal(va_alist)
+-va_dcl
+-{
+- va_list ap;
+- char *fmt;
+-
+- if (fp_errs == NULL)
+- exit(1);
+-
+- va_start(ap);
+- fmt = va_arg(ap, char *);
+-#endif /* __STRICT_ANSI__ */
+-
+- if (fp_errs == NULL)
+ exit(1);
+
+ lock_file(fp_errs);
More information about the freebsd-ports-bugs
mailing list