aboutsummaryrefslogtreecommitdiff
path: root/lib/libnetbsd
Commit message (Collapse)AuthorAgeFilesLines
* Make timespecadd(3) and friends publicAlan Somers2018-07-301-65/+0
| | | | | | | | | | | | | | | | | | | | | | The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have grown at least 28 syscalls that use timespecs in some way, leading many programs both inside and outside of the base system to redefine those macros. It's better just to make the definitions public. Our kernel currently defines two-argument versions of timespecadd and timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define three-argument versions. Solaris also defines a three-argument version, but only in its kernel. This revision changes our definition to match the common three-argument version. Bump _FreeBSD_version due to the breaking KPI change. Discussed with: cem, jilles, ian, bde Differential Revision: https://reviews.freebsd.org/D14725 Notes: svn path=/head/; revision=336914
* libnetbsd: Make the function declaration of efopen() match the definitionAlex Richardson2018-01-161-1/+2
| | | | | | | | | | | | In order to crossbuild FreeBSD on Mac/Linux I also need to build libnetbsd and FILE* is not equal to struct __sFILE on those platforms. Reviewed By: brooks, emaste Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D13305 Notes: svn path=/head/; revision=328062
* lib: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-266-0/+12
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326219
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-202-0/+4
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* libnetbsd: add emalloc and friendsEd Maste2017-04-063-1/+174
| | | | | | | | | | | These are error-checked versions of memory allocation routines used by NetBSD code, and are being added to facilitate updates to makefs. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D10291 Notes: svn path=/head/; revision=316572
* Port the getaddrinfo(1) utility from NetBSDEric van Gyzen2017-03-203-1/+320
| | | | | | | | | | | | | Submitted by: Lohith Bellad <lohithbsd@gmail.com> Reviewed by: hiren (earlier rev), ae Obtained from: NetBSD MFC after: 1 week Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9365 Notes: svn path=/head/; revision=315640
* Improve libnetbsd compatibility with NetBSDEnji Cooper2017-02-078-3/+199
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is being made to diff reduce/reduce duplication in contrib/netbsd-tests and to facilitate further porting of software from NetBSD Add the following headers: - sys/event.h: -- sys/types.h is required for kqueue on FreeBSD, but not NetBSD. - sys/types.h: -- NBBY is defined in sys/param.h on FreeBSD, not sys/types.h like on NetBSD. Pull in sys/param.h to have parity with NetBSD. - sys/wait.h: -- Define wrusage as __wrusage for parity with NetBSD typedef. - glob.h -- Define __gl_stat_t as "struct stat" for parity with NetBSD typedef. - pthread.h: -- Pull in pthread_np.h for _np functions defined separately on FreeBSD. Improve compatibility with NetBSD in the following headers: - sha1.h: -- define SHA1_CTX as SHA_CTX -- define SHA1Final as SHA1_Final - sha2.h: -- #include sha384 to pick up all of the SHA 384 bit macros and definitions. - util.h: -- Add sys/types.h to util.h to pollute the header for types used in flags_to_string and string_to_flags (u_long) as NetBSD doesn't require them for the functions. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313404
| * libnetbsd: add pthread.h compat headerEnji Cooper2017-01-161-0/+36
| | | | | | | | | | | | | | | | | | FreeBSD has pthread_np.h, which is used for consolidating all non-POSIX functions, but NetBSD doesn't have this concept. Make _np functions work seamlessly when ported from NetBSD to FreeBSD Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312303
| * libnetbsd: add sys/event.h compat headerEnji Cooper2017-01-151-0/+42
| | | | | | | | | | | | | | | | This adds in necessary sys/types.h pollution for uintptr_t used in sys/event.h, which according to kqueue(2) on NetBSD isn't necessary. Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312242
| * libnetbsd: add sys/types.h header which pollutes itself with sys/param.h toEnji Cooper2017-01-151-0/+37
| | | | | | | | | | | | | | pick up NBBY, etc Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312241
| * libnetbsd: add sys/wait.h compat headerEnji Cooper2017-01-151-0/+37
| | | | | | | | | | | | | | This just defines wrusage to __wrusage for now (they're both structs). Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312240
| * libnetbsd: more portability fixes with stdio.h and util.hEnji Cooper2017-01-152-1/+38
| | | | | | | | | | | | | | | | | | | | - stdio.h needs to pull in stdio.h/util.h for fparseln, not util.h - util.h needs to #include sys/types.h for flags_to_string, etc as flags_to_string uses u_long, which is typedef'ed in sys/types.h on FreeBSD Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312238
| * Fix copy-pasted copyrightEnji Cooper2017-01-151-24/+21
| | | | | | | | | | | | | | | | | | - Add Dell instead of "SRI International" - Use standard BSD 2-clause copyright - Remove DARPA sponsorship advertisement Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312225
| * libnetbsd: add compat header for glob.hEnji Cooper2017-01-151-0/+42
| | | | | | | | | | | | | | | | This is to diff reduce unnecessary additions to contrib/netbsd-tests/lib/libc/gen/t_glob.c Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312222
| * libnetbsd: improve sha2.h compat with FreeBSDEnji Cooper2017-01-141-0/+1
| | | | | | | | | | | | | | | | Add sha384 #include to libnetbsd's copy of sha2.h to expose all of the SHA384 support via the header. Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312138
| * libnetbsd: improve sha1.h compat with FreeBSDEnji Cooper2017-01-141-0/+3
| | | | | | | | | | | | | | Map SHA1_CTX to SHA_CTX and SHA1Final to SHA1_Final Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312135
| * Add stdio.h #include for fparselnEnji Cooper2017-01-141-2/+3
|/ | | | | | | | fparseln on FreeBSD requires stdio.h, then libutil.h, whereas NetBSD only requires util.h Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312132
* Add __BIT and __BITS macros from NetBSD to help support new testcasesEnji Cooper2017-01-121-0/+9
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=311972
* Include "util.h", not <util.h>. The header is in the same directoryMarcel Moolenaar2016-10-241-1/+2
| | | | | | | | as the C file. There may be a <util.h> on the host when compiling on macOS or Linux, causing conflicts. Notes: svn path=/head/; revision=307871
* When compiling on macOS or Linux, __dead can be defined already.Marcel Moolenaar2016-10-241-0/+2
| | | | | | | Conditionally define __dead. Notes: svn path=/head/; revision=307870
* First pass through library packaging.Glen Barber2016-02-041-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* Fix spelling error.Craig Rodrigues2015-11-051-1/+1
| | | | | | | Reported by: junovitch Notes: svn path=/head/; revision=290378
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge from head@274682Simon J. Gerraty2014-11-193-0/+159
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=274683
| * New dependenciesSimon J. Gerraty2013-10-131-0/+15
| | | | | | | | Notes: svn path=/projects/bmake/; revision=256418
* | Commit missing header for sys/time.h compat on NetBSD to unbreak the amd64/i386Enji Cooper2014-11-041-0/+65
| | | | | | | | | | | | | | | | | | build Pointyhat to: me (forgot to svn add it sooner) Notes: svn path=/head/; revision=274078
* | The NetBSD libc tests use several definitions/macros that aren't available inEnji Cooper2014-10-222-0/+94
|/ | | | | | | | | | | | | | | FreeBSD Add the missing compat definitions/macros to lib/libnetbsd so the testcases can be compiled with libnetbsd without having to invent ad hoc #define's, or having to convert things over to FreeBSD idioms Reviewed by: brooks Phabric: D993 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=273482
* Add libnetbsd, a thin compatibility layer intended to allow a limitedBrooks Davis2012-12-2110-0/+588
set of NetBSD software to compile as part of the FreeBSD build with little or no modifiction. It is built as a static library and not installed for general use. Likewise, its header files are not installed. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=244557