summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* When poll(2)'ing for readability or writability of a file descriptorarchie2002-08-293-6/+18
| | | | | | | | on behalf of a thread, we should check the POLLERR, POLLHUP, and POLLNVAL flags as well to wake up the thread in these cases. Suggested by: deischen MFC after: 3 days
* Allow one to grab the definition of struct ucred by defining _WANT_UCREDalfred2002-08-281-2/+1
| | | | | | | instead of forcing _KERNEL. Move the include of sys/_label.h in ucred.h under the _KERNEL || _WANT_UCRED case.
* Print a '-' sign for negative zero. Tested withschweikh2002-08-271-7/+2
| | | | | | | | | | | | | | | | | | | | | #include <stdio.h> int main(void) { printf("%+f\n", -0.0); printf("%+f\n", +0.0); printf("%+f\n", 0.0); return 0; } to output -0.000000 +0.000000 +0.000000 PR: bin/41823 Submitted by: GOTO Kentaro <gotoken@notwork.org> Liked by: bde MFC after: 3 weeks
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-259-9/+9
|
* Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attemptsjdp2002-08-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | to fail needlessly if a reverse DNS lookup of the IP address didn't come up with a hostname. As a comment in the code clearly stated, the "damn hostname" was looked up only for the purpose of netgroup matching. But if that lookup failed, the function bailed out immediately even though in many cases netgroup matching would not be used. This change marks the hostname as unknown but continues. Where netgroup matching is performed, an unknown hostname is handled conservatively. I.e., for "+@netgroup" (accept) entries an unknown hostname never matches, and for "-@netgroup" (reject) entries an unknown hostname always matches. In the lines affected (only), I also fixed a few bogus casts. There are others, and in fact this entire file would be a good candidate for a cleanup sweep. Reviewed by: imp (wearing his flourescent yellow Security Team cap) MFC after: 2 days
* &x is not a format stringkris2002-08-241-1/+1
|
* Note that <sys/types.h> in no longer a prerequisite for <utime.h> andmike2002-08-248-8/+0
| | | | <sys/mman.h>.
* We cannot use an alloc with only inputs and/or locals. The kernelmarcel2002-08-231-11/+16
| | | | | | assumes that the parameters are passed in output registers. Remove the alloc entirely, but don't depend on the kernel not trashing our registers.
* Wrap the header to prevent multiple inclusion, and mark the DECLS section.jmallett2002-08-221-0/+9
| | | | Reminded by: Rachel Hestilow <hestilow@ximian.com>
* Fixed getaddrinfo to honor sortlist in /etc/resolv.confpirzyk2002-08-211-0/+82
| | | | | | | PR: bin/27939 Reviewed by: ru, sheldonh (about a year ago) Obtained from: ume (via KAME, I think) MFC after: 1 month
* s/EDOFUS/EDOOFUS/phk2002-08-213-5/+5
| | | | Persuaded by: Google
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-2115-26/+26
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* Fix a typo in #if 0 codescottl2002-08-211-1/+1
|
* Add a manual page for wcwidth().tjr2002-08-202-1/+63
|
* Add a manual page for wcswidth().tjr2002-08-202-1/+62
|
* Move just committed version of wcswidth.c here (from "locale"),ache2002-08-202-25/+31
| | | | a bit optimized now.
* Remove wcswidth.c from here (and move it to "string")ache2002-08-202-65/+1
|
* Remove space at the end of continuation line in prev. commitache2002-08-201-1/+1
|
* xdr.3 is added to MAN in ../xdr/Makefile.inc where it belongs, so don'tbde2002-08-191-1/+1
| | | | add it here.
* Implement wcswidth()ache2002-08-192-2/+66
|
* Use modern-style arguments declarationache2002-08-191-2/+1
|
* Write null wide-character as L'\0' like in other placesache2002-08-191-1/+1
|
* According to SUSv2, always return 0 for null wide-character codeache2002-08-191-1/+6
|
* s/trailing NULL/trailing NUL/jmallett2002-08-192-2/+2
|
* Move internal defines from ctype.h hereache2002-08-191-0/+4
|
* Leave room for a trailing NUL not a NULL, that's not an ASCII character.jmallett2002-08-192-2/+2
|
* Implement the ISO C90 Amd.1 restartable wide and multibyte charactertjr2002-08-1813-4/+1020
| | | | | manipulation functions mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(), wcrtomb(), wcsrtombs().
* Move wcwidth() to separate file, it doesn't belong to iswctype.c at allache2002-08-173-11/+58
|
* According to SUSv2, wcwidth() should return -1 for non-printing charactersache2002-08-171-1/+1
|
* Cosmetic - remove unneded brackets and #undefache2002-08-172-41/+40
|
* wcwidth: fix espression to work correctly with SWIDTH0ache2002-08-171-2/+4
|
* Fix libc build breakage by defining FSTYPENAMES before includingbmilekic2002-08-161-0/+1
| | | | | | | disklabel.h; broken originally by 1.87 of sys/disklabel.h, which made the split between DKTYPENAMES and FSTYPENAMES. Someone who knows disklabel.c: do we still need DKTYPENAMES to be defined here now?
* Add iswctype wcwidth function codekeichii2002-08-161-0/+10
| | | | | | | Submitted by: clkao@clkao.org Reviewed by: keichii Obtained from: NetBSD MFC after: 1 month
* Hide 'struct ucred' behind '#ifdef _KERNEL', this should stop userlandalfred2002-08-161-0/+3
| | | | | | | from attempting to use it for good. There is a catch, kvm_proc.c needs to '#define _KERNEL' to get at the ucred. Requested by: rwatson
* Add LOGIN_SETMAC, which will indicate to the user context management coderwatson2002-08-161-1/+2
| | | | | | | | that it should also set the user's default MAC label, if available and permitted. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* - Fix a bug that wrote one char behind the end of therobert2002-08-151-6/+3
| | | | | | | | | | | | | | supplied buffer in case the size of it was equal to the number of characters the converted address consumed. The bug occurred when converting an AF_INET address. - Remove the SPRINTF macro and use sprintf instead. - Do not do string formatting using sprintf(3) and a temporary buffer which is copied when the supplied buffer provides enough space. Instead, use snprintf(3) and the real destination buffer, thus avoid the copy. Reported by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1) PR: misc/41289
* Put each function argument on its own line to keep lines shorterrobert2002-08-151-1/+6
| | | | than 80 columns.
* Use one line for each function argument to keep the linerobert2002-08-152-2/+11
| | | | | | | width smaller than 80 columns. Thanks to Ruslan for an explanation of multiple ways to achieve this.
* Removed duplicated MLINKS which make(1) recently started warning about.bde2002-08-151-2/+0
|
* Include <stdlib.h> to have abort() and exit() declared.robert2002-08-151-0/+1
|
* - For compliance with IEEE Std 1003.1-2001, add the 'restrict'robert2002-08-155-17/+11
| | | | | | qualifier to function prototypes and definitions where appropriate using the '__restrict' macro. - Update the manual page.
* - Introduce the 'restrict' qualifier to function prototypes androbert2002-08-155-8/+8
| | | | | definitions to comply with IEEE Std 1003.1-2001. - Update the manual pages.
* - Add the 'restrict' qualifier to the function prototypes androbert2002-08-1512-41/+17
| | | | | | | | definitions of the functions that convert strings to numbers and are defined by IEEE Std 1003-1.2001. - Use ANSI-C function definitions for all of the functions mentioned above plus strtouq and strtoq. - Update the prototypes in the manual pages.
* - Add the 'restrict' qualifier to the function definitions androbert2002-08-143-10/+4
| | | | | | | | public prototypes of setbuf(3) and setvbuf(3) using the '__restrict' macro from <sys/cdefs.h> to be compliant with IEEE Std 1003.1-2001. - Replace the K&R with ANSI-C function definitions. - Bring the manual page up-to-date.
* - Add the 'restrict' qualifier to the function definition ofrobert2002-08-142-7/+5
| | | | | | | | | strftime(3) for IEEE Std 1003.1-2001 compliance and remove excessive usage of the 'const' qualifier that was neither present in the prototype in the publice header, nor in the local prototype just above the function definition. - Replace the K&R function definition with a ANSI-C one. - Update the prototype of strftime(3) in its manual page.
* - Add the 'restrict' qualifier to the definitions of the stringrobert2002-08-146-18/+8
| | | | | | | concatenation and copy functions using the '__restrict' macro. This is to satisfy IEEE Std 1003-1.2001. - Use ANSI-C function definitions. - Add the 'restrict' keyword to the manual pages, too.
* - Add the C99 'restrict' qualifier using the '__restrict' macro torobert2002-08-142-2/+3
| | | | | function prototype and definition of strptime(3). - Update the manual page.
* Use "ugidfw.h" rather than <ugidfw.h> so that mkdep can find it.rwatson2002-08-141-1/+1
| | | | Suggested by: mike
* - Add the 'restrict' qualifier to match the IEEE Std 1003.1-2001robert2002-08-142-7/+11
| | | | | | | prototype of the tdelete(3) function. - Remove duplicated space. - Use an ANSI-C function definition for tdelete(3). - Update the manual page.
* - Add the 'restrict' qualifier required by IEEE Std 1003.1-2001robert2002-08-142-5/+2
| | | | | | | to the function definition of strxfrm(3) in form of our '__restrict' macro. - Use an ANSI-C function definition for strxfrm(3). - Change the manual page accordingly.
OpenPOWER on IntegriCloud