summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Pacify gcc about casting pointers to integers (for the lowest few bits).Peter Wemm2003-10-261-6/+8
| | | | Notes: svn path=/head/; revision=121531
* Consistently cast to (u_char *) when filling with junk.Poul-Henning Kamp2003-10-251-3/+3
| | | | Notes: svn path=/head/; revision=121518
* Style changes. Inching closer to convergence with OpenBSD.Poul-Henning Kamp2003-10-251-61/+60
| | | | Notes: svn path=/head/; revision=121500
* according to RFC3542 10.5, the 5th argment of inet6_opt_next()Hajimu UMEMOTO2003-10-251-1/+1
| | | | | | | | | is not size_t but socklen_t. Reported by: tinderbox Notes: svn path=/head/; revision=121496
* - fix description of what processes SIGCONT can be sent toKen Smith2003-10-241-1/+1
| | | | | | | | | PR: docs/58413 Reviewed by: rwatson Approved by: blackend (mentor) Notes: svn path=/head/; revision=121484
* oops, revert previous change to getaddrinfo.c. This is not relatedHajimu UMEMOTO2003-10-241-275/+155
| | | | | | | | to RFC3493. The previous change was related to RFC3484 (Default Address Selection for IPv6), and it will come later. Notes: svn path=/head/; revision=121474
* Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542Hajimu UMEMOTO2003-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 Notes: svn path=/head/; revision=121472
* reorder functions to be in sync with KAME.Hajimu UMEMOTO2003-10-231-128/+132
| | | | Notes: svn path=/head/; revision=121426
* EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493Hajimu UMEMOTO2003-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 Notes: svn path=/head/; revision=121425
* Add implementations of amd64_[gs]et_[fg]sbase().Peter Wemm2003-10-235-0/+158
| | | | Notes: svn path=/head/; revision=121407
* oops, gai_strerror must return default value when error codeHajimu UMEMOTO2003-10-221-0/+1
| | | | | | | isn't found in ai_errlist. Notes: svn path=/head/; revision=121348
* make ai_errlist struct. this is preparation for RFC3493Hajimu UMEMOTO2003-10-221-19/+32
| | | | | | | | | (EAI_NODATA is depricated). Obtained from: KAME Notes: svn path=/head/; revision=121347
* The FP status register allows for 6 traps to be masked. One of them,Marcel Moolenaar2003-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. Notes: svn path=/head/; revision=121332
* stop use of NI_WITHSCOPEID. it was deprecated.Hajimu UMEMOTO2003-10-211-8/+3
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=121316
* Bring the description of st_[cma]time modification conditions a bitDiomidis Spinellis2003-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. Notes: svn path=/head/; revision=121279
* document the fact that kqueue will immediately return and not timeout whenJohn-Mark Gurney2003-10-201-0/+8
| | | | | | | | | nevents is 0. PR: kern/45291 Notes: svn path=/head/; revision=121263
* Add rfork_thread(3).Alan Cox2003-10-132-1/+102
| | | | Notes: svn path=/head/; revision=121074
* Changed EINVAL constant reference from UIO_MAXIOV to IOV_MAX.Diomidis Spinellis2003-10-111-1/+1
| | | | | | | | The former is a kernel-only visible constant, the latter the POSIX-specified userland constant defined by including limits.h. Notes: svn path=/head/; revision=121011
* Cite the published version of "Engineering a Sort Function" instead ofTim J. Robbins2003-09-301-4/+7
| | | | | | | an email address. Spell McIlroy correctly. Notes: svn path=/head/; revision=120598
* More style fixes to improve diffability with OpenBSD.Poul-Henning Kamp2003-09-271-46/+54
| | | | | | | Pull 'A' evilness for realloc(3) from OpenBSD. Notes: svn path=/head/; revision=120524
* Style changes to improve diffability against OpenBSD version.Poul-Henning Kamp2003-09-271-91/+91
| | | | Notes: svn path=/head/; revision=120520
* Fix fabs(). This commit brought to you by the letter 'l'.Peter Wemm2003-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. Notes: svn path=/head/; revision=120448
* From OpenBSD:Bill 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 Notes: svn path=/head/; revision=120107
* Our getaddrinfo() and getnameinfo() are thread-safe butHajimu UMEMOTO2003-09-152-2/+10
| | | | | | | | | some limitation. Reported by: Marc G. Fournier <scrappy@hub.org> Notes: svn path=/head/; revision=120084
* Get rid of duplicates.Ruslan Ermilov2003-09-143-3/+3
| | | | Notes: svn path=/head/; revision=120054
* mdoc(7): Fix common mistakes made in the SEE ALSO section.Ruslan Ermilov2003-09-123-6/+8
| | | | Notes: svn path=/head/; revision=120010
* mdoc(7): Properly mark C headers.Ruslan Ermilov2003-09-1020-29/+29
| | | | Notes: svn path=/head/; revision=119964
* Document the fact that send(2) can return EPIPE (like when a socket is notOllivier Robert2003-09-101-0/+4
| | | | | | | | | | | connected). PR: docs/56683 Submitted by: Chris S.J. Peron <maneo@bsdpro.com> MFC after: 3 days Notes: svn path=/head/; revision=119963
* mdoc(7): Use the new feature of the .In macro.Ruslan Ermilov2003-09-0862-105/+105
| | | | Notes: svn path=/head/; revision=119893
* In the !MNT_BYFSID case, return EINVAL from unmount(2) when theIan Dowse2003-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 Notes: svn path=/head/; revision=119885
* Clarify that the second argument to accept() may be a null pointer ifPeter Pentchev2003-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 Notes: svn path=/head/; revision=119775
* Remove an unused and incorrect prototype for _none_init().Tim J. Robbins2003-09-051-1/+0
| | | | Notes: svn path=/head/; revision=119757
* Move a sentence about the terminating \0 from the RETURN VALUES sectionSimon L. B. Nielsen2003-09-042-14/+14
| | | | | | | | | | | (where it didn't really belong), to the DESCRIPTION section. English advice: ceri Requested by: das MFC after: 4 weeks Notes: svn path=/head/; revision=119748
* Sigh. I can't win anything. Use addq rather than addl with %rsp.Peter Wemm2003-09-041-1/+1
| | | | Notes: svn path=/head/; revision=119727
* Apply same basic fix for getcontext(2) as for i386. Store the returnPeter Wemm2003-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. Notes: svn path=/head/; revision=119726
* Fix some minor whitespace botchesPeter Wemm2003-09-041-1/+1
| | | | Notes: svn path=/head/; revision=119725
* Make getcontext(2) work on i386. It needs a small wrapper in libcPeter Wemm2003-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); } Notes: svn path=/head/; revision=119724
* Fix/add errno return values to match the NFS client implementation andDiomidis Spinellis2003-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 Notes: svn path=/head/; revision=119688
* Update the kern.osreldate documentation to document the present formatEivind Eklund2003-09-011-2/+17
| | | | | | | | | used, and refer to <osreldate.h> to get userland date. Submitted by: ru Notes: svn path=/head/; revision=119654
* Return (-1) not (ENOENT) for mac_prepare_type(), and set errno toRobert Watson2003-08-301-1/+2
| | | | | | | | | | ENOENT instead. Reported by: "Kenneth D. Merry" <ken@kdm.org> Submitted by: Bryan Liesner <bleez@comcast.net> Notes: svn path=/head/; revision=119588
* Document that read(2) can also return EPERMDiomidis Spinellis2003-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 Notes: svn path=/head/; revision=119570
* Clarify textEivind Eklund2003-08-261-1/+1
| | | | Notes: svn path=/head/; revision=119492
* Add HISTORY sections to the remaining MAC library man pages.Robert Watson2003-08-226-0/+36
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119321
* Update the mac_prepare(3) man page to reflect changes to theRobert Watson2003-08-221-8/+43
| | | | | | | | | | | | mac_prepare() APIs. Add a HISTORY section. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119320
* Make the elements argument to mac_prepare() be const.Robert Watson2003-08-221-1/+1
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119317
* As new objects begin to support new labels, start to generalizeRobert Watson2003-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 Notes: svn path=/head/; revision=119314
* Add a kluge suggested by Marcel to paper over the difference betweenGarrett Wollman2003-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 Notes: svn path=/head/; revision=119151
* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEMGarrett Wollman2003-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) Notes: svn path=/head/; revision=119140
* style.Makefile(5)David E. O'Brien2003-08-181-1/+1
| | | | Notes: svn path=/head/; revision=119071
* Stage 3 of dynamic root support. Make all the libraries needed to runGordon Tetlow2003-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. Notes: svn path=/head/; revision=119017