From: David Giller (rafetmad@cheshire.oxy.edu)
Date: 02/01/93


From: rafetmad@cheshire.oxy.edu (David Giller)
Subject: porting xvnews... varargs problem in GCC 2.3.3
Date: 1 Feb 1993 09:27:06 GMT


I've been trying to compile xvnews, a news reader for Xview, using
xview3L3. I've run into a little problem. Aside from the filenames
not fitting in the 14-char limit (a negligible problem) I've run into
the following problem:

gio.c: In function `gio_printf':
gio.c:989: `__builtin_va_alist' undeclared (first use this function)
gio.c:989: (Each undeclared identifier is reported only once
gio.c:989: for each function it appears in.)

Here is the offending section of code:

#include <stdio.h>
#include <ctype.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <varargs.h>
#include <malloc.h>
#include "guide.h"
#include "gio.h"

[......]

/*
 * fprintf to the current output file.
 */
#ifdef __STDC__
void
gio_printf(char *fmt, ...)
#else
void
gio_printf(fmt, va_alist)
        char *fmt;
        va_dcl
#endif
{
        va_list args;

        if (Newline)
                fputs(Indent, Outp);

        va_start(args);
        Newline = fmt[strlen(fmt) - 1] == '\n';
        vfprintf(Outp, fmt, args);
        va_end(args);
}

Can anyone shed some light on the situation? I have no experience
with C varargs.

Setup: latest SLS, imake fixed, xview3L3, GCC 2.3.3.

The package is on sunsite.unc.edu:/pub/X11/Openlook/xview.tar.Z

Thanks for all pointers...

-- 
David Giller, Box 134 | Q: How many Oregonians does it take to screw in a light
Occidental College    | bulb?  A: Three.  One to replace the bulb, and two to
1600 Campus Road      | fend off all the Californians trying to share the
Los Angeles, CA 90041 | experience. ---------------------------rafetmad@oxy.edu