Commit Graph

9708 Commits

Author SHA1 Message Date
marcel
c7673a8a31 Build libpmc on all architectures (FWIW :-)
Ok'd by: jkoshy@
2005-04-20 20:50:32 +00:00
marcel
24142cab5d o Do not include <machine/pmc_mdep.h>. It's automaticly included for
us when <sys/pmc.h> is included.
o  Replace "#if __i386__" and "#if __amd64__" with the equivalent of
   "#ifdef __i386__" and "#ifdef __amd64__" (resp.) These tokens are
   not defined on all platforms.
o  Conditionally compile pmc_parse_mask() on i386 and amd64 only. It's
   only referenced there. This will change when support for other
   platforms is added, of course.

Ok'd by: jkoshy@
2005-04-20 20:48:24 +00:00
jkoshy
19ca551dc4 Remove extra Id keyword. 2005-04-20 05:36:43 +00:00
jkoshy
0e598d84b7 Remove superfluous CFLAGS lines. Use the conditional '?=' construct
for WARNS lines.

Submitted by:	ru
2005-04-19 14:43:59 +00:00
ume
9af2b42712 - add getproto{byname,bynumber,ent}_r for internal use within libc.
- make getproto{byname,bynumber,ent} thread-safe.
2005-04-19 14:41:13 +00:00
ume
6164476dea - nuke deprecated and unused getnodeby(3).
- remove unused variable.

Obtained from:	KAME
2005-04-19 12:28:17 +00:00
jkoshy
dc3444cd91 Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities
and documentation into -CURRENT.

Bump FreeBSD_version.

Reviewed by:	alc, jhb (kernel changes)
2005-04-19 04:01:25 +00:00
ume
6dfe72cfb9 rename the NIS related fields to have yp_ prefix.
Suggested by:	delphij
2005-04-18 18:34:58 +00:00
delphij
3460f32839 Do not check whether a pointer is NULL, since free(3) already takes care of
this case.

