summaryrefslogtreecommitdiff
path: root/printf/asprntffuns.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-10-08 03:29:52 +0200
committerKevin Ryde <user42@zip.com.au>2001-10-08 03:29:52 +0200
commit7d0a2579549f024f7a262873a5834ddd8d9be875 (patch)
tree4a199465c6c7822758ede404ccddb8410390c7d2 /printf/asprntffuns.c
parent676123d45eff7a94c989ed65b1333e14bf3e8655 (diff)
downloadgmp-7d0a2579549f024f7a262873a5834ddd8d9be875.tar.gz
More of:
* printf/asprntffuns.c: New file.
Diffstat (limited to 'printf/asprntffuns.c')
-rw-r--r--printf/asprntffuns.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/printf/asprntffuns.c b/printf/asprntffuns.c
index 53fe307dc..02d896151 100644
--- a/printf/asprntffuns.c
+++ b/printf/asprntffuns.c
@@ -20,18 +20,15 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-/* These routines are provided separately to let mpz_out_ostream,
- mpq_out_ostream and mpf_out_ostream avoid dragging vsnprintf into the
- link via __gmp_asprintf_format.
+/* These routines are in a separate file so that the mpz_t, mpq_t and mpf_t
+ operator<< routines can avoid dragging vsnprintf into the link (via
+ __gmp_asprintf_format).
These routines are only needed to support gmp_asprintf if vsnprintf
- exists, or to support mpz_out_ostream if C++ has been enabled. (It'd be
- a pretty strange C++ environment which didn't have vsnprintf, so testing
- WANT_CXX probably doesn't change anything.) */
-
-#include "config.h"
-
-#if HAVE_VSNPRINTF || WANT_CXX
+ exists, or to support mpz_out_ostream if C++ has been enabled, and could
+ therefore be under "#if HAVE_VSNPRINTF || WANT_CXX". But they're
+ provided unconditionally so that the contents of libgmp don't depend on
+ the setting of --enable-cxx. */
#if HAVE_STDARG
#include <stdarg.h>
@@ -75,5 +72,3 @@ __gmp_asprintf_final (struct gmp_asprintf_t *d)
*d->result = buf;
return 0;
}
-
-#endif /* HAVE_VSNPRINTF || WANT_CXX */