dnl -*-fundamental-*-
dnl
-dnl $Id: configure.in,v 1.28 2000/10/08 11:07:55 mdw Exp $
+dnl $Id: configure.in,v 1.29 2001/06/22 19:34:07 mdw Exp $
dnl
dnl Configuration script for mLib
dnl
dnl ----- Revision history --------------------------------------------------
dnl
dnl $Log: configure.in,v $
+dnl Revision 1.29 2001/06/22 19:34:07 mdw
+dnl Find out whether @<float.h>@ exists (hack for uC-Linux).
+dnl
dnl Revision 1.28 2000/10/08 11:07:55 mdw
dnl Define a constant to tell @mdwopt@ that @str_qword@ is available.
dnl Reinstate the `-pedantic' option to GCC.
AM_PROG_LIBTOOL
mdw_GCC_FLAGS
+AC_CHECK_HEADERS(float.h)
+
mdw_CHECK_MANYLIBS(socket, socket)
mdw_CHECK_MANYLIBS(gethostbyname, nsl resolv)
/* -*-c-*-
*
- * $Id: dputf.c,v 1.3 2001/01/20 12:06:01 mdw Exp $
+ * $Id: dputf.c,v 1.4 2001/06/22 19:35:29 mdw Exp $
*
* `printf'-style formatting for dynamic strings
*
/*----- Revision history --------------------------------------------------*
*
* $Log: dputf.c,v $
+ * Revision 1.4 2001/06/22 19:35:29 mdw
+ * Find out whether @<float.h>@ exists (hack for uC-Linux).
+ *
* Revision 1.3 2001/01/20 12:06:01 mdw
* Define flags with macros, to ensure unsignedness.
*
/*----- Header files ------------------------------------------------------*/
#include <ctype.h>
-#include <float.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
+
#include "dstr.h"
/*----- Tunable constants -------------------------------------------------*/
goto formatted;
case 'e': case 'E': case 'f': case 'F': case 'g': case 'G':
+#ifdef HAVE_FLOAT_H
DPUTC(&dd, *p);
DPUTZ(&dd);
if (*p == 'f') {
d->len += sprintf(d->buf + d->len, dd.buf,
va_arg(ap, double));
goto formatted;
+#else
+ DPUTS(d, "<no float support>");
+#endif
case 'c':
DPUTC(&dd, *p);