summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info.kib2010-08-271-1/+1
| | | | | Reported and tested by: Fabian Keil <freebsd-listen fabiankeil de> MFC after: 17 days
* Allow ABIs to provide their own LIBC_ARCH in a more generic way. As a sidenwhitehorn2010-08-251-4/+5
| | | | | | effect, this fixes the build on powerpc64. Reviewed by: imp
* Fix an accidental sed...imp2010-08-241-2/+2
|
* Powerpc is special here. powerpc and powerpc64 use different ABIs, soimp2010-08-249-32/+35
| | | | | | their implementations aren't in the same files. Introduce LIBC_ARCH and use that in preference to MACHINE_CPUARCH. Tested by amd64 and powerpc64 builds (thanks nathanw@)
* Remove extra FreeBSD tag.kib2010-08-241-1/+0
| | | | MFC after: 3 days
* Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition intokib2010-08-243-4/+22
| | | | | | | | | | | the separate .o for libc_pic.a. This prevents rtld from making the symbol global. Putting the stack_protector_compat.c into the public domain acknowledged by kan. Reviewed by: kan MFC after: 2 weeks
* MFtbemd:imp2010-08-239-27/+27
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* On shared object unload, in __cxa_finalize, call and clear all installedkib2010-08-235-4/+71
| | | | | | | | | | | | | | | | | | | | | | atexit and __cxa_atexit handlers that are either installed by unloaded dso, or points to the functions provided by the dso. Use _rtld_addr_phdr to locate segment information from the address of private variable belonging to the dso, supplied by crtstuff.c. Provide utility function __elf_phdr_match_addr to do the match of address against dso executable segment. Call back into libthr from __cxa_finalize using weak __pthread_cxa_finalize symbol to remove any atfork handler which function points into unloaded object. The rtld needs private __pthread_cxa_finalize symbol to not require resolution of the weak undefined symbol at initialization time. This cannot work, since rtld is relocated before sym_zero is set up. Idea by: kan Reviewed by: kan (previous version) MFC after: 3 weeks
* Introduce implementation-private rtld interface _rtld_addr_phdr, whichkib2010-08-232-0/+9
| | | | | | | | fills struct dl_phdr_info for the shared object that contains the specified address, if any. Idea and reviewed by: kan MFC after: 3 weeks
* Style.kib2010-08-232-3/+3
| | | | MFC after: 3 days
* Use aux vector to get values for SSP canary, pagesize, pagesizes array,kib2010-08-1710-22/+217
| | | | | | | | | | | number of host CPUs and osreldate. This eliminates the last sysctl(2) calls from the dynamically linked image startup. No objections from: kan Tested by: marius (sparc64) MFC after: 1 month
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-1610-13/+14
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Correct the return code from _dns_gethostby*() to correspondume2010-08-151-4/+20
| | | | | | | with h_errno. Obtained from: NetBSD MFC after: 2 weeks
* - When there is no room for returning the result, nss backendume2010-08-1311-49/+109
| | | | | | | | | | have to return ERANGE and terminate with NS_RETURN. - When gethostbyname_r(3) and the friends end with an error, set errno to the value nss backend returns, and return errno value. PR: kern/131623 MFC after: 2 weeks
* Fix typos and spelling mistakes.joel2010-08-065-5/+5
|
* Comment out IEEE Std 1003.1-2001 conformance proclaimed too early,ache2010-08-051-5/+5
| | | | | see problems described in the comment to: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/128933
* Spelling fixes.joel2010-08-027-9/+9
|
* mdoc: remove unbalanced quotesuqs2010-08-022-6/+6
|
* mdoc: make sure to pass at least one argument to quotation macrosuqs2010-08-023-3/+3
|
* Disable all warnings when building gdtoa. This allows building libc withrpaulo2010-08-011-1/+1
| | | | | | | | | | clang. The general idea is that the vendor will not accept our compilation patches and so disabling the warnings is the best way to go as it makes future imports bearable. Submitted by: Dimitry Andric <dimitry at andric.com> Discussed with: das
* Fix a couple of typos.uqs2010-07-301-1/+1
| | | | | | PR: docs/148891 Submitted by: olgeni MFC after: 1 week
* Update mlockall(2) to mention that it's superuser-only syscall, justtrasz2010-07-272-4/+7
| | | | | | | like the mlock(2) manual page says. Update mlock(2) to say that hitting RLIMIT_MEMLOCK results in ENOMEM, not EAGAIN. MFC after: 1 month
* Apply a small grammar fix to {toupper,tolower}(3).bcr2010-07-252-4/+4
| | | | | | PR: docs/140458 Submitted by: Jeremy Huddleston (Jeremyhu at apple dot com) MFC after: 5 days
* Verify return value of the sigset manipulation functionskib2010-07-221-22/+14
| | | | | | | | to catch invalid signal numbers [1]. Use consistent style of not assigning the return value to a local variable. Reported by: Garrett Cooper <yanegomi gmail com> [1] MFC after: 1 week
* Also link getutxent.3 to utmpx.3.ed2010-07-211-1/+1
| | | | If you run `man utmpx', you expect to get some info on it.
OpenPOWER on IntegriCloud