diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/String.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/String.cc b/lib/String.cc index ec78c22..3e801c7 100644 --- a/lib/String.cc +++ b/lib/String.cc @@ -124,16 +124,22 @@ const char * String::set(const char * s, va_list ap) { return str; } +#ifdef HAVE_GMP + gmp_vasprintf(&str, s, ap); + r = str; +#else // !HAVE_GMP #ifdef HAVE_VASPRINTF vasprintf(&str, s, ap); r = str; +#else // !HAVE_VASPRINTF #ifdef HAVE_VSNPRINTF vsnprintf(t, BUFSIZ, s, ap); -#else +#else // !HAVE_VSNPRINTF vsprintf(t, s, ap); -#endif +#endif // HAVE_VSNPRINTF str = Base::strdup(r = t); -#endif +#endif // HAVE_VASPRINTF +#endif // HAVE_GMP siz = ::strlen(str); return r; } |