summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Style changes. Inching closer to convergence with OpenBSD.phk2003-10-251-61/+60
|
* according to RFC3542 10.5, the 5th argment of inet6_opt_next()ume2003-10-251-1/+1
| | | | | | is not size_t but socklen_t. Reported by: tinderbox
* - fix description of what processes SIGCONT can be sent tokensmith2003-10-241-1/+1
| | | | | | PR: docs/58413 Reviewed by: rwatson Approved by: blackend (mentor)
* oops, revert previous change to getaddrinfo.c. This is not relatedume2003-10-241-275/+155
| | | | | to RFC3493. The previous change was related to RFC3484 (Default Address Selection for IPv6), and it will come later.
* Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542ume2003-10-246-366/+1400
| | | | | | | | | | (aka RFC2292bis). Though I believe this commit doesn't break backward compatibility againt existing binaries, it breaks backward compatibility of API. Now, the applications which use Advanced Sockets API such as telnet, ping6, mld6query and traceroute6 use RFC3542 API. Obtained from: KAME
* reorder functions to be in sync with KAME.ume2003-10-231-128/+132
|
* EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493ume2003-10-232-17/+4
| | | | | | | | (aka RFC2553bis). Now, getaddrinfo(3) returns EAI_NONAME instead of EAI_NODATA. Our getaddrinfo(3) nor getnameinfo(3) didn't use EAI_ADDRFAMILY. Obtained from: KAME
* Add implementations of amd64_[gs]et_[fg]sbase().peter2003-10-235-0/+158
|
* oops, gai_strerror must return default value when error codeume2003-10-221-0/+1
| | | | isn't found in ai_errlist.
* make ai_errlist struct. this is preparation for RFC3493ume2003-10-221-19/+32
| | | | | | (EAI_NODATA is depricated). Obtained from: KAME
* The FP status register allows for 6 traps to be masked. One of them,marcel2003-10-222-3/+3
| | | | | | | | | | | | the denormal/unnormal trap, is not a standard IEEE trap. We did not exclude it from being returned by fpgetmask(), nor did we make sure that fpsetmask() didn't clobber it. Since the non-IEEE trap is not part of fp_except_t, users of ifpgetmask()/fpsetmask() would be confronted with unexpected behaviour, one of which is a SIGFPE for denormal/unnormal FP results. This commit makes sure that we don't leak the denormal/unnormal mask bit in fp_except_t and also that we don't clobber it.
* stop use of NI_WITHSCOPEID. it was deprecated.ume2003-10-211-8/+3
| | | | Obtained from: KAME
* Bring the description of st_[cma]time modification conditions a bitdds2003-10-201-6/+18
| | | | | | closer to reality. More work remains to be done. st_mtime should be the most complete based on IEEE Std 1003.1, 2003 Edition, a review of ufs_vnops.c, and some experimentation.
* document the fact that kqueue will immediately return and not timeout whenjmg2003-10-201-0/+8
| | | | | | nevents is 0. PR: kern/45291
* Add rfork_thread(3).alc2003-10-132-1/+102
|
* Changed EINVAL constant reference from UIO_MAXIOV to IOV_MAX.dds2003-10-111-1/+1
| | | | | The former is a kernel-only visible constant, the latter the POSIX-specified userland constant defined by including limits.h.
* Cite the published version of "Engineering a Sort Function" instead oftjr2003-09-301-4/+7
| | | | an email address. Spell McIlroy correctly.
* More style fixes to improve diffability with OpenBSD.phk2003-09-271-46/+54
| | | | Pull 'A' evilness for realloc(3) from OpenBSD.
* Style changes to improve diffability against OpenBSD version.phk2003-09-271-91/+91
|
* Fix fabs(). This commit brought to you by the letter 'l'.peter2003-09-261-1/+1
| | | | | | | | | (fstp stores a mem32 value, fstpl stores a mem64 value) This fixes ghostscript for 'make release' on amd64. Ghostscript for some reason thinks it is a good idea to use -fno-builtin, which means it is vulnerable to bugs in libc that are normally hidden by the builtin gcc functions. Oops.
* From OpenBSD:fenner2003-09-151-1/+1
| | | | | | | | | | | | always widen the imputed netmask if it is narrower than the specified octets. fixes a strange behaviour where inet_net_pton would always return 4 (bits) for multicast addresses no matter how many octets were specified. negotiated with Paul Vixie, original author of this function. PR: standards/53151 Submitted by: Max Laier <max@love2party.net> Optained from: OpenBSD
* Our getaddrinfo() and getnameinfo() are thread-safe butume2003-09-152-2/+10
| | | | | | some limitation. Reported by: Marc G. Fournier <scrappy@hub.org>
* Get rid of duplicates.ru2003-09-143-3/+3
|
* mdoc(7): Fix common mistakes made in the SEE ALSO section.ru2003-09-123-6/+8
|
* mdoc(7): Properly mark C headers.ru2003-09-1020-29/+29
|
* Document the fact that send(2) can return EPIPE (like when a socket is notroberto2003-09-101-0/+4
| | | | | | | | connected). PR: docs/56683 Submitted by: Chris S.J. Peron <maneo@bsdpro.com> MFC after: 3 days
* mdoc(7): Use the new feature of the .In macro.ru2003-09-0862-105/+105
|
* In the !MNT_BYFSID case, return EINVAL from unmount(2) when theiedowse2003-09-081-7/+12
| | | | | | | | | | | | | | specified directory is not found in the mount list. Before the MNT_BYFSID changes, unmount(2) used to return ENOENT for a nonexistent path and EINVAL for a non-mountpoint, but we can no longer distinguish between these cases. Of the two error codes, EINVAL was more likely to occur in practice, and it was the only one of the two that was documented. Update the manual page to match the current behaviour. Suggested by: tjr Reviewed by: tjr
* Clarify that the second argument to accept() may be a null pointer ifroam2003-09-051-1/+7
| | | | | | | | | no peer address information is desired. PR: 56044 Submitted by: Felix Opatz <felix@zotteljedi.de> and Bernd Luevelsmeyer <bdluevel@heitec.net> MFC after: 1 month
* Remove an unused and incorrect prototype for _none_init().tjr2003-09-051-1/+0
|
* Move a sentence about the terminating \0 from the RETURN VALUES sectionsimon2003-09-042-14/+14
| | | | | | | | (where it didn't really belong), to the DESCRIPTION section. English advice: ceri Requested by: das MFC after: 4 weeks
* Sigh. I can't win anything. Use addq rather than addl with %rsp.peter2003-09-041-1/+1
|
* Apply same basic fix for getcontext(2) as for i386. Store the returnpeter2003-09-042-2/+56
| | | | | | value for getcontext() in a preserved register rather than on the stack. The second time around, the stack value would likely have changed so we can't depend on it for the return value.
* Fix some minor whitespace botchespeter2003-09-041-1/+1
|
* Make getcontext(2) work on i386. It needs a small wrapper in libcpeter2003-09-042-2/+52
| | | | | | | | | | | | | | | | | | | | | | | otherwise the return from the syscall stub for getcontext will pop off the return value for the caller to the getcontext stub and it will appear as though the setcontext() syscall returned instead of the getcontext(). The same bug exists on amd64, a fix is coming there too. The bug can be demonstrated with this test code fragment: main() { ucontext_t top; if (getcontext(&top) == 0) { write(2, "PING!\n", 6); /* Cause a return value of 1 from getcontext this time */ top.uc_mcontext.mc_eax = 1; setcontext(&top); err(1, "setcontext() returned"); } write(2, "PONG!\n", 6); _exit(0); }
* Fix/add errno return values to match the NFS client implementation anddds2003-09-022-5/+16
| | | | | | | | better represent failures of special files accessed over NFS. Approved by: schweikh (mentor) Reviewed by: bde (as a description) MFC after: 6 weeks
* 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
OpenPOWER on IntegriCloud