~ubuntu-branches/ubuntu/quantal/uclibc/quantal

« back to all changes in this revision

Viewing changes to libc/stdio/vdprintf.c

  • Committer: Bazaar Package Importer
  • Author(s): Hector Oron
  • Date: 2011-06-11 03:06:20 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110611030620-ywjfvyuqvrpsm282
Tags: 0.9.32-1
* New upstream release
* Add myself as maintainer
* Bump standards version 
* Add Vcs-Git, Vcs-Browser and Homepage fields
* Add watch file 

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include "_stdio.h"
12
12
#include <stdarg.h>
13
13
 
14
 
#ifdef __USE_OLD_VFPRINTF__
15
 
libc_hidden_proto(vfprintf)
16
 
#endif
17
 
libc_hidden_proto(fflush_unlocked)
18
14
 
19
 
libc_hidden_proto(vdprintf)
20
15
int vdprintf(int filedes, const char * __restrict format, va_list arg)
21
16
{
22
17
        FILE f;
45
40
 
46
41
#ifdef __UCLIBC_HAS_WCHAR__
47
42
        f.__ungot_width[0] = 0;
48
 
#endif /* __UCLIBC_HAS_WCHAR__ */
 
43
#endif
49
44
#ifdef __STDIO_MBSTATE
50
45
        __INIT_MBSTATE(&(f.__state));
51
 
#endif /* __STDIO_MBSTATE */
 
46
#endif
52
47
 
53
48
/* _vfprintf_internal doesn't do any locking, locking init is here
54
49
 * only because of fflush_unlocked. TODO? */
55
50
#if (defined(__STDIO_BUFFERS) || defined(__USE_OLD_VFPRINTF__)) && defined(__UCLIBC_HAS_THREADS__)
56
51
        f.__user_locking = 1;           /* Set user locking. */
57
 
        __stdio_init_mutex(&f.__lock);
 
52
        STDIO_INIT_MUTEX(f.__lock);
58
53
#endif
59
54
        f.__nextopen = NULL;
60
55