summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* #include <string.h> for strcmp()'s prototype.Tim J. Robbins2003-01-031-1/+2
| | | | Notes: svn path=/head/; revision=108623
* #include "local.h" to make __svfscanf()'s prototype visible.Tim J. Robbins2003-01-033-0/+3
| | | | Notes: svn path=/head/; revision=108622
* Remove an unused variable: `sb' in fts_read().Tim J. Robbins2003-01-032-2/+0
| | | | Notes: svn path=/head/; revision=108621
* Remove an unused variable, `sverrno', which has not been used since 1.11.Tim J. Robbins2003-01-031-1/+0
| | | | Notes: svn path=/head/; revision=108620
* Optimize errstr() by reducing the number of times it walks a string.Mike Barcroft2003-01-031-9/+7
| | | | | | | | | | | As a side effect, it makes the code easier to read and requires less pointer arithmetic. Test by: strerror regression test Submitted by: Tim Kientzle <kientzle@acm.org> Notes: svn path=/head/; revision=108603
* Reset the stream orientation to 0 (unoriented) in freopen(), as requiredTim J. Robbins2003-01-031-0/+1
| | | | | | | by the C standard. Notes: svn path=/head/; revision=108598
* It is no longer necessary to include sys/types.h before wordexp.h.Tim J. Robbins2003-01-031-1/+0
| | | | Notes: svn path=/head/; revision=108597
* popen() is a function, not an argument.Tim J. Robbins2003-01-031-1/+1
| | | | Notes: svn path=/head/; revision=108582
* Protect pidlist with a mutex to avoid a race causing a duplicate free()Tim J. Robbins2003-01-031-8/+24
| | | | | | | | | | when the same pipe FILE is pclosed()'d in different threads, and to avoid corrupting the linked list when adding or removing items. The symptoms of the linked list getting corrupted were pclose() either not finding the pipe on the list, or the list becoming circular and pclose() looping infinitely. Notes: svn path=/head/; revision=108580
* Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akinJuli Mallett2003-01-023-7/+491
| | | | | | | | | | | to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes to the user being granted the pty. Submitted by: Ryan Younce <ryany@pobox.com> Reviewed by: security-officer@, standards@, mike@ Notes: svn path=/head/; revision=108574
* In cgetmatch(3), return -1 if a NULL or 0-length name parameter is used.Thomas Quinot2003-01-021-0/+3
| | | | | | | | | | | | | | This situation most notably arises in chkprintcap, when a /etc/printcap entry has an empty rp= attribute. In that case, cgetmatch would enter an infinite loop if any entry in the file has multiple names. This causes lpd to hang at boot time on 5.0-DP2 when both conditions are met (:rp=: and multiple names -- not necessarily on the same entry). Reviewed by: roberto Notes: svn path=/head/; revision=108553
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-0113-518/+518
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-303-3/+3
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* Back out the s/int */size_t */ commit.David E. O'Brien2002-12-302-2/+2
| | | | | | | | It makes a difference on 64-bit arches, and no one really wants a 2^64 block size [yet]. Notes: svn path=/head/; revision=108445
* Fix LP64 architectures and especially ia64. Functions that returnMarcel Moolenaar2002-12-302-0/+2
| | | | | | | | | | | | a pointer and lack a prototype will have the return value (assumed to be an integer) zero-extended to a pointer. On ia64 this is unconditionally fatal as it zeroes-out the region bits, forming an invalid pointer. Fix the sigsegv by including <stdlib.h>. Pointy hat: bbraun Notes: svn path=/head/; revision=108419
* Remove BUGS section indicating that these calls are unimplemented.Robert Watson2002-12-295-15/+15
| | | | | | | | | Update copyrights. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=108412
* Update acl_set.3, missed in last round:Robert Watson2002-12-291-11/+19
| | | | | | | | | | | - Update BUGS: this stuff is implemented. - Update last modified date. - Document acl_set_link_np() call. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=108411
* Update libc POSIX.1e code and documentation to reflect:Robert Watson2002-12-298-44/+164
| | | | | | | | | | | | | - Updated copyrights, modified dates - Remove "BUGS" entry indicating that ACLs are unimplemented - Implement acl_*_link() library wrapper variants for get, set, delete, aclvalid. - Document acl_*_link() calls. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=108410
* Use `useconds_t' instead of `u_int' or `unsigned int' where appropriate.Mike Barcroft2002-12-294-7/+7
| | | | Notes: svn path=/head/; revision=108380
* english(4) police.Jens Schweikhardt2002-12-2721-25/+25
| | | | Notes: svn path=/head/; revision=108317
* Silence casting away constness warnings.Alfred Perlstein2002-12-271-5/+12
| | | | | | | | Make cgetmatch's locals const. Make cdbget take a const string and copy it into a buffer. Notes: svn path=/head/; revision=108312
* Fix a small typo.Tim J. Robbins2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108310
* Slight tuning if teh KSE man page to indicate some functionality isJulian Elischer2002-12-271-29/+33
| | | | | | | not yet inplemented and to clear up some wording. Notes: svn path=/head/; revision=108309
* Be more consistent with "static".Tim J. Robbins2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108299
* Add an implementation of the POSIX wordexp() and wordfree() functions,Tim J. Robbins2002-12-263-2/+518
| | | | | | | | | | which perform shell-style word expansion on strings. This is still a little rough around the edges. PR: 13420 Notes: svn path=/head/; revision=108288
* Spelling: s/then/than/ where appropriate.Ruslan Ermilov2002-12-241-3/+3
| | | | Notes: svn path=/head/; revision=108260
* mdoc(7) police: Deal with self-xrefs.Ruslan Ermilov2002-12-245-5/+4
| | | | Notes: svn path=/head/; revision=108257
* Document protection bits.Tom Rhodes2002-12-231-0/+16
| | | | | | | | PR: 46252 Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl> Notes: svn path=/head/; revision=108230
* Fixed the abuses of .Ql visible on stderr in troff mode.Ruslan Ermilov2002-12-231-6/+6
| | | | | | | PR: docs/37176 Notes: svn path=/head/; revision=108221
* Back out the -fpcc-struct-return fixes.Alexander Kabaev2002-12-222-24/+68
| | | | | | | Approved by: re (rwatson) Notes: svn path=/head/; revision=108176
* Fix style (no space after return, twice-too-big continuation) andJuli Mallett2002-12-221-2/+2
| | | | | | | | | | cast (casting long to a void pointer, rather than intptr_t to a void pointer) bogons. Reviewed by: bde Notes: svn path=/head/; revision=108168
* Reduce libc's memory footprint by lazily allocating memory used internallyRob Braun2002-12-211-9/+22
| | | | | | | | | by setproctitle(). Reviewed by: jkh Notes: svn path=/head/; revision=108163
* Reduce libc.so's memory footprint by lazily allocating memory used internallyRob Braun2002-12-212-4/+16
| | | | | | | | by basename() and dirname(). Reviewed by: eric Notes: svn path=/head/; revision=108152
* Import newer versions of div() and ldiv() from NetBSD which handleTim J. Robbins2002-12-212-68/+24
| | | | | | | | | the -fpcc-struct-return calling convention properly instead of returning garbage. This may break backwards compatibility with some old binaries that were compiled when -fno-pcc-struct-return was the default. Notes: svn path=/head/; revision=108151
* Document the fact that the printf() family of functions return negativeTim J. Robbins2002-12-201-2/+14
| | | | | | | | | | values (EOF in our case) on error, and some of the possible errno values in an Errors section. PR: 39257 Notes: svn path=/head/; revision=108121
* C99 standardised the vscanf() family of functions, update StandardsTim J. Robbins2002-12-201-2/+5
| | | | | | | section to reflect this. Notes: svn path=/head/; revision=108120
* Stylistic changes:Mike Barcroft2002-12-201-11/+14
| | | | | | | | | | | | | | o Fix an English error (comma splice) and poorly worded sentence. o Fix KNF ordering of variables (pointers come before arithmetic types). o Restore hand-optimization of sizeof()-1, instead of strlen(). o Remove unneeded local variables in strerror_r(). Test by: strerror regression test Requested by: bde Reviewed by: bde Notes: svn path=/head/; revision=108118
* Document what really occurs when we obtain an error.Tom Rhodes2002-12-201-6/+9
| | | | | | | | PR: 43357 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> Notes: svn path=/head/; revision=108113
* Grammatical fixup: s/be the -1/be -1/Ceri Davies2002-12-191-1/+1
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=108105
* Add back the Standards section claiming conformance to 1003.1-2001 andTim J. Robbins2002-12-191-10/+13
| | | | | | | C99 now that all known standards-related bugs have been fixed. Notes: svn path=/head/; revision=108091
* Write the message to stderr, not file descriptor 2, so that perror()Tim J. Robbins2002-12-191-1/+7
| | | | | | | writes to the correct stream if stderr has been redirected with freopen(). Notes: svn path=/head/; revision=108090
* Use strerror_r() to format the error message so that strerror()'s staticTim J. Robbins2002-12-191-1/+4
| | | | | | | | | | | buffer does not get clobbered. ISO/IEC 9899:1999 7.21.6.2 3: "The implementation shall behave as if no library function calls the strerror function." Notes: svn path=/head/; revision=108089
* mdoc(7) police: "The .Fa argument.".Ruslan Ermilov2002-12-19178-396/+991
| | | | Notes: svn path=/head/; revision=108087
* mdoc(7) police: Fixed a few .Fa abuses.Ruslan Ermilov2002-12-192-4/+6
| | | | Notes: svn path=/head/; revision=108085
* mdoc(7) police: excessive quotes.Ruslan Ermilov2002-12-191-1/+1
| | | | Notes: svn path=/head/; revision=108083
* Rearrange strerror() so that its itoa procedure can be used withMike Barcroft2002-12-182-86/+45
| | | | | | | | | | | | | | | | | | strerror_r(). Doing this allows us to ensure that strerror_r() always fills the supplied buffer regardless of EINVAL or ERANGE errors. strerror()'s semantics have changed slightly such that an argument of 0 is now considered invalid and errno is set to EINVAL. Remove internal regression test for strerror() and strerror_r(). This will be reincarnated in src/tools/regression/lib/libc/string. In strerror(3), add a comment about strerror()'s bogus return type. PR: 44356 Notes: svn path=/head/; revision=108044
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.Ruslan Ermilov2002-12-1855-195/+196
| | | | Notes: svn path=/head/; revision=108040
* mdoc(7) police: "The .Fn function".Ruslan Ermilov2002-12-1876-64/+468
| | | | Notes: svn path=/head/; revision=108037
* mdoc(7) police: "The .Fn system call".Ruslan Ermilov2002-12-183-0/+18
| | | | Notes: svn path=/head/; revision=108035
* mdoc(7) police: "The .Fn function".Ruslan Ermilov2002-12-1833-35/+141
| | | | Notes: svn path=/head/; revision=108030