1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-16 01:22:18 +03:00
Commit Graph

7 Commits

Author SHA1 Message Date
Pádraig Brady
cf88e56ab3 support GNU format printf and scanf on mingw
Allow %lld and %Lf to work on mingw as per:
http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
2014-12-08 13:31:58 -07:00
Paul Eggert
41ffc7676c ftoastr: use strtof only if HAVE_STRTOF
This is needed on HP-UX 11.11 with GCC 4.24; see Bruno Haible's report
<http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00154.html>.
* lib/ftoastr.c (STRTOF) [LENGTH == 1]: Use strtof only if HAVE_STRTOF.
* modules/ftoastr (configure.ac): Check for strtof.
2011-06-13 09:47:58 -07:00
Paul Eggert
104aca8300 ftoastr: split into 3 modules ftoastr, dtoastr, ldtoastr
This is so that a program like Emacs, which needs only dtoastr,
does not have to bother with distributing and compiling ftoastr
and ldtoastr.
* MODULES.html.sh: Document these modules (ftoastr wasn't documented).
* modules/dtoastr, modules/ldtoastr: New files.
* modules/ftoastr: Now works just for 'float'.
(Files): Remove lib/dtoastr.c, lib/ldtoastr.c.
(Makefile.am): Remove ftoastr.h (not needed and no effect),
dtoastr.c, ldtoastr.c.
2011-01-11 16:37:14 -08:00
Paul Eggert
52e7df4a7f ftoastr: don't assume snprintf
* lib/ftoastr.c (snprintf) [! GNULIB_SNPRINTF_POSIX]:
Implement a subset of snprintf here, by using sprintf safely.
* modules/ftoastr (Depends-on): Remove snprintf.
2010-11-19 14:41:15 -08:00
Paul Eggert
925bf02167 ftoastr: depend on snprintf, improve comments
* lib/ftoastr.c: Also mention Loitsch's draft.
* lib/ftoastr.h: Require WIDTH to be nonnegative.  This isn't
needed in the current implementation, but it might simplify
speeding up the code later.
* modules/ftoastr: Depend on snprintf; this improves portability.
Suggested by Bruno Haible in the same email.
2010-11-18 21:31:05 -08:00
Paul Eggert
32a4812677 ftoastr: port to hosts lacking strtof and strtold
Problem reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00242.html>.
* lib/ftoastr.c (STRTOF): Define to strtod if in a pre-C99
environment and strtold (and presumably strtof) are not available.
* modules/ftoastr (Files): Add m4/c-strtod.m4.
(configure.ac): Require gl_C99_STRTOLD.
2010-11-18 17:32:27 -08:00
Paul Eggert
0c7219c648 ftoastr: new module, for lossless conversion of floats to short strings
* lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c:
* modules/ftoastr: New files.
2010-11-17 12:59:32 -08:00