aboutsummaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* MFH: r282315-r282534Glen Barber2015-05-061-1/+3
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-arm-redux/; revision=282535
| * No need for result_use_check attribute in reallocf(3).Pedro F. Giffuni2015-05-011-1/+1
| | | | | | | | Notes: svn path=/head/; revision=282322
| * Move reallocarray definition to the _BSD_VISIBLE blockBaptiste Daroussin2015-05-011-3/+2
| | | | | | | | | | | | | | | | | | Add the required __alloc_size attributes Requested by: pfg Notes: svn path=/head/; revision=282317
| * Import reallocarray(3) from OpenBSDBaptiste Daroussin2015-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 Notes: svn path=/head/; revision=282314
* | MFH: r280643-r281852Glen Barber2015-04-225-121/+135
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-arm-redux/; revision=281853
| * Move ALTQ from contrib to net/altq. The ALTQ code is for many yearsGleb Smirnoff2015-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@ Notes: svn path=/head/; revision=281613
| * Remove the const qualifier from iconv(3) to comply with POSIX:Tijl Coosemans2015-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 Notes: svn path=/head/; revision=281550
| * Make use of gcc attributes in some standard include headers.Pedro F. Giffuni2015-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 Notes: svn path=/head/; revision=281130
| * Clean some spaces vs tabs.Pedro F. Giffuni2015-03-291-37/+37
| | | | | | | | | | | | | | No, this file doesn't conform with KNF at all. Notes: svn path=/head/; revision=280820
* | MFH: r278968-r280640Glen Barber2015-03-251-2/+2
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-arm-redux/; revision=280641
| * Temporarily revert 280458.Pedro F. Giffuni2015-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. Notes: svn path=/head/; revision=280636
| * Clean sparse spaces.Pedro F. Giffuni2015-03-251-2/+2
| | | | | | | | Notes: svn path=/head/; revision=280626
| * Introduce nonnull attributes in the signal and pthread headers.Pedro F. Giffuni2015-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 Notes: svn path=/head/; revision=280458
* | MFH: r278593-r278966Glen Barber2015-02-181-1/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-arm-redux/; revision=278967
| * Correct and clarify comment for __SMBF.Bryan Drewery2015-02-111-1/+1
| | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=278600
* | MFH: r278202,r278205-r278590Glen Barber2015-02-111-1/+5
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-arm-redux/; revision=278591
| * Sort the entries by build knob, then MACHINE_ARCH like other areas of the treeEnji Cooper2015-02-041-13/+12
| | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=278204
| * Clean up more usb related files when MK_USB == no when dealing withEnji Cooper2015-02-041-1/+5
|/| | | | | | | | | | | | | | | | | | | | | manpages, libraries, and binaries MFC after: 1 week X-MFC with: r278135 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=278202
| * Clean up more usb related files when MK_USB == no when dealing withEnji Cooper2014-11-261-1/+5
| | | | | | | | | | | | | | manpages, libraries, and binaries Notes: svn path=/projects/building-blocks/; revision=275142
| * Account for /usr/include/protocols/r{outed,whod}.h with their respective ↵Enji Cooper2014-11-261-1/+9
| | | | | | | | | | | | | | build knobs Notes: svn path=/projects/building-blocks/; revision=275115
| * Fix some accidentally inverted logicEnji Cooper2014-11-261-1/+1
| | | | | | | | Notes: svn path=/projects/building-blocks/; revision=275114
| * Conditionalize a number of components in the treeEnji Cooper2014-11-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - bootparamd - bootpd - finger/fingerd - ftp/ftpd - hastctl/hastd - iscsid, et al - rbootd - talk/talkd - tcpd, et al - tftp/tftpd Add src.conf entries for the various components and do a best effort at adding components to tools/build/mk/OptionalObsoleteFiles.inc Notes: svn path=/projects/building-blocks/; revision=275106
* | Ensure #include <semaphore.h> is sufficient for using SEM_VALUE_MAX.Jilles Tjoelker2015-01-311-0/+2
| | | | | | | | | | | | | | Discussed with: pluknet Notes: svn path=/head/; revision=277983
* | Make install cuse headers if MK_CUSE != noEnji Cooper2015-01-251-1/+4
| | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=277682
* | Deorbit the IEEE-488/GPIB support.Poul-Henning Kamp2014-12-251-5/+1
|/ | | | Notes: svn path=/head/; revision=276214
* Fix the build by installing acpi_hpet.h correctly.Rui Paulo2014-10-241-1/+1
| | | | | | | | Submitted by: jase MFC after: 1 week Notes: svn path=/head/; revision=273613
* The current POSIX semaphore implementation stores the _has_waiters flagJohn Baldwin2014-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 Notes: svn path=/head/; revision=273604
* HPET: create /dev/hpetN as a way to access HPET from userland.Rui Paulo2014-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 Notes: svn path=/head/; revision=273598
* Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cppBaptiste Daroussin2014-10-091-8/+3
| | | | Notes: svn path=/head/; revision=272808
* Add explicit_bzero(3) and its kernel counterpart.Xin LI2014-10-071-0/+3
| | | | | | | | Obtained from: OpenBSD MFC after: 2 weeks Notes: svn path=/head/; revision=272673
* unistd: drop argument names from setpgrp(3) prototype.Pedro F. Giffuni2014-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 Notes: svn path=/head/; revision=271878
* unistd: move setpgrp(2) to the __BSD_VISIBLE sectionPedro F. Giffuni2014-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 Notes: svn path=/head/; revision=271792
* Roll back r271012 even more aggressively.Ed Schouten2014-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. Notes: svn path=/head/; revision=271155
* Leave the C11 keywords alone when we have a recent version of GCC.Ed Schouten2014-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. Notes: svn path=/head/; revision=271012
* Add bsearch_b to the libc map and the stdlib header.Pedro F. Giffuni2014-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 Notes: svn path=/head/; revision=270952
* Add lock annotations to the header files of our threading libraries.Ed Schouten2014-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). Notes: svn path=/head/; revision=270943
* Add guards to ptrdiff_t definition in include/stddef.hAlexander Kabaev2014-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 Notes: svn path=/head/; revision=270277
* Update our stub resolver to final version of libbind.Hajimu UMEMOTO2014-08-125-54/+159
|\ | | | | | | | | | | | | Obtained from: ISC Notes: svn path=/head/; revision=269867
| * We don't use these files.Hajimu UMEMOTO2014-08-092-65/+0
| | | | | | | | Notes: svn path=/vendor/resolver/dist/; revision=269763
| * Bring final version of libbind:Pedro F. Giffuni2014-08-057-54/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From http://www.isc.org/downloads/libbind/ The libbind functions have been separated from the BIND suite as of BIND 9.6.0. Originally from older versions of BIND, they have been continually maintained and improved but not installed by default with BIND 9. This standard resolver library contains the same historical functions and headers included with many Unix operating systems. In fact, most implementations are based on the same original code. At present, NetBSD maintains libbind code, now known as "netresolv". Notes: svn path=/vendor/resolver/dist/; revision=269610
| * Import the resolver part of BIND 9.4.3.vendor/resolver/9.4.3Hajimu UMEMOTO2008-12-142-3/+8
| | | | | | | | | | Notes: svn path=/vendor/resolver/dist/; revision=186083 svn path=/vendor/resolver/9.4.3/; revision=186084; tag=vendor/resolver/9.4.3
| * Vendor import of BIND 9.4.1Hajimu UMEMOTO2007-06-035-303/+305
| | | | | | | | Notes: svn path=/vendor/resolver/dist/; revision=170242
| * Vendor import of BIND 9.3.3Hajimu UMEMOTO2006-12-151-3/+4
| | | | | | | | Notes: svn path=/vendor/resolver/dist/; revision=165254
| * Vendor import of BIND 9.3.2Hajimu UMEMOTO2006-05-211-0/+65
| | | | | | | | Notes: svn path=/vendor/resolver/dist/; revision=158782
| * Vendor import of BIND 9.3.2Hajimu UMEMOTO2006-03-214-0/+1438
| | | | Notes: svn path=/vendor/resolver/dist/; revision=156959
* Add re-entrant versions of the hash functions based on the GNU api.Pedro F. Giffuni2014-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) Notes: svn path=/head/; revision=268943
* Revert r268826:Pedro F. Giffuni2014-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 Notes: svn path=/head/; revision=268846
* Minor sorting to match the NetBSD headerPedro F. Giffuni2014-07-181-3/+5
| | | | | | | | MFC after: 3 days Obtained from: NetBSD Notes: svn path=/head/; revision=268826
* Fix some edge cases with rewinddir():John Baldwin2014-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 Notes: svn path=/head/; revision=268531
* Don't install GSS-API headers when the GSSAPI option has been disabled.Tijl Coosemans2014-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> Notes: svn path=/head/; revision=267441