Sascha Wildner [Sun, 7 Jan 2018 06:19:18 +0000 (07:19 +0100)]
ac(8): Staticize and raise WARNS to 6.
While here, put a CONSOLE_TTY specific prototype in a corresponding
#ifdef.
Eitan Adler [Sun, 7 Jan 2018 05:21:56 +0000 (21:21 -0800)]
xtr(1) clean up
- clean usage of comma operator
- use char instead of int
- add brackets
Reviewed-by: dillon
Tomohiro Kusumi [Sat, 6 Jan 2018 18:37:53 +0000 (20:37 +0200)]
etc/autofs: Sync with FreeBSD commits
Bring in below from FreeBSD@GitHub in 1 commit.
64382aa4e68 Add /etc/autofs/include_nis, a non-rewriting NIS map.
a5ff2845f3f Rename /etc/autofs/include_nis to /etc/autofs/include_nis_nullfs, to indicate that this script provides nullfs map rewriting for local mounts.
759e1781cc0 Change formatting; no functional changes.
Tomohiro Kusumi [Sat, 6 Jan 2018 18:28:14 +0000 (20:28 +0200)]
etc/autofs: Cleanup trailing whitespaces
This generates diff between these and FreeBSD scripts.
Tomohiro Kusumi [Sat, 6 Jan 2018 18:16:46 +0000 (20:16 +0200)]
usr.sbin/fstyp: Remove local MIN() definition
This isn't needed.
Having local MIN() also broke compilation on NetBSD with ZFS support,
due to ZFS headers already included sys/param.h.
Matthew Dillon [Sat, 6 Jan 2018 18:13:31 +0000 (10:13 -0800)]
kernel - Intel user/kernel separation MMU bug fix part 6 (stabilization)
* Stabilization. Fix a bug which can crash the machine when the sysctl
is toggled back and forth on a live system.
* The fork code was inheriting ISOMMU in pcb_flags from the parent
process, but potentially not getting a pmap with the feature configured
due to the sysctl being toggled off.
Reported-by: profmakx, zrj, swildner
Sascha Wildner [Sat, 6 Jan 2018 16:58:09 +0000 (17:58 +0100)]
kernel/lagg: Normalize various #if XXX and #ifdef XXX to #if 0.
Fixes some -Wundef warnings too.
No functional change.
zrj [Sat, 6 Jan 2018 14:39:31 +0000 (16:39 +0200)]
drm/radeon: Fix -Wundef warnings.
Pointed-by: swildner
Sepherosa Ziehau [Sat, 6 Jan 2018 05:03:41 +0000 (13:03 +0800)]
ipfw: ICMP_MAXTYPE could be any value; don't assume it's < 32
It is 40 as of this commit.
Sepherosa Ziehau [Sat, 6 Jan 2018 04:58:02 +0000 (12:58 +0800)]
ipfw: Support all possible ICMP types.
Sepherosa Ziehau [Sat, 6 Jan 2018 03:48:12 +0000 (11:48 +0800)]
ipfw.8: Reset do_pipe and do_table.
Since ipfw_main could be called in a loop, if the rules are loaded
from file.
Sepherosa Ziehau [Sat, 6 Jan 2018 03:35:53 +0000 (11:35 +0800)]
ipfw: Define instruction size max.
Matthew Dillon [Sat, 6 Jan 2018 07:53:47 +0000 (23:53 -0800)]
kernel - Intel user/kernel separation MMU bug fix part 5
* Fix iretq fault handling. As I thought, I messed it up with
the trampoline patches. Fixing it involves issuing the correct
KMMU* macros to ensure that the code is on the correct stack
and has the correct mmu context.
Revalidate with a test program that uses a signal handler to
change the stack segment descriptor to something it shouldn't
be.
* Get rid of the "kernel trap 9..." console message for the iretq
fault case.
Sascha Wildner [Sat, 6 Jan 2018 05:31:50 +0000 (06:31 +0100)]
Add __attribute__((__noreturn__)) to various function prototypes in usr.bin/.
This general cleanup is useful in various ways. It helps the compiler
optimize better and it also helps later GCCs detect better when to give
-Wimplicit-fallthrough warnings and when not.
Found-with: -Wsuggest-attribute=noreturn
Sascha Wildner [Sat, 6 Jan 2018 05:15:37 +0000 (06:15 +0100)]
xstr(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 05:06:20 +0000 (06:06 +0100)]
whereis(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 05:03:17 +0000 (06:03 +0100)]
usbhidaction(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 04:58:52 +0000 (05:58 +0100)]
uname(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 04:39:51 +0000 (05:39 +0100)]
tcopy(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 04:23:41 +0000 (05:23 +0100)]
symorder(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 04:20:07 +0000 (05:20 +0100)]
stat(1): Staticize.
Sascha Wildner [Sat, 6 Jan 2018 04:15:08 +0000 (05:15 +0100)]
ruptime(1): Staticize and remove a wrong prototype.
Sascha Wildner [Sat, 6 Jan 2018 03:38:16 +0000 (04:38 +0100)]
nfsstat(1): Staticize and remove an unused variable.
Matthew Dillon [Fri, 5 Jan 2018 17:52:13 +0000 (09:52 -0800)]
kernel - Intel user/kernel separation MMU bug fix part 4
* This completes 99% of the meltdown mitigation work, implementing
a feature which isolates user and kernel page tables. There
are currently two remaining TODO's:
(1) We still map all of kernel text (btext to etext) to avoid
having to tabulate vector entry and exit points. No
kernel data or bss or any other kernel data is mapped,
beyond trampoline and cpu hw requirements.
(2) iretq + %gs fault bug needs to be re-tested.
* Automate enablement of machdep.isolated_user_pmap added.
The bug mitigation will be enabled for all Intel CPUs.
This will increase system call and interrupt overhead by
150-250nS. System-call-heavy or interrupt-heavy workloads
will be more severely effected (network, database, high speed
storage, etc), up to 30%. Nominal workloads such as compiles will
lose around 5%.
* Cleanup boot messages (zrj).
* Rename sysctl from vm.isolated_user_pmap to
machdep.isolated_user_pmap (zrj)
Matthew Dillon [Fri, 5 Jan 2018 08:47:46 +0000 (00:47 -0800)]
kernel - Intel user/kernel separation MMU bug fix part 3/3
* Implement the isolated pmap template, iso_pmap. The pmap code will
generate a dummy iso_pmap containing only the kernel mappings required
for userland to be able to transition into the kernel and vise-versa.
The mappings needed are:
(1) The per-cpu trampoline area for our stack (rsp0)
(2) The global descriptor table (gdt) for all cpus
(3) The interrupt descriptor table (idt) for all cpus
(4) The TSS block for all cpus (we store this in the trampoline page)
(5) Kernel code addresses for the interrupt vector entry and exit
* In this implementation the 'kernel code' addresses are currently just
btext to etext. That is, the kernel's primary text area. Kernel
data and bss are not part of the isolation map.
TODO - just put the vector entry and exit points in the map, and
not the entire kernel.
* System call performance is reduced when isolation is turned on.
100ns -> 350ns or so. However, typical workloads should not lose
more than 5% performance or so. System-call heavy and interrupt-heavy
workloads (network, database, high-speed storage, etc) can lose a lot
more performance.
We leave the trampoline code in-place whether isolation is turned on
or not. The trampoline overhead, without isolation, is only 5nS or so.
* Fix a missing exec-related trampoline initialization.
* Clean-up kernel page table PTEs a bit. PG_M is ignored on non-terminal
PTEs, so don't set it. Also don't set PG_U in non-terminal kernel
page table pages (PG_U is never set on terminal PTEs so this wasn't
a problem, but we should be correct).
* Fix a bug in fast_syscall's trampoline stack. The wrong stack
pointer was being loaded.
* Move mdglobaldata->gd_common_tss to privatespace->common_tss.
Place common_tss in the same page as the trampoline to reduce
exposure to globaldata from the isolated MMU context.
* 16-byte align struct trampframe for convenience.
* Fix a bug in POP_FRAME. Always cli in order to avoid getting
an interrupt just at the iretq instruction, which might be
misinterpreted.
Matthew Dillon [Thu, 4 Jan 2018 18:34:51 +0000 (10:34 -0800)]
kernel - Intel user/kernel separation MMU bug fix part 2/3
* Cleanup pass. Throw in some documentation.
* Move the gd_pcb_* fields into the trampoline page to allow
kernel memory to be further restricted in part 3.
Matthew Dillon [Wed, 3 Jan 2018 20:45:17 +0000 (12:45 -0800)]
kernel - Intel user/kernel separation MMU bug fix part 1/3
* Part 1/3 of the fix for the Intel user/kernel separation MMU bug.
It appears that it is possible to discern the contents of kernel
memory with careful timing measurements of instructions due to
speculative memory reads and speculative instruction execution
by Intel cpus. This can happen because Intel will allow both to
occur even when the memory access is later disallowed due to
privilege separation in the PTE.
Even though the execution is always aborted, the speculative
reads and speculative execution results in timing artifacts which
can be measured. A speculative compare/branch can lead to timing
artifacts that allow the actual contents of kernel memory to be
discerned.
While there are multiple speculative attacks possible, the Intel
bug is particularly bad because it allows a user program to more
or less effortlessly access kernel memory (and if a DMAP is
present, all of physical memory).
* Part 1 implements all the logic required to load an 'isolated'
version of the user process's PML4e into %cr3 on all user
transitions, and to load the 'normal' U+K version into %cr3 on
all transitions from user to kernel.
* Part 1 fully allocates, copies, and implements the %cr3 loads for
the 'isolated' version of the user process PML4e.
* Part 1 does not yet actually adjust the contents of this isolated
version to replace the kernel map with just a trampoline map in
kernel space. It does remove the DMAP as a test, though. The
full separation will be done in part 3.
Sascha Wildner [Fri, 5 Jan 2018 16:46:05 +0000 (17:46 +0100)]
kernel/vmxnet3: Fix wrong check (no functional change).
Eitan Adler [Fri, 5 Jan 2018 06:48:14 +0000 (22:48 -0800)]
morse(6): correct email for original author
Obtained-From: FreeBSD
Sascha Wildner [Fri, 5 Jan 2018 02:01:22 +0000 (03:01 +0100)]
libthread_xu: Fix a typo in a comment.
Sascha Wildner [Fri, 5 Jan 2018 01:57:01 +0000 (02:57 +0100)]
Clean up a bit for symlinked headers.
<errno.h> as well as <poll.h> are symlinked to their <sys/...>
counterparts, so there is no need to include both.
Also fix a comment that suggests that there is a difference.
Peeter Must [Thu, 4 Jan 2018 12:34:57 +0000 (14:34 +0200)]
kernel/evdev: Expose headers to userland.
zrj [Thu, 4 Jan 2018 10:02:59 +0000 (12:02 +0200)]
libc/nls: Sync with FreeBSD.
Move out catentry structure destroy code to its own function.
Set refcount = 0 in SAVEFAIL() macro.
Taken-from: FreeBSD
zrj [Wed, 3 Jan 2018 07:25:04 +0000 (09:25 +0200)]
Remove src/share/nls.
It was never hooked into the build after initial Citrus import in:
32a7b49af5025caa26dc703952f47b39d046c9eb
zrj [Wed, 3 Jan 2018 07:20:52 +0000 (09:20 +0200)]
Simplify legacy share/nls handling.
Remove src/nls.alias and create legacy compat links directly.
The nls.alias method is unsafe and will break with our 'make upgrade'.
Eitan Adler [Thu, 4 Jan 2018 05:19:08 +0000 (21:19 -0800)]
morse(6): add static where appropriate
Sepherosa Ziehau [Wed, 3 Jan 2018 05:41:00 +0000 (13:41 +0800)]
ipfw.8: Fix 'not [iface]' and 'not [iface:net]' support
Sepherosa Ziehau [Sat, 9 Dec 2017 04:10:25 +0000 (12:10 +0800)]
em/emx: Sync with Intel's em 7.6.2
- Fix RX filter settings when exiting promiscous mode.
- Add workaround for I219 resetting.
- Fix some settings for 82574.
Tested-by: dillon@ (I219)
François Tigeot [Tue, 2 Jan 2018 21:25:54 +0000 (22:25 +0100)]
drm/i915: Add Coffee Lake support
* This commit mostly adds PCI IDs
* Handle all Coffee Lake GPUs as Kaby Lake ones for now
zrj [Tue, 2 Jan 2018 07:03:55 +0000 (09:03 +0200)]
cal(1): Rename to use de_AT.ISO8859-15 calendar.
zrj [Tue, 2 Jan 2018 06:02:42 +0000 (08:02 +0200)]
locales: Add "is_IS.ISO8859-1" locale.
Mainly for testing, we already have -15 and UTF-8 ones.
zrj [Tue, 2 Jan 2018 05:59:15 +0000 (07:59 +0200)]
cldr2def: Fix few typos in tools.
While there, do not hardcode /usr/src as a source directory.
zrj [Mon, 1 Jan 2018 08:51:48 +0000 (10:51 +0200)]
kernel/nata: Add loader hint to disable nata attach.
For cases where atapci devices (including cdroms) would fail to attach or have
other issues and are not needed for booting(like setup uses CAM, NVME, VIRTIO).
We include nata(4) in a X86_64_GENERIC kernel config, probing of ata bus can be
disabled by setting: "atapciN.disabled=1" (where N is ata pci unit).
Sascha Wildner [Mon, 1 Jan 2018 00:00:00 +0000 (01:00 +0100)]
Bump the copyrights.
Happy new 2018 to everyone and thanks for all the help and support! :)
zrj [Mon, 27 Nov 2017 08:28:03 +0000 (10:28 +0200)]
kernel/nata: Add more INTEL chipset IDs.
Refactor the ata_intel_new_setmode().
Taken-from: FreeBSD
zrj [Mon, 27 Nov 2017 07:57:17 +0000 (09:57 +0200)]
kernel/nata: Add bunch of chipset IDs.
Minor fixes here and there. Expertimental.
Taken-from: FreeBSD
zrj [Mon, 27 Nov 2017 06:05:41 +0000 (08:05 +0200)]
kernel/nata: Handle soft resets in ahci better.
This brings back the ATA_AHCI_GHC_AE|ATA_AHCI_GHC_HR.
Could not make ata_ahci_issue_cmd() to work reliably on my Intel 63XXESB2
SATA300 controller, for now this version will do. Experimental.
It is better to focus on implementing the CAM_ATA and prune ata-ahci.c.
zrj [Sun, 26 Nov 2017 15:53:16 +0000 (17:53 +0200)]
kernel/nata: Deal with ATA_DEV() and atadev->unit.
Hopefully I got all places correctly.
While there, some misc cleanup.
zrj [Sun, 26 Nov 2017 13:04:22 +0000 (15:04 +0200)]
kernel/nata: Fix HT1000 DMA engine 64k transfer issue.
Some chips seem to need 16bit writes.
Taken-from: FreeBSD
Also noticed interesting change back in:
5b527db0a83182c576889a67555810d780759bb7
zrj [Sun, 26 Nov 2017 12:13:19 +0000 (14:13 +0200)]
kernel/nata: Extract ata_tf_read() and ata_tf_write().
While there swap check order ata_intel_31244_command() and
adjust few places to use request->parent.
No functional change.
zrj [Sun, 26 Nov 2017 11:02:45 +0000 (13:02 +0200)]
kernel/nata: Extract ad_get_geometry().
While there, extract ata_unit2str() too.
zrj [Sat, 25 Nov 2017 19:07:45 +0000 (21:07 +0200)]
kernel/nata: Add Adaptec 1420 support.
It depends on Marwell so group it together.
While there, split out Cenatek, Micron generic chipset support to their own
drivers. Also fix up few drivers that cannot reliably do 64k transfers and
remove few unused ATA_AHCI_P_CMD_* defines.
Taken-from: FreeBSD
zrj [Sat, 25 Nov 2017 16:21:00 +0000 (18:21 +0200)]
kernel/nata: Extract reset functions in chipset drivers.
Explicitly do not import any port multipliers support for now.
Use only higher half of device signature, some devices return
incorrect values in lower part and causes issues in detection.
All of this is a bit messy in ata-ahci.c.
While there, include several later bugfixes.
Taken-from: FreeBSD
zrj [Sat, 25 Nov 2017 09:01:41 +0000 (11:01 +0200)]
kernel/nata: Misc cleanup in non chipset codes.
* Move some stuff around.
* Add local implementations of biofinish() and g_io_deliver().
* Add prints for READ_NATIVE_MAX_ADDRESS.
* Use >= in comparisons for devclass_get_maxunit()
No functional change.
zrj [Fri, 24 Nov 2017 15:17:16 +0000 (17:17 +0200)]
kernel/nata: Return more data for natacontrol(8).
* include info about backing subdisks
* use last 16 bytes of serial number in meta (as MatrixRAID does)
* add optional automatc spindown/spinup support (dmesg noisy)
* various cleanups
* natacontrol(8) additions + cleanup
Taken-from: FreeBSD
zrj [Fri, 24 Nov 2017 13:08:13 +0000 (15:08 +0200)]
kernel/nata: Pass interrupt function to ata_setup_interrupt().
There is one strange change ATA_AHCI_GHC_HR 0x80000001 -> 0x00000001.
It is used for AHCI reset, all other bits are already in place so going
with the flow on this one.
Futher reduce differences with FreeBSD r183724:
* add ata_netcell_setmode() instead of relying on ata_generic_chipinit()
* add ata_promise_mio_setprd() for promise
* prepare siliconimage for port multipliers
* spray some KASSERT() here and there
* fix typo for ATA_READ_NATIVE_MAX_ADDRESS
Taken-from: FreeBSD
zrj [Thu, 23 Nov 2017 20:24:45 +0000 (22:24 +0200)]
kernel/nata: Constification.
Attempt at making nata a bit more safe:
* const attributes where possible
* add and use ata_set_desc() helper
* add early returns (for future split modules support)
* fix a bug in ata-sis.c where it was patching ids table.
As a bonus, now CCVER=gcc47 no longer warn on -Warray-bounds in ata-ite.c,
finally allowing to buildkernel w/o NO_WERROR (ata_mode2idx() in ata-pci.c).
No functional change intended, except for bugfix in ata-sis.c.
zrj [Thu, 23 Nov 2017 17:34:27 +0000 (19:34 +0200)]
kernel/nata: Separate sata bits.
Do some cleanup of defines and headers.
Rename few ATI controllers.
While there, remove no longer used PC98 defines.
zrj [Thu, 23 Nov 2017 12:19:53 +0000 (14:19 +0200)]
kernel/nata: Allow disabling complicated chipset drivers.
There is no point for ATA_NO_ATI option (ati chipset setup relies on sii).
Using ATA_NO_AHCI will automatically disable these ata chipset drivers:
intel, marvel, nvidia, promise, siliconimage, sis, via
Only for development until nata(4) gets updated.
zrj [Thu, 23 Nov 2017 10:10:10 +0000 (12:10 +0200)]
kernel/nata: Move-out public chipset setup related defines.
Taken-from: FreeBSD
zrj [Thu, 23 Nov 2017 07:33:31 +0000 (09:33 +0200)]
kernel/nata: Use reg == 0x63 for NVIDIA chipsets.
It is not clear whether it was modularization artifact or actual bugfix.
For now changing to match FreeBSD ata variant. No hardware to test it.
This might need to be reverted if chipset initialization is wrong.
zrj [Thu, 23 Nov 2017 05:50:35 +0000 (07:50 +0200)]
kernel/nata: Use cfg1 on AMD and NVIDIA chipsets.
It is now clear that only one config state is needed.
Mainly to match the FreeBSD variant for less diffs.
zrj [Wed, 22 Nov 2017 19:04:14 +0000 (21:04 +0200)]
kernel/nata: Remove common ata_via_family_setmode().
Just extract and use vendor specific versions.
Note: there is some confusion about reg == 0x53 vs 0x63 for some chipsets.
For now leave the previous behaviour, thus no functional change.
zrj [Wed, 22 Nov 2017 13:54:19 +0000 (15:54 +0200)]
kernel/nata: Split out huge ata-chipsets.c
In preparations for pseudo-modularization.
If we decide to modularizate this one, it would be just wrapping each of the
chipsets sources in its own kernel module. Current variant just simply includes
everything back together while still allowing to work with individual chipset.
Thus no functional change.
Sascha Wildner [Sun, 31 Dec 2017 16:49:00 +0000 (17:49 +0100)]
ftpd(8): Revert a Makefile change that was not meant to be pushed.
Sascha Wildner [Sun, 31 Dec 2017 16:42:07 +0000 (17:42 +0100)]
Add __attribute__((__noreturn__)) to various function prototypes in libexec/.
This general cleanup is useful in various ways. It helps the compiler
optimize better and it also helps later GCCs detect better when to give
-Wimplicit-fallthrough warnings and when not.
Found-with: -Wsuggest-attribute=noreturn
Sascha Wildner [Sun, 31 Dec 2017 15:16:09 +0000 (16:16 +0100)]
rpc.sprayd(8): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 15:12:01 +0000 (16:12 +0100)]
tftpd(8): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 14:59:45 +0000 (15:59 +0100)]
telnetd(8): Remove duplicate prototypes.
zrj [Sun, 31 Dec 2017 14:13:54 +0000 (16:13 +0200)]
tools: Do not hardcode path to perl.
Solves issue with DPorts and Ravenports.
zrj [Sun, 31 Dec 2017 14:12:54 +0000 (16:12 +0200)]
world: Avoid extended ASCII.
Use UTF-8 where needed, use plain ASCII where possible.
No functional change.
zrj [Sun, 31 Dec 2017 14:08:21 +0000 (16:08 +0200)]
sys: Avoid extended ASCII.
Use UTF-8 where needed, use plain ASCII where possible.
Minor cleanup in dev/raid/arcmsr/arcmsr.h (for readability).
No functional change.
Sascha Wildner [Sun, 31 Dec 2017 13:53:38 +0000 (14:53 +0100)]
Remove various 'r' commands and daemons.
rcp(1), rlogin(1), rlogind(1), rsh(1) and rshd(1). In the unlikely case
that someone still needs them, they can use the net/bsdrcmds port to
bring them back.
FreeBSD removed them in October 2017 and I took their work as a guideline.
zrj [Sun, 31 Dec 2017 07:56:17 +0000 (09:56 +0200)]
lib/libc_rtld: Fix 'make install'.
Do not install nls categories and uuid(3) manpages. These are handled by libc.
Eitan Adler [Sun, 31 Dec 2017 07:03:29 +0000 (23:03 -0800)]
skel: Quote default alias for pager
Sascha Wildner [Sun, 31 Dec 2017 03:47:16 +0000 (04:47 +0100)]
mt(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 03:40:39 +0000 (04:40 +0100)]
mkstr(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 03:30:52 +0000 (04:30 +0100)]
m4(1): Add some __printflike.
Sascha Wildner [Sun, 31 Dec 2017 03:11:16 +0000 (04:11 +0100)]
locate(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 03:00:29 +0000 (04:00 +0100)]
localedef(1): Add some __printflike.
Sascha Wildner [Sun, 31 Dec 2017 02:34:15 +0000 (03:34 +0100)]
locale(1): Staticize and remove an unused variable.
Sascha Wildner [Sun, 31 Dec 2017 02:30:05 +0000 (03:30 +0100)]
leave(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 02:25:19 +0000 (03:25 +0100)]
gencat(1): Staticize and remove a wrong prototype.
zrj [Thu, 28 Dec 2017 12:30:07 +0000 (14:30 +0200)]
libc: Remove 'table' argument from call to collate_range_cmp() in __sccl().
This prevents segfaults when called with say incomplete locale.
Introduce a separate wide variant of __wcollate_range_cmp() and use proper
variant were needed. The __sccl() does not use wchar_t types.
Also use '\0' instead of plain 0.
Similar change was done in FreeBSD.
zrj [Thu, 28 Dec 2017 11:34:53 +0000 (13:34 +0200)]
libc/locale: Fix leading space issue in wcstof().
On failure correctly set endptr to report failure.
It was reported by libc++ testsuite.
Taken-from: FreeBSD
zrj [Sat, 30 Dec 2017 18:32:25 +0000 (20:32 +0200)]
newlocale(3): Add support for native complex locale.
Now newlocale(LC_ALL_MASK, setlocale(LC_ALL, NULL), NULL) should work
as intended even with combinations like LC_CTYPE=lv_LT LC_TIME=lt_LT.
While there, add compat support in setlocale(3) and fix a wrong git am
in previous newlocale(3) commit.
Eitan Adler [Fri, 29 Dec 2017 23:14:52 +0000 (15:14 -0800)]
bsd-family-tree: Update to latest
- add NetBSD 6.06, 7.1.1
- add HardenedBSD 10, 11
- correct 'NDB' to 'NBD'
Obtained-from: FreeBSD
Sascha Wildner [Fri, 29 Dec 2017 19:24:10 +0000 (20:24 +0100)]
shutdown(8): Fix building with -DDEBUG.
Sascha Wildner [Fri, 29 Dec 2017 19:20:51 +0000 (20:20 +0100)]
csplit(1): Staticize.
zrj [Fri, 29 Dec 2017 13:51:32 +0000 (15:51 +0200)]
newlocale(3): Add compat support for c++ runtime libs.
Implement simple 'private' env support that mimics the internal
__get_locale_env(). Not to be used in a context of C.
While there, fix off by one in array index (_LC_LAST vs XLC_LAST).
zrj [Thu, 28 Dec 2017 11:05:18 +0000 (13:05 +0200)]
libc/locale: Prevent bad builds on partial XLC_ enum changes.
Add static asserts and document them.
Taken-from: FreeBSD
zrj [Thu, 28 Dec 2017 11:01:36 +0000 (13:01 +0200)]
mbtowc(3): Set EILSEQ on incomplete character case.
There are several cases where EILSEQ is already handled, yet not handled
in other cases. Make it consistent.
In-discussion-with: swildner
Taken-from: OpenBSD
zrj [Fri, 29 Dec 2017 13:37:16 +0000 (15:37 +0200)]
libc/locale: Misc cleanup.
Mostly whitespace, use NULL and fix typo.
Sascha Wildner [Fri, 29 Dec 2017 12:08:30 +0000 (13:08 +0100)]
crunchgen(1)/crunchide(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:51:09 +0000 (12:51 +0100)]
compress(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:44:09 +0000 (12:44 +0100)]
chat(8): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:32:49 +0000 (12:32 +0100)]
cap_mkdb(1): Staticize and remove an unused variable.
Sascha Wildner [Fri, 29 Dec 2017 11:28:03 +0000 (12:28 +0100)]
c99(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:25:16 +0000 (12:25 +0100)]
btpin(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:21:26 +0000 (12:21 +0100)]
basename(1): Staticize.