Reviewed by:	ume
2005-04-18 03:45:23 +00:00
das
5aec008257 Add a sysctl that returns the full path of a process' text file.
This information is needed by things like `gdb -p' and Sun's javac,
and previously it could only be obtained via procfs
2005-04-18 02:10:37 +00:00
kientzle
a46546658e Portability enhancement: MS Windows won't restore metadata if the file
is still open, so close the file as soon as we've written the
file contents, before we attempt to restore metadata.

Thanks to:  Kees Zeelenberg
2005-04-17 22:49:00 +00:00
ache
60e7539065 Fix truncl.3 MLINKS 2005-04-17 19:57:52 +00:00
kientzle
877f4c482e Update "make distfile" to use newest automake/autoconf from ports.
Thanks to: Juergen Lock
2005-04-17 17:51:05 +00:00
delphij
a524a21406 Fix build for !YP case.
BTW.  Shall we change these fields to have yp_ prefix?  That will make the
code easier to read.
2005-04-17 15:10:30 +00:00
ume
04a684b008 libc-internal interfaces should have two underscores in front
of their names.

Pointed out by:	das
2005-04-17 14:42:52 +00:00
delphij
ba35b6aa76 Wrong working directory, sorry. The previous patch was what I have
seen in NetBSD's tree, and this one is what I have submitted for review.

Pointy hat to:	me
2005-04-17 04:00:55 +00:00
delphij
90a7ec34ec Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3).  POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.

PR:		standards/80008
Requested by:	Xin Liu <lx@knight.6test.edu.cn>
Reviewed by:	freebsd-standards (das)
MFC After:	2 weeks
2005-04-17 03:56:07 +00:00
das
bdb6987b1d Be bug-for-bug compatible with the C standard with respect to
printf("%#.0o", 0).  Cite an amusing passage from a defect report.
2005-04-16 22:36:51 +00:00
das
9c49c2a65a More optimized math functions. 2005-04-16 21:12:55 +00:00
das
a9fd105354 Implement truncl() based on floorl(). 2005-04-16 21:12:47 +00:00
rwatson
c2d86096e6 When parsing the second {uid,gid} in an identity phrase for ugidfw,
check the password or group database before attempting to parse as an
integer, as is done for the first {uid,gid} in an identity phrase.

Obtained from:	TrustedBSD Project
Sponsored by:	SPAWAR, SPARTA
2005-04-16 11:58:55 +00:00
rwatson
74350013ae In practice, you need to include <sys/types.h> and
<security/mac_bsdextended/mac_bsdextended.h> in order to include
<ugidfw.h>, so document that.

MFC after:	3 days
2005-04-16 11:32:46 +00:00
ume
aedac4ef3a Now, our getservbyname(3) is thread-safe. So, we don't need
to protect it with mutex lock.
2005-04-15 18:15:12 +00:00
ume
0e0eae8d50 - add getserv{byname,byport,ent}_r for internal use within libc.
- make getserv{byname,byport,ent} thread-safe.

Reviewed by:	gnn
2005-04-15 18:09:39 +00:00
ume
b8a79c699c hostalias() is not thread-safe. So, introduce _res_hostalias()
and use it.

Obtained from:	BIND9
2005-04-15 14:42:29 +00:00
ume
61d715cfa6 remove needless res_init() call.
Inspired by:	NetBSD
2005-04-14 11:44:43 +00:00
peter
c1d476c931 Adapt the libpthread patch for using i386_set_gsbase() to libthr. 2005-04-14 00:44:07 +00:00
peter
03d84df307 Use the i386_set_gsbase() syscall if it is implemented in the kernel.
This is a little hairy here because the allocation and usage of this
functionality is split into two places in libpthread.
2005-04-14 00:13:20 +00:00
peter
3692814aa2 Attempt i386_set_gsbase() before using the user_ldt code. Unimplemented
sysarch() calls return EINVAL, not SIGSYS.. so we can trivially adapt.
2005-04-14 00:02:37 +00:00
peter
d07b2f1b2c Add stubs for the %fs/%gs base management calls. 2005-04-14 00:01:35 +00:00
nyan
db5f8a5b7b Merge two slice_type_name() functions. 2005-04-13 13:42:38 +00:00
davidxu
03aa59f2ee o Code cleanup, eliminate private thread id map, directly
use lwpid as thread id.
 o Export tls pointer.
2005-04-13 04:57:38 +00:00
davidxu
1f525cc190 Fill traceme and events fields. 2005-04-12 23:33:08 +00:00
davidxu
3093d067e4 Conditionally report initial thread event. 2005-04-12 03:13:49 +00:00
davidxu
bc36c64c8d Add missing event reporting code. 2005-04-12 03:08:11 +00:00
davidxu
6b1b88e88d Sync with debugger code in libthr. 2005-04-12 03:03:16 +00:00
davidxu
2cf5eeb001 Add debugger event reporting support, current only TD_CREATE and TD_DEATH
events are reported.
2005-04-12 03:00:28 +00:00
alc
b2ebe16689 Add a machine-specific, optimized implementation of strcat.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 18:58:49 +00:00
alc
420be8df92 Eliminate a conditional branch and as a side-effect eliminate a branch to
a return instruction.  (The latter is discouraged by the Opteron
optimization manual because it disables branch prediction for the return
instruction.)

Reviewed by: bde
2005-04-10 18:12:07 +00:00
delphij
ecb578572b Remove duplicated "bytes".
Submitted by:	Wojciech A. Koszek [dunstan freebsd czest pl]
PR:		79747
2005-04-10 12:15:25 +00:00
alc
417aec058f Add a machine-specific, optimized implementation of strcpy.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 05:11:06 +00:00
alc
654c522ae8 Add a machine-specific, optimized implementation of strcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-09 20:47:08 +00:00
ume
1b9c36cc46 unbreak build without YP defined.
Submitted by:	Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
2005-04-09 14:20:18 +00:00
stefanf
d1df2201c0 Remove unused variables and assignments. 2005-04-08 21:24:23 +00:00
stefanf
edc96e2497 Use prototypes in the function definitions. 2005-04-08 21:15:38 +00:00
stefanf
460f9ad102 Remove unused variable. 2005-04-08 20:58:47 +00:00
alc
1ab7d22f97 Add machine-specific, optimized implementations of bcmp and memcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-08 05:15:55 +00:00
alc
02ae1b51e3 Eliminate unneeded instructions that are a vestige of mechanical
translation from i386.
2005-04-08 05:10:18 +00:00
das
15bd306d7a Add roundl(), lroundl(), and llroundl(). 2005-04-08 01:24:08 +00:00
das
4df744a471 These files should include s_lround.c instead of s_lrint.c.
This only matters for efficiency, not for correctness.
2005-04-08 00:52:27 +00:00
das
9977034544 Fix a (coincidentally harmless) bug. 2005-04-08 00:52:16 +00:00
cognet
c7b04f713a Use the new atomic_cmpset_32(). 2005-04-07 22:06:05 +00:00
davidxu
22b6b1a4cf Adjust hash function for smaller pthread structure size. 2005-04-07 06:09:17 +00:00
alc
90a823ed92 Eliminate an unneeded instruction that is a vestige of mechanical
translation from i386.
2005-04-07 05:46:46 +00:00
peter
cb1b05e7a8 Fix strict-alias warnings by removing excessive (and wrong) casts. 2005-04-07 04:33:15 +00:00
alc
cbb9f3f415 Add machine-specific, optimized implementations of bcopy, bzero, memcpy,
memmove, and memset.

PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-07 03:56:03 +00:00
ume
aa9bf872c4 - we are no longer shareing any resources to be locked between
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
2005-04-06 15:36:34 +00:00
ume
26cc55077b MUTEX_INITIALIZER should be used instead of
PTHREAD_MUTEX_INITIALIZER, here.
2005-04-06 15:16:04 +00:00
davidxu
ed60415691 Remove unique id field which is no longer used by debugger. 2005-04-06 13:57:31 +00:00
davidxu
a991e5caf8 Remove debug symbol from installed library, one can always
use compiled version in libthr directory.
2005-04-06 13:48:11 +00:00
ume
38e722e1a8 separate gai_strerror(3) from getaddrinfo.c.
Requested by:	phantom
2005-04-06 12:45:51 +00:00
kientzle
3e09e80261 A number of improvements to ZIP support.
* Handles entries with compressed size >2GB (signed/unsigned cleanup)
  * Handles entries with compressed size >4GB ("ZIP64" extension)
  * Handles Unix extensions (ctime, atime, mtime, mode, uid, etc)
  * Format-specific "skip data" override allows ZIP reader to skip
    entries without decompressing them, which makes "tar -t"
    a lot faster.
  * Handles "length-at-end" entries generated by, e.g., "zip -r - foo"

Many thanks to: Dan Nelson, who contributed the code and test files for
   the first three items above and suggested the fourth.
2005-04-06 04:19:30 +00:00
das
bb5d9cb768 Fix a long-standing bug in k_rem_pio2(), which led to large errors when
tanf() was called with big arguments close to multiples of pi/2.

Reported by:	ucbtest via bde
2005-04-05 23:27:47 +00:00
ume
b0c9c2a388 make yp stuff re-entrant.
Obtained from:	NetBSD
2005-04-05 18:25:23 +00:00
ume
ac4b9096b3 protect _yp_domain with mutex lock.
Inspired by:	NetBSD
2005-04-05 18:07:59 +00:00
ume
b24803b06b add missing mutex unlock. 2005-04-05 17:13:28 +00:00
phk
063486ce84 natd core dumps when -reverse switch is used because of a bug in
libalias.

In /usr/src/lib/libalias/alias.c, the functions LibAliasIn and
LibAliasOutTry call the legacy PacketAliasIn/PacketAliasOut instead
of LibAliasIn/LibAliasOut when the PKT_ALIAS_REVERSE option is set.
In this case, the context variable "la" gets lost because the legacy
compatibility routines expect "la" to be global.  This was obviously
an oversight when rewriting the PacketAlias* functions to the
LibAlias* functions.

The fix (as shown in the patch below) is to remove the legacy
subroutine calls and replace with the new ones using the "la" struct
as the first arg.

Submitted by:	Gil Kloepfer <fgil@kloepfer.org>
Confirmed by:	<nicolai@catpipe.net>
PR:		76839
MFC after:	3 days
2005-04-05 13:04:35 +00:00
davidxu
e911a0459c Export thread address. 2005-04-05 11:38:30 +00:00
das
1db6f984bc Build exp2(), exp2f(), and related documentation. 2005-04-05 02:57:39 +00:00
das
1324b71e9d Document exp2() and exp2f(), and make other minor tweaks and updates. 2005-04-05 02:57:28 +00:00
das
bf28283937 Implement exp2() and exp2f(). 2005-04-05 02:57:15 +00:00
davidxu
1b586b1fd5 Pass exact number of threads. 2005-04-04 23:43:53 +00:00
ume
cb0b5ed63a make _files_getaddrinfo() re-entrant.
Obtained from:	NetBSD
2005-04-04 19:45:27 +00:00
davidxu
399fdd028a Export pthread_condattr_getclock, pthread_condattr_setclock. 2005-04-03 23:52:29 +00:00
das
87aa297030 Replace the current strspn() and strcspn() with significantly faster
implementations inspired by the ones in DragonFly.  Unlike the
DragonFly versions, these have a small data cache footprint, and my
tests show that they're never slower than the old code except when the
charset or the span is 0 or 1 characters.  This implementation is
generally faster than DragonFly until either the charset or the span
gets in the ballpark of 32 to 64 characters.
2005-04-02 18:52:44 +00:00
das
1e73b68cbc Add some missing errnos from POSIX. Nothing in FreeBSD generates
these at the moment, but applications that test for them will now
have a better chance of compiling.

I have intentionally omitted errnos that are only good for STREAMS,
since apps that use STREAMS won't compile anyway.  The exception is
EPROTO, which was apparently intended for STREAMS, but worth having
anyway because Linux (mis)uses it for other things.
2005-04-02 12:33:28 +00:00
ume
420c834c87 nuke the logic for AF_UNSPEC and simplify. once, it was introduced
to improve getaddrinfo(3).  but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
2005-04-02 08:18:33 +00:00
davidxu
beebb880be Connect libthr and libthread_db to make buildworld. 2005-04-02 01:40:12 +00:00
davidxu
6c73121667 Update debugger code for new libthr. 2005-04-02 01:36:21 +00:00
davidxu
f066519e91 Import my recent 1:1 threading working. some features improved includes:
1. fast simple type mutex.
 2. __thread tls works.
 3. asynchronous cancellation works ( using signal ).
 4. thread synchronization is fully based on umtx, mainly, condition
    variable and other synchronization objects were rewritten by using
    umtx directly. those objects can be shared between processes via
    shared memory, it has to change ABI which does not happen yet.
 5. default stack size is increased to 1M on 32 bits platform, 2M for
    64 bits platform.
As the result, some mysql super-smack benchmarks show performance is
improved massivly.

Okayed by: jeff, mtm, rwatson, scottl
2005-04-02 01:20:00 +00:00
davidxu
049358d9ae Prepare for importing my 1:1 threading work, disconnect libthr and
libthread_db from make buildworld.
2005-04-02 00:59:18 +00:00
nyan
eb3dd13248 Add over 32GB disk support on pc98 (userland part).
Submitted by:	Hirokazu WATANABE
2005-03-30 13:03:33 +00:00
kientzle
886428519a Clean up the support for extracting very long pathnames. 2005-03-29 05:24:08 +00:00
pjd
0e1fcdd3a6 Fix typo - link for bsde_add_rule(3) manual page was not created.
MFC after:	1 week
2005-03-28 09:38:43 +00:00
pjd
838e3ffcb1 Properly return rule number.
Submitted by:	Wojciech A. Koszek
PR:		bin/79292
MFC after:	1 week
2005-03-28 09:37:44 +00:00
das
da9b203aaf Implement and document remquo() and remquof(). 2005-03-25 04:40:44 +00:00
davidxu
17f1ca4d9b Eliminate plt relocation for kse_switchin. 2005-03-21 23:10:35 +00:00
davidxu
014dff15cf Use __weak_reference macro to define weak symbols. 2005-03-21 13:17:16 +00:00
das
79d24f2484 Teach fmtcheck() about the ' (thousands separator) flag. 2005-03-21 08:00:55 +00:00
simon
1ffec0c271 Add byteorder(9) to SEE ALSO.
MFC after:	3 days
2005-03-20 17:27:57 +00:00
pjd
d4e1d8c063 Make kvm(3) aware of ki_jid field.
Reviewed by:	gad
MFC after:	3 days
2005-03-20 10:37:56 +00:00
cognet
60d20350ea Use the correct values for softfloat, in both the little endian and the big
endian cases.
2005-03-20 00:53:52 +00:00
das
79b831e3a1 Fix the double rounding problem with subnormals, and
remove the XXX comments, which no longer apply.
2005-03-18 02:27:59 +00:00
das
9f8ee2b273 Add missing prototypes for fma() and fmaf(), and remove an inaccurate
comment.
2005-03-18 01:47:42 +00:00
das
fdf53809bb Make the fenv.h routines work for programs that use SSE for
floating-point arithmetic on i386.  Now I'm going to make excuses
for why this code is kinda scary:

- To avoid breaking the ABI with 5.3-RELEASE, we can't change
  sizeof(fenv_t).  I stuck the saved mxcsr in some discontiguous
  reserved bits in the existing structure.

- Attempting to access the mxcsr on older processors results
  in an illegal instruction exception, so support for SSE must
  be detected at runtime.  (The extra baggage is optimized away
  if either the application or libm is compiled with -msse{,2}.)

I didn't run tests to ensure that this doesn't SIGILL on older 486's
lacking the cpuid instruction or on other processors lacking SSE.
Results from running the fenv regression test on these processors
would be appreciated.  (You'll need to compile the test with
-DNO_STRICT_DFL_ENV.)  If you have an 80386, or if your processor
supports SSE but the kernel didn't enable it, then you're probably out
of luck.

Also, I un-inlined some of the functions that grew larger as a result
of this change, moving them from fenv.h to fenv.c.
2005-03-17 22:21:46 +00:00
emax
8435db4dc6 Fix typo in comments (spell Linux correctly)
Submitted by:	Markus Brueffer < markus at brueffer dot de >
MFC after:	3 days
2005-03-17 21:39:44 +00:00
dougb
a11fe928e2 Regenerate for 9.3.1 2005-03-17 08:39:12 +00:00
dougb
78ab7e518f bmake changes to handle the move of dns/sec and related files 2005-03-17 08:35:21 +00:00
das
5b7d321e53 Spell 'fedisableexcept' correctly. 2005-03-16 22:34:14 +00:00
das
bfdcd78bfc Document feenableexcept(), fedisableexcept(), and fegetexcept(). 2005-03-16 19:04:28 +00:00
das
6448887f3b Replace fegetmask() and fesetmask() with feenableexcept(),
fedisableexcept(), and fegetexcept().  These two sets of routines
provide the same functionality.  I implemented the former as an
undocumented internal interface to make the regression test easier to
write.  However, fe(enable|disable|get)except() is already part of
glibc, and I would like to avoid gratuitous differences.  The only
major flaw in the glibc API is that there's no good way to report
errors on processors that don't support all the unmasked exceptions.
2005-03-16 19:03:46 +00:00
das
a84bfd6e04 Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors.  In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
  and *sets* the new flag word to M.  (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
  and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break.  I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it.  This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated.  ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386.  As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR:		75862
Suggested by:	bde
2005-03-15 15:53:39 +00:00
phk
9979dac9ca Dike out unwarranted reference to si_udev. 2005-03-15 14:26:14 +00:00
harti
c7663fe856 Finish repo-copy of lib/libbsnmp/modules to usr.sbin/bsnmpd/modules.
These modules are modules for the daemon, not for the library so
they should be where the daemon is.
2005-03-14 17:32:16 +00:00
kientzle
4f2d6bca6d Support extracting entries with pathnames longer than PATH_MAX. In
testing, I've archived and restored dir trees with ~1MB pathnames.
Most formats, of course, have much smaller limits.
2005-03-13 02:53:42 +00:00
kientzle
57f7478012 When rejecting rediculously large pax attributes (such as pathnames
over 1MB), issue a warning instead of forcing an internal assertion
failure.
2005-03-13 02:35:52 +00:00
kientzle
816c5be744 Correctly pass low-level I/O errors back up to the caller when
reading cpio format.
2005-03-13 01:52:35 +00:00
kientzle
3d74129d7e Better error messages on read and file-open errors. 2005-03-13 01:51:16 +00:00
kientzle
b1a33585f7 Include detailed error message from zlib after a decompression error. 2005-03-13 01:48:33 +00:00
kientzle
ebf75b4df5 If the output is not a regular file, it's okay to add it to the archive.
In particular, /dev/st0 can be added to an archive being written to /dev/st0.

Thanks to: Jaakko Heinonen
2005-03-13 01:47:31 +00:00
stefanf
8655a91f58 Use socklen_t where appropriate. 2005-03-11 14:17:12 +00:00
stefanf
64a1df7d12 Avoid pointer arithmetics on void *.
Approved by:	alfred
2005-03-10 08:25:49 +00:00
stefanf
c463ca74d4 Remove an superfluous assignment.
Approved by:	alfred
2005-03-10 00:58:21 +00:00
stefanf
624654db85 Use socklen_t where appropriate.
Approved by:	alfred
2005-03-10 00:57:01 +00:00
cperciva
180357cd92 In light of the recent 2^69 operation collision-finding attack on SHA1,
add support for SHA256.

Tested on:	i386, sparc64
Tested using:	NIST test vectors, built-in tests
X-MFC-after:	5.4-RELEASE
2005-03-09 19:23:04 +00:00
cperciva
0f8b638e68 The third parameter to SHA_Update and SHA1_Update is a "size_t", not a
"unsigned int".
2005-03-09 16:22:21 +00:00
alfred
93318a5e79 Make MSG_NOSIGNAL available to native programs.
Bump FreeBSD_version to note this change.

Reviewed by: sobomax
2005-03-09 00:17:33 +00:00
stefanf
2619687e84 Initialise `sn' before using its value. 2005-03-08 21:46:18 +00:00
phk
25e912bfe0 Have ttyname_r() try to ask DEVFS for the device name.
Document ttyname_r().

