aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gdtoa
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* libc: Remove empty comments in Symbol.mapBrooks Davis2023-11-151-3/+0
| | | | | | | These were left over from $FreeBSD$ removal. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42612
* libc: Purge unneeded cdefs.hWarner Losh2023-11-016-6/+0
| | | | | | | | | These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-166-12/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-126-6/+6
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* libc: drop "All rights reserved" from Foundation copyrightsEd Maste2022-08-043-3/+3
| | | | | | | | | This has already been done for most files that have the Foundation as the only listed copyright holder. Do it now for files that list multiple copyright holders, but have the Foundation copyright in its own section. Sponsored by: The FreeBSD Foundation
* Remove sparc64 specific parts of libc.Warner Losh2020-02-261-1/+1
| | | | | | | | | | | | | | | Also update comments for which architectures use 128 bit long doubles, as appropriate. The softfloat specialization routines weren't updated since they appear to be from an upstream source which we may want to update in the future to get a more favorable license. Reviewed by: emaste@ Differential Revision: https://reviews.freebsd.org/D23658 Notes: svn path=/head/; revision=358348
* libc: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-256-0/+12
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326193
* For now, compile all of contrib/gdtoa without requiring strict aliasing,Dimitry Andric2017-02-131-0/+1
| | | | | | | | | | | | | | | since it is using type punning of union members, and clang does not yet support gcc's extensions which allow this (refer to https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type%2dpunning for more information). This should fix strtod(3) return values for the lang/julia port, so it does not fail on an assertion during its build. PR: 216770 Notes: svn path=/projects/clang400-import/; revision=313706
* Replace dot-dot relative pathing with SRCTOP-relative paths where possibleEnji Cooper2017-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg MFC after: 1 week Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9207 Notes: svn path=/head/; revision=312451
* META MODE: Don't create .meta files when symlinking sources into the obj ↵Bryan Drewery2015-11-251-2/+2
| | | | | | | | | | | | | | directory. Tracking these leads to situations where meta mode will consider the file to be out of date if /bin/sh or /bin/ln are newer than the source file. There's no reason for meta mode to do this as make is already handling the rebuild dependency fine. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291320
* Add missing include to eliminate -Wmissing-prototypes warningCraig Rodrigues2015-09-201-0/+1
| | | | Notes: svn path=/head/; revision=288010
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}Marcel Moolenaar2014-03-041-4/+4
| | | | | | | | | | | | | | if not already defined. This allows building libc from outside of lib/libc using a reach-over makefile. A typical use-case is to build a standard ILP32 version and a COMPAT32 version in a single iteration by building the COMPAT32 version using a reach-over makefile. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=262722
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds aDavid Chisnall2011-11-203-6/+23
| | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=227753
* Unbreak the build for arm and powerpc.David Schultz2008-04-122-0/+3
| | | | | | | Pointy hat to yours truly. Notes: svn path=/head/; revision=178154
* Make several changes to the way printf handles hex floating point (%a):David Schultz2008-04-123-207/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1, 0x4p-2, or 0x8p-3, depending on what happened to be convenient. This meant that printing a value as a double and printing the same value as a long double could produce different (but equivalent) results. The change is to always make the leading digit a 1, unless the number is 0. This solves the aforementioned problem and has several other advantages. 2. Use the FPU to do rounding. This is far simpler and more portable than manipulating the bits, and it fixes an obsure round-to-even bug. It also raises the exceptions now required by IEEE 754R. The drawbacks are that it is usually slightly slower, and it makes printf less effective as a debugging tool when the FPU is hosed (e.g., due to a buggy softfloat implementation). 3. On i386, twiddle the rounding precision so that (2) works properly for long doubles. 4. Make several simplifications that are now possible due to (2). 5. Split __hldtoa() into a separate file. Thanks to remko for access to a sparc64 box for testing. Notes: svn path=/head/; revision=178140
* Export gdtoa's __ULto{x,Q}_D2A routine in a private namespace soDavid Schultz2007-12-161-0/+5
| | | | | | | libm can use it. Notes: svn path=/head/; revision=174681
* Fix handling of subnormals on i386/ia64/amd64.David Schultz2007-12-091-2/+0
| | | | | | | PR: 85080 Notes: svn path=/head/; revision=174488
* In scanf, round according to the current rounding mode.David Schultz2007-12-033-4/+16
| | | | Notes: svn path=/head/; revision=174204
* Use an intermediate pointer to avoid a strict aliasing warning.John Birrell2007-11-211-1/+2
| | | | | | | | | Note that ULong in this code is actually defined as an unsigned integer across all arches so that the gdtoa() function always processes 32 bit data despite the unfortunate naming of "ULong". Notes: svn path=/head/; revision=173793
* Remove symbols that should not be exported.Daniel Eischen2007-10-131-29/+0
| | | | | | | | Submitted by: das MFC after re@ approval Notes: svn path=/head/; revision=172618
* Fix a rounding error.David Schultz2007-05-081-1/+1
| | | | | | | Reported by: Bruno Haible Notes: svn path=/head/; revision=169354
* Use C comments since we now preprocess these files with CPP.Daniel Eischen2007-04-291-4/+8
| | | | Notes: svn path=/head/; revision=169092
* Fix rounding of 0xf for hex fp formats.David Schultz2007-01-031-1/+1
| | | | | | | PR: 90333 Notes: svn path=/head/; revision=165742
* Don't export __gdtoa. The only known ports that rely onDaniel Eischen2006-04-151-5/+1
| | | | | | | | | | this or the deprecated POSIX functions {e,g,f}cvt() have newer versions that do not (rely on them). Requested by: marius Notes: svn path=/head/; revision=157777
* Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,Daniel Eischen2006-04-011-0/+4
| | | | | | | | | | | this is used by some 3rd party applications when {e,f,g}cvt() are not found. POSIX defines the xcvt() funtions but says they are deprecated in favor or sprintf(). We'll import these functions from OpenBSD and remove __gdtoa() from the exported interfaces when libc version is bumped. Notes: svn path=/head/; revision=157350
* Add each directory's symbol map file to SYM_MAPS.Daniel Eischen2006-03-131-0/+2
| | | | Notes: svn path=/head/; revision=156613
* Add symbol maps and initial symbol version definitions to libc.Daniel Eischen2006-03-131-0/+39
| | | | | | | Reviewed by: davidxu Notes: svn path=/head/; revision=156608
* Don't compile the gdtoa package's strtoIg.c into libc.David Schultz2005-01-271-1/+1
| | | | | | | I never got around to making use of it. Notes: svn path=/head/; revision=140889
* Cut out the gordian handling of subnormals by bit fiddling, andDavid Schultz2005-01-181-128/+15
| | | | | | | | | | | | | instead use the FPU to convert subnormals to normals. (NB: Further simplification is possible, such as using the FPU for the rounding step.) This fixes a bug reported by stefanf where long double subnormals in the Intel 80-bit format would be output with one fewer digit than necessary when the default precision was used. Notes: svn path=/head/; revision=140430
* Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.David Schultz2005-01-151-4/+1
| | | | | | | | The purpose of having a separate file involved an abandoned scheme that would have kept contrib/gdtoa out of the include path for the rest of libc. Notes: svn path=/head/; revision=140279
* Updated manh shift constant type to 'ULL' for PPC to fixPeter Grehan2004-01-211-1/+1
| | | | | | | | | shift-too-large compile error reviewed by: das Notes: svn path=/head/; revision=124767
* Implement __hdtoa() and __hldtoa() and enable printf() support for %aDavid Schultz2004-01-182-1/+433
| | | | | | | and %A, which print floating-point numbers in hexadecimal. Notes: svn path=/head/; revision=124667
* Fix a bug that caused long double subnormals to be printedDavid Schultz2004-01-181-0/+3
| | | | | | | | incorrectly on architectures without an explicit normalization bit (sparc64, powerpc). Notes: svn path=/head/; revision=124652
* Replaced an ugly hack to selectively disable warningsRuslan Ermilov2004-01-111-3/+0
| | | | | | | | | | in contributed sources with just a hack made possible by bsd.sys.mk,v 1.33. This is better because it just nulls out the warning flags rather than adding gcc(1) specific -w option to CFLAGS. Notes: svn path=/head/; revision=124374
* Add an ulgy hack so that warnings added by non-zero WARNS values won't beDavid E. O'Brien2004-01-101-0/+3
| | | | | | | | | used with the contrib/ gdtoa sources as they aren't WARNS-clean. Submitted by: ru Notes: svn path=/head/; revision=124354
* Userland spinlocks bad. Sleep locks good.David Schultz2003-06-211-2/+5
| | | | | | | | | Use the latter for gdtoa. Requested by: deischen (far too long ago) Notes: svn path=/head/; revision=116652
* /strtopx/ s/result/&result/David Schultz2003-04-092-2/+2
| | | | | | | This is the version I *meant* to commit last week. Notes: svn path=/head/; revision=113278
* Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().David Schultz2003-04-052-1/+98
| | | | | | | | | | In support of this, add some MD macros to assist in converting long doubles to the format expected by gdtoa(). Reviewed by: silence on standards@ Notes: svn path=/head/; revision=113145
* Clean up the way gdtoa sources are found.David E. O'Brien2003-03-131-1/+6
| | | | | | | OK'ed by: das Notes: svn path=/head/; revision=112202
* Replace our ancient dtoa/strtod implementation with the gdtoaDavid Schultz2003-03-125-0/+159
package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien Notes: svn path=/head/; revision=112163