mingw-runtime

sami25 sami25 at o2.pl
Sat May 24 20:31:41 BST 2008


Hi,
I have a problem with code
Log_Write("%ld", 5);

void Log_Write(char *fmt, ...)
{
	va_list ap;
	char buf[2048];

	if(!logfile.fp) return;
	va_start(ap, fmt);
	vs/*n*/printf(buf, /*2048, */fmt, ap);
	va_end(ap);
	printf("vprintf: ");
	
	va_start(ap,fmt);
	vprintf(fmt, ap);
	va_end(ap);
	printf("\nvsnprintf: %s\n", buf);
	
	Log_UnifyEndOfLine(buf);
	fprintf(logfile.fp, buf);
	fflush(logfile.fp);
	logfile.numwirtes++;
}

the vsprintf is not function properly but if I replace it with _vsnprintf or vsprintf it works ok, vprintf also works ok
I don't know why but vsnprintf does not work with any format with l at the beginnig is there a quick way to fix it loaclly ?
(like recompiling some .a file in mingw runtime)

compiling cmd: i586-mingw32msvc-gcc -g file.c -o file.o

-- 
sami25



More information about the Ubuntu-motu mailing list