summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Handle failures to malloc memory to hold key or val copies.ghelmer2011-12-231-0/+11
| | | | PR: bin/83348
* - Fix style(9) bugs in glob.ceadler2011-12-201-35/+35
| | | | Approved by: jilles
* - Add restrict keyword to glob(3)eadler2011-12-202-3/+4
| | | | | | | PR: kern/161958 Submitted by: Henning Petersen <henning.petersen@t-online.de> Approved by: jilles MFC after: 3 days
* Address warnings found by clang.tuexen2011-12-171-36/+28
| | | | MFC after: 3 months.
* A major overhaul of the CARP implementation. The ip_carp.c was startedglebius2011-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from scratch, copying needed functionality from the old implemenation on demand, with a thorough review of all code. The main change is that interface layer has been removed from the CARP. Now redundant addresses are configured exactly on the interfaces, they run on. The CARP configuration itself is, as before, configured and read via SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or SIOCAIFADDR_IN6 may now be configured to a particular virtual host id, which makes the prefix redundant. ifconfig(8) semantics has been changed too: now one doesn't need to clone carpXX interface, he/she should directly configure a vhid on a Ethernet interface. To supply vhid data from the kernel to an application the getifaddrs(8) function had been changed to pass ifam_data with each address. [1] The new implementation definitely closes all PRs related to carp(4) being an interface, and may close several others. It also allows to run a single redundant IP per interface. Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for idea on using ifam_data and for several rounds of reviewing! PR: kern/117000, kern/126945, kern/126714, kern/120130, kern/117448 Reviewed by: bz Submitted by: bz [1]
* Since clang does not support the tls_model attribute used in malloc.cdim2011-12-151-2/+10
| | | | | | | yet (see LLVM PR 9788), and warns about it, rub it out for now. When clang grows support for this attribute, I will revert this again. MFC after: 1 week
* In lib/libc/rpc/crypt_client.c, fix a clang warning about an implicitdim2011-12-151-2/+2
| | | | | | | | | conversion between enum desdir/desmode from include/rpc/des.h, and enum desdir/desmode from include/rpcsvc/crypt.x. These are actually different enums, with different value names, but by accident the integer representation of the enum values happened to be the same. MFC after: 1 week
* Remove meaningless self-assignment in res_send.c, otherwise clang willdim2011-12-151-2/+0
| | | | | | | | warn about it. I guess this was originally done to silence a bogus warning by an older version of gcc, but I could not reproduce it with any version of gcc that I have access to. MFC after: 1 week
* Fix a bug where sctp_sendmdg() uses uninitialized memory.tuexen2011-12-151-0/+1
| | | | MFC after: 3 days.
* Small style(9) improvements.theraven2011-12-151-2/+4
| | | | Approved by: dim (mentor)
* Clean up includes; the prototype for getosreldate() has moved toru2011-12-141-4/+3
| | | | <unistd.h> in r183390.
OpenPOWER on IntegriCloud