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.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/newlib/libc/stdio/fprintf.c b/newlib/libc/stdio/fprintf.c
index de036605f..8f97a8b28 100644
--- a/newlib/libc/stdio/fprintf.c
+++ b/newlib/libc/stdio/fprintf.c
@@ -19,38 +19,31 @@
#include <stdio.h>
#ifdef _HAVE_STDC
-
#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef _HAVE_STDC
int
fprintf (FILE * fp, const char *fmt,...)
-{
- int ret;
- va_list ap;
-
- 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
+#endif
{
int ret;
va_list ap;
+#ifdef _HAVE_STDC
+ va_start (ap, fmt);
+#else
va_start (ap);
+#endif
ret = vfprintf (fp, fmt, ap);
va_end (ap);
return ret;
}
-
-#endif