summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Externalize malloc's spinlock so that a thread library can takedeischen2003-11-042-0/+9
| | | | | | | | | | | it around an application's fork() call. Our new thread libraries (libthr, libpthread) can now have threads running while another thread calls fork(). In this case, it is possible for malloc to be left in an inconsistent state in the child. Our thread libraries, libpthread in particular, need to use malloc internally after a fork (in the child). Reviewed by: davidxu
* Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroedtjr2003-11-043-9/+3
| | | | | | | mbstate_t object that they ignore. The zeroing is fairly expensive, and it will never be necessary in these functions; when we support state-dependent encodings, we will pass in a pointer to the file's mbstate_t object, and only zero it at the time the file gets opened.
* Add a reference to the new utrace(2) manual page.tjr2003-11-041-1/+2
|
* When printing ACLs, truncate user and group names if they're too long,rwatson2003-11-031-3/+5
| | | | | | | | | rather than generating an error. This is consistent with other tools printing user and group names, and means you can read the ACL using our tools rather than being up a creek. PR: 56991 Submitted by: Michael Bretterklieber <mbretter@a-quadrat.at>
* Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implementtjr2003-11-024-254/+233
| | | | | | mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left unconverted; GB18030 will be done eventually, but GBK and UTF2 may just be removed, as they are subsets of GB18030 and UTF-8 respectively.
* Remove TODO comment about creating a macro version of towctrans().tjr2003-11-011-4/+0
| | | | Remove unnecessary inclusion of <ctype.h>.
* Fix a typo that caused the optimized single-byte locale path not to be taken.tjr2003-11-011-1/+1
|
* Add a manual page for the utrace() system call.tjr2003-11-012-1/+87
| | | | Obtained from: NetBSD
* Allow mbrtowc() and wcrtomb() to be implemented directly, instead oftjr2003-11-017-50/+204
| | | | | | | | | | | | | | | | | as wrappers around the deprecated 4.4BSD rune functions. This paves the way for state-dependent encodings, which the rune API does not support. - Add __emulated_sgetrune() and __emulated_sputrune(), which are implementations of sgetrune() and sputrune() in terms of mbrtowc() and wcrtomb(). - Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to __emulated_mbrtowc() and __emulated_wcrtomb(). - Add __mbrtowc and __wcrtomb function pointers, which point to the current locale's conversion functions, or the __emulated versions. - Implement mbrtowc() and wcrtomb() as calls to these function pointers. - Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly. All of this emulation mess will be removed, together with rune support, in FreeBSD 6.
* Don't bother passing a freshly-zeroed mbstate to mbsrtowcs() etc.tjr2003-10-314-75/+25
| | | | | | | when the current implementation won't use it, anyway. Just pass NULL. This will need to be changed when state-dependent encodings are supported, but there's no need to take the performance hit in the meantime.
* Implement fgetrune(), fungetrune() and fputrune() as wrappers aroundtjr2003-10-311-36/+8
| | | | fgetwc(), ungetwc() and fputwc().
* add destination address selection described in RFC3484.ume2003-10-301-7/+412
| | | | | | | | | in KAME implementation, even when no policy is installed into kernel, getaddrinfo(3) sorts addresses. Since it causes POLA violation, I modified to don't sort addresses when no policy is installed into kernel, Obtained from: KAME
* Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree.phk2003-10-302-2/+3
|
* Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magicphk2003-10-302-2/+7
| | | | characters '*', '?' and '['.
* Remove incomplete support for running FreeBSD userland on old NetBSD kernelstjr2003-10-298-31/+4
| | | | lacking the issetugid() and utrace() syscalls.
* Make this part identical with NetBSD: Use recvlen instead of inlen.mbr2003-10-291-1/+1
| | | | | | No functionality change. Obtained from: NetBSD
* Don't compare NULL against a character.mbr2003-10-291-3/+3
| | | | Obtained from: NetBSD
* Don't use NULL to compare against a char.mbr2003-10-291-2/+2
| | | | Obtained from: NetBSD
* Don't use NULL to compare against a character.mbr2003-10-291-1/+1
| | | | Obtained from: NetBSD
* Don peril sensitive (ie: bikeshed sensitive) sunglasses and quietlypeter2003-10-282-408/+1
| | | | | | | | | | | send strhash(3) off to sleep with the fishes. Nothing in our tree uses it. It has no documentation. It is nonstandard and in spite of the filename strhash.c and strhash.h, it lives in application namespace by providing compulsory global symbols hash_create()/hash_destroy()/hash_search()/ hash_traverse()/hash_purge()/hash_stats() regardless of whether you #include <strhash.h> or not. If it turns out that there is a huge application for this after all, I can repocopy it somewhere safer and we can revive it elsewhere. But please, not in libc!
* Pacify gcc about casting pointers to integers (for the lowest few bits).peter2003-10-261-6/+8
|
* Consistently cast to (u_char *) when filling with junk.phk2003-10-251-3/+3
|
* 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
OpenPOWER on IntegriCloud