summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Globally replace u_int*_t from (non-contributed) man pages.ed2012-02-128-22/+22
| | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month
* Replace utxrm(8) by utx(8).ed2012-02-111-1/+1
| | | | | | | | | | At first, I added a utility called utxrm(8) to remove stale entries from the user accounting database. It seems there are cases in which we need to perform different operations on the database as well. Simply rename utxrm(8) to utx(8) and place the old code under the "rm" command. In addition to "rm", this tool supports "boot" and "shutdown", which are going to be used by an rc-script which I am going to commit separately.
* Set read buffer size to multiple of sizeof(struct futx).ed2012-02-111-7/+12
| | | | | | | | | If the utmpx database gets updated while an application is reading it, there is a chance the reading application processes partially overwritten entries. To solve this, make sure we always read a multiple of sizeof(struct futx) at a time. MFC after: 2 weeks
* Switch getifaddrs(3) to the new API introduced in r231505. Also removebz2012-02-111-122/+47
| | | | | | | | | | | | | conditional code parts not used by or applicable to FreeBSD. The new implementation is supposed to be able to cope with changes to the 'l' versions of the msghdr structs now used as well as to if_data allowing future changes without breaking things. This restores carp(4) config support in HEAD after r231504. Reviewed by: glebius, brooks MFC After: 3 months
* Introduce a new NET_RT_IFLISTL API to query the address list. It worksbz2012-02-111-1/+15
| | | | | | | | | | | on extended and extensible structs if_msghdrl and ifa_msghdrl. This will allow us to extend both the msghdrl structs and eventually if_data in the future without breaking the ABI. Bump __FreeBSD_version to allow ports to more easily detect the new API. Reviewed by: glebius, brooks MFC after: 3 days
* Backout changes from r228571. Remove if_data from struct ifa_msghdr again.bz2012-02-111-1/+1
| | | | | | | While this breaks carp on HEAD temporary, it restores the upgrade path from stable, and head before 20111215. Reviewed by: glebius, brooks
* More accurately document what happens on error.eadler2012-02-091-3/+6
| | | | | | | PR: docs/127908 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net> Approved by: cperciva MFC after: 1 week
* Acknowledge that jail_attach and jail_remove can return EPERM.jamie2012-02-081-1/+3
| | | | MFC after: 1 week
* eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r andbrooks2012-02-081-7/+0
| | | | | | | | ether_nota_r and do not use static variables so remove the note copied from ethers.3 saying they do. Reported by: bms MFC after: 3 days
* Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessordim2012-02-072-2/+2
| | | | | | set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. MFC after: 1 week
* Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE whichandreast2012-02-054-34/+34
| | | | | | | | | has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful name. Tested on 32- and 64-bit PowerMac. Reviewed by: bde
* Make the sys/ucontext.h self-contained by changing the return typekib2012-02-018-8/+8
| | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month
* Move descriptions of file caching commands out of the file locking section.tijl2012-01-281-17/+17
| | | | Approved by: kib (mentor)
* Remove a left-over reference to make.conf(5) which was used as a place topluknet2012-01-271-2/+1
| | | | | | | store the VM_STACK compile option to enable MAP_STACK support in its earliest stage of development. Found by: mux
* Clarify the implementation-defined behaviour in case of close(2)kib2012-01-221-1/+5
| | | | | | returning error. MFC after: 1 week
* The sys/uio.h header is needed only for readv(2), preadv(2), writev(2) andpjd2012-01-222-4/+4
| | | | | | | pwritev(2). Document it more precisely. Reviewed by: jilles MFC after: 3 days
* Add API for obtaining extended machine context states that cannot bekib2012-01-2119-10/+693
| | | | | | | | | | | fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). Tested by: pho MFC after: 1 month
* This commit adds profiling support for powerpc64. Now we can do applicationandreast2012-01-201-1/+1
| | | | | | | | | | | | | profiling and kernel profiling. To enable kernel profiling one has to build kgmon(8). I will enable the build once I managed to build and test powerpc (32-bit) kernels with profiling support. - add a powerpc64 PROF_PROLOGUE for _mcount. - add macros to avoid adding the PROF_PROLOGUE in certain assembly entries. - apply these macros where needed. - add size information to the MCOUNT function. MFC after: 3 weeks, together with r230291
* Conditionalize the __floatunsisf and __floatunsidf functions, added indas2012-01-201-0/+4
| | | | | | NetBSD's rev 1.6 of this file, on !defined(SOFTFLOAT_FOR_GCC). These functions are provided by libgcc, so we don't need them. This should unbreak mips.
* Don't inline fenv.h functions on arm for now. Inlining makes sense:das2012-01-201-0/+2
| | | | | | | | the function bodies require only 2 to 10 instructions. However, it leads to application binaries that refer to a private ABI, namely, the softfloat innards in libc. This could complicate future changes in the implementation of the floating-point emulation layer, so it seems best to have programs refer to the official fe* entry points in libm.
* Merge in the latest SoftFloat changes from NetBSD. (NetBSD isn't thedas2012-01-2019-16/+555
| | | | | | | original vendor, but we're using their heavily modified version.) This brings in functions for long double emulation (both extended and quad formats), which may be useful for testing, and also for replacing libc/sparc64/fpu/.
* Insert read memory barriers.davidxu2012-01-162-1/+2
|
* Computations on NaNs are supposed to return one of the input NaNs unchanged.das2012-01-162-4/+3
| | | | | | | Fix a few places in the sparc64 floating-point emulator where this wasn't being handled properly. Submitted by: bde
* Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support fordas2012-01-162-1/+64
| | | | | | | | dynamic rounding modes, but FPUless chips that use softfloat can support it because everything is emulated anyway. (We presently have incomplete support for hardware FPUs.) Submitted by: Ian Lepore
* Remove functions from softfloat's Symbol.map that don't need to be exported.das2012-01-162-20/+14
| | | | | | Also use the proper number of underscores for internal names. (Changing the names should be fine, since apparently the symbols are currently unused.)
* Convert softfloat to use the standard exception flag and rounding macrosdas2012-01-165-34/+34
| | | | | | in fenv.h instead of the non-standard and incomplete ones in ieeefp.h. Thanks to Ian Lepore for testing this patch.
* Correct some bugs that resulted from arm/_fpmath.h being blindly copieddas2012-01-161-1/+2
| | | | | | | from the x86 version, which has a completely different long double format. Submitted by: Maks Verver
* Make man page wording more clear:eadler2012-01-151-1/+1
| | | | | | | PR: docs/164078 Submitted by: Taras <ds@ukrhub.net> Approved by: bcr MFC after: 3 days
* Remove wtmpcvt(1).ed2012-01-131-1/+0
| | | | | | | | The wtmpcvt(1) utility converts wtmp files to the new format used by utmpx(3). Now that HEAD has been branched to stable/9 and 9.0 is released, there is no need for it in HEAD. MFC after: never
* Revert unintentional commit of changes to getnetgrent.c.ghelmer2012-01-101-28/+13
|
* Add pidfile_fileno() to obtain the file descriptor for an openghelmer2012-01-101-13/+28
| | | | pidfile.
* Add aligned_alloc(3).ed2012-01-094-9/+55
| | | | | | | | | The C11 folks reinvented the wheel by introducing an aligned version of malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead of returning the allocation by reference, it returns the address, just like malloc(3). Reviewed by: jasone@
* Properly sort functions by name.ed2012-01-081-3/+3
|
* Two other places where we can use WEAK_ALIAS.andreast2012-01-082-6/+2
|
* Implement fdlopen(3), an rtld interface to load shared object by filekib2012-01-074-3/+47
| | | | | | | | descriptor. Requested and tested by: des (previous version) Reviewed by: des, kan (previous version) MFC after: 2 weeks
* Handle the internal scope address representation of the KAME IPv6ume2012-01-071-1/+2
| | | | | | | stack for the node-local multicast address. Spotted by: Rainer Bredehorn <Bredehorn__at__gmx.de> MFC after: 1 week
* Use the macro WEAK_ALIAS. Tested on 32 and 64-bit.andreast2012-01-062-20/+10
|
* Change index() and rindex() to a weak alias.ed2012-01-056-6/+6
| | | | | | | | This allows people to still write statically linked applications that call strchr() or strrchr() and have a local variable or function called index. Discussed with: bde@
* Document the fact that chroot(2) is no longer part of POSIX since SUSv3delphij2012-01-041-1/+19
| | | | and add a SECURITY CONSIDERATIONS section for recommended practices.
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-035-7/+7
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Merge index() and strchr() together.ed2012-01-0315-279/+128
| | | | | | | | | | | | | | | | | As I looked through the C library, I noticed the FreeBSD MIPS port has a hand-written version of index(). This is nice, if it weren't for the fact that most applications call strchr() instead. Also, on the other architectures index() and strchr() are identical, meaning we have two identical pieces of code in the C library and statically linked applications. Solve this by naming the actual file strchr.[cS] and let it use __strong_reference()/STRONG_ALIAS() to provide the index() routine. Do the same for rindex()/strrchr(). This seems to make the C libraries and static binaries slightly smaller, but this reduction in size seems negligible.
* Add some additional const poison after r228972. The 'mapping' array indim2011-12-301-1/+2
| | | | | | | | | | | | lib/libc/gen/strtofflags.c became const, but gcc did not warn about assigning its members to non-const pointers. Clang warned about this with: lib/libc/gen/strtofflags.c:98:12: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types] for (sp = mapping[i].invert ? mapping[i].name : ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed by: jilles
* libc: Eliminate some relative relocations in file flags table.jilles2011-12-291-23/+23
|
* Fix manual section for acl_get(3) and mac_get(3) family functions.pluknet2011-12-291-14/+14
| | | | | Reviewed by: rwatson MFC after: 1 week
* libc: Eliminate some relative relocations in getusershell().jilles2011-12-271-8/+7
|
* libc: Eliminate some relative relocations in setlocale().jilles2011-12-271-1/+1
|
* Update rtprio(2) manual page to reflect the latest changes in -CURRENT asdelphij2011-12-272-17/+82
| | | | | | | well as provide documentation for rtprio_thread(2) system call. MFC after: 1 month X-MFC-after: r228470
* Add missing opening and closing brackets in getopt_long.3 and getsubopt.3gjb2011-12-262-3/+6
| | | | | | | to make the examples reflect reality more closely. MFC after: 1 week X-MFC-After: 9.0-RELEASE
* Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]cperciva2011-12-236-3/+81
| | | | | | | | | | | | | | | | | | | | Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam
* Handle malloc failures in yplib.c.ghelmer2011-12-231-0/+46
| | | | PR: bin/83349
OpenPOWER on IntegriCloud