Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/fprintf.c')
-rw-r--r--newlib/libc/stdio/fprintf.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/newlib/libc/stdio/fprintf.c b/newlib/libc/stdio/fprintf.c
index 56a08863a..de036605f 100644
--- a/newlib/libc/stdio/fprintf.c
+++ b/newlib/libc/stdio/fprintf.c
@@ -17,32 +17,40 @@
#include <_ansi.h>
#include <stdio.h>
+
#ifdef _HAVE_STDC
+
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef _HAVE_STDC
int
-fprintf(FILE * fp, _CONST char *fmt,...)
-#else
-int
-fprintf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
-#endif
+fprintf (FILE * fp, const char *fmt,...)
{
int ret;
va_list ap;
-#ifdef _HAVE_STDC
va_start (ap, fmt);
+ ret = vfprintf (fp, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
#else
+
+#include <varargs.h>
+
+int
+fprintf (fp, fmt, va_alist)
+ FILE *fp;
+ char *fmt;
+ va_dcl
+{
+ int ret;
+ va_list ap;
+
va_start (ap);
-#endif
ret = vfprintf (fp, fmt, ap);
va_end (ap);
return ret;
}
+
+#endif