Simplify threaded/unthreaded stuff a lot.
2005-03-08 21:35:52 +00:00
phk
abe23c2538 Make the returnvalue of times(3) insensitive to changes in wall-clock.
PR:	78537
2005-03-08 08:12:35 +00:00
das
1e57fa37f5 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
1376e3369e Remove an obsolete sentence from a comment. 2005-03-07 20:28:26 +00:00
phantom
732dfa42c4 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
59658f6dc5 - 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
3e55f968bf Add manpage links for frexpf, frexpl, ldexpf, and ldexpl. 2005-03-07 05:01:04 +00:00
das
c4f78b88c6 Document frexpl and ldexpl. 2005-03-07 05:00:54 +00:00
das
5cd14bf8eb Document scalbnl and scalblnl. 2005-03-07 05:00:44 +00:00
das
c4cf2622dd Document nextafterl and nexttoward{,f,l}. 2005-03-07 05:00:29 +00:00
das
4e4746e6f5 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
9331bfcabd Document fmal. 2005-03-07 04:59:43 +00:00
das
60d1f35832 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
8892e8e916 - 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
fd680f0398 - 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
adcae0d9cf 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
6bde47de78 - 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
be070dc174 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
60fe3744a1 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
e1ac3a8c05 - 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
4d2ad621bf - 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
5bfaaf0464 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
e08a3e75ca Implement frexpl. 2005-03-07 04:54:51 +00:00
das
2474fb3758 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
c8e0555e08 Implement fmal. 2005-03-07 04:54:20 +00:00
das
8ebc6e4b38 - 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
70073cd00d - 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
ed73924a0b 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
69b60bd975 Add an assembly version of fmal. 2005-03-07 04:53:11 +00:00
das
4a2bef4123 Add scalbnl, also known as as ldexpl. 2005-03-07 04:52:58 +00:00
das
e67e9ee139 Alias scalbnf as ldexpf. The two are identical in binary
floating-point formats.
2005-03-07 04:52:43 +00:00
das
6ea772039c Fix a mistake in the exponent range. 2005-03-06 19:08:18 +00:00