summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Revert most of r210764, now that mdocml does the rightuqs2010-12-282-2/+2
| | | | | | thing with empty quotation macros. Requested by: Alex Kozlov
* Sort cross references by section.brucec2010-12-181-2/+2
| | | | Reported by: pluknet
* Update shmget(2) with POSIX access permissions and remove non-standard SHM_R,brucec2010-12-173-13/+11
| | | | SHM_W and machine/param.h.
* Bump manual page date.trasz2010-12-131-1/+1
|
* After PSARC/2010/029, "canonical six" no longer exists.trasz2010-12-131-1/+3
|
* Fix stack alignment (required to be to 16 bytes) instead of ptrace andnwhitehorn2010-12-112-5/+5
| | | | cerror on powerpc64.
* When reopening a stream backed by an open file descriptor, do not closejhb2010-12-091-12/+9
| | | | | | | | | | | | | the existing file descriptor. Instead, let dup2() atomically close the old file descriptor when assigning the newly opened file to the same descriptor. This closes a race in a multithreaded application where a concurrent open() could allocate the existing file descriptor in between the calls to close() and dup2(). PR: threads/79887 Submitted by: Dmitrij Tejblum tejblum of yandex-team.ru Reviewed by: davidxu MFC after: 1 week
* Move most of the remaining USD/PSD/SMM papers into share/docuqs2010-12-047-9696/+0
|
* Remove two unused variables, left over from the refactoring in r180104.gavin2010-12-021-6/+0
| | | | | | PR: bin/152551 Submitted by: Henning Petersen <henning.petersen t-online.de> MFC after: 2 weeks
* Update the documentation to reflect changes to the implementation indas2010-11-301-14/+14
| | | | | | | r197752, which is related to handling of null buffer pointers. Also make a few minor wording changes. Reported by: jh@
* Always set errno to a sane value when pututxline(3) fails.ed2010-11-141-0/+3
| | | | | For example, it will now return ESRCH when trying to replace a nonexistent entry with DEAD_PROCESS.
* Sync with OpenBSD, primarily better signal and terminal handling.delphij2010-11-132-124/+130
| | | | | Obtained from: OpenBSD MFC after: 2 weeks
* This commit implements the SO_USER_COOKIE socket option, which letsluigi2010-11-121-0/+18
| | | | | | | | | | | | | | | | | | | | | | | you tag a socket with an uint32_t value. The cookie can then be used by the kernel for various purposes, e.g. setting the skipto rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has been implemented; however there is nothing ipfw-specific in its implementation). The ipfw-related code that uses the optopn will be committed separately. This change adds a field to 'struct socket', but the struct is not part of any driver or userland-visible ABI so the change should be harmless. See the discussion at http://lists.freebsd.org/pipermail/freebsd-ipfw/2009-October/004001.html Idea and code from Paul Joe, small modifications and manpage changes by myself. Submitted by: Paul Joe MFC after: 1 week
* Make sure to specify the alignment of minbrk and curbrk. They were correctlydim2010-11-112-0/+2
| | | | | | | | aligned by accident with earlier binutils, but no longer are, causing link failures. Submitted by: nwhitehorn Obtained from: projects/binutils-2.17
* Remove some unneeded spaces from the __sym_compat() macro, since newerdim2010-11-111-1/+1
| | | | | versions of gas are more fussy about spaces surrounding '@' signs in versioned symbol names.
* Add a new libc function: cfmakesane(3).ed2010-11-024-6/+37
| | | | | | | | | | | I've noticed various terminal emulators that need to obtain a sane default termios structure use very complex `hacks'. Even though POSIX doesn't provide any functionality for this, extend our termios API with cfmakesane(3), which is similar to the commonly supported cfmakeraw(3), except that it fills the termios structure with sane defaults. Change all code in our base system to use this function, instead of depending on <sys/ttydefaults.h> to provide TTYDEF_*.
* - Note that non-superusers are not allowed to set the SF_ARCHIVEDjh2010-10-291-3/+7
| | | | | | | | | flag. [1] - Note that also fchflags(2) will return EPERM for attempts to set or unset the SF_SNAPSHOT flag. Submitted by: Garrett Cooper [1] MFC after: 1 week
* Add sysctl kern.sched.cpusetsize to export the size of kernel cpuset,davidxu2010-10-291-0/+9
| | | | | | also add sysconf() key _SC_CPUSET_SIZE to get sysctl value. Submitted by: gcooper
* Fix PIC_RETURN when abicalls are not defined.jchandra2010-10-241-1/+1
| | | | Submitted by: Artem Belevich (artemb at gmail dot com)
* Revert to r214147, errno is not clobbered as originallybcr2010-10-221-2/+0
| | | | thought.
* Document strtonum()s behavior of setting errno to 0 when no error is found.bcr2010-10-211-0/+2
| | | | | | | PR: docs/143330 Submitted by: Efstratios Karatzas (gpf dot kira at gmail dot com) Discussed with: ru@ MFC after: 7 days
* Sync with OpenBSD rev. 1.13:bcr2010-10-211-2/+1
| | | | | | | | strtonum does not require limits.h Obtained from: OpenBSD Discussed with: ru@ MFC after: 5 days
* Fix error handling logic of pututxline(3).ed2010-10-211-12/+21
| | | | | | Instead of only returning NULL when the entry is invalid and can't be matched against the current database, also return it when it cannot open the log files properly.
* mdoc: make pages render with mandocuqs2010-10-213-4/+3
| | | | | | It's a bit more pedantic regarding .Bl list elements. This has an added benefit of unbreaking the ipfw(8) manpage, where groff was silently skipping one list element.
* Revert revision 214007, I realized that MySQL wants to resolvedavidxu2010-10-202-4/+0
| | | | | | | a silly rwlock deadlock problem, the deadlock is caused by writer waiters, if a thread has already locked a reader lock, and wants to acquire another reader lock, it will be blocked by writer waiters, but we had already fixed it years ago.
* Unbreak buildworld by including pthread_rwlockattr_setkind_np anddavidxu2010-10-182-0/+4
| | | | pthread_rwlockattr_getkind_np.
* Clang related fixes:rpaulo2010-10-132-1/+2
| | | | | | | * When calling syslog(), pass a format string. * Define YY_NO_INPUT on nslexer.l Submitted by: Norberto Lopes <nlopes.ml at gmail.com>
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-0829-32/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Missed space.kib2010-10-061-1/+1
| | | | | Submitted by: brueffer MFC after: 1 week
* Add cross-references to lrand48(3) and arc4random(3) from rand(3)kib2010-10-062-1/+11
| | | | | | | and random(3). Submitted by: Valentin Nechayev <netch netch kiev ua> MFC after: 1 week
* When no protocol entry is found, getproto*_r(3) shouldume2010-10-053-3/+3
| | | | | | | return zero. Spotted by: Kostik Belousov <kostikbel__at__gmail.com> MFC after: 2 weeks
* Clear errno for each method dispatch.ume2010-10-041-0/+2
| | | | | Spotted by: Kostik Belousov <kostikbel__at__gmail.com> MFC after: 2 weeks
* libc: Remove the i386 assembler version of strlen(3).jilles2010-10-012-55/+1
| | | | | | | | | | | | | On anything modern, the C version, which processes a word at a time, is much faster. The Intel optimization manual explicitly warns against using REP prefixes with SCAS or CMPS, which is exactly what the assembler version does. A simple test on a Phenom II showed the C version, compiled with -O2, to be about twice as fast determining the length of 100000 strings between 0 and 255 bytes long. MFC after: 2 weeks
* Retire the amd64 and i386 specific inline assembly versions of ldexp.c,dim2010-09-302-136/+0
| | | | | | | | as they are slower than the generic version in C, at least on modern hardware. This leaves us with just five implementations. Suggested by: bde Approved by: rpaulo (mentor)
* Apply the same workaround for clang to amd64's version of ldexp.c (as indim2010-09-291-3/+9
| | | | | | | | | | | | | r212976): order the incoming arguments to fscale as st(0), st(1), and mark temp2 volatile (only in case of compilation with clang) to force clang to pop it correctly. No binary change when compiled with gcc. This fixes ldexp() when compiled with clang on amd64, which makes drand48() and friends work correctly again, and this in turn fixes perl's tempfile(). Reported by: Renato Botelho, Derek Tattersall Approved by: rpaulo (mentor)
* To support stack unwinding for cancellation points, add -fexceptions flagdavidxu2010-09-257-53/+43
| | | | | | | for them, two functions _pthread_cancel_enter and _pthread_cancel_leave are added to let thread enter and leave a cancellation point, it also makes it possible that other functions can be cancellation points in libraries without having to be rewritten in libthr.
* Workaround LLVM bug #4434:rpaulo2010-09-211-3/+7
| | | | | | | | | | Reorder inline assembly arguments temp2, temp, value and texp to follow the st(0), st(1), etc. style. Also mark the temp2 variable as volatile to workaround another clang bug. This allows clang to buildworld FreeBSD/i386. Submitted by: dim
* Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, ifalc2010-09-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | the first line of a script exceeded MAXSHELLCMDLEN characters, then exec_imgact_shell() silently truncated the line and passed on the truncated interpreter name or argument. Now, exec_imgact_shell() will fail and return ENOEXEC, which is the commonly used errno among Unix variants for this type of error. (2) Previously, exec_imgact_shell()'s check on the length of the interpreter's name was ineffective. In other words, exec_imgact_shell() could not possibly fail and return ENAMETOOLONG. The reason being that the length of the interpreter name had to exceed MAXSHELLCMDLEN characters in order that ENAMETOOLONG be returned. But, the search for the end of the interpreter name stops after at most MAXSHELLCMDLEN - 2 characters are scanned. (In the end, this particular error is eventually discovered outside of exec_imgact_shell() and ENAMETOOLONG is returned. So, the real effect of this second change is that the error is detected earlier, in exec_imgact_shell().) Update the definition of MAXINTERP to the actual limit on the size of the interpreter name that has been in effect since r142453 (from 2005). In collaboration with: kib
* First step at adopting FreeBSD to support PSARC/2010/029. This makestrasz2010-09-201-6/+26
| | | | | | acl_is_trivial_np(3) properly recognize the new trivial ACLs. From the user point of view, that means "ls -l" no longer shows plus signs for all the files when running ZFS v28.
* Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 andgjb2010-09-122-2/+2
| | | | | | | r212438, repectively. Approved by: keramida (mentor) MFC after: 1 week
* Revert changes of 'assure' to 'ensure' made in r211936.brucec2010-09-114-7/+7
| | | | Approved by: rrs (mentor)
* Note O_SYNC and O_NOFOLLOW flags in dbopen(3) since r190497.gjb2010-09-101-2/+2
| | | | | | | | PR: 150030 Submitted by: Janne Snabb snabb at epipe com Patch by: Janne Snabb Approved by: keramida (mentor) MFC after: 1 week
* Add EINVAL to list of possible return values for cpuset_getaffinity(2).gjb2010-09-101-0/+6
| | | | | | | | PR: 149978 Submitted by: gcooper Patch by: gcooper Approved by: keramida (mentor) MFC after: 1 week
* Because POSIX does not allow EINTR to be returned from sigwait(),davidxu2010-09-104-1/+51
| | | | | | | | add a wrapper for it in libc and rework the code in libthr, the system call still can return EINTR, we keep this feature. Discussed on: thread Reviewed by: jilles
* Arrgh, tested wrong source tree _again_. Fix previous commit. Also,trasz2010-09-091-1/+1
| | | | | | this and previous one are MFC candidate. MFC after: 1 month
* Add minor optimization. It's less strict than its kernel counterparttrasz2010-09-091-0/+9
| | | | due to upcoming ACL changes required by the new ZFS.
* Add ECONNRESET to list of possible errors in connect(2).gjb2010-09-061-1/+3
| | | | | | | PR: 148683 Submitted by: Gennady Proskurin <gpr at mail dot ru> Approved by: keramida (mentor) MFC after: 1 week
* Use NULL instead of 0 for pointer in example.kib2010-08-291-1/+1
| | | | MFC after: 3 days
* Add the MAP_PREFAULT_READ option to mmap(2).alc2010-08-281-1/+14
| | | | Reviewed by: jhb, kib
* Fix incorrect usage of 'assure' and 'insure'.brucec2010-08-287-10/+10
| | | | Approved by: rrs (mentor)
OpenPOWER on IntegriCloud