Commit Graph

16 Commits

Author SHA1 Message Date
theraven
0f6ef690b3 Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
2011-11-20 14:45:42 +00:00
das
22b42559b2 Merge gdtoa-20110304. 2011-03-12 07:03:06 +00:00
attilio
2aef64d798 Import a vendor fix for a list overrun.
This has been considered as a security hole on some specialized ml,
but currently the secteam@ doesn't consider that way.

Reviewed by:	emaste, des
Sponsored by:	Sandvine Incorporated
MFC after:	3 days
2009-09-07 09:30:37 +00:00
das
1dd1bae7b6 Vendor import of gdtoa 20081205. 2009-01-28 04:36:34 +00:00
das
2732388653 Merge gdtoa 20080831. This fixes several bugs, including an infinite
loop pointed out by cognet@ that occurs when calling strtod() with a
string representing a number between DBL_MAX and 2*DBL_MAX, when the
rounding mode is anything other than the default.
2008-09-03 07:23:57 +00:00
das
785a4b4a47 Flatten vendor/gdtoa/*. 2008-09-03 05:17:02 +00:00
das
a1995f0037 On platforms where long is 64 bits, make sure gdtoa doesn't use a
long when it really wants an int.
2007-12-17 00:19:49 +00:00
das
94ddd9f41e Merge local diffs. 2007-01-03 04:59:33 +00:00
das
5bc737f352 Import of the latest gdtoa sources, which include fixes for minor
problems relating to NaNs and rounding.
2007-01-03 04:58:54 +00:00
das
bc257052e5 Configure gdtoa so that floating-point numbers are correctly rounded
when they are printed in non-default rounding modes.
2005-01-18 18:56:18 +00:00
das
502b55c20b Userland spinlocks bad. Sleep locks good.
Use the latter for gdtoa.

Requested by:	deischen (far too long ago)
2003-06-21 08:20:14 +00:00
das
b2471a5039 Add some missing prototypes to eliminate some warnings. These already
appear without leading underscores in gdtoa.h, but this approach avoids
removing that file from the vendor branch and unduly rearranging things.

Prodded by:	nectar
2003-04-09 06:04:35 +00:00
das
67eff66578 Add missing prototype for gdtoa(). 2003-04-05 22:09:26 +00:00
das
cfb004fe95 Enable locale support in strtod() and dtoa().
Noticed by:	ache
Reviewed by:	mike (mentor)
2003-03-19 20:25:45 +00:00
das
b2697c9471 Local patches:
- include extra system headers and add appropriate #defines
- use a spinlock to synchronize parts of gdtoa
- protect exported symbols with leading underscores

Reviewed by:	bde (briefly), mike (mentor), obrien
2003-03-12 20:20:22 +00:00
das
db3a0f1435 Initial import of David Gay's gdtoa library for conversion between
strings and floating point.
2003-03-12 20:18:32 +00:00