The Samba-Bugzilla – Attachment 2951 Details for
Bug 5033
configure inserts incorrect define for HPUX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Small example how samba uses va macros
example.c (text/plain), 650 bytes, created by
Olaf Flebbe
on 2007-10-23 01:38:11 UTC
(
hide
)
Description:
Small example how samba uses va macros
Filename:
MIME Type:
Creator:
Olaf Flebbe
Created:
2007-10-23 01:38:11 UTC
Size:
650 bytes
patch
obsolete
>#include <stdarg.h> >#include <stdio.h> > >/* #define HAVE_VA_COPY*/ >#ifdef HAVE_VA_COPY >#define VA_COPY(dest, src) va_copy(dest, src) >#else >#define VA_COPY(dest, src) (dest) = (src) >#endif > > >void func3( va_list ap) { > int i,j; > i = va_arg( ap, char *); > j = va_arg( ap, int); > > printf("func3 %s %d\n", i,j); > va_end( ap); >} > > >void func2( va_list ap) { > > va_list ap2; > > VA_COPY( ap2, ap); > func3( ap2); > VA_COPY( ap2, ap); > func3( ap2); >} > >void func( int a, ... ) { > va_list ap; > > va_start( ap, a); > func2( ap); > va_end( ap); > } > > >int main() { > func( 1,"hallo",2 ); > func( 1,"sdjf",3 ); > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5033
: 2951 |
2952