summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Translate from GNU C to ISO C.des2004-01-144-4/+4
|
* Add and document ffsl(), fls() and flsl().des2004-01-137-12/+201
|
* Kill whitespace at end of lines.nectar2004-01-121-9/+9
|
* Fix a bug that could result in a null pointer dereference innectar2004-01-121-1/+1
| | | | | | | | | | | getpwent(3) or getpwuid(3) when using NIS adjunct maps. The bug was present in the internal `nis_passwd' function. The lookup in the adjunct map used the name passed into `nis_passwd', however no name was of course supplied by getpwent or getpwuid. Correctly use the name from the `struct pwd' that was found instead. PR: bin/59962 Submitted by: Gabriel Gomez <ggomez@fing.edu.uy>
* XDR sources are handled by ../xdr/Makefile.inc.ru2004-01-111-4/+0
|
* Replaced an ugly hack to selectively disable warningsru2004-01-112-3/+3
| | | | | | | in contributed sources with just a hack made possible by bsd.sys.mk,v 1.33. This is better because it just nulls out the warning flags rather than adding gcc(1) specific -w option to CFLAGS.
* Add an ulgy hack so that warnings added by non-zero WARNS values won't beobrien2004-01-101-0/+3
| | | | | | used with the contrib/ gdtoa sources as they aren't WARNS-clean. Submitted by: ru
* Clarify the behavior of ptrace(2) a little bit: the tracing processrwatson2004-01-101-0/+24
| | | | | | | | | | | | | | | must first attach to the traced process. If the tracing process exits without detaching, the traced process will be killed rather than continued. For the duration of the tracing session, the traced process is reparented to the tracing process (with resulting expected behaviors). It is permissible to trace more than one other process at a time. When using waitpid() to monitor the behavior of the traced process, signals are intercepted: they may optionally then be forwarded using ptrace(). Signals are generated normally by and for the process, but also by the tracing facility (SIGTRAP). Product of: Suffering Sponsored by: DARPA, AFRL
* We need to discard `const'ness explicitly when invoking sysarch.nectar2004-01-101-1/+1
| | | | Reported by: sparc64 tinderbox via bde
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mnectar2004-01-0914-39/+14
| | | | | | | | | | at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde
* It was reported that when using nss_ldap, getgrent(3) would behavenectar2004-01-091-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incorrectly when encountering `large' groups (many members and/or many long member names). The reporter tracked this down to the glibc NSS module compatibility code (nss_compat.c): it would prematurely record that a NSS module was finished iterating through its database in some cases. Two aspects are corrected: 1. nss_compat.c recorded that a NSS module was finished iterating whenever the module reported something other than SUCCESS. The correct logic is to continue iteration when the module reports either SUCCESS or RETURN. The __nss_compat_getgrent_r and __nss_compat_getpwent_r routines are updated to reflect this. 2. An internal helper macro __nss_compat_result is used to map glibc NSS status codes to BSD NSS status codes (e.g. NSS_STATUS_SUCCESS -> NS_SUCCESS). It provided the obvious mapping. When a NSS routine is called with a too-small buffer, the convention in the BSD NSS code is to report RETURN. (This is used to implement reentrant APIs such as getpwnam_r(3).) However, the convention in glibc for this case is to set errno = ERANGE and overload TRYAGAIN. __nss_compat_result is updated to handle this case. PR: bin/60287 Reported by: Lachlan O'Dea <odela01@ca.com>
* Adjust for brain outage that affected the previous commit.nectar2004-01-061-1/+1
| | | | Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
* Add required headers.nectar2004-01-062-0/+4
|
* Add required headers and function declarations.nectar2004-01-062-0/+3
|
* Remove unused variables. Add required headers and functionnectar2004-01-067-6/+12
| | | | declarations.
* Use ANSI C function definition for `_mcount' and remove `static'nectar2004-01-061-2/+2
| | | | | | prototype from header file. Discussed with: bde, maybe one year ago
* Add missing declaration.nectar2004-01-061-0/+2
|
* Work around a `warning: zero-length printf format string'.nectar2004-01-061-1/+1
|
* Avoid undefined behavior:nectar2004-01-061-2/+2
| | | | foo[i] = bar[++i]; /* Which operator [] will be evaluated first? */
* Make intentions explicit with additional parenthesis.nectar2004-01-062-8/+8
|
* Remove unused variables and function declarations. Add missing headers.nectar2004-01-065-8/+6
|
* Describe kern.ipc.nsfbufsused and kern.ipc.nsfbufspeak.maxim2003-12-291-0/+9
| | | | Reviewed by: silby
* Make sure we initialise dirp->dd_size if we aren't reading a unionfsdfr2003-12-261-0/+1
| | | | | | directory. Special thanks to: valgrind
* Add restrict qualifiers. (docs)alfred2003-12-245-5/+5
| | | | | PR: 44394 Submitted by: Craig Rodrigues <rodrige@attbi.com>
* Properly advance "x/y/z" form slash-pointers in some rare casesache2003-12-241-4/+4
| | | | PR: 60539
* Back out previous commit due to incorrect content.trhodes2003-12-231-128/+62
| | | | Noticed by: wollman
* Document many of the missing posix.1b options.trhodes2003-12-231-62/+128
| | | | | | PR: 20528 Submitted by: bms (original version) Requested by: mike (awhile ago)
* Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendorkan2003-12-192-13/+2
| | | | | | | | | | | | | รณ++ ABI document at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor The ABI was initially defined for ia64, but GCC3 and Intel compilers have adopted it on other platforms. This is the patch from PR bin/59552 with a number of changes by me. PR: bin/59552 Submitted by: Bradley T Hughes (bhughes at trolltech dot com)
* Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendorkan2003-12-191-7/+101
| | | | | | | | | | | | | C++ ABI document at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor The ABI was initially defined for ia64, but GCC3 and Intel compilers have adopted it on other platforms. This is the patch from PR bin/59552 with a number of changes by me. PR: bin/59552 Submitted by: Bradley T Hughes (bhughes at trolltech dot com)
* First byte of GBK-like sequences is 0x81, not 0x80ache2003-12-191-1/+1
|
* Brucification: Don't initialize in declaration, make sure extra linesjkh2003-12-182-2/+5
| | | | follow declaration section.
* Do comparison using appropriate casting first, as per SUSv3 (search for firstjkh2003-12-172-2/+4
| | | | [last] character, not int).
* Document the effect of sysctl tunables controlling p_candebug(9) onjkoshy2003-12-141-1/+7
| | | | ktrace(2).
* Fixed English error in previous commit. Fixed some older English errors.bde2003-12-111-6/+5
| | | | Removed a redundant clause.
* Add reference to standards/55112 for next time SHLIB_MAJOR is bumped.mikeh2003-12-101-0/+1
| | | | Suggested by: wollman
* Add sticky(8) cross reference.dds2003-12-101-1/+2
| | | | | | PR: docs/60068 Submitted by: Ken Stailey MFC after: 2 weeks
* - Put manh/manl bitfields into correct-sized integral type.grehan2003-12-101-5/+4
| | | | - remove XXX normalization bit comment, code is correct.
* Add a short description of the kse_switchin(2) syscall to the ksemarcel2003-12-102-2/+14
| | | | | manpage and add a kse_switchin link. While here, list kse_thr_interrupt before kse_wakeup in the MLINKS variable and the synopsis.
* Set __mbrtowc and __wcrtomb correctly when changing to the C/POSIX locale.tjr2003-12-081-0/+14
| | | | | | | Save __mbrtowc and __wcrtomb and restore them when changing back to the cached locale. Reported by: perky
* Add support for timeout: and attempts: resolver options.murray2003-12-071-0/+20
| | | | | Submitted by: Paul Vixie <paul@vix.com> / ISC MFC After: 1 week
* Split multibyte(3) into separate manual pages for each function.tjr2003-12-077-145/+543
| | | | | | Instead of just deleting it, turn the original page into a general overview of the multibyte character conversion functions, somewhat similar to stdio(3).
* Split the documentation for localeconv() off into a separate manual page.tjr2003-12-073-176/+232
|
* Fix prototype for getchar_unlocked().tjr2003-12-071-1/+1
|
* "Fix" makecontext() so that the C code begins execution with itspeter2003-12-051-2/+6
| | | | | | | | | | | | | ABI-required stack alignment. C code expects that the push of the return address disturbed the 16 byte alignment and it will take corrective measures to fix it before making another call. Of course, if its wrong to start with, then all hell breaks loose. Essentially we "fix" this by making the stack alignment odd to start with. This was one of the things that broke on libkse with apps that use floating point/varargs/etc. Approved by: re (scottl)
* Fixed a bug in sendfile(2) where the sent data would be corrupted duedg2003-12-011-2/+6
| | | | | | | | | | to sendfile(2) being erroneously automatically restarted after a signal is delivered. Fixed by converting ERESTART to EINTR prior to exiting. Updated manual page to indicate the potential EINTR error, its cause and consequences. Approved by: re@freebsd.org
* Do not adjust to the pagesize at runtime. Besides for the one-timemarcel2003-11-281-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization overhead, there's a problem in that we never call imalloc() and thus malloc_init() for zero-sized allocations. As a result, malloc(0) returns NULL when it's the first or only malloc in the program. Any non-zero allocation will initialize the malloc code with the side-effect that subsequent zero-sized allocations return a non-NULL pointer. This is because the pointer we return for zero- sized allocations is calculated from malloc_pageshift, which needs to be initialized at runtime on ia64. The result of the inconsistent behaviour described above is that configure scripts failed the test for a GNU compatible malloc. This resulted in a lot of broken ports. Other, even simpler, solutions were possible as well: 1. initialize malloc_pageshift with some non-zero value (say 13 for 8KB pages) and keep the runtime adjustment. 2. Stop using malloc_pageshift to calculate ZEROSIZEPTR. Removal of the runtime adjustment was chosen because then ia64 is the same as any other platform. It is not to say that using a page size obtained at runtime is bad per se. It's that there's currently a high level of gratuity for its existence and the moment it causes problems is the moment you need to get rid of it. Hence, it's not unthinkable that this commit is (partially) reverted some time in the future when we do have a good reason for it and a good way to achieve it. Approved by: re@ (rwatson) Reported by: kris (portmgr@) -- may the ports be with you
* Replace out of date struct statfs definition with a reference to statfs(2).tjr2003-11-211-64/+3
| | | | Approved by: re
* Fix problem where initgroups would silently truncate groups withdds2003-11-191-2/+7
| | | | | | | more than NGROUP elements without providing the opportunity to setgroups to fail and correctly return error and set errno. MFC after: 2 weeks
* Documented missing EINVAL errno valuedds2003-11-191-0/+6
| | | | | | | | kern_prot.c: if (ngrp > NGROUPS) return (EINVAL); MFC after: 2 weeks
* Install the user trap handlers that libc provides from a constructor, sojake2003-11-181-0/+2
| | | | | | | | that they will be installed before application constructors are invoked. Its possible to link applications such that this fails, application code is invoked before they are installed, but, well, Don't Do That. Approved by: re (jhb)
OpenPOWER on IntegriCloud