fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / stdio / vprintf.c
blob916d518980c079c2fefd7771cbb0b83aa274ba0f
1 /* doc in vfprintf.c */
3 /*
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms are permitted
8 * provided that the above copyright notice and this paragraph are
9 * duplicated in all such forms and that any documentation,
10 * advertising materials, and other materials related to such
11 * distribution and use acknowledge that the software was developed
12 * by the University of California, Berkeley. The name of the
13 * University may not be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 #include <_ansi.h>
21 #include <stdio.h>
23 #ifdef _HAVE_STDC
24 #include <stdarg.h>
25 #else
26 #include <varargs.h>
27 #endif
29 #include "local.h"
31 #ifndef _REENT_ONLY
33 int
34 _DEFUN (vprintf, (fmt, ap),
35 _CONST char *fmt _AND
36 va_list ap)
38 _REENT_SMALL_CHECK_INIT(_stdout_r (_REENT));
39 return _vfprintf_r (_REENT, _stdout_r (_REENT), fmt, ap);
42 #endif /* !_REENT_ONLY */
44 int
45 _DEFUN (_vprintf_r, (ptr, fmt, ap),
46 struct _reent *ptr _AND
47 _CONST char *fmt _AND
48 va_list ap)
50 _REENT_SMALL_CHECK_INIT(_stdout_r (ptr));
51 return _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap);