summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* Correct return type of pdfork(2).ed2014-04-041-2/+2
| | | | | | | | | | The pdfork(2) man page states: "pdfork() returns a PID, 0 or -1, as fork(2) does." As it returns a PID, the return type should obviously be pid_t. As int and pid_t have the same size on all architectures, this change does not affect the ABI in any way.
* Fix the inheritance of the FBSDprivate_1.0 namespace.theraven2014-04-031-1/+1
|
* Move _b functions into the 11.x symbol version namespace.theraven2014-04-033-5/+16
|
* Add an extra void* cast to work around a bug in FreeBSD-gcc inheritedtheraven2014-04-031-1/+1
| | | | from Apple.
* Move scandir_b to a later symbol version.theraven2014-04-021-1/+1
|
* Add support for some block functions that come from OS X. These aretheraven2014-04-0217-30/+390
| | | | | | | intended to build with any C compiler. Reviewed by: pfg MFC after: 3 weeks
* Fix an issue where the locale and rune locale could become out of sync,theraven2014-04-022-9/+9
| | | | | | | | causing mb* functions (and similar) to be called with the wrong data (possibly a null pointer, causing a crash). PR: standards/188036 MFC after: 1 week
* - In the libiconv module for ISO 2022 restore the original order of thetijl2014-04-0113-28/+25
| | | | | | | | | | | | | | | | | | | | | fields of a private struct such that variables of this type are initialised correctly. Fixes conversion from ISO 2022. Also do this in the BIG5 module to prevent similar errors in the future. - In the libiconv module for EUC-TW replace 2^cs with 1<<cs. Fixes conversion from EUC-TW. - Synchronise iconv code with NetBSD. In most cases this only updates the RCS id because the changes are already there or are NetBSD specific. + libc/iconv/citrus_csmapper.c: Add a comment. + libc/iconv/citrus_db_factory.c: Remove put16(). + libc/iconv/citrus_iconv.c: Return EINVAL on error. + libc/iconv/citrus_mapper.c: Return EINVAL on error. + libc/iconv/citrus_memstream.c: Fix type of a variable. + libc/iconv/citrus_prop.h: Sync definition of _CITRUS_PROP_HINT_END. + libc/iconv/citrus_stdenc.c: Return EINVAL on error. + libiconv_modules/mapper_std/citrus_mapper_std.c: Plug memory leak. Obtained from: NetBSD MFC after: 2 weeks
* Use the correct variable name in the example code.eadler2014-03-301-1/+1
|
* Update system man pages for s/capability.h/capsicum.h/.rwatson2014-03-277-14/+15
| | | | MFC after: 3 weeks
* Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.andrew2014-03-232-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit. This is an optional coprocessors may not be present in all devices, however it appears to be in all current SoCs we support. armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too old to support this. Because of this there are a number of WITH/WITHOUT options that are unsupported and must be left as the default value. The options and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXX In addition, without an external toolchain, the following need to be left as their default: * WITH_CLANG * WITH_CLANG_IS_CC As there is a different method of passing float and double values to functions the ABI is incompatible with existing armv6 binaries. To use this a full rebuild of world is required. Because no floating point values are passed into the kernel an armv6 kernel with VFP enabled will work with an armv6hf userland and vice versa.
* Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores theandrew2014-03-221-10/+14
| | | | current rounding mode used by the VFP unit.
* Remove an extra 1 in an #if lineandrew2014-03-161-1/+1
| | | | Reported by: ian@
* Fix the spelling of function.andrew2014-03-162-2/+2
| | | | Reported by: ian@
* Add an optimised version of the float and double helper functions. Theseandrew2014-03-166-124/+537
| | | | | | | are only used on armv6 when the vfp unit is detected. They will also be available for the upcoming armv6hf platform, however while not used by default there will need to be defined for any software that calls them directly.
* Update most userspace consumers of capability.h to use capsicum.h instead.rwatson2014-03-161-1/+1
| | | | | | | auditdistd is not updated as I will make the change upstream and then do a vendor import sometime in the next week or two. MFC after: 3 weeks
* To avoid missing a chance to cancel thread, call _pthread_testcancel at thedavidxu2014-03-131-0/+1
| | | | | | | beginning of _sem_timedwait. Submitted by: Eric van Gyzen &lt; eric at vangyzen dot net &gt; MFC after: 3 days
* Make ether_line really report an error when all input is invalid.jmmv2014-03-121-5/+7
| | | | | | | | | | | | The previous code failed to return an error condition when the whole input was invalid due to improper handling of the sscanf return value. Actually, this failure was properly being caught by a test in tools/regression/lib/libc/net/test-ether.t but was not noticed because these tests are never run. (On my way to fixing that ;-) The fix applied here resembles the implementation of ether_line in NetBSD modulo the setting of an errno value (which is not documented as an expectation in the manpage anyway).
* Export _libc_arm_fpu_present as a private symbol to be used by otherandrew2014-03-111-0/+2
| | | | system libraries, for example libm.
* libc man pages: Remove reference to non-existent FreeBSD Securityeadler2014-03-073-8/+0
| | | | | | Architecture MFC After: 3 days
* fts: Don't abort if an empty pathname is given.jilles2014-03-061-5/+1
| | | | | | | | | | | Make fts_open(3) treat an empty pathname like any other pathname that cannot be lstatted because of [ENOENT]. It is rather confusing if rm -rf file1 "" file2 does not remove file1 and file2. PR: bin/187264 MFC after: 2 weeks
* Let __bt_put() accept the R_SETCURSOR flag, as stated in the dbopen(3) manpage.jlh2014-03-061-1/+2
| | | | | | | While here, update the comment above with all the accepted flags. Reviewed by: silence on hackers@ MFC after: 2 weeks
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}marcel2014-03-0446-138/+142
| | | | | | | | | | | if not already defined. This allows building libc from outside of lib/libc using a reach-over makefile. A typical use-case is to build a standard ILP32 version and a COMPAT32 version in a single iteration by building the COMPAT32 version using a reach-over makefile. Obtained from: Juniper Networks, Inc.
* Merge from head up to r262611.dim2014-02-281-1/+1
|\
| * syncer(4) is a kernel process, not a user processbjk2014-02-271-1/+1
| | | | | | | | | | Noticed by: Geoffrey Thomas <gthomas@mokafive.com> Approved by: hrs (mentor)
* | Merge from head up to r262472.dim2014-02-252-5/+4
|\ \ | |/
| * Consistently pass around context information using a simple pointer. Thistijl2014-02-242-5/+4
| | | | | | | | | | | | | | fixes some dereferencing bugs in Chinese character set conversions. PR: 185964 MFC after: 5 days
* | Merge from head up to r262311.dim2014-02-211-3/+3
|\ \ | |/
| * Match the correct variable to the variable description.brueffer2014-02-211-3/+3
| | | | | | | | | | | | PR: 121173 Submitted by: Thomas Mueller <tmueller at sysgo.com> MFC after: 1 week
* | In lib/libc/sparc64/sys/__sparc_utrap_setup.c, avoid an error aboutdim2014-02-201-1/+1
|/ | | | passing a pointer to a const object to sysarch().
* document _JAIL as a possible option to set a cpuset for a jail..jmg2014-02-151-1/+2
| | | | MFC after: 3 days
* Set errno on inet_ntop(3) failure.kevlo2014-02-071-2/+4
| | | | Reviewed by: glebius
* fts: Fix double-free with conflicting concurrent modifications.jilles2014-02-071-4/+8
| | | | | | | | | | | If rare conditions such as concurrent conflicting manipulation of the filesystem occur, fts_read() frees the current FTSENT without adjusting the pointers in the FTS accordingly. A later fts_close() then frees the same FTSENT again. Reported by: pho Tested by: pho MFC after: 1 week
* libc/net: fix a portability issueeadler2014-02-051-1/+1
| | | | | | | * POSIX does not require socklen_t to be unsigned Submitted by: bde MFC After: 1 week (with r261454)
* libc/net: Fix some issues in inet6_opt_init() (from RFC 3542):eadler2014-02-041-4/+1
| | | | | | | | | | | | | | * The RFC says (in section 10.1) that only when extbuf is not NULL, extlen shall be checked, so don't perform this check when NULL is passed. * socklen_t is unsigned, so checking extlen for less than zero is not needed. Submitted by: swildner@dragonflybsd.org Reviewed by: Mark Martinec <Mark.Martinec+freebsd@ijs.si> Reviewed by: hrs Obtained by: DragonFlyBSD
* Fix a typo.brueffer2014-02-031-1/+1
| | | | MFC after: 1 week
* The posix_madvise(3) and posix_fadvise(2) should return error onkib2014-01-304-8/+20
| | | | | | | | | failure, same as posix_fallocate(2). Noted by: Bob Bishop <rb@gid.co.uk> Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week
* mdoc: fix several uses of the Fx macro to point to actual releases.uqs2014-01-285-5/+5
| | | | Found by: make manlint
* Add MLINK for fdclosedir.3 to directory.3 and sort fdopendir(3) entry.bdrewery2014-01-241-1/+2
| | | | | Reported by: bde Approved by: bapt (mentor)
* The posix_fallocate(2) syscall should return error number on error,kib2014-01-231-2/+2
| | | | | | | | | | without modifying errno. Reported and tested by: Gennady Proskurin <gpr@mail.ru> Reviewed by: mdf PR: standards/186028 Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Update EINVAL description.pluknet2014-01-231-2/+2
| | | | | | This matches current POSIX standards and actual FreeBSD behavior. MFC after: 1 week
* Update jemalloc to version 3.5.0.jasone2014-01-233-13/+31
|
* Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if thenwhitehorn2014-01-201-0/+35
| | | | | | | | | device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Comments and suggestions by: grehan, dteske, jilles MFC after: 1 month
* Replace LIBGCC by LIBCOMPILER_RT.ed2014-01-181-3/+3
| | | | | We now use libcompiler_rt on all platforms now. Instead of referring directly to -lgcc and LIBGCC, use -lcompiler_rt and LIBCOMPILER_RT.
* libc/resolv: Use poll() instead of kqueue().jilles2014-01-142-3/+3
| | | | | | | | The resolver in libc creates a kqueue for watching a single file descriptor. This can be done using poll() which should be lighter on the kernel and reduce possible problems with rlimits (file descriptors, kqueues). Reviewed by: jhb
* ANSI-fy prototype.delphij2014-01-141-3/+1
| | | | MFC after: 2 weeks
* fts(3): Remove stray mentions of the obsolete fts_bignum.jilles2014-01-121-9/+1
|
* fts: Stat things relative to the directory fd, if possible.jilles2014-01-121-12/+19
| | | | | | | | | As a result, the kernel needs to process shorter pathnames if fts is not changing directories (if fts follows symlinks (-L option to utilities), fts cannot open "." or FTS_NOCHDIR was specified). Side effect: If pathnames exceed PATH_MAX, [ENAMETOOLONG] is not hit at the stat stage but later (opendir or application fts_accpath) or not at all.
* Add some missing .Nm for newer syscalls in existing man pages.jilles2014-01-113-3/+6
| | | | MFC after: 1 week
* Fix several bugs in sctp_bindx():tuexen2014-01-041-9/+18
| | | | | | | | | | | * Set errno to EAFNOSUPPORT if an address is provided which is neither AF_INET nor AF_INET6. * Don't modify the arguments. * Don't smash the stack when provided with a non-zero port. * Handle the case correctly where the first address provided is an IPv6 address. MFC after: 3 days
OpenPOWER on IntegriCloud