summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* We should never zero-pad INF or NaN (yielding silly strings like "00inf")das2007-05-081-0/+1
| | | | even if the programmer asks for zero padding.
* Fix a rounding error.das2007-05-081-1/+1
| | | | Reported by: Bruno Haible
* Remove parameter names from prototypes to avoid namespace issues.des2007-05-061-22/+22
|
* Implement and document some utility functions that can be used to communicatepjd2007-05-064-3/+360
| | | | | | with GEOM providers. OK'ed by: phk
* - Fix typogabor2007-05-041-2/+2
| | | | | Approved by: keramida (mentor) MFC after: 3 days
* Don't assume that int is signed 32-bits in one place. Keep assumingbde2007-05-022-8/+11
| | | | | | | | | | | | | | that ints have >= 31 value bits elsewhere. s/int/int32_t/ seems to have been done too globally for all other files in msun/src before msun/ was imported into FreeBSD. Minor fixes in comments. e_lgamma_r.c: Describe special cases in more detail: - exception for lgamma(0) and lgamma(neg.integer) - lgamma(-Inf) = Inf. This is wrong but is required by C99 Annex F. I hope to change this.
* Fix tgamma() on some special args:bde2007-05-021-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) tgamma(-Inf) returned +Inf and failed to raise any exception, but should always have raised an exception, and should behave like tgamma(negative integer). (2) tgamma(negative integer) returned +Inf and raised divide-by-zero, but should return NaN and raise "invalid" on any IEEEish system. (3) About half of the 2**52 negative intgers between -2**53 and -2**52 were misclassified as non-integers by using floor(x + 0.5) to round to nearest, so tgamma(x) was wrong (+-0 instead of +Inf and now NaN) on these args. The floor() expression is hard to use since rounding of (x + 0.5) may give x or x + 1, depending on |x| and the current rounding mode. The fixed version uses ceil(x) to classify x before operating on x and ends up being more efficient since ceil(x) is needed anyway. (4) On at least the problematic args in (3), tgamma() raised a spurious inexact. (5) tgamma(large positive) raised divide-by-zero but should raise overflow. (6) tgamma(+Inf) raised divide-by-zero but should not raise any exception. (7) Raise inexact for tiny |x| in a way that has some chance of not being optimized away. The fix for (5) and (6), and probably for (2), also prevents -O optimizing away the exception. PR: 112180 (2) Standards: Annex F in C99 (IEC 60559 binding) requires (1), (2) and (6).
* Document (in a comment) the current (slightly broken) handling of specialbde2007-05-021-6/+9
| | | | | | | | | | | | | | | | | | | | | | values in more detail, and change the style of this comment to be closer to fdlibm and C99: - tgamma(-Inf) was undocumented and is wrong (+Inf, should be NaN) - tgamma(negative integer) is as intended (+Inf) but not best for IEEE-754 (NaN) - tgamma(-0) was documented as being wrong (+Inf) but was correct (-Inf) - documentation of setting of exceptions (overflow, etc.) was more complete here than in most of libm, but was further from matching the actual setting than in most of libm, due to various bugs here (primarily, always evaluating +Inf one/zero and getting unwanted divide-by-zero exceptions from this). Now the actual behaviour with gcc -O0 is documented. Optimization still breaks setting of exceptions all over libm, so nothing can depend on this working. - tgamma(NaN)'s exception was documented as being wrong (invalid) but was correct (no exception with IEEEish NaNs). Finish (?) rev.1.5. gamma was not renamed to tgamma in one place. Finish (?) rev.1.6. errno.h was not completely removed.
* s/@VERSION@/@ARCHIVE_VERSION@/cperciva2007-05-022-3/+3
| | | | | | | This is a no-op as far as FreeBSD is concerned, but makes libarchive more autoconf-friendly. Approved by: kientzle
* Fix one kind of style(9) bug and a typo in a comment.yar2007-05-011-5/+5
| | | | Tested with: md5(1)
* Roughly implement libpthread support.marcel2007-05-011-1/+19
|
* Back out all POSIXified *env() changes.ache2007-05-014-96/+41
| | | | | | | | | Not because I admit they are technically wrong and not because of bug reports (I receive nothing). But because I surprisingly meets so strong opposition and resistance so lost any desire to continue that. Anyone who interested in POSIX can dig out what changes and how through cvs diffs.
* Second call of sysctl() is used to gather a proper size of a memory chunkwkoszek2007-05-011-1/+1
| | | | | | | | | | | needed to hold the GEOM tree. At this point, pointer 'p' has an improper value (as it was used previously), and we're getting EFAULT. Fix this functionality by passing NULL instead of 'p'. This fixes mdconfig(8) -l output with high number of md(4) devices. Found by: kris Reviewed by: phk
* Bump .Ddache2007-04-301-1/+1
| | | | Suggested by: Henrik Brix Andersen <henrik@brixandersen.dk>
* Add phraseache2007-04-301-1/+2
| | | | | "so altering the argument shall change the environment." into putenv description.
* Make putenv() fully conforms to Open Group specs Issue 6ache2007-04-304-26/+58
| | | | | | | | | | | (also IEEE Std 1003.1-2001) The specs explicitly says that altering passed string should change the environment, i.e. putenv() directly puts its arg into environment (unlike setenv() which just copies it there). It means that putenv() can't be implemented via setenv() (like we have before) at all. Putenv() value lives (allows modifying) up to the next putenv() or setenv() call.
* Remove special case skipping initial '=' of the setenv() value "forache2007-04-302-7/+0
| | | | | | | | | compatibility with the different environment conventions" (man page). With the standards, we don't have them different anymore and IEEE Std 1003.1-2001 says that "The values that the environment variables may be assigned are not restricted except that they are considered to end with a null byte"
* Make setenv, putenv, getenv and unsetenv conforming to Open Group specsache2007-04-304-19/+48
| | | | | | | | | Issue 6 (also IEEE Std 1003.1-2001) in following areas: args, return, errors. Putenv still needs rewriting because specs explicitly says that altering passed string later should change the environment (currently we copy the string so can't provide that).
* Add missing links and sort.pjd2007-04-291-3/+9
|
* Don't enable symbol versioning for librt by default just yet.deischen2007-04-291-0/+2
|
* Make sure FBSDprivate_1.0 is located at the end of the versionkan2007-04-291-1/+1
| | | | inheritance chain.
* Catch up with the renaming of the private version namespace.deischen2007-04-292-2/+2
|
* Use C comments since we now preprocess these files with CPP.deischen2007-04-2941-215/+313
|
* Number the private version namespace in case we ever want to havedeischen2007-04-291-1/+1
| | | | compatibility between versions (as we do for the public namespace).
* Symbol version librt.deischen2007-04-292-0/+71
|
* Remove the MSG_PEEK flag from the documentation of the send(2) syscall -roam2007-04-271-1/+0
| | | | | | | | it is only relevant to receiving data from sockets, not to sending. PR: 109667 Submitted by: Jari Kirma <kirma@cs.hut.fi> Approved by: wollman
* Get endianess right.phk2007-04-241-1/+11
| | | | | | Why would an XML library need to know about endianess anyway ?? Prodded by, long time ago: ahze
* Add au_to_zonename.3 alias for au_token.3.rwatson2007-04-231-0/+1
| | | | Obtained from: TrustedBSD Project
* Add a reference and lock the target thread when setting its name.deischen2007-04-232-10/+48
| | | | Submitted by: davidxu (via libthr)
* Add back the original behavior of changing the entire directory path atnjl2007-04-222-2/+34
| | | | | | | | | | once (CWD a/b/c vs. 3 CWDs). If an error occurs, we fall back to the default method of a single CWD per directory element. Since this is technically a violation of the basic FTP RFC, this behavior is under a compile-time option FTP_COMBINE_CWDS and is off by default. It should work with most Unix-based FTP daemons and can save latency. MFC after: 2 weeks
* Fix a memory leak in the uname/gname lookup cache.kientzle2007-04-201-11/+11
| | | | Thanks to: VMiklos
* Make inet6_rth_* family of functions more compliant with RFC3542:mtm2007-04-191-1/+9
| | | | | | | | | | | 1. CMSG_NXTHDR(mhdr, cmsg) is supposed to dereference cmsg and return the next header in the chain. If cmsg is NULL it should return the first header, behaving essentially like CMSG_FIRSTHDR(). 2. inet6_rth_(space|init|add) should do basic checking on their input to verify that the number of headers (segments) is between 0 and 127 inclusive. MFC-After: 1 month
* Grammer correction from: emastephk2007-04-191-1/+1
|
* Loosen return value spec for fputs to be standards compliant so peoplephk2007-04-191-5/+2
| | | | don't program against our more restrictive behaviour.
* Add a missing backslash and unbreak the build.ru2007-04-161-1/+1
|
* - Add missing man page linksrafan2007-04-161-3/+17
| | | | | | | - Remove link for define_key.3 which is a real man page - Some whitespace nits Approved by: delphij (mentor)
* In libarchive: Downgrade ARCHIVE_FATAL and ARCHIVE_FAILED errors whichcperciva2007-04-161-0/+6
| | | | | | | | | | | | | | | | occur on the write side of extracting a file to ARCHIVE_WARN errors when returning them from archive_read_extract. In bsdtar: Use the return code from archive_read_data_into_fd and archive_read_extract to determine whether we should continue trying to extract an archive after one of the entries fails. This commit makes extracting a truncated tarball complain once about the archive being truncated, instead of complaining twice (once when trying to extract an entry, and once when trying to seek to the next entry). Discussed with: kientzle
* Properly cleanup the UID/GID lookup data.kientzle2007-04-151-0/+4
|
* Don't free a NULL pointer.kientzle2007-04-151-1/+2
|
* Clean up a lot of memory leaks in the libarchive test harness.kientzle2007-04-1512-0/+29
|
* Thanks to Colin for catching my mixup. The original problem wasn'tkientzle2007-04-151-3/+8
| | | | suppressing the second error, it was failing to address the first.
* Consolidate numeric limit macros in one place; include themkientzle2007-04-156-49/+44
| | | | only on platforms that need them. FreeBSD doesn't.
* Pass through error message if any operation fails, not just the last one.kientzle2007-04-141-1/+1
|
* Overhaul of 'ar' support:kientzle2007-04-147-228/+235
| | | | | | | | | | | | | | | | | | | * use "AR_GNU" as the format name instead of AR_SVR4 (it's what everyone is going to call it anyway) * Simplify numeric parsing to unsigned (none of the numeric values should ever be negative); don't run off end of numeric fields. * Finish parsing the common header fields before the next I/O request (which might dump the contents) * Be smarter about format guessing and trimming filenames. * Most of the magic values are only used in one place, so just inline them. * Many more comments. * Be smarter about handling damaged entries; return something reasonable. * Call it a "filename table" instead of a "string table" * Update tests. Enable selection of 'ar', 'arbsd', and 'argnu' formats by name (this allows bsdtar to create ar format archives). The 'ar' writer still needs some work; it should reject entries that aren't regular files and should probably also strip leading paths from filenames.
* Invoke utime(2) properly. (It's only used on platformskientzle2007-04-141-2/+2
| | | | that lack utimes(2).)
* Fix the build by temporarily disabling 'ar' support untilkientzle2007-04-141-1/+0
| | | | I can clean it up.
* Cleanup sysconf(3) a bit. sysconf(3) assumes in some places it operatespjd2007-04-141-21/+18
| | | | | | | | | | on int, but in fact it should operate on long. - Introduce 'lvalue' variable, which is long. - Fix _SC_XOPEN_SHM for 64bit archs. - Fix _SC_PHYS_PAGES for 64bit archs. Reported by: simokawa - Use lvalue for pathconf(3), as it returns long. - Cast value explicitly to long on return.
* Fix the build.kientzle2007-04-142-2/+2
| | | | | | N.B. 'ar' format support is broken right now, it's not passing tests. If I can't find the problem soon, I'll back out the last commit.
* Fixes from Joerg Sonnenberger, reviewed by Kai Wang.kientzle2007-04-141-49/+81
|
* Conventionally, tar archives have always included a trailing '/'kientzle2007-04-145-74/+261
| | | | | | | | | | | | | for directories. bsdtar used to add this, but that recently got lost somehow. So now I'm adding it back in libarchive. The only odd part of doing this in libarchive: Adding a directory to a tar archive and then reading it back again can yield a different name. Add a test case to exercise some boundary conditions with tar filenames and ensure that trailing slashes are added to dir names only as necessary. Thanks to: Oliver Lehmann for bringing this regression to my attention.
OpenPOWER on IntegriCloud