aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Renumber copyright clause 4Warner Losh2017-02-28640-640/+640
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Sort declaration of sem_clockwait_npEric van Gyzen2017-02-281-1/+2
| | | | | | | | | | | | | | Also mention <time.h> in sem_timedwait(3), because POSIX does, and because the user will need it for clockid_t, struct timespec, and TIMER_ABSTIME. Reported by: bde MFC after: 9 days X-MFC with: r314179 Sponsored by: Dell EMC Notes: svn path=/head/; revision=314424
* Properly indent a default: label and avoid crashing when runningBjoern A. Zeeb2017-02-281-2/+2
| | | | | | | | | | under -v but cannot connect due to trying to print an int as %s [1]. Reported by: andrew [1] MFC after: 3 days Notes: svn path=/head/; revision=314396
* Remove SVR4 (System V Release 4) binary compatibility support.Gleb Smirnoff2017-02-281-1/+1
| | | | | | | | UNIX System V Release 4 is operating system released in 1988. It ceased to exist in early 2000-s. Notes: svn path=/head/; revision=314373
* librss: simplify some NULL checks.Pedro F. Giffuni2017-02-271-2/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=314322
* Remove unneeded variable initialization from r314319.Mariusz Zaborski2017-02-261-2/+0
| | | | | | | Pointed out by: kib Notes: svn path=/head/; revision=314320
* Don't try to open devices in the gettc() function which will alwaysMariusz Zaborski2017-02-261-11/+28
| | | | | | | | | | fail in the Capability mode. Instead silently fallback to the syscall method, which is done for example in the gettimeofday(2) function. Reviewed by: kib Notes: svn path=/head/; revision=314319
* Don't convert ENOENT to nothing for individual lookup, just for theWarner Losh2017-02-251-4/+6
| | | | | | | | | | iterative get_next interface. This prevents efivar(3) from printing 4k of 0's when a variable isn't set. Sponsored by: Netflix Notes: svn path=/head/; revision=314231
* Fix up r314189Enji Cooper2017-02-241-1/+1
| | | | | | | | | | | | | The conditional in do_buff_decode(..) after the while loop was accidentally inverted. Only increment the pointer for fmt if it's not NUL. MFC after: 2 weeks X-MFC with: r314189 Reported by: pstef Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314191
* Fix some minor style nits: put parentheses around return valuesEnji Cooper2017-02-241-10/+10
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314190
* Fix up NULL/'\0' uses and fix 2 derefs after NULLEnji Cooper2017-02-241-18/+19
| | | | | | | | | | | MFC after: 2 weeks Reported by: Coverity CID: 1018898, 1018899 Differential Revision: https://reviews.freebsd.org/D6142 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314189
* Add sem_clockwait_np()Eric van Gyzen2017-02-236-25/+93
| | | | | | | | | | | | | | | | | | | | | This function allows the caller to specify the reference clock and choose between absolute and relative mode. In relative mode, the remaining time can be returned. The API is similar to clock_nanosleep(3). Thanks to Ed Schouten for that suggestion. While I'm here, reduce the sleep time in the semaphore "child" test to greatly reduce its runtime. Also add a reasonable timeout. Reviewed by: ed (userland) MFC after: 2 weeks Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9656 Notes: svn path=/head/; revision=314179
* Remove an assembler flag, which is redundant since r309124. The upstreamJung-uk Kim2017-02-231-6/+0
| | | | | | | | | | | took care of it by introducing a macro NO_EXEC_STACK_DIRECTIVE. http://llvm.org/viewvc/llvm-project?rev=273500&view=rev Reviewed by: dim Notes: svn path=/head/; revision=314152
* Surround any unmangled C++ names in libcxxrt's version map with 'externDimitry Andric2017-02-221-12/+16
| | | | | | | | | | | | | "C++"', otherwise ld refuses to make the symbols global in the final library. This causes the __int128-related symbols to go missing when the library is stripped during installation. Helpful hints: emaste MFC after: 2 weeks X-MFC-With: r314061 Notes: svn path=/head/; revision=314104
* Add __int128-related symbols to libcxxrt's version map. Put these intoDimitry Andric2017-02-211-2/+19
| | | | | | | | | | | | | the same CXXABI verions as recent libstdc++. Note that __int128 types are only available on arches where long long is 128 bit wide. Noticed by: harti MFC after: 2 weeks Notes: svn path=/head/; revision=314061
* Make several improvements and corrections in the kenv(2) man pageEric van Gyzen2017-02-211-58/+54
| | | | | | | | MFC after: 3 days Sponsored by: Dell EMC Notes: svn path=/head/; revision=314055
* Upgrade to OpenPAM Radula.Dag-Erling Smørgrav2017-02-203-41/+0
|\ | | | | | | Notes: svn path=/head/; revision=313975
| * Vendor import of OpenPAM Radula.vendor/openpam/RADULADag-Erling Smørgrav2017-02-1928-137/+184
| | | | | | | | | | Notes: svn path=/vendor/openpam/dist/; revision=313968 svn path=/vendor/openpam/RADULA/; revision=313969; tag=vendor/openpam/RADULA
| * Merge upstream r825: fix line continuation in whitespaceDag-Erling Smørgrav2014-10-181-8/+24
| | | | | | | | Notes: svn path=/vendor/openpam/dist/; revision=273269
* | Add a file descriptor in struct url for netrcBaptiste Daroussin2017-02-203-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using libfetch in an application that drops privileges when fetching like pkg(8) then user complain because the application does not read anymore ${HOME}/.netrc. Now a caller can prepare a fd to the said file and manually assign it to the structure. It is also a first step to allow to capsicumize libfetch applications Reviewed by: allanjude, des Approved by: des Differential Revision: https://reviews.freebsd.org/D9678 Notes: svn path=/head/; revision=313974
* | Publish fp[get][set]sticky() for ARMv6.Michal Meloun2017-02-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Although fp[get][set]sticky() functions are obsolete, they are still required for GNU fortran49 library. MFC after: 2 months Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D9634 Notes: svn path=/head/; revision=313873
* | Publish __aeabi_uidiv and __aeabi_idiv as compatible symbols from libc.Michal Meloun2017-02-173-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to bug[1] in libcompiler_rt, all symbols declared by DEFINE_AEABI_FUNCTION_ALIAS() are not hidden. All these but two are explicitly exported from libc and don't causes problems. Remaining two, __aeabi_uidiv and __aeabi_idiv, infecting all non-versioned shared libraries. And these symbols are consumed by many (if not all) packages[2]. As workaround, export these from libc as compatible symbols, in global namespace. With this, these are still visible for rtld, but static linker doesn't use then. [1] DEFINE_AEABI_FUNCTION_ALIAS() macro uses '.set' directive for declaration of aliased symbol. Unfortunately, '.set' doesn't inherit visibility of base symbol, and macro don't explicitly sets visibility for aliased one. [2] Given symbols are exported from non-versioned libraries only if library itself uses them. So, if world is built for CPU with HW divide, these function are not used and given symbols are not exported. By this, contents of these libraries is not stable, and all packages fails to run. Note: Due to r313823 I'm forced to commit this too early, without leave enough time for proper review. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9632 Notes: svn path=/head/; revision=313866
* | Add documentations related to new APIs of r313761Mahdi Mokhtari2017-02-171-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | PR: 216850 216851 216852 216856 216857 216858 Submitted by: sgk@troutmask.apl.washington.edu Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491 Notes: svn path=/head/; revision=313864
* | Fix building of r313761 on platforms thatMahdi Mokhtari2017-02-172-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | `long double` is alias of `double` (MIPS, etc) PR: 216850 216851 216852 216856 216857 216858 Reported by: emsate Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491 Notes: svn path=/head/; revision=313863
* | Remove unnecessary #includes from the kqueue(2) man page.Ed Schouten2017-02-161-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that <sys/event.h> can be included on its own, adjust the manual page accordingly. Remove both unnecessary #include statements from the synopsis and the example code. While there, also add a note to the BUGS section to mention that previous versions of this header file still depend on <sys/types.h>. Reviewed by: ngie, vangyzen Differential Revision: https://reviews.freebsd.org/D9605 Notes: svn path=/head/; revision=313801
* | prefix UFS symbols with UFS_ to reduce namespace pollutionEd Maste2017-02-153-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically: ROOTINO -> UFS_ROOTINO WINO -> UFS_WINO NXADDR -> UFS_NXADDR NDADDR -> UFS_NDADDR NIADDR -> UFS_NIADDR MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency) Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_ Reviewed by: kib, mckusick Obtained from: NetBSD MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9536 Notes: svn path=/head/; revision=313780
* | Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msunMahdi Mokhtari2017-02-153-1/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to improve C11 conformance. PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde, mat, theraven Approved by: bde (src committer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D9491 Notes: svn path=/head/; revision=313761
* | Fix indentation in nss_configure().Mark Johnston2017-02-141-13/+13
| | | | | | | | | | | | | | | | MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313749
* | Register nss_atexit() before parsing nsswitch.conf for the first time.Mark Johnston2017-02-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | NSS modules are loaded when nsswitch.conf is parsed and may register their own atexit handlers with libc. nss_atexit() unloads any dynamically loaded NSS modules, so it should run only after the modules' atexit handlers have been invoked. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313748
* | Capsicum support for bhyve(8).Bartek Rutkowski2017-02-142-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds Capsicum sandboxing to bhyve. Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com> Reviewed by: grehan, oshogbo Approved by: emaste, grehan Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D8290 Notes: svn path=/head/; revision=313727
* | Handle clang 4.x+ with the compile-time exception added in r312213Enji Cooper2017-02-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | It also fails the assertions noted in bug 208703 PR: 208703 PR: 217084 Submitted by: jbeich MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313713
* | MFV r313676: libpcap 1.8.1Xin LI2017-02-133-30/+38
| | | | | | | | | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=313695
* | Consistently handle negative or wrapping offsets in the mmap(2) syscalls.Konstantin Belousov2017-02-121-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For regular files and posix shared memory, POSIX requires that [offset, offset + size) range is legitimate. At the maping time, check that offset is not negative. Allowing negative offsets might expose the data that filesystem put into vm_object for internal use, esp. due to OFF_TO_IDX() signess treatment. Fault handler verifies that the mapped range is valid, assuming that mmap(2) checked that arithmetic gives no undefined results. For device mappings, leave the semantic of negative offsets to the driver. Correct object page index calculation to not erronously propagate sign. In either case, disallow overflow of offset + size. Update mmap(2) man page to explain the requirement of the range validity, and behaviour when the range becomes invalid after mapping. Reported and tested by: royger (previous version) Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=313690
* | Manipulate OBJDIR with :H when referencing dso directoryEnji Cooper2017-02-111-1/+1
| | | | | | | | | | | | | | | | | | This reduces path lengths, etc in memory with make by a minimal value Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313651
* | ufs: Use UFS_MAXNAMLEN constantConrad Meyer2017-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (like NFS, EXT2FS, SVR4, IBCS2) instead of redefining the MAXNAMLEN constant. No functional change. Reviewed by: kib@, markj@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9500 Notes: svn path=/head/; revision=313475
* | Merge content from ^/projects/netbsd-tests-upstream-01-2017 into ^/headEnji Cooper2017-02-082-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary end-goal of this drop is ease future merges with NetBSD and collaborate further with the NetBSD project. The goal was (largely, not completely as some items are still oustanding in the NetBSD GNATS system) achieved by doing the following: - Pushing as many changes required to port contrib/netbsd-tests back to NetBSD as possible, then pull the upstream applied changes back in to FreeBSD. - Diff reduce with upstream where possible by: -- Improving libnetbsd header, etc compat glue. -- Using _SED variables to modify test scripts on the fly for items that could not be upstreamed to NetBSD. As a bonus for this work, this change also introduces testcases for uniq(1). Many thanks to Christos for working with me to get many of the changes back into the NetBSD project. In collaboration with: Christos Zoulas <christos@netbsd.org> MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313439
| * \ MFhead@r313404Enji Cooper2017-02-071-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=313406
| * | | Remove placeholder compat header for stdio.hEnji Cooper2017-02-071-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the end, dealing with fparseln was more bikeshed worthy than I anticipated, and polling stdio.h with libutil.h caused me more grief than necessary. Keeping the compat header around for no reason other than include_next'ing the stdio.h header in FreeBSD makes no sense. Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=313405
| * | | MFhead@r313380Enji Cooper2017-02-073-25/+24
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=313381
| * \ \ \ MFhead@r313360Enji Cooper2017-02-073-15/+40
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=313361
| * \ \ \ \ MFhead@r313243Enji Cooper2017-02-04159-888/+953
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=313244
| * | | | | | Remove util.h (libutil.h) pollution from stdio.h compat headerEnji Cooper2017-01-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing libutil.h causes grief later because hexdump(3) in FreeBSD and contrib/netbsd-tests/lib/libc/db/h_hash.c conflict. I'm working adapting h_hash.c, but for now, unbreak the build in the easiest way possible. Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312312
| * | | | | | Clarify #includes for hexdump vs sbuf_hexdumpEnji Cooper2017-01-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312310
| * | | | | | MFhead@r312305Enji Cooper2017-01-161-1/+20
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312306
* | | | | | | | Clean up trailing and leading whitespace for variables to make itEnji Cooper2017-02-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consistent with the rest of the file and style.Makefile(9) a bit more MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313438
* | | | | | | | Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describesEnji Cooper2017-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbuf_hexdump(9)'s behavior MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313437
* | | | | | | | Clarify #includes for hexdump(3) vs sbuf_hexdump(9)Enji Cooper2017-02-081-2/+3
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hexdump(3) only requires libutil.h, whereas sbuf_hexdump(9) requires sys/types.h (for ssize_t) and sys/sbuf.h MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313436
* | | | | | | 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