summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Remove clause 3 and 4 from the licensebapt2015-05-211-2/+0
| | | | Obtained from: NetBSD
* Remove the write-only variable phent. We currently do not check thekib2015-05-201-5/+0
| | | | | | | | size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Drop some unnecessary casts.pfg2015-05-181-4/+3
| | | | | Reported by: Clang static analyzer Obtained from: NetBSD
* Add fabs() to arm64 libcemaste2015-05-143-1/+36
| | | | | Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2532
* Teach bits of libc about Thumb. This adds the if-then instructions neededandrew2015-05-125-4/+48
| | | | | | | | | to handle the ARM conditional execution. While here fix a bug found by this in the hard-float code, cc is the opposite of cs. The former is used for 'less than' in floating-point code and is executed when the C (carry) bit is clear, the latter is used when greater than, equal, or unordered, and is executed when the C bit is set.
* Use the GOT_* macros to help simplify the code, these work with both picandrew2015-05-112-26/+9
| | | | and non-pic code, and to build for Thumb.
* recv(),send(): Directly call interposing entry instead of going through PLT.jilles2015-05-102-2/+10
| | | | | | recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function.
* Tweak the comment here some more. In particular, the previous openingjhb2015-05-061-7/+7
| | | | | | sentence was a bit confusing. Noted by: kib
* Remove the note about seekdir() removing telldir() cookies. That wasjhb2015-05-061-7/+1
| | | | | | removed back in r269204. MFC after: 3 days
* A few style fixes and expand the comment a bit on what _fixtelldir() isjhb2015-05-061-6/+10
| | | | doing.
* Tweak seekdir, telldir and readdir so that when htere are deletes going on,julian2015-05-055-1/+65
| | | | | | | | | | | as seek to teh last location saved will still work. This is needed for Samba to be able to correctly handle delete requests from windows. This does not completely fix seekdir when deletes are present but fixes the worst of the problems. The real solution must involve some changes to the API for eh VFS and getdirentries(2). Obtained from: Panzura inc MFC after: 1 week
* Fix major copy/paste and other style errors.pluknet2015-05-051-5/+10
|
* Various updates to the ftruncate(2) documentation:jhb2015-05-041-7/+19
| | | | | | | | | | | | | | | | | - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 (2) Submitted by: andrew@ugh.net.au (2) MFC after: 1 week
* Partially revert r255486, the first argument to socketpair() is a socketjhb2015-05-041-4/+4
| | | | | | | | | domain, not a file descriptor. Use 'domain' instead of the original 'd' for this argument to match socket(2). PR: 199491 Reported by: sp55aa@qq.com MFC after: 1 week
* fork(2): Add a note to the effect that kqueue descriptors, unlike othermarkj2015-05-021-2/+5
| | | | | | | descriptor types, are not inherited from the parent process. Reported by: kmacy MFC after: 1 week
* Apply the copyright the the same owners as the original malloc(3) where most ofbapt2015-05-011-2/+3
| | | | | | | | the text here comes from Reported by: many Discussed with: miod@OpenBSD.org Pointyhat to: bapt
* Import reallocarray(3) from OpenBSDbapt2015-05-014-2/+182
| | | | | | | | | Add a manpage for it, assign the copyright to the OpenBSD project on it since it is mostly copy/paste from OpenBSD manpage. style(9) fixes Differential Revision: https://reviews.freebsd.org/D2420 Reviewed by: kib
* Disable the tests that use makecontext on arm64, it still needs to beandrew2015-04-271-0/+2
| | | | written.
* Build/install libc, librt, libthr, and msun NetBSD test suites on allngie2015-04-273-13/+3
| | | | | | architectures MFC after: 1 week
* mdoc: remove end of line whitespacebapt2015-04-261-1/+1
|
* mdoc: rendering fixesbapt2015-04-262-4/+8
|
* Use mdoc(7) macros to handle parenthesisbapt2015-04-261-1/+1
|
* mdoc: fix functions declarationsbapt2015-04-261-1/+1
|
* Escape "Ed"bapt2015-04-2611-11/+11
|
* Escape "Ed"bapt2015-04-261-1/+1
|
* Assuming a system has /bin/csh on it is a bad idea (especially it beingngie2015-04-251-0/+1
| | | | | | optional on FreeBSD). Look for /bin/cat instead MFC after: 3 days
* __xlocale_C_ctype should not be const. It contains a reference count that ↵theraven2015-04-241-1/+1
| | | | | | is modified by newlocale / duplocale / freelocale. MFC after: 1 week
* Small changes to locale-related man pages.theraven2015-04-245-5/+5
| | | | Fix a missing .h and change the recommended include for the POSIX2008 functions from xlocale.h to locale.h. Including xlocale.h is for legacy / Darwin compatibility so should not be encouraged.
* Reassign copyright statements on several files from Advancedjhb2015-04-237-7/+7
| | | | | | | Computing Technologies LLC to Hudson River Trading LLC. Approved by: Hudson River Trading LLC (who owns ACT LLC) MFC after: 1 week
* A complete user message is signalled with the MSG_EOR flag, not the MSG_EOFtuexen2015-04-231-3/+3
| | | | | | | flag. Thanks to Valentin Nechayev for reporting the issue. MFC after: 1 week
* computematchjumps(): fix allocator sizeof operand mismatch.pfg2015-04-221-2/+2
| | | | | | Mostly cosmetical warning. Found by: Clang static analyzer
* Support file verification in MAC.rodrigc2015-04-221-0/+4
| | | | | | | | | | | | | | * Add VCREAT flag to indicate when a new file is being created * Add VVERIFY to indicate verification is required * Both VCREAT and VVERIFY are only passed on the MAC method vnode_check_open and are removed from the accmode after * Add O_VERIFY flag to rtld open of objects * Add 'v' flag to __sflags to set O_VERIFY flag. Submitted by: Steve Kiernan <stevek@juniper.net> Obtained from: Juniper Networks, Inc. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/27 Relnotes: yes
* Fix improbable memory leak in _citrus_prop_read_str().pfg2015-04-201-1/+3
| | | | Found by: Clang Static Analyzer
* Remove code to support the top of the stack layout for FreeBSD 1.x/2.xkib2015-04-201-37/+36
| | | | | | | | | kernel, but keep explanation of the old ps_strings structure to make it clear what sanity check tries to accomplish. Noted by: Oliver Pinter <oliver.pinter@hardenedbsd.org> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), andkib2015-04-1819-443/+9
| | | | | | | | | | | | | | | | | | | | | | | | pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fcntl(2) contains compatibility code to handle kernels before the struct flock was changed during the 8.x CURRENT development. The shims were reasonable to allow easier revert to the older kernel at that time. Now, two or three major releases later, shims do not serve any purpose. Such old kernels cannot handle current libc, so revert the compatibility code. Make padded syscalls support conditional under the COMPAT6 config option. For COMPAT32, the syscalls were under COMPAT6 already. Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to (partially) disable the removed shims. Reviewed by: jhb, imp (previous versions) Discussed with: peter Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Make wait6(2), waitid(3) and ppoll(2) cancellation points. Thekib2015-04-186-1/+119
| | | | | | | | | waitid() function is required to be cancellable by the standard. The wait6() and ppoll() follow the other syscalls in their groups. Reviewed by: jhb, jilles (previous versions) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Remove the const qualifier from iconv(3) to comply with POSIX:tijl2015-04-1514-25/+23
| | | | | | | | | | http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html Adjust all code that calls iconv. PR: 199099 Exp-run by: antoine MFC after: 2 weeks
* Remove obsolete bits about maximum number of file systems.pluknet2015-04-121-6/+1
| | | | | | NMOUNT has gone together with static mount table in 4.3BSD-Reno. MFC after: 1 week
* Fix powerpc setjmp FPR saving/restoring.jhibbits2015-04-083-108/+108
| | | | X-MFC-With: r279784
* Add the start of libc and libstand for arm64. Not all of the machineandrew2015-04-0724-4/+1019
| | | | | | | | dependent functions have been implemented, but this is enough for world. Differential Revision: https://reviews.freebsd.org/D2132 Reviewed by: emaste Sponsored by: The FreeBSD Foundation
* vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via thejhb2015-04-061-2/+2
| | | | | | | copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 MFC after: 1 week
* Stop including if_var.h from userland.glebius2015-04-062-2/+0
| | | | Sponsored by: Nginx, Inc.
* Make strlcpy/strlcat slightly easier to read.pfg2015-04-062-43/+42
| | | | | | Bring small upstream updates. Obtained from: OpenBSD
* fts: Don't return FTS_SLNONE if it's not a symlink (if race).jilles2015-04-041-5/+6
| | | | | | | | | | | | | | | | When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0) failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This incorrectly triggered if a filename existed to be read from the directory, was deleted before the fstatat(flag=0) and created again after the fstatat(flag=0). Fix this by only returning FTS_SLNONE if the result from fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a symlink, treat it as if fstatat(flag=0) succeeded. PR: 196724 Reported and tested by: pho MFC after: 1 week
* libc: Eliminate duplicate copies of __vdso_gettc.cemaste2015-04-0210-197/+5
| | | | | Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2152
* Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INITtrasz2015-04-021-3/+3
| | | | | | | are ignored. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.kib2015-04-012-3/+9
| | | | | | | | | Both .weak and .alias assembler directives only work when assembling the file which defines the symbol. Reported and tested by: andrew Sponsored by: The FreeBSD Foundation MFC after: 1 week
* wordexp: Explicitly pass along IFS.jilles2015-03-311-1/+4
| | | | | | | | | | | Per Austin group issue #884, sh should not import IFS from the environment but always set it to $' \t\n'. For wordexp(), however, it is documented and useful for it to use IFS from the environment. Since sh currently imports IFS from the environment, this change has no functional effect. MFC after: 1 week
* Make kevent(2) a cancellation point.kib2015-03-295-2/+82
| | | | | | | | | | | | | | | | | | | | | Note that to cancel blocked kevent(2) call, changelist must be empty, since we cannot cancel a call which already made changes to the process state. And in reverse, call which only makes changes to the kqueue state, without waiting for an event, is not cancellable. This makes a natural usage model to migrate kqueue loop to support cancellation, where existing single kevent(2) call must be split into two: first uncancellable update of kqueue, then cancellable wait for events. Note that this is ABI-incompatible change, but it is believed that there is no cancel-safe code that relies on kevent(2) not being a cancellation point. Option to preserve the ABI would be to keep kevent(2) as is, but add new call with flags to specify cancellation behaviour, which only value seems to add complications. Suggested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Add an SCTP symbol which was missed intuexen2015-03-281-0/+1
| | | | | | | | | https://svnweb.freebsd.org/base?view=revision&revision=169622 This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783 Thanks to Jukka Ukkonen for reporting the bug and providing a fix. MFC after: 3 days
OpenPOWER on IntegriCloud