我必须将此代码片段从varargs.h更改为stdarg.h,但我不确切知道如何:
#ifndef lint
int ll_log (va_alist)
va_dcl
{
int event, result;
LLog *lp;
va_list ap;
va_start (ap);
lp = va_arg (ap, LLog *);
event = va_arg (ap, int);
result = _ll_log (lp, event, ap);
va_end (ap);
return result;
}
Run Code Online (Sandbox Code Playgroud)
当我尝试构建它时,编译器说:
error "GCC no longer implements <varargs.h>."
error "Revise your code to use <stdarg.h>."
Run Code Online (Sandbox Code Playgroud)
我需要编译和运行的程序有一些类似的片段,我需要知道如何更改它们.如果你能写一些例子,我会满意的.