How do I declare a pointer to a function with variable args?
e.g int (*my_printf) (FILE *stream, const char *format, ..., void *data) = NULL;
The error from clang was:
a.c:8:56: error: expected ')'
int (*my_printf) (FILE *stream, const char *format, ..., char *data) = NULL;
^
a.c:8:18: note: to match this '('
int (*my_printf) (FILE *stream, const char *format, ..., char *data) = NULL;
^
1 error generated.
Of course, I could simple place the data parameter as the last one. But I still want a general solution
@Jim:
So, what do you think about execle function?
(From man execle I see this)
int execle(const char *path, const char *arg,
..., char * const envp[]);

cat /usr/include/unistd.h |grep execle=>int execle(const char *, const char *, ...);(OSX 10.9)..., but should be the last one in the list?/*, (char *)0, char *const envp[] */