summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Merge MIPS platform support to 8-STABLE.Jayachandran C.2010-11-2733-558/+651
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit merges the MIPS platform changes that was now stable in -CURRENT into 8-STABLE. The MIPS changesets are too many (~400) to list here. But the changesets merged in this commit that affect other platforms are summarized below: r204635 : (changes to sys/dev/hwpmc, lib/libpmc, sys/sys/pmc.h) Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor. r205845: (changes to sys/modules/Makefile) Fix for building modules on mips and arm. r204031: (changes to sys/kern/link_elf_obj.c) printf fix, as part of kernel module support for MIPS. r206404: (changes to sys/arm/include/bus.h) Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the other platforms - for arm and mips. r206819: (changes to sys/vm/) Add VMFS_TLB_ALIGNED_SPACE option and kmem_alloc_nofault_space(), which is used to allocate kernel stack address on MIPS. r208165, r211087: (sys/kern/subr_smp.c, sys/kern/sched_ule.c) Enable ULE scheduler for MIPS, Fix for an issue in SMP when 32 cpus are enabled. r208659: (sys/{ia64/ia64,mips/mips,sun4v/sun4v}/pmap.c) Simplify the inner loop of get_pv_entry() r208794: (changes to sys/vm/) Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig() fails to allocate MIPS page table pages. r210327: (changes to sys/vm/) Support for MIPS page table page allocation. Add a new function 'vm_page_t vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to allocate a page from a specified freelist, and other related changes. Reviewed by: alc(vm changes only) Approved by: kib(re), alc(vm), imp(mips), jmallett(mips), gnn(mips pmc) Notes: svn path=/stable/8/; revision=215938
* MFC r215236:Xin LI2010-11-272-124/+130
| | | | | | | | | Sync with OpenBSD, primarily better signal and terminal handling. Obtained from: OpenBSD Notes: svn path=/stable/8/; revision=215934
* MFC r209873:Konstantin Belousov2010-11-031-4/+20
| | | | | | | Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO. Notes: svn path=/stable/8/; revision=214758
* MFC r208513:Konstantin Belousov2010-11-031-3/+58
| | | | | | | | Improve the documentation for PT_LWPINFO. Note that some features are not implemented on MIPS and ARM. Notes: svn path=/stable/8/; revision=214757
* MFC r212906:Edward Tomasz Napierala2010-11-011-6/+26
| | | | | | | | | | First step at adopting FreeBSD to support PSARC/2010/029. This makes 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. Notes: svn path=/stable/8/; revision=214626
* MFC r212376:Edward Tomasz Napierala2010-11-011-0/+9
| | | | | | | | | | | | Add minor optimization. It's less strict than its kernel counterpart due to upcoming ACL changes required by the new ZFS. MFC r212379: Fix previous commit. Notes: svn path=/stable/8/; revision=214624
* MFC r213453: When no protocol entry is found, getproto*_r(3)Hajimu UMEMOTO2010-10-303-3/+3
| | | | | | | should return zero. Notes: svn path=/stable/8/; revision=214548
* MFC r213403: Clear errno for each method dispatch.Hajimu UMEMOTO2010-10-301-0/+2
| | | | Notes: svn path=/stable/8/; revision=214547
* MFC: 209760Randall Stewart2010-10-261-0/+5
| | | | | | | | | If a user calls sctp_sendx() with a NULL sinfo we will crash. Instead we should provide our own temp structure to use internally. Notes: svn path=/stable/8/; revision=214391
* MFC r214147:Benedict Reuschling2010-10-261-2/+1
| | | | | | | | | | | Sync with OpenBSD rev. 1.13: strtonum does not require limits.h Obtained from: OpenBSD Discussed with: ru@ Notes: svn path=/stable/8/; revision=214379
* MFC r213326: libc: Remove the i386 assembler version of strlen(3).Jilles Tjoelker2010-10-192-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. Notes: svn path=/stable/8/; revision=214086
* MFC of r207830Edwin Groothuis2010-10-191-0/+8
| | | | | | | | | | | | | | | | | strptime(3) confused July with June with the fr_FR locale. When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain <denis@tikuts.com> Notes: svn path=/stable/8/; revision=214079
* MFC r213476:Konstantin Belousov2010-10-132-1/+11
| | | | | | | | | | | Add cross-references to lrand48(3) and arc4random(3) from rand(3) and random(3). MFC r213477: Missed space. Notes: svn path=/stable/8/; revision=213773
* MFC 205021:John Baldwin2010-10-1212-39/+22
| | | | | | | | | | | | - Use an initializer macro to initialize fields in 'fake' FILE objects used by *sprintf(), etc. - Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE objects. This is currently a nop on FreeBSD, but is import for other platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply zero. Notes: svn path=/stable/8/; revision=213720
* MFC r203958: %U was macroized in mdoc(7), escape.Ruslan Ermilov2010-10-062-2/+2
| | | | Notes: svn path=/stable/8/; revision=213473
* Revert r213002.Rui Paulo2010-09-264-33/+13
| | | | Notes: svn path=/stable/8/; revision=213184
* MFC r197804 (rwatson):Rui Paulo2010-09-224-13/+33
| | | | | | | | | | | | | Add basename_r(3) to complement basename(3). basename_r(3) which accepts a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer. Note about semantics: while this interface is not POSIXy, there's another major platform that uses it (Android) and the semantics between the two platforms are pretty much the same. Notes: svn path=/stable/8/; revision=213002
* MFC 212269.Glen Barber2010-09-131-1/+3
| | | | | | | | | Add ECONNRESET to connect(2). Approved by: keramida (mentor) Notes: svn path=/stable/8/; revision=212564
* MFC r211748:Konstantin Belousov2010-09-073-4/+22
| | | | | | | | | Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into the separate .o for libc_pic.a. This prevents rtld from making the symbol global. Notes: svn path=/stable/8/; revision=212290
* MFC r211966:Konstantin Belousov2010-09-011-1/+1
| | | | | | | Use NULL instead of 0 for pointer in example. Notes: svn path=/stable/8/; revision=212082
* MFC r211340: Correct the return code from _dns_gethostby*()Hajimu UMEMOTO2010-08-291-4/+20
| | | | | | | to correspond with h_errno. Notes: svn path=/stable/8/; revision=211956
* MFC r211276:Hajimu UMEMOTO2010-08-2811-49/+109
| | | | | | | | | | | | | - When there is no room for returning the result, nss backend 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 Notes: svn path=/stable/8/; revision=211938
* MFC r206622,207939,208593,208732,209031: mdoc cleanupUlrich Spörlein2010-08-2712-12/+12
| | | | | | | | | | - order prologue by Dd/Dt/Os - fix prologue - remove empty lines and other garbage - uppercase document title Notes: svn path=/stable/8/; revision=211872
* MFC r206615: remove .Pp where not neededUlrich Spörlein2010-08-275-12/+0
| | | | Notes: svn path=/stable/8/; revision=211866
* MFC r211750:Konstantin Belousov2010-08-271-1/+0
| | | | | | | Remove extra FreeBSD tag. Notes: svn path=/stable/8/; revision=211863
* MFC r211704:Konstantin Belousov2010-08-262-3/+3
| | | | | | | Style. Notes: svn path=/stable/8/; revision=211840
* MFC r209709:Rebecca Cran2010-08-071-1/+1
| | | | | | | | | | Increment 'sa' at the end of the loop; otherwise, only the first address ever gets checked. Approved by: rrs (mentor) Notes: svn path=/stable/8/; revision=211018
* MFC r209684:Rebecca Cran2010-08-073-29/+29
| | | | | | | | | Use ISO C99 integer types instead of the BSD-specific u_int*_t. Approved by: rrs (mentor) Notes: svn path=/stable/8/; revision=211017
* MFC r209058:Rebecca Cran2010-08-061-1/+1
| | | | | | | | | sctp_recvmsg returns the number of bytes received, not sent. Approved by: rrs (mentor) Notes: svn path=/stable/8/; revision=210948
* MFC r210641: Fix a couple of typos.Ulrich Spörlein2010-08-061-1/+1
| | | | | | | | PR: docs/148891 Submitted by: olgeni Notes: svn path=/stable/8/; revision=210919
* MFC r209736:Edward Tomasz Napierala2010-08-053-40/+10
| | | | | | | | Fix acl_from_text(3) - and, therefore, setfacl(1) - for user and group names names starting with a digit. Notes: svn path=/stable/8/; revision=210867
* MFC r204636:Jaakko Heinonen2010-08-021-1/+8
| | | | | | | | | | | In reallocf(3), free the memory only when size != 0. Otherwise, when the System V compatibility option (malloc "V" flag) is in effect a zero sized reallocf() could cause a double free. PR: bin/141753 Notes: svn path=/stable/8/; revision=210745
* MFC r210468:Benedict Reuschling2010-07-302-4/+4
| | | | | | | | | | Apply a small grammar fix to {toupper,tolower}(3). PR: docs/140458 Submitted by: Jeremy Huddleston (Jeremyhu at apple dot com) Notes: svn path=/stable/8/; revision=210660
* MFC r210370:Konstantin Belousov2010-07-291-22/+14
| | | | | | | | Verify return value of the sigset manipulation functions to catch invalid signal numbers. Notes: svn path=/stable/8/; revision=210598
* MFC r209932:Konstantin Belousov2010-07-191-2/+10
| | | | | | | | | For xsi_sigpause(3), remove the supplied signal from the process mask during sigpause(2) call. It was backward. Check that the signal number is valid. Notes: svn path=/stable/8/; revision=210234
* MFC: r207946Christian Brueffer2010-07-041-3/+2
| | | | | | | | The previous revision actually removed the bug being hinted at, so go ahead and remove the hint. Notes: svn path=/stable/8/; revision=209698
* MFC: r207923Christian Brueffer2010-07-031-1/+25
| | | | | | | Document FIONREAD, FIONWRITE and FIONSPACE. Notes: svn path=/stable/8/; revision=209661
* MFC r209360: add C message catalogue entries for newer errnos.Maxim Konovalov2010-07-021-0/+10
| | | | Notes: svn path=/stable/8/; revision=209643
* MFH r200600: Clarify what's meant by NUL for getline.3Ulrich Spörlein2010-06-191-1/+2
| | | | | | | | PR: docs/141125 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Notes: svn path=/stable/8/; revision=209349
* MFC r208811:Edward Tomasz Napierala2010-06-111-5/+5
| | | | | | | | | | | Don't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t). Found with: Coverity Prevent CID: 7466, 7467 Approved by: re (kib) Notes: svn path=/stable/8/; revision=209047
* Fix usage of uninitialized variable.Edward Tomasz Napierala2010-06-111-1/+1
| | | | | | | | | Found with: Coverity Prevent CID: 7517 Approved by: re (kib) Notes: svn path=/stable/8/; revision=209046
* MFC r208437:Edward Tomasz Napierala2010-06-022-24/+18
| | | | | | | | | | Make acl_get_perm_np(3) work with NFSv4 ACLs. Reviewed by: kientzle@ Approved by: re (kib) Notes: svn path=/stable/8/; revision=208756
* MFC r208493:Ulrich Spörlein2010-05-301-1/+1
| | | | | | | | | These features will first appear in 8.1, soon to be released Approved by: re (kib) Notes: svn path=/stable/8/; revision=208652
* Change the current working directory to be inside the jail created byColin Percival2010-05-271-1/+8
| | | | | | | | | | | | | | | | | the jail(8) command. [10:04] Fix a one-NUL-byte buffer overflow in libopie. [10:05] Correctly sanity-check a buffer length in nfs mount. [10:06] Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:04.jail Security: FreeBSD-SA-10:05.opie Security: FreeBSD-SA-10:06.nfsclient Notes: svn path=/stable/8/; revision=208586
* MFC r208034:Edward Tomasz Napierala2010-05-201-0/+3
| | | | | | | | Make branding less intrusive - in acl_set(3), in case ACL brand is ACL_BRAND_UNKNOWN, do what the programmer says instead of failing. Notes: svn path=/stable/8/; revision=208359
* MFC r208033:Edward Tomasz Napierala2010-05-201-20/+32
| | | | | | | | | Make it possible to actually use NFSv4 permission bits with acl_set_perm(3) and acl_delete_perm(3). It went undetected, because neither setfacl(1) nor Samba use this routines. D'oh. Notes: svn path=/stable/8/; revision=208358
* MFC r207981:Gordon Tetlow2010-05-191-2/+2
| | | | | | | | | | | | | Fix a bug due to a type conversion from 64 to 32 bits. The side effect of this type conversion is the high bits which were used to indicate if a special character was a literal or special were dropped. As a result, all special character were treated as special, even if they were supposed to be literals. Approved by: mentor (wes@) Notes: svn path=/stable/8/; revision=208318
* MFC r205099-205100,205108:Xin LI2010-05-131-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two optimizations to MI strlen(3) inspired by David S. Miller's blog posting [1]. - Use word-sized test for unaligned pointer before working the hard way. Memory page boundary is always integral multiple of a word alignment boundary. Therefore, if we can access memory referenced by pointer p, then (p & ~word mask) must be also accessible. - Better utilization of multi-issue processor's ability of concurrency. The previous implementation utilized a formular that must be executed sequentially. However, the ~, & and - operations can actually be caculated at the same time when the operand were different and unrelated. The original Hacker's Delight formular also offered consistent performance regardless whether the input would contain characters with their highest-bit set, as it catches real nul characters only. These two optimizations has shown further improvements over the previous implementation on microbenchmarks on i386 and amd64 CPU including Pentium 4, Core Duo 2 and i7. [1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1 Notes: svn path=/stable/8/; revision=208051
* MFC r207734: sigaltstack(2): document some modernizations:Jilles Tjoelker2010-05-131-17/+15
| | | | | | | | | | * un-document 'struct sigaltstack' tag for stack_t as this is BSD-specific; this doesn't seem useful enough to document as such * alternate stacks are per thread, not per process * update error codes to what the kernel does and POSIX requires Notes: svn path=/stable/8/; revision=208032
* MFC r207604:Konstantin Belousov2010-05-111-3/+9
| | | | | | | Document RUSAGE_THREAD. Notes: svn path=/stable/8/; revision=207919