summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* simplification in explore_numeric: unified the post-process withume2006-07-211-32/+22
| | | | | | | GET_AI and GET_PORT. Commented on an impossible case. Obtained from: KAME MFC after: 1 week
* RFC3493 requires use of inet_aton for AF_INET.ume2006-07-211-3/+7
| | | | | Obtained from: KAME MFC after: 1 week
* clean-up: rewrote explore_null and explore_numeric without using sentinel.ume2006-07-211-35/+20
| | | | | | | | we do not need it since we make (at most) a single addrinfo entry in these cases. Obtained from: KAME MFC after: 1 week
* - draft-ietf-ipngwg-icmp-namelookups-09ume2006-07-211-79/+164
| | | | | | | | | - make it compilable It still requires root privilege and is experimental. Obtained from: KAME MFC after: 1 week
* Use variadic macros that comply with C99. Keep the GCC-style ones ifstefanf2006-07-171-1/+1
| | | | DEBUG is defined and GCC is used.
* Change the GCC specific __FUNCTION__ to C99's __func__.stefanf2006-07-171-1/+1
| | | | OK'ed by: des
* Make the variadic macro debug() comply to C99.stefanf2006-07-171-3/+6
|
* Use a prototype for res_init().stefanf2006-07-171-1/+1
| | | | MFC after: 3 days
* Unexpand two TAILQ_FOREACH_SAFE cases.delphij2006-07-172-4/+2
| | | | Ok'ed by: davidxu
* Note the convention that humanize_number follows.imp2006-07-151-8/+11
| | | | Add 'engineering' numbers to table.
* o compat_group() and files_group() are more complicated than I thoughtmaxim2006-07-141-4/+6
| | | | | | | | | | | | | | | | in rev. 1.34. Mainly I missed the fact that the buffer is used for two purposes: 1) storing a group line from the group file; 2) __gr_parse_entry() parses the buffer and tries to put the group members to the remaining part of the buffer and can fail if there is no enough room for them. Re-arrange the buffer size checks to account the latter case. Submitted by: Kirk R Webb MFC after: 2 weeks
* Caching scheduling policy and priority in userland, a critical but baddlydavidxu2006-07-135-20/+50
| | | | | written application is frequently changing thread priority for SCHED_OTHER policy.
* Use thr_setscheduler, thr_getscheduler and thr_setschedparam to implementdavidxu2006-07-134-26/+15
| | | | pthread functions.
* o Add missed comma, xref kld(4).maxim2006-07-121-2/+3
|
* Use kernel facilities to support real-time scheduling.davidxu2006-07-127-124/+103
|
* __error could be called too early before libthr is initialized, testdavidxu2006-07-121-5/+7
| | | | this case and return global varible errno instead.
* Following repo-copy of mac_is_present_np.3 to mac_is_present.3, removerwatson2006-07-076-93/+6
| | | | | | | old file, update references, etc. The C function is already named mac_is_present(). Obtained from: TrustedBSD Project
* Fixed the threshold for using the simple Taylor approximation.bde2006-07-072-2/+2
| | | | | | | | | | | | | | | | | | | | | In e_log.c, there was just a off-by-1 (1 ulp) error in the comment about the threshold. The precision of the threshold is unimportant, but the magic numbers in the code are easier to understand when the threshold is described precisely. In e_logf.c, mistranslation of the magic numbers gave an off-by-1 (1 * 16 ulps) error in the intended negative bound for the threshold and an off-by-7 (7 * 16 ulps) error in the intended positive bound for the threshold, and the intended bounds were not translated from the double precision bounds so they were unnecessarily small by a factor of about 2048. The optimization of using the simple Taylor approximation for args near a power of 2 is dubious since it only applies to a relatively small proportion of args, but if it is done then doing it 2048 times as often _may_ be more efficient. (My benchmarks show unexplained dependencies on the data that increase with further optimizations in this area.)
* Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <bde2006-07-051-10/+10
| | | | | | | | | | | | | | | | | | | 2**-28 as a side effect, by merging with the float precision version of tanh() and the double precision version of sinh(). For tiny x, tanh(x) ~= x, and we used the expression x*(one+x) to return this value (x) and set the inexact flag iff x != 0. This doesn't work on ia64 since gcc -O does the dubious optimization x*(one+x) = x+x*x so as to use fma, so the sign of -0.0 was lost. Instead, handle tiny x in the same as sinh(), although this is imperfect: - return x directly and set the inexact flag in a less efficient way. - increased the threshold for non-tinyness from 2**-55 to 2**-28 so that many more cases are optimized than are pessimized. Updated some comments and fixed bugs in others (ranges for half-open intervals mostly had the open end backwards, and there were nearby style bugs).
* Removed the optimized asm versions of scalb() and scalbf(). Thesebde2006-07-053-62/+2
| | | | | | | | | | | | | | | | | | | | | | | | | functions are only for compatibility with obsolete standards. They shouldn't be used, so they shouldn't be optimized. Use the generic versions instead. This fixes scalbf() as a side effect. The optimized asm version left garbage on the FP stack. I fixed the corresponding bug in the optimized asm scalb() and scalbn() in 1996. NetBSD fixed it in scalb(), scalbn() and scalbnf() in 1999 but missed fixing it in scalbf(). Then in 2005 the bug was reimplemented in FreeBSD by importing NetBSD's scalbf(). The generic versions have slightly different error handling: - the asm versions blindly round the second parameter to a (floating point) integer and proceed, while the generic versions return NaN if this rounding changes the value. POSIX permits both behaviours (these functions are XSI extensions and the behaviour for a bogus non-integral second parameter is unspecified). Apart from this and the bug in scalbf(), the behaviour of the generic versions seems to be identical. (I only exhusatively tested generic_scalbf(1.0F, anyfloat) == asm_scalb(1.0F, anyfloat). This covers many representative corner cases involving NaNs and Infs but doesn't test exception flags. The brokenness of scalbf() showed up as weird behaviour after testing just 7 integer cases sequentially.)
* Backed out rev.1.10. It tried to implement ldexpf() as a weak referencebde2006-07-051-2/+0
| | | | | | | | | | | | | | | | | to scalbf(), but ldexpf() cannot be implemented in that way since the types of the second parameter differ. ldexpf() can be implemented as a weak or strong reference to scalbnf() (*) but that was already done long before rev.1.10 was committed. The old implementation uses a reference, so rev.1.10 had no effect on applications. The C files for the scalb() family are not used for amd64 or i386, so rev.1.10 had even less effect for these arches. (*) scalbnf() raises the radix to the given exponent, while ldexpf() raises 2 to the given exponent. Thus the functions are equivalent except possibly for their error handling iff the radix is 2. Standards more or less require identical error handling. Under FreeBSD, the functions are equivalent except for more details being missing in scalbnf()'s man page.
* Use some math tricks in arena_run_reg_dalloc() to avoid actual division, asjasone2006-07-011-83/+90
| | | | | | | | | | | | | | | | | well as avoiding a switch statement. This change has no significant impact to performance when branch prediction is successful at predicting the sizes of objects passed to free(), but in the case that the object sizes are semi-random, this change has the potential to prevent many branch prediction misses, thus improving performance substantially. Take advantage of alignment guarantees in ipalloc(), and pad object sizes to something less than a power of two when possible. This has the potential to substantially reduce internal fragmentation for objects allocated via posix_memalign(). Avoid an unnecessary pow2_ceil() call in arena_ralloc(). Submitted by: djam8193ah@hotmail.com
* Make the behavior of malloc(0) standards-compliant by getting rid of nil,jasone2006-06-301-48/+46
| | | | | | | | | and instead creating a small allocation for each malloc(0) call. The optional SysV compatibility behavior remains unchanged. Add a couple of assertions. Fix a couple of typos in error message strings.
* twalk() expects an `action' function not a comparison function.keramida2006-06-231-1/+1
| | | | | | | | | The text is correct in the "DESCRIPTION" section, so fix "SYNOPSIS" to use the correct name. PR: docs/90498 Submitted by: Vasil Dimov MFC after: 3 days
* Remove some unused variablesbrian2006-06-231-2/+0
|
* Make the mincore(2) return ENOMEM when requested range is not fully mapped.kib2006-06-211-2/+2
| | | | | | | Requested by: Bruno Haible <bruno at clisp org> Reviewed by: alc Approved by: pjd (mentor) MFC after: 1 month
* Add a missing case for the switch statement in arena_run_reg_dalloc(). [1]jasone2006-06-201-8/+20
| | | | | | | Fix a leak in chunk_dealloc(). [2] Reported by: [1] djam8193ah@hotmail.com, [2] Ville-Pertti Keinonen <will@exomi.com>
* Update for the 'file' 4.17 import.obrien2006-06-192-55/+49
|
* o Typo: ownship -> ownership.maxim2006-06-171-1/+1
| | | | Obtained from: DragonFlyBSD
* o Make grep ^strlcpy work: put a return value type on separate line.maxim2006-06-151-1/+2
|
* o Sort .Xrs.maxim2006-06-131-1/+1
|
* Add xref to statfs(2)phk2006-06-131-0/+1
|
* Respect FETCH_BIND_ADDRESS when opening the data connection.des2006-06-131-0/+5
| | | | PR: misc/98872
* Fix a bug introduced in rev 1.92, where, when changing from one directorydes2006-06-131-0/+2
| | | | | | | | to another, the first CWD after a string of CDUPs would incorrectly include a slash before the directory name. Reported by: obrien PR: bin/83278
* Specify default path for SHLIBDIR before bsd.own.mk does.akiyama2006-06-111-1/+3
| | | | This fix shared library installed correct place.
* Don't build IPv6 support if we have choosen not to have it.delphij2006-06-091-0/+4
|
* o Remove a cruft prevented libpthread sigaction(2) wrapper tomaxim2006-06-096-14/+36
| | | | | | | | | | | | | do its work for SIGINFO. Always install libpthread signal handler wrapper for SIGINFO even if user SIG_IGN's or SIG_DFL's it. SIGINFO has a special meaning for libpthread: when LIBPTHREAD_DEBUG enviroment variable defined it is used for dumping an information about threads to /tmp/. Reported by: mi Reviewed by: deischen MFC after: 2 weeks
* Fix an unwanted gcc4 warning.emax2006-06-062-4/+4
| | | | | Submitted by: delphij MFC after: 3 days
* - ANSIfy.delphij2006-06-051-69/+26
| | | | | | - Remove two unnecessary casts. These changes would help gcc4 compile.
* Replace absolute addressing in the call instructions with position-independendkib2006-06-051-2/+3
| | | | | | | | calls. This eliminates TEXTREL from libc, making its text segment relocatable. PR: i386/85242 Approved by: kan (mentor) MFC after: 1 month
* Add audit_submit.3 to the set of man pages built and installed withrwatson2006-06-051-1/+2
| | | | | | | libbsm. This interface is new as of OpenBSM 1.0 alpha 6. Submitted by: csjp Obtained from: TrustedBSD Project
* Include strings.h for bzero()delphij2006-06-052-0/+2
|
* Remove unused member.davidxu2006-06-031-1/+0
|
* Remove unused member field m_queue.davidxu2006-06-022-6/+1
|
* o Record a file offset for a last successfully parsed group file line.maxim2006-06-011-0/+8
| | | | | | | | | | | If the initial buffer size (1KB) for the given group line is not big enough, reset the offset. It helps to do not miss this line when getrg() reallocates the larger buffer and tries to parse the line again. PR: bin/52433, kern/55031, bin/83696, misc/97640, misc/98111 Submitted by: bsw71@mail.ru, Philip M. Gollucci, Justin Erenkrantz Glanced at: nectar MFC after: 1 month
* o Document the fact truncate(2) has no effect for !VDIR or !VREG files.maxim2006-06-011-1/+5
| | | | Submitted by: ceri
* Explicitly request pre-zeroed memory instead of memset'ing ourdelphij2006-05-311-5/+1
| | | | | | own. Ok'ed by: davidxu
* Fix the output.ru2006-05-271-0/+1
| | | | Noticed by: rodrigc
* - Add include for libutil.h and string.h for prototype.delphij2006-05-251-1/+3
| | | | | - Cast the rvalue to be compared with the result of strlen() to size_t.
* GC old a.out and K&R support.imp2006-05-231-9/+0
|
OpenPOWER on IntegriCloud