Commit Graph

9487 Commits

Author SHA1 Message Date
das
fe8bcbade1 Replace strong references with weak references. There's no
particularly good reason to do this, except that __strong_reference
does type checking, whereas __weak_reference does not.
On Alpha, the compiler won't accept a 'long double' parameter in
place of a 'double' parameter even thought the two types are
identical.
2005-03-07 21:27:37 +00:00
stefanf
a03d288de2 Remove an obsolete sentence from a comment. 2005-03-07 20:28:26 +00:00
phantom
50f210b463 Add korean NLS message catalogs for libc
Submitted by:	Hye-Shik Chang <perky@FreeBSD.org>
PR:		misc/78290
2005-03-07 13:57:24 +00:00
das
b5c280fa93 - If z is 0, one of x or y is 0, and the other is infinite, raise
an invalid exception and return an NaN.
- If a long double has 113 bits of precision, implement fma in terms
  of simple long double arithmetic instead of complicated double arithmetic.
- If a long double is the same as a double, alias fma as fmal.
2005-03-07 05:02:09 +00:00
das
cdfb777ae4 Add manpage links for frexpf, frexpl, ldexpf, and ldexpl. 2005-03-07 05:01:04 +00:00
das
83430c065e Document frexpl and ldexpl. 2005-03-07 05:00:54 +00:00
das
4e91e312ee Document scalbnl and scalblnl. 2005-03-07 05:00:44 +00:00
das
548bfa64db Document nextafterl and nexttoward{,f,l}. 2005-03-07 05:00:29 +00:00
das
1628ed734a Add nexttoward to the list of implemented functions, and explicitly
list the four that are still missing.
2005-03-07 04:59:53 +00:00
das
d8ce8c01ff Document fmal. 2005-03-07 04:59:43 +00:00
das
1f3be4402d Remove ldexp and ldexpf. The former is in libc, and the latter is
identical to scalbnf, which is now aliased as ldexpf.  Note that the
old implementations made the mistake of setting errno and were the
only libm routines to do so.
2005-03-07 04:59:30 +00:00
das
55e39ad021 - Remove s_ldexpf.c (now aliased to scalbn.)
- Add nexttoward{,f,l} and nextafterl.  On all platforms,
  nexttowardl is an alias for nextafterl.
- Add fmal.
- Add man pages for new routines: fmal, nextafterl,
  nexttoward{,f,l}, scalb{,l}nl.

Note that on platforms where long double is the same as double, we
generally just alias the double versions of the routines, since doing
so avoids extra work on the source code level and redundant code in
the binary.  In particular:

		ldbl53		ldbl64/113
fmal       	s_fma.c		s_fmal.c
ldexpl     	s_scalbn.c	s_scalbnl.c
nextafterl 	s_nextafter.c	s_nextafterl.c
nexttoward 	s_nextafter.c	s_nexttoward.c
nexttowardf	s_nexttowardf.c	s_nexttowardf.c
nexttowardl	s_nextafter.c	s_nextafterl.c
scalbnl    	s_scalbn.c	s_scalbnl.c
2005-03-07 04:59:11 +00:00
das
fd944134c6 - Define FP_FAST_FMA for sparc64, since fma() is now implemented using
sparc64's 128-bit long doubles.
- Define FP_FAST_FMAL for ia64.
- Prototypes for fmal, frexpl, ldexpl, nextafterl, nexttoward{,f,l},
  scalblnl, and scalbnl.
2005-03-07 04:58:43 +00:00
das
9a051ba77b Alias scalbn as ldexpl and scalbnl on platforms where long double is
the same as double.
2005-03-07 04:58:03 +00:00
das
6600ea99c1 - Implement scalblnl.
- In scalbln and scalblnf, check the bounds of the second argument.
  This is probably unnecessary, but strictly speaking, we should
  report an error if someone tries to compute scalbln(x, INT_MAX + 1ll).
2005-03-07 04:57:50 +00:00
das
fe5bcdbac5 Implement nexttowardf. This is used on both platforms with 11-bit
exponents and platforms with 15-bit exponents for long doubles.
2005-03-07 04:57:38 +00:00
das
7818b34a10 Implement nexttoward and nextafterl; the latter is also known as
nexttowardl.  These are not needed on machines where long doubles
look like IEEE-754 doubles, so the implementation only supports
the usual long double formats with 15-bit exponents.

Anything bizarre, such as machines where floating-point and integer
data have different endianness, will cause problems.  This is the case
with big endian ia64 according to libc/ia64/_fpmath.h.  Please contact
me if you managed to get a machine running this way.
2005-03-07 04:56:46 +00:00
das
356e29eb2d - Try harder to trick gcc into not optimizing away statements
that are intended to raise underflow and inexact exceptions.
- On systems where long double is the same as double, nextafter
  should be aliased as nexttoward, nexttowardl, and nextafterl.
