diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-10-17 13:37:52 -0700 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-10-17 13:37:52 -0700 |
commit | cfbc0081078b5a41895a2ad689627bf94eeacb43 (patch) | |
tree | 4720fff6ae1a79ffe953ee8689a2bd3f8ce016a0 /libc/stdio/_scanf.c | |
parent | c94314fa618c682646c07ddd914a5abb77346273 (diff) |
rework internal uClibc mutexes to support futex locking, and nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/stdio/_scanf.c')
-rw-r--r-- | libc/stdio/_scanf.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index 914311877..34c1c9abd 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -235,7 +235,7 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap) #ifdef __UCLIBC_HAS_THREADS__ f.__user_locking = 1; /* Set user locking. */ - __stdio_init_mutex(&f.__lock); + STDIO_INIT_MUTEX(f.__lock); #endif f.__nextopen = NULL; @@ -283,7 +283,7 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap) #ifdef __UCLIBC_HAS_THREADS__ f.f.__user_locking = 1; /* Set user locking. */ - __stdio_init_mutex(&f.f.__lock); + STDIO_INIT_MUTEX(f.f.__lock); #endif f.f.__nextopen = NULL; @@ -388,8 +388,10 @@ int vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict format, { FILE f; - f.__bufstart = f.__bufpos = (unsigned char *) str; - f.__bufread = f.__bufend = (unsigned char *) (str + wcslen(str)); + f.__bufstart = + f.__bufpos = (char *) str; + f.__bufread = + f.__bufend = (char *)(str + wcslen(str)); __STDIO_STREAM_DISABLE_GETC(&f); __STDIO_STREAM_DISABLE_PUTC(&f); @@ -414,7 +416,7 @@ int vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict format, #ifdef __UCLIBC_HAS_THREADS__ f.__user_locking = 1; /* Set user locking. */ - __stdio_init_mutex(&f.__lock); + STDIO_INIT_MUTEX(f.__lock); #endif f.__nextopen = NULL; |