# HG changeset patch # User jkeil # Date 1038336780 0 # Node ID 1dd8fe0776d34912333c8879fd39b9a86141eb51 # Parent 2a69a884206aecb5ade620c101dbcc8a28b06eed Add our own vsscanf implementation, in case the system's libc does not have one. (required for solaris, when the Ogg/Vorbis audio decoder is used) diff -r 2a69a884206a -r 1dd8fe0776d3 linux/Makefile --- a/linux/Makefile Tue Nov 26 18:34:09 2002 +0000 +++ b/linux/Makefile Tue Nov 26 18:53:00 2002 +0000 @@ -3,7 +3,7 @@ LIBNAME = libosdep.a -SRCS=getch2.c timer-lx.c shmem.c strsep.c scandir.c # timer.c +SRCS=getch2.c timer-lx.c shmem.c strsep.c vsscanf.c scandir.c # timer.c OBJS=$(SRCS:.c=.o) ifeq ($(TARGET_ARCH_X86),yes) diff -r 2a69a884206a -r 1dd8fe0776d3 linux/vsscanf.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux/vsscanf.c Tue Nov 26 18:53:00 2002 +0000 @@ -0,0 +1,20 @@ +#include "../config.h" + +#ifndef HAVE_VSSCANF +/* system has no vsscanf. try to provide one */ + +#include +#include + +int +vsscanf(const char *str, const char *format, va_list ap) +{ + /* XXX: can this be implemented in a more portable way? */ + long p1 = va_arg(ap, long); + long p2 = va_arg(ap, long); + long p3 = va_arg(ap, long); + long p4 = va_arg(ap, long); + long p5 = va_arg(ap, long); + return sscanf(str, format, p1, p2, p3, p4, p5); +} +#endif