tools/build: Don't redefine open() for the linux bootstrapThis is needed to bootstrap llvm-tblgen on Linux since LLVM calls`::open(...)` which does not work if open is a statement macro.Also stop
tools/build: Don't redefine open() for the linux bootstrapThis is needed to bootstrap llvm-tblgen on Linux since LLVM calls`::open(...)` which does not work if open is a statement macro.Also stop defining O_SHLOCK/O_EXLOCK and update the only bootstrap toolsuser of those flags to deal with missing definitions.Reviewed By: jrtc27MFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D31226(cherry picked from commit 5f6c8ce2452da2da233e37bf4c2b6fccde8594b1)
show more ...
Remove the SYMVER build option.This option was added as a transition aide when symbol versioning wasfirst added. It was enabled by default in 2007 and is supported evenby the old GPLv2 binutils.
Remove the SYMVER build option.This option was added as a transition aide when symbol versioning wasfirst added. It was enabled by default in 2007 and is supported evenby the old GPLv2 binutils. Trying to disable it currently fails tobuild in libc and at this point it isn't worth fixing the build.Reported by: Michael DexterReviewed by: impDifferential Revision: https://reviews.freebsd.org/D24637
Remove "All rights reserved" from my files.See r333391 for the rationale.MFC after: 1 week
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorp
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier f
General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat 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 ofHighlander" tool: an older (2014) run over FreeBSD tree was useful as astarting point.
Renumber copyright clause 4Renumber cluase 4 to 3, per what everybody else did when BSD grantedthem permission to remove clause 3. My insistance on keeping the samenumbering for legal reasons is
Renumber copyright clause 4Renumber cluase 4 to 3, per what everybody else did when BSD grantedthem permission to remove clause 3. My insistance on keeping the samenumbering for legal reasons is too pedantic, so give up on that point.Submitted by: Jan Schaumann <[email protected]>Pull Request: https://github.com/freebsd/freebsd/pull/96
hash(3): protect in-memory page when using cross-endianness.When writing out pages in the "other endian" format, make a copyinstead of trashing the in-memory one.Obtained from: NetBSD (CVS rev.
hash(3): protect in-memory page when using cross-endianness.When writing out pages in the "other endian" format, make a copyinstead of trashing the in-memory one.Obtained from: NetBSD (CVS rev. 1.29)
btree(3): don't shortcut closing if the metadata is dirty.Obtained from: NetBSD (from krb5 tree)MFC after: 3 weeks
Fix prototype of dbm_open().The last argument of dbm_open() should be a mode_t according to POSIX;not an int.Reviewed by: pfg, kibDifferential Revision: https://reviews.freebsd.org/D6650
Let dbm's datum::dptr use the right type.According to POSIX, it should use void *, not char *. Unfortunately, thedsize field also has the wrong type. It should be size_t. I'm not goingto change t
Let dbm's datum::dptr use the right type.According to POSIX, it should use void *, not char *. Unfortunately, thedsize field also has the wrong type. It should be size_t. I'm not goingto change that, as that will break the ABI.Reviewed by: pfgDifferential Revision: https://reviews.freebsd.org/D6647
libc: make more use of the howmany() macro when available.We have a howmany() macro in the <sys/param.h> header that isconvenient to re-use as it makes things easier to read.
libc: use our roundup2/rounddown2() macros when param.h is available.rounddown2 tends to produce longer lines than the original code butstill it makes the code more readable.
libc: do not include <sys/types.h> where <sys/param.h> was already includedAccording to style(9):> normally, include <sys/types.h> OR <sys/param.h>, but not both.(<sys/param.h> already includes <
libc: do not include <sys/types.h> where <sys/param.h> was already includedAccording to style(9):> normally, include <sys/types.h> OR <sys/param.h>, but not both.(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
libc: replace 0 with NULL for pointers.While here also cleanup some surrounding code; particularlydrop some malloc() casts.Found with devel/coccinelle.Reviewed by: bde (previous version - all
libc: replace 0 with NULL for pointers.While here also cleanup some surrounding code; particularlydrop some malloc() casts.Found with devel/coccinelle.Reviewed by: bde (previous version - all new bugs are mine)
Follow-up r295924: Only sync hash-based db files open for writing when closing.This fixes a major performance regression when reading db files such asthe pw database during a 'pkg install'.MFC a
Follow-up r295924: Only sync hash-based db files open for writing when closing.This fixes a major performance regression when reading db files such asthe pw database during a 'pkg install'.MFC after: 1 weekTested by: baptReviewed by: baptSponsored by: EMC / Isilon Storage DivisionDifferential Revision: https://reviews.freebsd.org/D5868
libc: don't build compat functions if building WITHOUT_SYMVERWITHOUT_SYMVER necessarily implies building a system without symverbackwards compatability.Sponsored by: The FreeBSD Foundation
Allow O_CLOEXEC to be used in dbopen() flagsThere is also a small portability crutch, also present in NetBSD,to allow compiling on a system that doesn't define O_CLOEXEC.Approved by: rpaulo (men
Allow O_CLOEXEC to be used in dbopen() flagsThere is also a small portability crutch, also present in NetBSD,to allow compiling on a system that doesn't define O_CLOEXEC.Approved by: rpaulo (mentor)Obtained from: NetBSD (r1.17, r1.18)Differential Revision: https://reviews.freebsd.org/D5549
db(3): Fix aliasing warnings from modern GCC.While here also drop a malloc cast.Obtained from: NetBSD (CVS Rev. 1.18 - 1.20)
db(3): Fix aliasing warnings from modern GCC.Obtained from: NetBSD (CVS Rev. 1.20)
If we close or sync a hash-based db file, make sure to call fsync tomake sure the changes are on disk. The people at pfSense noticed thatit didn't always make it to the disk soon enough with soft u
If we close or sync a hash-based db file, make sure to call fsync tomake sure the changes are on disk. The people at pfSense noticed thatit didn't always make it to the disk soon enough with soft updates.Differential Revision: https://reviews.freebsd.org/D5186Reviewed by: garga, vangyzen, bapt, seMFC after: 1 week
Use intptr_t note ptrdiff_t when storing flags in the bottom bits ofpointers.Obtained from: CheriBSD (e3a69027cc5a384431156d61c90d4304387a9b9d)Sponsored by: DARPA, AFRL
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
db/recno: Open with close-on-exec like btree and hash do.
Switch libc from using _sig{procmask,action,suspend} symbols, whichare aliases for the syscall stubs and are plt-interposed, to thelibc-private aliases of internally interposed sigprocmask() etc.
Switch libc from using _sig{procmask,action,suspend} symbols, whichare aliases for the syscall stubs and are plt-interposed, to thelibc-private aliases of internally interposed sigprocmask() etc.Since e.g. _sigaction is not interposed by libthr, calling signal()removes thr_sighandler() from the handler slot etc. The result wasbreaking signal semantic and rtld locking.The added __libc_sigprocmask and other symbols are hidden, they arenot exported and cannot be called through PLT. The setjmp/longjmpfunctions for x86 were changed to use direct calls, and sincePIC_PROLOGUE only needed for functional PLT indirection on i386, it isremoved as well.The PowerPC bug of calling the syscall directly in the setjmp/longjmpimplementation is kept as is.Reported by: Pete French <[email protected]>Tested by: Michiel Boland <[email protected]>Reviewed by: jilles (previous version)Sponsored by: The FreeBSD FoundationMFC after: 1 week
Drop some unnecessary casts.Reported by: Clang static analyzerObtained from: NetBSD
1234567