[xiph-cvs] cvs commit: net sock.c

Brendan Cully brendan at xiph.org
Wed Jul 9 17:53:02 PDT 2003



On Wednesday, 09 July 2003 at 07:55, Segher Boessenkool wrote:
> Brendan Cully wrote:
> >>>> va_copy is undefined on windows
> >>>
> >>>>+#define va_copy(ap1, ap2) ((ap1) = (ap2))
> >>>
> >>>This won't work on some windows compilers (where va_list is, I think, an
> >>>array).
> >>>
> >>>Mike
> >>
> >>with MSVC, va_list is a pointer (char * actually)...I'm not sure what it 
> >>is under cygwin/gcc....so the question is, how many win32 compilers do we 
> >>want to support, or is MSVC adequate ?
> >
> >Let's just use memcpy.
> 
> Neither of these will work in general; the underlying
> data types can be arbitrary general, and va_end() will
> do double free()'s, etc.  If your C implementation
> doesn't provide the macro va_copy(), it's not actually C.
> 
> Best you can do is make a replacement macro per *exact*
> system, i.e. keyed on specific compiler/environment versions.
> 
> I'm sorry.

Me too. But this is only for windows, which isn't using autoconf. On
any other system, autoconf will detect and use va_copy. So I think it
probably won't be that serious a problem in practice.

-b
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list