summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Pull up vendor changes to mdoc(7)uqs2012-01-051-2/+2
| | | | | | | | This switches us to using -isoC-2011 as the symbol name which is used by groff and mdocml. It follows the change to 4 digit years as done with IEEE Std 1003 post-1999. MFC after: 2 weeks (groff changes only)
* Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwdbapt2012-01-052-1/+16
| | | | | | while here, fix missing parentheses of the return statement of pw_make. Approved by: des (mentor)
* 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@
* Quiet down clang -Werror.pfg2012-01-041-2/+2
| | | | | Reported by: Pawel Worach Approved by: jhb (mentor)
* Update PMC events from October 2011 Intel documentation.fabient2012-01-041-11/+6
| | | | | Submitted by: Davide Italiano <davide.italiano@gmail.com> MFC after: 3 days
* 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.
* Integrate the line drawing algorithm from the book "Graphic Gems 1".pfg2012-01-031-22/+191
| | | | | | | | | | | http://www.graphicsgems.org/ At the time it claimed to be 3-4 times faster than the traditional algorithm. PR: 18769 Approved by: jhb (mentor) MFC after: 2 weeks
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-038-12/+12
| | | | | | | | | | 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-0316-287/+135
| | | | | | | | | | | | | | | | | 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.
* In several llvm library Makefiles, remove extraneous slashes at the enddim2012-01-014-4/+4
| | | | | | of SRCDIR definitions. MFC after: 3 days
* Instead of forcing -O1 on PowerPC for LLVM and clang, fix the actualnwhitehorn2012-01-011-4/+2
| | | | | | | | problem by adding -fno-strict-aliasing to CFLAGS. Since this is a global issue that just happened to manifest on PowerPC, add this to CFLAGS unconditionally. MFC after: 1 week
* Upgrade libcompiler_rt to upstream revision 147390.ed2011-12-311-0/+4
|\ | | | | | | | | | | | | | | | | This version of libcompiler_rt adds support for __mulo[sdt]i4(), which computes a multiply and its overflow flag. There are also a lot of cleanup fixes to headers that don't really affect us. Updating to this revision should make it a bit easier to contribute changes back to the LLVM developers.
| * Import compiler-rt r147390.ed2011-12-31230-608/+13134
| |
* | 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
* | Fix typo in Makefile comment.rwatson2011-12-301-1/+1
| | | | | | | | MFC after: 3 days
* | 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
| |
* | Add locally implemented atomic intrinsics to libcompiler_rt.ed2011-12-2717-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The built-in atomic operations are not implemented in our version of GCC 4.2 for the ARM and MIPS architectures. Instead of emitting locked instructions, they generate calls to functions that can be implemented in the C runtime. Only implement the atomic operations that are used by <stdatomic.h> for datatype sizes that are supported by atomic(9). This means that on these architectures, we can only use atomic operations on 32-bits and 64-bits variables, which is typically sufficient. This makes <stdatomic.h> work on all architectures except MIPS, since MIPS and SPARC64 still use libgcc. Converting these architectures to libcompiler_rt is on my todo list.
* | 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 libstdthreads.ed2011-12-2610-0/+893
| | | | | | | | | | | | | | | | | | | | | | | | | | This library implements the C11 threads interface on top of the pthreads library. As discussed on the lists, the preferred way to implement this, is as a separate library. It is unlikely that these functions will be used a lot in the future. It would have been easier if the C11 working group standardized (a subset of) pthreads and clock_nanosleep(). Having it as a separate library allows the embedded people to omit it from their system. Discussed on: arch@, threads@
* | 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
* | Implement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x).jhibbits2011-12-241-0/+62
| | | | | | | | | | | | | | Sampling is in progress. Approved by: nwhitehorn (mentor) 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
* | Add placeholder code for prepending pathnames to tftp.ed2011-12-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | At work we have a single tftp server that provides installation data for a variety of operating systems. I'd rather place our FreeBSD-related files in a subdirectory, instead of the root. It would be nice if this setting could be run-time configurable, but at least in our specific case, this is not possible, as pxeboot is chainloaded through pxelinux. Sponsored by: Kumina bv
* | Use contrib sources for building libarchive, tar and cpio.mm2011-12-22256-75767/+30
| | | | | | | | | | | | Make "make test" fully operational. MFC after: 2 weeks
* | - 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
* | Sync libarchive with vendor branch release/2.8:mm2011-12-205-13/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3730: Fix issue 174 (Windows path names, not relevant for FreeBSD) 3734: Merge r1989: archive_clear_error should set errno to 0. 3735: Merge r3247 from trunk: Clear errors before returning from archive_read_support_format_all() 3799: Check the position before dereferencing the pointer. This avoids dereferencing one byte past the end of a string 3824: Merge r3823 from trunk for issue 199 (hang in iso9660 reading) Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks
* | Update libarchive, tar and cpio to version 2.8.5mm2011-12-2020-37/+51
| | | | | | | | | | | | | | | | | | | | The following additional vendor revisions are applied: Revision 3740: Use archive_clear_error() to clear the error markers. Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks
* | Merge vendor revision 3723:mm2011-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes extraction of Zip entries that use length-at-end without specifying either the compressed or uncompressed length. In particular, fixes bsdtar extraction of such files. Obtained from: http://code.google.com/p/libarchive Reported by: Patrick Lamaiziere <patfbsd@davenulle.org> (freebsd-stable@) MFC after: 1 week
* | Add binding support to libradius(3).melifaro2011-12-205-1/+17
| | | | | | | | | | | | Submitted by: Sergey Matveychuk <sem33@yandex-team.ru> Approved by: ae (mentor) MFC after: 2 weeks
* | Upgrade to OpenPAM Lycopsida.des2011-12-181-0/+5
|\ \
| * | Vendor import of OpenPAM Lycopsida.des2011-12-1867-935/+1816
| | |
| * | Flatten and clean up.des2008-12-1360-0/+7073
| /
* | Address warnings found by clang.tuexen2011-12-171-36/+28
| | | | | | | | MFC after: 3 months.
* | Fix typos in the comments about clang warnings in severaldim2011-12-161-2/+2
| | | | | | | | | | | | | | sendmail-related Makefiles. Spotted by: arundel MFC after: 1 week
* | In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrectdim2011-12-161-0/+6
| | | | | | | | | | | | warnings about alignment, so turn -Wcast-align off for now. MFC after: 1 week
* | 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]
* | Unfortunately, clang gives a warning about sendmail code that cannot bedim2011-12-161-0/+7
| | | | | | | | | | | | | | turned off yet. Since this is contrib code, and we don't really care about the warnings, just turn make them non-fatal for now. MFC after: 1 week
* | In lib/libpmc/libpmc.c, struct pmc_cputype_map's pm_cputype field shoulddim2011-12-161-1/+1
| | | | | | | | | | | | be of type 'enum pmc_cputype', not 'enum pmc_class'. MFC after: 1 week
* | In lib/libipsec/policy_token.l, use lex's standard "%option noinput"dim2011-12-161-1/+1
| | | | | | | | | | | | instead of hand-defining the YY_NO_INPUT macro. MFC after: 1 week
* | Define YY_NO_INPUT in lib/libipsec/policy_token.l, so lex's input()dim2011-12-151-0/+1
| | | | | | | | | | | | function does not get defined needlessly. MFC after: 1 week
* | Modify pw_copy:bapt2011-12-153-13/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | - if pw is NULL and oldpw is not NULL then the oldpw is deleted - if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid then it renames the user add new gr_* functions so now gr_util API is similar to pw_util API, this allow to manipulate groups in a safe way. Reviewed by: des Approved by: des MFC after: 1 month
* | 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
OpenPOWER on IntegriCloud