summaryrefslogtreecommitdiff
path: root/clears.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-12-22 10:57:56 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-12-22 10:57:56 +0000
commitfd8400aa1fac40bb84b5a8b64c887776d87fd6e3 (patch)
tree407cf2a1984f56507846294e86064bbe267889e3 /clears.c
parentec596858e24e5457f109b77ee50fd0daefa7316c (diff)
downloadmpfr-fd8400aa1fac40bb84b5a8b64c887776d87fd6e3.tar.gz
Explicit support for K&R C since ansi2knr can't be used.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2588 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'clears.c')
-rw-r--r--clears.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/clears.c b/clears.c
index 54b7008cc..bf4afa33e 100644
--- a/clears.c
+++ b/clears.c
@@ -20,18 +20,37 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#include <stdarg.h>
-#include "gmp.h"
-#include "gmp-impl.h"
-#include "mpfr.h"
+/* Needed for build with GMP */
+#ifndef HAVE_STDARG
+# include "config.h"
+#endif
+
+#if HAVE_STDARG
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
#include "mpfr-impl.h"
void
+#if HAVE_STDARG
mpfr_clears (mpfr_ptr x, ...)
+#else
+mpfr_clears (va_alist)
+ va_dcl
+#endif
{
va_list arg;
+#if HAVE_STDARG
va_start (arg, x);
+#else
+ mpfr_ptr x;
+ va_start(arg);
+ x = va_arg (arg, mpfr_ptr);
+#endif
+
while (x != 0)
{
mpfr_clear (x);