2005-03-07 04:55:58 +00:00
das
83b372fbd0 - Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.  For architectures that don't have such a bit,
  LDBL_NBIT is 0.  This makes it possible to say `mantissa & ~LDBL_NBIT'
  in places that previously used an #ifdef to select the right expression.
  The optimizer should dispense with the extra arithmetic when LDBL_NBIT
  is 0 anyway.
- Add an XXX comment for the big endian case.
2005-03-07 04:55:40 +00:00
das
a6dba00c47 Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.  For architectures that don't have such a bit,
LDBL_NBIT is 0.  This makes it possible to say `mantissa & ~LDBL_NBIT'
in places that previously used an #ifdef to select the right expression.
The optimizer should dispense with the extra arithmetic when LDBL_NBIT
is 0.
2005-03-07 04:55:22 +00:00
das
2cc13e1e88 Implement frexpl. 2005-03-07 04:54:51 +00:00
das
84ad4c5b6e Alias frexp as frexpl on platforms where a long double is the same as
a double.
2005-03-07 04:54:39 +00:00
das
1e49f0f6c9 Implement fmal. 2005-03-07 04:54:20 +00:00
das
acc1374e50 - Define the LDBL_PREC to be the number of significant bits in a long
double's mantissa.
- Add an assembly version of fmal.
2005-03-07 04:54:02 +00:00
das
21f1e1325d - Define the LDBL_PREC to be the number of significant bits in a long
double's mantissa.
- Add an assembly version of scalbnl.
2005-03-07 04:53:48 +00:00
das
7de9ed08e2 Define the LDBL_PREC to be the number of significant bits in a long
double's mantissa.
2005-03-07 04:53:36 +00:00
das
727afbc2b1 Add an assembly version of fmal. 2005-03-07 04:53:11 +00:00
das
1acdadc49a Add scalbnl, also known as as ldexpl. 2005-03-07 04:52:58 +00:00
das
e60595c23c Alias scalbnf as ldexpf. The two are identical in binary
floating-point formats.
2005-03-07 04:52:43 +00:00
das
a263f09ca4 Fix a mistake in the exponent range. 2005-03-06 19:08:18 +00:00
marcus
08440d6d16 Increase the default stacksizes:
32-bit		64-bit
main thread	2 MB		4 MB
other threads	1 MB		2 MB

Approved by:	mtm
Adapted from:	libpthread
2005-03-06 07:56:18 +00:00
mux
6c94985636 Unbreak strsignal(). This is an MFC candidate.
Reported by:	Sean McNeil <sean@mcneil.com>
2005-03-06 03:19:19 +00:00
das
e33c016f43 Work around a gcc bug. This fixes feholdexcept() et al. at -O1.
Symptoms of the problem included assembler warnings and
nondeterministic runtime behavior when a fe*() call that affects the
fpsr is closely followed by a float point op.

The bug (at least, I think it's a bug) is that gcc does not insert a
break between a volatile asm and a dependent instruction if the
volatile asm came from an inlined function.  Volatile asms seem to be
fine in other circumstances, even without -mvolatile-asm-stop, so
perhaps the compiler adds the stop bits before inlining takes place.
The problem does not occur at -O0 because inlining is disabled, and it
doesn't happen at -O2 because -fschedule-insns2 knows better.
2005-03-05 20:34:45 +00:00
green
a454a69a64 Do not require the pty(4) majors to be anything in particular. 2005-03-04 20:23:32 +00:00
marcus
3beb7872da Fix a problem in the Skinny ALG where a specially crafted packet could cause
a libalias application (e.g.  natd, ppp, etc.) to crash.  Note: Skinny support
is not enabled in natd or ppp by default.

Approved by:	secteam (nectar)
MFC after:	1 day
Secuiryt:	This fixes a remote DoS exploit
2005-03-03 03:06:37 +00:00
kbyanc
ff2208f538 Set the TCP_NODELAY socket option and clear TCP_NOPUSH in order to flush
any pending HTTP request rather than calling shutdown(2) with SHUT_WR.
This makes libfetch (and thus fetch(1)) work again with Squid proxies
configured to not allow half-closed connections.

Reported by:	Pawel Worach (pawel.worach AT telia DOT com)
2005-03-02 19:09:28 +00:00
kientzle
64109ff3a3 Use correct byte order when parsing the size of the gzip "Extra data" field.
In particular, this correctly allows bsdtar (and pkg_add) to skip
package signatures.

Thanks to: Theo Schlossnagle
2005-03-02 05:34:05 +00:00
davidxu
31a7daa9b4 Fix incorrect comment. 2005-03-01 23:42:00 +00:00
stefanf
c94981f388 Fix typo in a comment. 2005-03-01 20:32:05 +00:00
pjd
c457829339 Add polish version of libc NLS catalog. 2005-03-01 14:38:30 +00:00
marcus
66fc579c06 Increase the default stacksizes:
32-bit		64-bit
main thread	2 MB		4 MB
other threads	1 MB		2 MB

Adapted from:	libpthread
Approved by:	deischen
2005-02-28 17:15:31 +00:00
trhodes
c9a4fc4edd Fix grammatical issue.
Submitted by:	ceri
2005-02-27 22:24:24 +00:00
phantom
19825475ce Backout NLS catalog handling, until all edge cases are resolved 2005-02-27 22:17:47 +00:00
phantom
e6fe29a2c7 Unbreak !NLS case 2005-02-27 21:17:22 +00:00
ru
886aafe32a Make the format of LC_COLLATE files architecture independent. 2005-02-27 20:31:13 +00:00
phantom
8d1b204eb7 Revert accidiental removal of string.h inclusion. 2005-02-27 18:39:02 +00:00
phantom
07680d2f60 Enable processing of NLS catalogs while building/installing of libc 2005-02-27 18:09:52 +00:00
phantom
0c6f416c1c Add russian version of libc NLS catalog
Translated by:	Valeriy Kravchuk <openxs@ipnet.kiev.ua>
		Alexey Dokuchaev <danfe@nsu.ru>
2005-02-27 18:09:09 +00:00
phantom
b1e39a85e3 Add template NLS catalog for strerror(), strerror_r() and strsignal()
localization support
2005-02-27 17:59:39 +00:00
delphij
ba11d22fac Change the spin lock logic to a reasonable one. We should spin when
the lock is held by other thread, but not when nobody owns it.  According
to deischen@, this part of code will never be hit in our threads
library, since it does not use locks without wait/wakeup functions.

Spotted by:	mingyanguo via ChinaUnix.net forum
Reviewed by:	deischen
2005-02-27 17:45:55 +00:00