fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / stdio / fprintf.c
blob8f97a8b28d08fad217e3f8f3f3d2bcf79690768c
1 /*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 #include <_ansi.h>
19 #include <stdio.h>
21 #ifdef _HAVE_STDC
22 #include <stdarg.h>
23 #else
24 #include <varargs.h>
25 #endif
27 #ifdef _HAVE_STDC
28 int
29 fprintf (FILE * fp, const char *fmt,...)
30 #else
31 int
32 fprintf (fp, fmt, va_alist)
33 FILE *fp;
34 char *fmt;
35 va_dcl
36 #endif
38 int ret;
39 va_list ap;
41 #ifdef _HAVE_STDC
42 va_start (ap, fmt);
43 #else
44 va_start (ap);
45 #endif
46 ret = vfprintf (fp, fmt, ap);
47 va_end (ap);
48 return ret;