Mercurial > mplayer.hg
changeset 8290:1dd8fe0776d3
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)
author | jkeil |
---|---|
date | Tue, 26 Nov 2002 18:53:00 +0000 |
parents | 2a69a884206a |
children | abe95dde3223 |
files | linux/Makefile linux/vsscanf.c |
diffstat | 2 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- /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 <stdio.h> +#include <stdarg.h> + +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