Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.lang.c Subject: Re: va_list used in Keywords: va_list, X3J11, vfprintf Message-ID: <2095@dataio.Data-IO.COM> Date: 14 Aug 89 19:13:23 GMT References: <1140@midgard.Midgard.MN.ORG> Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Organization: Data I/O Corporation; Redmond, WA Lines: 30 In article <1140@midgard.Midgard.MN.ORG> dal@midgard.Midgard.MN.ORG (Dale Schumacher) writes: header file, the v[fs]printf() function prototypes . The trick to note is that is required for any *user* code that uses variable argument lists. Since is supplied by the *vendor*, the problem can be solved in one of two ways, 1. In stdio.h, include the lines: #ifndef __STDARG_H /* #define'd by stdarg.h */ #include /* get definition of va_list */ #endif (As has been discussed here before, using 'wrappers' like this means that order dependent #include's can be #include'd in any order without a problem.) 2. As the compiler vendor, we *know* what va_list is, so we simply prototype vprintf and friends as: int vprintf(const char *,char *); instead of: int vprintf(const char *,va_list); I use 2. because it compiles faster.