aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/snprintf.c
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2017-12-03 23:58:31 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2018-01-17 11:47:30 -0600
commit7192f840966684d4460542a516278ca08dd14842 (patch)
treeef7c9f4eeeed6163e2faa9098525e4744fdf82b1 /newlib/libc/stdio/snprintf.c
parent70ee6b17df9b055a05cdcc4d3fe1813d7b57e2d8 (diff)
downloadnewlib-7192f840966684d4460542a516278ca08dd14842.zip
newlib-7192f840966684d4460542a516278ca08dd14842.tar.gz
newlib-7192f840966684d4460542a516278ca08dd14842.tar.bz2
ansification: remove _HAVE_STDC
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/stdio/snprintf.c')
-rw-r--r--newlib/libc/stdio/snprintf.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c
index d73cdbf..809b52b 100644
--- a/newlib/libc/stdio/snprintf.c
+++ b/newlib/libc/stdio/snprintf.c
@@ -20,29 +20,16 @@
#include <_ansi.h>
#include <reent.h>
#include <stdio.h>
-#ifdef _HAVE_STDC
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <limits.h>
#include <errno.h>
#include "local.h"
int
-#ifdef _HAVE_STDC
_snprintf_r (struct _reent *ptr,
char *__restrict str,
size_t size,
const char *__restrict fmt, ...)
-#else
-_snprintf_r(ptr, str, size, fmt, va_alist)
- struct _reent *ptr;
- char *str;
- size_t size;
- const char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -57,11 +44,7 @@ _snprintf_r(ptr, str, size, fmt, va_alist)
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = (size > 0 ? size - 1 : 0);
f._file = -1; /* No file. */
-#ifdef _HAVE_STDC
va_start (ap, fmt);
-#else
- va_start (ap);
-#endif
ret = _svfprintf_r (ptr, &f, fmt, ap);
va_end (ap);
if (ret < EOF)
@@ -80,17 +63,9 @@ _sniprintf_r (struct _reent *, char *, size_t, const char *, ...)
#ifndef _REENT_ONLY
int
-#ifdef _HAVE_STDC
snprintf (char *__restrict str,
size_t size,
const char *__restrict fmt, ...)
-#else
-snprintf(str, size, fmt, va_alist)
- char *str;
- size_t size;
- const char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -106,11 +81,7 @@ snprintf(str, size, fmt, va_alist)
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = (size > 0 ? size - 1 : 0);
f._file = -1; /* No file. */
-#ifdef _HAVE_STDC
va_start (ap, fmt);
-#else
- va_start (ap);
-#endif
ret = _svfprintf_r (ptr, &f, fmt, ap);
va_end (ap);
if (ret < EOF)