summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* No need for result_use_check attribute in reallocf(3).pfg2015-05-011-1/+1
|
* Move reallocarray definition to the _BSD_VISIBLE blockbapt2015-05-011-3/+2
| | | | | | Add the required __alloc_size attributes Requested by: pfg
* Import reallocarray(3) from OpenBSDbapt2015-05-011-0/+3
| | | | | | | | | 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
* Move ALTQ from contrib to net/altq. The ALTQ code is for many yearsglebius2015-04-161-9/+2
| | | | | | | | | discontinued by its initial authors. In FreeBSD the code was already slightly edited during the pf(4) SMP project. It is about to be edited more in the projects/ifnet. Moving out of contrib also allows to remove several hacks to the make glue. Reviewed by: net@
* Remove the const qualifier from iconv(3) to comply with POSIX:tijl2015-04-151-2/+2
| | | | | | | | | | 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
* Make use of gcc attributes in some standard include headers.pfg2015-04-063-73/+94
| | | | | | | | | | | | | | | | | | | The `nonnull' attribute specifies that some function parameters should be non-null pointers. This is very useful as it helps the compiler generate warnings on suspicious code and can also enable some small optimizations. Also start using 'alloc_size' attribute in the allocator functions. This is an initial step to better integrate our libc with the compiler: these attributes are fully supported by clang and they are also useful for the static analyzer. Note that due to some bogus internal procedure in the way gcc ports are built they may require updating if they were built before r280801. Relnotes: yes Hinted by: Android's bionic libc Differential Revision: https://reviews.freebsd.org/D2107
* Clean some spaces vs tabs.pfg2015-03-291-37/+37
| | | | No, this file doesn't conform with KNF at all.
* Temporarily revert 280458.pfg2015-03-252-79/+62
| | | | | | | | GCC is still carries an old version of cdefs.h which doesn't accept multiple parameters for the nonnull attribute. Since this issue probably affects many ports in the tree we will revert it for now until gcc gets fixed.
* Clean sparse spaces.pfg2015-03-251-2/+2
|
* Introduce nonnull attributes in the signal and pthread headers.pfg2015-03-242-62/+79
| | | | | | | | | | | | | The `nonnull' attribute specifies that some function parameters should be non-null pointers. This is very useful as it helps the compiler generate warnings on suspicious code and can also enable some small optimizations. In clang this is also useful for the static analyzer. While we could go on defining this all over the tree, it only makes sense to annotate a subset of critical functions. Hinted by: Android's bionic libc Differential Revision: https://reviews.freebsd.org/D2101
* Correct and clarify comment for __SMBF.bdrewery2015-02-111-1/+1
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Sort the entries by build knob, then MACHINE_ARCH like other areas of the treengie2015-02-041-13/+12
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Clean up more usb related files when MK_USB == no when dealing withngie2015-02-041-1/+5
| | | | | | | | manpages, libraries, and binaries MFC after: 1 week X-MFC with: r278135 Sponsored by: EMC / Isilon Storage Division
* Ensure #include <semaphore.h> is sufficient for using SEM_VALUE_MAX.jilles2015-01-311-0/+2
| | | | Discussed with: pluknet
* Make install cuse headers if MK_CUSE != nongie2015-01-251-1/+4
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Deorbit the IEEE-488/GPIB support.phk2014-12-251-5/+1
|
* Fix the build by installing acpi_hpet.h correctly.rpaulo2014-10-241-1/+1
| | | | | Submitted by: jase MFC after: 1 week
* The current POSIX semaphore implementation stores the _has_waiters flagjhb2014-10-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | in a separate word from the _count. This does not permit both items to be updated atomically in a portable manner. As a result, sem_post() must always perform a system call to safely clear _has_waiters. This change removes the _has_waiters field and instead uses the high bit of _count as the _has_waiters flag. A new umtx object type (_usem2) and two new umtx operations are added (SEM_WAIT2 and SEM_WAKE2) to implement these semantics. The older operations are still supported under the COMPAT_FREEBSD9/10 options. The POSIX semaphore API in libc has been updated to use the new implementation. Note that the new implementation is not compatible with the previous implementation. However, this only affects static binaries (which cannot be helped by symbol versioning). Binaries using a dynamic libc will continue to work fine. SEM_MAGIC has been bumped so that mismatched binaries will error rather than corrupting a shared semaphore. In addition, a padding field has been added to sem_t so that it remains the same size. Differential Revision: https://reviews.freebsd.org/D961 Reported by: adrian Reviewed by: kib, jilles (earlier version) Sponsored by: Norse
* HPET: create /dev/hpetN as a way to access HPET from userland.rpaulo2014-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | In some cases, TSC is broken and special applications might benefit from memory mapping HPET and reading the registers to count time. Most often the main HPET counter is 32-bit only[1], so this only gives the application a 300 second window based on the default HPET interval. Other applications, such as Intel's DPDK, expect /dev/hpet to be present and use it to count time as well. Although we have an almost userland version of gettimeofday() which uses rdtsc in userland, it's not always possible to use it, depending on how broken the multi-socket hardware is. Install the acpi_hpet.h so that applications can use the HPET register definitions. [1] I haven't found a system where HPET's main counter uses more than 32 bit. There seems to be a discrepancy in the Intel documentation (claiming it's a 64-bit counter) and the actual implementation (a 32-bit counter in a 64-bit memory area). MFC after: 1 week Relnotes: yes
* Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cppbapt2014-10-091-8/+3
|
* Add explicit_bzero(3) and its kernel counterpart.delphij2014-10-071-0/+3
| | | | | Obtained from: OpenBSD MFC after: 2 weeks
* unistd: drop argument names from setpgrp(3) prototype.pfg2014-09-191-1/+1
| | | | | | | They are useless and don't match the style of the header. While here adjust the comment with tabs. Suggested by: kevinlo
* unistd: move setpgrp(2) to the __BSD_VISIBLE sectionpfg2014-09-181-1/+1
| | | | | | | | | | | | Our setpgrp(2) differs from the specified by POSIX, which only has one argument, and is only meant for compatibility with BSD. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/setpgrp.html Pointed-out in: openbsd-tech (2014-09-16) MFC after: 6 weeks
* Roll back r271012 even more aggressively.ed2014-09-051-1/+1
| | | | | | | | | | | | | | | | I've looked at the GCC sources and I now understand what's going wrong. THe C11 keywords are simply nonexistent when using C++ mode. They are marked as C-only in the parser. This is absolutely impractical for multiple reasons: - The C11 keywords do not conflict with C++ naming rules. They all start with _[A-Z]. There is no reason to make them C-only. - It makes it practically impossible for people to use these keywords in C header files and expect them to work from within C++ sources. As I said in my previous commit message: GCC is by far the weirdest compiler that I've ever used.
* Leave the C11 keywords alone when we have a recent version of GCC.ed2014-09-031-1/+1
| | | | | | | | | | | As GCC also gained support for the C11 keywords over time, we can patch up <sys/cdefs.h> to not define these anymore. This has the advantage that error messages for static assertions are printed natively and that _Alignas() will work with even a type outside of C11 mode. All C11 keywords are supported with GCC 4.7 and higher, with the exception of _Thread_local and _Generic. These are only supported as of GCC 4.9.
* Add bsearch_b to the libc map and the stdlib header.pfg2014-09-011-7/+7
| | | | | | | | | | | | bsearch_b is the Apple blocks enabled version of bsearch(3). This was added to libc in Revision 264042 but the commit missed the declaration required to make use of it. While here move some other block-related functions to the BSD_VISIBLE block as these are non-standard. Phabric: D638 Reviewed by: theraven, wollman
* Add lock annotations to the header files of our threading libraries.ed2014-09-011-27/+49
| | | | | | | | | | | | | | | This change extends all of the functions present in the <pthread.h> and <threads.h> headers to have lock annotations. This will allow Clang to warn about the following: - Locking a function twice, - Unlocking a function without a mutex being locked, - Forgetting to unlock a mutex before returning, - Destroying or reinitializing a mutex that is currenty locked, - Using an unlocked mutex in combination with a condition variable. Enabling these annotations already allowed me to catch a bug in one of our userspace tools (r270749).
* Add guards to ptrdiff_t definition in include/stddef.hkan2014-08-211-0/+3
| | | | | | | | | Back in 2011 obrien has added the #define macro in sys/sys/stddef.h to guard ptrdiff_t. Add similar protection to the identical code in include/stddef.h. Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org> MFC after: 1 week
* Update our stub resolver to final version of libbind.ume2014-08-125-54/+159
| | | | Obtained from: ISC
* Add re-entrant versions of the hash functions based on the GNU api.pfg2014-07-211-2/+18
| | | | | | | While testing this I found a conformance issue in hdestroy() that will be fixed in a subsequent commit. Obtained from: NetBSD (hcreate.c, CVS Rev. 1.7)
* Revert r268826:pfg2014-07-181-5/+3
| | | | | | | | The current ordering of this header is a feature as it is more consistent with POSIX. Also adding gratuitous newlines is not elegant. Pointed out by: bde
* Minor sorting to match the NetBSD headerpfg2014-07-181-3/+5
| | | | | MFC after: 3 days Obtained from: NetBSD
* Fix some edge cases with rewinddir():jhb2014-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | - In the unionfs case, opendir() and fdopendir() read the directory's full contents and cache it. This cache is not refreshed when rewinddir() is called, so rewinddir() will not notice updates to a directory. Fix this by splitting the code to fetch a directory's contents out of __opendir_common() into a new _filldir() function and call this from rewinddir() when operating on a unionfs directory. - If rewinddir() is called on a directory opened with fdopendir() before any directory entries are fetched, rewinddir() will not adjust the seek location of the backing file descriptor. If the file descriptor passed to fdopendir() had a non-zero offset, the rewinddir() will not rewind to the beginning. Fix this by always seeking back to 0 in rewinddir(). This means the dd_rewind hack can also be removed. While here, add missing locking to rewinddir(). CR: https://phabric.freebsd.org/D312 Reviewed by: jilles MFC after: 1 week
* Don't install GSS-API headers when the GSSAPI option has been disabled.tijl2014-06-131-2/+7
| | | | | | | Some ports assume GSS-API is supported when they find the headers. PR: 189156 Submitted by: Garrett Cooper <yanegomi@gmail.com>
* Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.pfg2014-05-304-3/+53
| | | | | | | | | | | | POSIX.1-2008 specifies that those two functions should be declared by including <strings.h>, not <string.h> (the latter only has strcoll_l() and strxfrm_l()): http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html Obtained from: DragonFlyBSD Reviewed by: theraven MFC after: 2 weeks
* Initial import of character device in userspace support for FreeBSD.hselasky2014-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CUSE library is a wrapper for the devfs kernel functionality which is exposed through /dev/cuse . In order to function the CUSE kernel code must either be enabled in the kernel configuration file or loaded separately as a module. Currently none of the committed items are connected to the default builds, except for installing the needed header files. The CUSE code will be connected to the default world and kernel builds in a follow-up commit. The CUSE module was written by Hans Petter Selasky, somewhat inspired by similar functionality found in FUSE. The CUSE library can be used for many purposes. Currently CUSE is used when running Linux kernel drivers in user-space, which need to create a character device node to communicate with its applications. CUSE has full support for almost all devfs functionality found in the kernel: - kevents - read - write - ioctl - poll - open - close - mmap - private per file handle data Requested by several people. Also see "multimedia/cuse4bsd-kmod" in ports.
* include: Don't expose L_cuserid in strict C standard compliance mode.jilles2014-05-111-1/+1
| | | | | L_cuserid is supposed to be exposed only for old POSIX, or in the default (expose everything) environment.
* include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLEjilles2014-05-119-19/+19
| | | | | | | | | or __POSIX_VISIBLE. Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets __POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported. No functional change is intended.
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-062-2/+2
| | | | from the latter.
* langinfo.h: Hide YESSTR and NOSTR in strict POSIX mode.jilles2014-04-191-1/+1
| | | | YESSTR and NOSTR are obsolete and are only in old SUS.
* Add support for some block functions that come from OS X. These aretheraven2014-04-022-0/+18
| | | | | | | intended to build with any C compiler. Reviewed by: pfg MFC after: 3 weeks
* Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4tijl2014-04-014-4/+4
| | | | | | -fms-extensions. MFC after: 2 weeks
* Remove AppleTalk support.glebius2014-03-141-1/+1
| | | | | | | | | | AppleTalk was a network transport protocol for Apple Macintosh devices in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was a legacy protocol and primary networking protocol is TCP/IP. The last Mac OS X release to support AppleTalk happened in 2009. The same year routing equipment vendors (namely Cisco) end their support. Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE.
* Remove IPX support.glebius2014-03-141-8/+1
| | | | | | | | | | | IPX was a network transport protocol in Novell's NetWare network operating system from late 80s and then 90s. The NetWare itself switched to TCP/IP as default transport in 1998. Later, in this century the Novell Open Enterprise Server became successor of Novell NetWare. The last release that claimed to still support IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco) discontinued support for IPX in 2011. Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
* Update jemalloc to version 3.5.0.jasone2014-01-231-0/+18
|
* Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if thenwhitehorn2014-01-201-0/+1
| | | | | | | | | 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 Sun RPC license with a 3-clause BSD license. This license changehrs2013-12-0916-423/+454
| | | | | was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation.
* Install teken.h for userland.ray2013-12-051-0/+3
| | | | | | | | Part of VT(9) project merge. Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation
* Replace Sun Industry Standards Source License for Sun RPC code with ahrs2013-11-251-45/+24
| | | | | | 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation.
* Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,hrs2013-11-2523-596/+572
| | | | with the explicit permission of Sun Microsystems in 2009.
OpenPOWER on IntegriCloud