diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-10-26 01:41:06 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-10-26 01:41:06 +0200 |
commit | 4877a68bcef0125ea239a52806efb02eb1203a17 (patch) | |
tree | 41d48b3515d764808e8990420f99554adf7f38e6 /printf | |
parent | d3b0be6aed30aec5be241560071388e803a601e8 (diff) | |
download | gmp-4877a68bcef0125ea239a52806efb02eb1203a17.tar.gz |
* printf/snprntffuns.c, printf/vasprintf.c: Use
__gmp_replacement_vsnprintf if libc vsnprintf not available.
* printf/asprintf.c, printf/snprintf.c, printf/vasprintf.c,
printf/vsnprintf.c: Provide these functions unconditionally.
Diffstat (limited to 'printf')
-rw-r--r-- | printf/asprintf.c | 4 | ||||
-rw-r--r-- | printf/snprintf.c | 4 | ||||
-rw-r--r-- | printf/vasprintf.c | 8 | ||||
-rw-r--r-- | printf/vsnprintf.c | 4 |
4 files changed, 4 insertions, 16 deletions
diff --git a/printf/asprintf.c b/printf/asprintf.c index 0a1bf8e1b..cae7e9183 100644 --- a/printf/asprintf.c +++ b/printf/asprintf.c @@ -21,8 +21,6 @@ MA 02111-1307, USA. */ #include "config.h" -#if HAVE_VSNPRINTF - #if HAVE_STDARG #include <stdarg.h> #else @@ -58,5 +56,3 @@ gmp_asprintf (va_alist) va_end (ap); return ret; } - -#endif /* HAVE_VSNPRINTF */ diff --git a/printf/snprintf.c b/printf/snprintf.c index 91faa4d5a..e61b9ff15 100644 --- a/printf/snprintf.c +++ b/printf/snprintf.c @@ -21,8 +21,6 @@ MA 02111-1307, USA. */ #include "config.h" -#if HAVE_VSNPRINTF - #if HAVE_STDARG #include <stdarg.h> #else @@ -66,5 +64,3 @@ gmp_snprintf (va_alist) va_end (ap); return ret; } - -#endif /* HAVE_VSNPRINTF */ diff --git a/printf/vasprintf.c b/printf/vasprintf.c index ee2763465..50974d384 100644 --- a/printf/vasprintf.c +++ b/printf/vasprintf.c @@ -21,8 +21,6 @@ MA 02111-1307, USA. */ #include "config.h" -#if HAVE_VSNPRINTF - #if HAVE_STDARG #include <stdarg.h> #else @@ -36,6 +34,10 @@ MA 02111-1307, USA. */ #include "gmp.h" #include "gmp-impl.h" +#if ! HAVE_VSNPRINTF +#define vsnprintf __gmp_replacement_vsnprintf +#endif + /* vasprintf isn't used since we prefer all GMP allocs to go through __gmp_allocate_func, and in particular we don't want the -1 return from @@ -111,5 +113,3 @@ gmp_vasprintf (char **result, const char *fmt, va_list ap) GMP_ASPRINTF_T_INIT (d, result); return __gmp_doprnt (&__gmp_asprintf_funs, &d, fmt, ap); } - -#endif /* HAVE_VSNPRINTF */ diff --git a/printf/vsnprintf.c b/printf/vsnprintf.c index 6950a218d..9ed6b6a93 100644 --- a/printf/vsnprintf.c +++ b/printf/vsnprintf.c @@ -21,8 +21,6 @@ MA 02111-1307, USA. */ #include "config.h" -#if HAVE_VSNPRINTF - #if HAVE_STDARG #include <stdarg.h> #else @@ -46,5 +44,3 @@ gmp_vsnprintf (char *buf, size_t size, const char *fmt, va_list ap) d.size = size; return __gmp_doprnt (&__gmp_snprintf_funs, &d, fmt, ap); } - -#endif /* HAVE_VSNPRINTF */ |