summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Update the kern.osreldate documentation to document the present formateivind2003-09-011-2/+17
| | | | | | used, and refer to <osreldate.h> to get userland date. Submitted by: ru
* Return (-1) not (ENOENT) for mac_prepare_type(), and set errno torwatson2003-08-301-1/+2
| | | | | | | ENOENT instead. Reported by: "Kenneth D. Merry" <ken@kdm.org> Submitted by: Bryan Liesner <bleez@comcast.net>
* Document that read(2) can also return EPERMdds2003-08-301-0/+3
| | | | | | | | | | | | | | | | | See e.g. nfsclient/nfs_vnops.c static int nfs_read(struct vop_read_args *ap) { struct vnode *vp = ap->a_vp; if (vp->v_type != VREG) return (EPERM); return (nfs_bioread(vp, ap->a_uio, ap->a_ioflag, ap->a_cred)); } Approved by: schweikh (mentor) MFC after: 6 weeks
* Clarify texteivind2003-08-261-1/+1
|
* Add HISTORY sections to the remaining MAC library man pages.rwatson2003-08-226-0/+36
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Update the mac_prepare(3) man page to reflect changes to therwatson2003-08-221-8/+43
| | | | | | | | | mac_prepare() APIs. Add a HISTORY section. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Make the elements argument to mac_prepare() be const.rwatson2003-08-221-1/+1
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* As new objects begin to support new labels, start to generalizerwatson2003-08-221-86/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the default label support in /etc/mac.conf. Rather than maintain each default label type in an explicit global variable in mac.c, keep a list of defaults loaded from the configuration file. Generalize the parsing so that we support both the older: default_file_labels foo default_ifnet_labels foo default_process_labels foo And also a new: default_labels file foo default_labels ifnet foo default_labels process foo We now accept arbitrary object classes in the first argument. If the same object is specified more than once, we discard the earlier definition in favor of the later one. Add a new API, mac_prepare_type(), which accepts a mac_t to prepare, as well as an object name in the second argument, which will pull a default label set for the object out of the configuration loaded by mac_init_internal(). This permits the libc to adapt to new objects known about by applications but not by libc at compile-time. Also liberalize the error handling a bit: if we're using implicit initialization (i.e., the application didn't explicitly initialize the MAC code), ignore syntax errors and only use valid lines. In the future, we may want to add explicit warnings and do this a bit more consistently. While here, add support for a MAC_CONFFILE environmental variable, which may be used to specify an alternative mac.conf configuration file if the application isn't running with modified privilege (issetugid()). Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Add a kluge suggested by Marcel to paper over the difference betweenwollman2003-08-192-0/+4
| | | | | | | | | | | | gethostname()'s old and new signatures without requiring a library bump. Note that programs which called gethostname() with a negative argument were already broken, since the same type conversion was done by the old implementation. Add a note in the Makefile so that whoever next bumps the libc revision will delete the kluge at the same time (as it will no longer be necessary). This is only operative on 64-bit platforms. Submitted by: marcel
* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEMwollman2003-08-192-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | when the buffer is not long enough to hold the current host name. POSIX does not standardize error returns for gethostname(), so it doesn't matter which one we use, but ENAMETOOLONG is at least a little more intuitive, and mi suggests the existence of prior art. I've been running with this change for a while on my home machine with no effect. At the same time, I've updated the prototype for gethostname() to use the correct standard type (size_t) for the namelen argument. All of the in-tree callers fall into one of the following categories: 1) Call perror() or equivalent when gethostname() fails. 2) Ignore gethostname()'s return value entirely, potentially resulting in data corruption if the buffer is too small. 3) Fall back to a (possibly sensible) default value if gethostname() fails. Many of the callers I examined shows signs of confusion about the correct sizing of the host name buffer. gethostname(3) now has more information about this, as well as updated standards information. PR: 48114 Submitted by: mi (in part)
* style.Makefile(5)obrien2003-08-181-1/+1
|
* Stage 3 of dynamic root support. Make all the libraries needed to rungordon2003-08-171-0/+1
| | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified.
* Fix wrong identifier on .end directive. The SYSCALL macro does namemarcel2003-08-164-4/+4
| | | | mangling and creates an .ent directive with the mangled name.
* Replace some syscalls with libc version, this makes abort work better withdavidxu2003-08-161-10/+7
| | | | | | libkse. Tested under libc_r, libkse, libthr. Reviewed by: deischen
* Make the documentation of PT_STEP match its implementation: theiedowse2003-08-111-2/+3
| | | | | | | `data' parameter is not ignored; if non-zero, it specifies a signal number to be delivered to the traced process. MFC after: 1 day
* Add the mlockall()/munlockall() system call manual page from NetBSD.bms2003-08-111-0/+140
| | | | | | | | PR: kern/42426, standards/54223 Obtained from: NetBSD Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks
* Add the mlockall() and munlockall() system calls.bms2003-08-117-8/+9
| | | | | | | | | | | | | | | | | | | | | | | - All those diffs to syscalls.master for each architecture *are* necessary. This needed clarification; the stub code generation for mlockall() was disabled, which would prevent applications from linking to this API (suggested by mux) - Giant has been quoshed. It is no longer held by the code, as the required locking has been pushed down within vm_map.c. - Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES to express their intention explicitly. - Inspected at the vmstat, top and vm pager sysctl stats level. Paging-in activity is occurring correctly, using a test harness. - The RES size for a process may appear to be greater than its SIZE. This is believed to be due to mappings of the same shared library page being wired twice. Further exploration is needed. - Believed to back out of allocations and locks correctly (tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC). PR: kern/43426, standards/54223 Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks
* For type 0 rng lower initial drop to 50, it is enough to hide linearityache2003-08-101-1/+5
| | | | Reorganize historic #ifdef section
* Fix the case of the encoding name in the ENCODING line. Names aretjr2003-08-101-1/+1
| | | | case-sensitive, and MSKANJI does not work.
* Cross-reference gbk(5).tjr2003-08-101-0/+1
|
* Cross-reference gbk(5) now that it exists. Fix a copy & paste error:tjr2003-08-101-1/+2
| | | | one occurrence of GB 18030 should have been 11383.
* Add a fairly minimal manual page for the GBK encoding.tjr2003-08-102-1/+63
|
* Add a cross reference to Unicode 3.0.tjr2003-08-101-1/+6
|
* Add cross references to the new character encoding manual pages,tjr2003-08-101-1/+5
| | | | and to mbsinit(3) while I'm at it.
* Add manual pages for the BIG5, GB18030 and MSKanji encodings. These maytjr2003-08-104-1/+189
| | | | need to be fleshed out a little, especially big5(5).
* o There are 6 trap disable bits in ar.fpsr, not five. Even though wemarcel2003-08-092-4/+4
| | | | | | | | | | | | | didn't provide a constant for one of them (non-IEEE denormal trap), in an attempt to not support it probably, it's not we are left with the lower 5 bits. o Properly mask the passed or returned fp_except_t. Not doing so causes instant core dumps by trying to write an invalid value to ar.fpsr. Now that we're masking, stop using exclusive-or to invert bits. This fixes the illegal instruction fault encountered when building mozilla.
* Add signalcontext() which will be needed by libpthread.deischen2003-08-092-1/+104
| | | | Reviewed by: marcel
* Add the POSIX 1003.1-2001 posix_madvise() interface.bms2003-08-094-4/+29
| | | | | | PR: standards/54634 Reviewed by: das Approved by: jake (mentor)
* Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't validmarcel2003-08-088-8/+0
| | | | anymore. This also fixes long line bugs caused by the lengthy URLs :-)
* Fix markup for uuid_equal()marcel2003-08-081-1/+2
|
* Fix two (2) bugs in one (1) statement:marcel2003-08-081-1/+4
| | | | | | | | | | | | | o fix the len argument of memcmp(3) to be the size of the node field of the uuid structure, not the size of the uuid structure itself. We're comparing the node fields... o uuid_compare(3) is specified to return -1, 0 or 1, depending on the outcome of the comparison. memcmp(3) returns the difference between the first differing bytes. Hence, we cannot ever return the return value of memcmp(3) as-is. PR: standards/55370 Submitted by: Konstantin Oznobihin <bork@rsu.ru>
* Implement signalcontext.jake2003-08-082-2/+78
|
* Implement mblen(s, n) as mbtowc(NULL, s, n) to avoid calling sgetrune()tjr2003-08-071-26/+9
| | | | | and to simplify things. This is only valid until we start supporting state-dependent encodings.
* Implement mbstowcs() as a wrapper around mbsrtowcs(), and wcstombs()tjr2003-08-072-115/+24
| | | | as a wrapper around wcsrtombs().
* Implement mbtowc() in terms of mbrtowc(), and wctomb() in terms of wcrtomb().tjr2003-08-072-53/+42
|
* Implement btowc() in terms of mbrtowc() instead of sgetrune(), andtjr2003-08-072-10/+27
| | | | | | | | | wctob() in terms of wcrtomb() instead of sputrune(). There should be no functional differences, but there may be a small performance hit because we make an extra function call. The aim here is to have as few functions as possible calling s{get,put}rune() to make it easier to remove them in the future.
* Document that connect(2) can return EINTR, and that ityar2003-08-061-3/+6
| | | | can return EALREADY for a socket in blocking mode as well.
* add support for using kqueue to watch bpf sockets.jmg2003-08-051-1/+8
| | | | | Submitted by: Brian Buchanan of nCircle, Inc. Tested on: i386 and sparc64
* Allow foot shooting as Linux emulation needs it.julian2003-08-041-1/+2
| | | | | | | | | Also change "Auto mode" to use a "special" value instead of 0, and define and document it. I had thought libpthread had already been switched to use auto mode but it appears that patch hasn't been committed yet. Discussed with: Davidxu
* Restore including of "collate.h", for its own prototype (mis)match detectionache2003-08-031-0/+1
|
* Remove commented out and never used codeache2003-08-031-34/+1
|
* Remove __collate_range_cmp() stabilization, it conflicts with rangesache2003-08-031-10/+2
|
* Override the default stubs for getcontext(2) and swapcontext(2) somarcel2003-08-023-2/+80
| | | | | | | | | | | | | that we can flush the register stack prior to entering the kernel. This avoids having dirty registers and saves us from having to manually write them to the backing store from within the kernel. In that respect, flushing the RSE is both functionally required as well as performance optimal. On average we had 18 dirty registers when getcontext(2) was called from libthr. Since libthr does not switch back to a context created by getcontext(2), not having dealt with the dirty registers was harmless.
* The END() must expand to the .endp directive with the same name asmarcel2003-08-013-6/+5
| | | | | | | on the corresponding .proc directive, or the .endp must not have a name at all. While here, remove an artificial dependency in Ovfork.S by performing manual register renaming.
* Cross-reference arc4random(3).das2003-07-311-0/+4
|
* The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1.das2003-07-311-2/+4
|
* Update manual for i386_set_ldt to reflect newly added features.davidxu2003-07-311-0/+34
| | | | Submitted by: julian
* Only allow trapframe formats instead of sigframe formats like themarcel2003-07-301-4/+4
| | | | | comment says and don't write the first 3 arguments to FRAME_TRAPARG_* as they are specific to sigframes.
* Minor constification.phk2003-07-291-2/+2
|
* Add support for gb18030 encodingache2003-07-293-1/+170
| | | | | PR: 51729 Submitted by: Kang Liu <liukang@bjpu.edu.cn>
OpenPOWER on IntegriCloud