summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug due to a type conversion from 64 to 32 bits. The side effect ofgordon2010-05-121-2/+2
| | | | | | | | | | this type conversion is the high bits which were used to indicate if a special character was a literal or special were dropped. As a result, all special character were treated as special, even if they were supposed to be literals. Reviewed by: gad@ Approved by: mentor (wes@)
* The previous revision actually removed the bug being hinted at, sobrueffer2010-05-121-3/+2
| | | | | | | | go ahead and remove the hint. PR: 143944 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> MFC after: 1 week
* mdoc: simplify quotation schemeuqs2010-05-111-3/+2
| | | | Reviewed by: brueffer
* mdoc: fix parenthesisuqs2010-05-111-2/+2
| | | | Reviewed by: brueffer
* mdoc: use macro for +- that is understood by mdocmluqs2010-05-112-4/+4
| | | | Reviewed by: brueffer
* Document FIONREAD, FIONWRITE and FIONSPACE.brueffer2010-05-111-1/+25
| | | | | | Obtained from: NetBSD Submitted by: emaste MFC after: 1 week
* strptime(3) confused July with June with the fr_FR locale.edwin2010-05-091-0/+8
| | | | | | | | | | | | | When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain <denis@tikuts.com> MFC after: 1 week
* sigprocmask(2): pthread_sigmask(3) must be used in threaded processes.jilles2010-05-071-1/+7
| | | | | | | Although libthr's pthread_sigmask() just calls sigprocmask() and this is unlikely to change, mention this POSIX requirement on applications. MFC after: 1 week
* raise(3): Note that this sends a signal to the current thread, not process.jilles2010-05-071-3/+3
| | | | | | | This is how it works (with threading libraries loaded) and what POSIX requires. MFC after: 1 week
* Merger of the quota64 project into head.mckusick2010-05-071-4/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This joint work of Dag-Erling Smørgrav and myself updates the FFS quota system to support both traditional 32-bit and new 64-bit quotas (for those of you who want to put 2+Tb quotas on your users). By default quotas are not compiled into the kernel. To include them in your kernel configuration you need to specify: options QUOTA # Enable FFS quotas If you are already running with the current 32-bit quotas, they should continue to work just as they have in the past. If you wish to convert to using 64-bit quotas, use `quotacheck -c 64'; if you wish to revert from 64-bit quotas back to 32-bit quotas, use `quotacheck -c 32'. There is a new library of functions to simplify the use of the quota system, do `man quotafile' for details. If your application is currently using the quotactl(2), it is highly recommended that you convert your application to use the quotafile interface. Note that existing binaries will continue to work. Special thanks to John Kozubik of rsync.net for getting me interested in pursuing 64-bit quota support and for funding part of my development time on this project.
| * Final update to current version of head in preparation for reintegration.mckusick2010-05-061-3/+9
| |\
| * \ Update to current version of head.mckusick2010-04-2894-572/+744
| |\ \
| * | | Debugging nits found while testing the new 64-bit quota code.mckusick2010-03-161-4/+18
| | | |
| * | | IFH@204581des2010-03-04192-7021/+7849
| |\ \ \
| * \ \ \ Sync from head.des2009-09-262-2/+19
| |\ \ \ \
| * \ \ \ \ Sync with headdes2009-09-255-5/+186
| |\ \ \ \ \
| * \ \ \ \ \ Merge from headdes2009-09-17253-2365/+11587
| |\ \ \ \ \ \
* | | | | | | | Update xrefs from 4.3BSD to modern signal functions in various man pages.jilles2010-05-0610-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sigvec(2) references have been updated to sigaction(2), sigsetmask(2) and sigblock(2) to sigprocmask(2), sigpause(2) to sigsuspend(2). Some legacy man pages still refer to them, that is OK.
* | | | | | | | sigaltstack(2): document some modernizations:jilles2010-05-061-17/+15
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * un-document 'struct sigaltstack' tag for stack_t as this is BSD-specific; this doesn't seem useful enough to document as such * alternate stacks are per thread, not per process * update error codes to what the kernel does and POSIX requires MFC after: 1 week
* | | | | | | Document RUSAGE_THREAD.kib2010-05-041-3/+9
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reviewed by: bde MFC after: 1 week
* | | | | | unlinkat(2): unlinkat(AT_REMOVEDIR) fails with ENOTEMPTY like rmdir()jilles2010-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for non-empty directories. POSIX permits both ENOTEMPTY and EEXIST, but we use the clearer ENOTEMPTY, following BSD tradition. MFC after: 1 week
* | | | | | sysctl(3): Update description of various kern.* variables.jilles2010-04-251-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3) (which is a more convenient way to access some of the variables). PR: 116480 MFC after: 1 week
* | | | | | C language does not has references, it provides pointers.kib2010-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by: bde MFC after: 2 weeks
* | | | | | Add standards section, improve wording, taking into account the handlingkib2010-04-211-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of NULL and changed type in declaration. Suggested by: bde MFC after: 2 weeks
* | | | | | Free() is not allowed to modify errno, remove safety brackets around it [1].kib2010-04-201-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add small optimization, do not copy a string to the buffer that is to be freed immediately after. Noted by: jh [1] Reviewed by: jh MFC after: 2 weeks
* | | | | | Slightly modernize realpath(3).kib2010-04-202-8/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SUSv4 requires that implementation returns EINVAL if supplied path is NULL, and ENOENT if path is empty string [1]. Bring prototype in conformance with SUSv4, adding restrict keywords. Allow the resolved path buffer pointer be NULL, in which case realpath(3) allocates storage with malloc(). PR: kern/121897 [1] MFC after: 2 weeks
* | | | | | Revert r206649.kib2010-04-181-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the presented declaration of struct sigaction, noting the caveat in the text. Real layout of the structure and exposed implementation namespace only obfuscates the usage. Submitted by: bde MFC after: 3 days
* | | | | | getcwd(3): Clarify that EACCES may or may not be checked.jilles2010-04-171-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 MFC after: 2 weeks
* | | | | | fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen.jilles2010-04-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD) PR: 116074 MFC after: 1 week
* | | | | | Still reference struct __sigaction with clarification when this formkib2010-04-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of argument declaration is needed. Discussed with: bde MFC after: 3 days
* | | | | | mdoc: order prologue macros consistently by Dd/Dt/Osuqs2010-04-1413-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors)
* | | | | | mdoc: don't abuse Bo/Pc to get what looks like an intervaluqs2010-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be explicit and use the general bracketing form plus symbols which are to be interpreted mathematically in this case. Complaint by: mdocml Reviewed by: ru Approved by: philip, ed (mentors)
* | | | | | mdoc: remove .Pp where not neededuqs2010-04-145-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trips up mdocml and can simply go away. Reviewed by: ru Approved by: philip, ed (mentors)
* | | | | | Align the declaration for sa_sigaction with POSIX.kib2010-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days
* | | | | | Add #endif missed in r206490.marius2010-04-111-0/+1
| | | | | |
* | | | | | While SPARC V9 allows tininess to be detected either before or aftermarius2010-04-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tininess is detected before rounding therefore rounding up to the smallest normalized number should set the underflow flag. This change is needed for using SoftFloat on sparc64 for reference purposes. PR: 144900 Submitted by: Peter Jeremy
* | | | | | Use the stored length value instead of calculating it by strlen().ume2010-04-061-8/+6
| | | | | |
* | | | | | I feel this wording of the history is more clear.obrien2010-04-052-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | ANSIfy vasprintf() while I'm here.
* | | | | | libc/db/hash: cap auto-tuned block size with a value that actually worksavg2010-04-052-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix mostly matters after r206129 that made it possible for st_blksize to be greater than 4K. For this reason, this change should be MFC-ed before r206129. Also, it seems that all FreeBSD uitlities that use db(3) hash databases and create new databases in files, specify their own block size value and thus do not depend on block size autotuning. PR: bin/144446 Submitted by: Peter Jeremy <peterjeremy@acm.org> MFC after: 5 days
* | | | | | hash.3: fix a factual mistake in the man pageavg2010-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: bin/144446 Submitted by: Peter Jeremy <peterjeremy@acm.org> MFC after: 3 days
* | | | | | Add capability to use a db version of services. It is enabled byume2010-04-042-1/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specifying `db' as source of service in /etc/nsswitch.conf. MFC after: 2 weeks
* | | | | | Reduce duplicate code.ume2010-04-041-59/+33
| | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks
* | | | | | Treat '+' as special only when in compat mode, and simplifyume2010-04-041-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the logic bit. MFC after: 2 weeks
* | | | | | Stop adding trailing '\n'. The servent_unpack() doesn't expectume2010-04-041-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lines terminated with '\n'. MFC after: 2 weeks
* | | | | | Add prototype for libc internal interfaces.delphij2010-03-312-0/+4
| | | | | |
* | | | | | Add prototypes for libc private interfaces.delphij2010-03-311-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While I'm there, apply __unused whenever appropriate. Reviewed by: md5(1)
* | | | | | Make acl_to_text_np(3) not crash on long group or user names in NFSv4 ACLs.trasz2010-03-281-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: amd64/145091 MFC after: 2 weeks
* | | | | | Don't forget to bump the date in the man page.ed2010-03-281-1/+1
| | | | | |
* | | | | | Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.ed2010-03-281-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A nice thing about POSIX 2008 is that it finally standardizes a way to obtain file access/modification/change times in sub-second precision, namely using struct timespec, which we already have for a very long time. Unfortunately POSIX uses different names. This commit adds compatibility macros, so existing code should still build properly. Also change all source code in the kernel to work without any of the compatibility macros. This makes it all a less ambiguous. I am also renaming st_birthtime to st_birthtim, even though it was a local extension anyway. It seems Cygwin also has a st_birthtim.
* | | | | | - Remove const'ness from dlerror(3) prototype, for consistency with POSIX.gahr2010-03-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: cognet MFC after: 1 week
OpenPOWER on IntegriCloud