Commit Graph

306287 Commits

Author SHA1 Message Date
riastradh c95d2b6372 libstdc++: Don't try to fflush stdin.
It doesn't work.  It's undefined behaviour.  On NetBSD, it will fail
with EBADF, if fd 0 isn't open for write, or if fd 0 is open for
write, it will write heap garbage to fd 0.

   If stream points to an output stream or an update stream in which
   the most recent operation was not input, the fflush function causes
   any unwritten data for that stream to be delivered to the host
   environment to be written to the file; otherwise, the behavior is
   undefined.

   (ISO C11 and ISO C17, Sec. 7.21.5.2 `The fflush function')

PR lib/58206
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114879
2024-05-20 11:20:53 +00:00
martin 5d83fcdc53 Use double quotes to include the local ./Makefile.hash 2024-05-20 09:48:42 +00:00
martin 85cbce96d9 Fix a few oversights from the renaming of dup3110 to dup3100 2024-05-20 09:37:34 +00:00
christos 545ba1d7ca Handle versions > 100 2024-05-20 04:16:48 +00:00
christos 95f4cd1417 remove dup line 2024-05-20 02:36:33 +00:00
christos cf1b9a81ef regen 2024-05-20 01:40:44 +00:00
christos 95f35978fa finish renaming __dup3110 to __dup3100 2024-05-20 01:33:39 +00:00
christos 679926ade6 Rename dup3110 to dup3100 to match historical practice for NetBSD-11,
because we already have kevent100. Fix compat_dup3 to belong in compat_100
not compat_110.
2024-05-20 01:30:33 +00:00
christos 8ba66bcbe2 Adjust to the new dup3 behavior for equal fds 2024-05-20 00:27:53 +00:00
christos eafd8a950e regen 2024-05-19 22:27:15 +00:00
christos 381b1356d0 version dup3 2024-05-19 22:25:47 +00:00
sjg c86b32d1f8 make: use separate function to include makefiles.
Have Dir_FindFile and Dir_FindInclude call FindFile with a
bool flag to indicate whether .CURDIR should be be searched at all.
2024-05-19 20:09:40 +00:00
sjg 8853c17bba Dir_FindFile treat sysIncPath and defSysIncPath as special
Rather than play games with adding .DOTLAST and then having to
exclude that from .SYSPATH, just have Dir_FindFile check if
path is sysIncPath or defSysIncPath and behave as if .DOTLAST seen
and also skip the final search of .CURDIR.

Fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty.
2024-05-19 17:55:54 +00:00
riastradh de0b2f54e0 linux: Add a few more cases to pci_get_class.
Should fix crash on boot with amdgpu now that the ACPI business is
enabled.
2024-05-19 17:36:08 +00:00
christos 2fc12b4c2a Amend for oldfd == newfd returning EINVAL in dup3 2024-05-19 16:04:46 +00:00
christos dad623351c PR/58266: Collin Funk: Fail if from == to, like FreeBSD and Linux. The test
is done in dup3 before any other tests so even if a bad descriptor it is
passed we will return EINVAL not EBADFD like Linux does.
2024-05-19 15:56:55 +00:00
tsutsui 2bea8b15aa Use native cd9660 blocksize to specify block numbers in cd9660.c.
This reduces diffs from src/usr.sbin/installboot/cd9660.c.
Also explicitly call cd9660_match() to get fstype->blocksize properly.
2024-05-19 15:52:34 +00:00
tsutsui 741cd576e4 Sync with src/usr.sbin/installboot/cd9660.c:
- include now properly updated cd9660_extern.h for function prototypes
  and remove them from local installboot.h
- use ISO_MAXNAMLEN rather than (BSD specific and incorrect) MAXNAMLEN
- use proper names for the secondary boot file
- appease several pointer signedness warnings (not fatal on HOST tools)
2024-05-19 15:51:30 +00:00
tsutsui 7e1194a3e4 Put a RAMDISK kernel and SYS_UBOOT into hp300 installcd to make it bootable.
This should finally close PR/54455.
2024-05-19 15:50:00 +00:00
tsutsui 4882e3f0bf Add cd9660 support to search a bootloader file in the target file system.
Also add CD boot support for hp300, using a bootloader file in cd9660 fs.
This is a tool's part to close PR/54455.

HP 9000/300 machines read LIF directory entry allocated after
the LIF volume header at the top of the boot disk during bootstrap,
and a bootstrap file must be contiguously allocated on the disk
due to limitation of the LIF specification.

Current NetBSD/hp300's bootloader is larger than ~80KB so we have
to prepare a special 'boot' partition for FFS (that has only 8KB (ffsv1)
or 32KB (ffsv2) spaces) disks to put such a large bootloader.

On the other hand, on ISO9660 fs all files are allocated contiguously
so we can specify a bootloader file in the target ISO9660 directly
in the LIF directory entry.

Note we can simply use the existing "append" option to create bootable
CD ISO for hp300, but it looks some emulators (at leaset MAME) reject
such non-standard ISO files, i.e. with an appended bootloader file at
the end of the image.
2024-05-19 15:48:57 +00:00
gutteridge 37dff36670 acronyms.comp: add SBI 2024-05-19 15:47:38 +00:00
tsutsui 448aa2ad53 Reorder function prototypes per source files. 2024-05-19 15:44:21 +00:00
tsutsui 173d80ed84 Install cd9660 related system headers for tools installboot(8) builds. 2024-05-19 15:43:24 +00:00
tsutsui 40d859218e Make cd9660_util.c usable in userland tools like installboot(8).
This was partially done for src/distrib/cdrom/macppc_installboot,
but more strict prototypes are necessary for native binary builds.
2024-05-19 15:41:53 +00:00
tsutsui 14cc0335a4 Enable SUPPORT_CD on uboot. 2024-05-19 15:39:58 +00:00
riastradh 42a8728080 ttm: Undo mistake in previous.
PR xsrc/58133
2024-05-19 13:50:04 +00:00
riastradh fd5adf4c18 ttm: Sync ttm_bo_uvm_fault_idle better with Linux.
PR xsrc/58133
2024-05-19 13:28:28 +00:00
christos 43bbf82ac4 allow things to compile again 2024-05-18 19:57:03 +00:00
andvar b087128c77 s/Abosrb/Absorb/ in comment. 2024-05-18 19:28:36 +00:00
andvar 7b6cdeb9a1 s/abou/about/ in comment. 2024-05-18 19:04:45 +00:00
andvar 9d70975e70 s/Aborb/Absorb/ in comment. 2024-05-18 19:03:31 +00:00
christos 3c6141f6f3 include all extra flavors of the kernel and use the proper variable for
the machine dependent installation directory.
2024-05-18 02:03:17 +00:00
thorpej e4214c824f If <sys/mcontext.h> does not define __UCONTEXT_SIZE, define it as
sizeof(ucontext_t).
2024-05-18 01:21:42 +00:00
thorpej d8a1d80a31 Define the _UC_* flag bits before including <sys/mcontext.h>. 2024-05-18 01:16:21 +00:00
thorpej 1853c81a61 Clean up the <sys/ucontext.h> <-> <machine/mcontext.h> interface up
a little:
- Define _UC_MD_BIT* constants for the available machine-dependent bits,
  and use those constants to define the machine-dependent bits as well
  as the machine-independent bits that have machine-dependent values.
- Explicitly generate an error if _UC_TLSBASE, _UC_SETSTACK, or
  _UC_CLRSTACK are not defined by <machine/mcontext.h>.
2024-05-18 00:37:40 +00:00
thorpej 286a759751 Remove unnecessary include of <sys/malloc.h>. 2024-05-18 00:05:50 +00:00
thorpej c79d399c24 Remove unecessary include of <sys/malloc.h>. 2024-05-18 00:05:18 +00:00
thorpej 0ad7109896 Remove unnecessary include of <sys/malloc.h>. 2024-05-18 00:04:46 +00:00
thorpej 002d97bff0 Move the include of <sys/malloc.h> to where it's truly needed. 2024-05-18 00:04:01 +00:00
thorpej 4ea2e44bb6 Remove unnecessary include of <sys/malloc.h>. 2024-05-17 23:57:46 +00:00
thorpej 64a52938bd <sys/mallocvar.h> -> <sys/malloc.h> 2024-05-17 23:56:24 +00:00
uwe a9c500b2e8 curses: constify newterm() and setterm() arguments
newterm() argument is const in the spec, so this fixes our
conformance.

setterm() is not in the spec, but it's natural and in ncurses its
argument is const too, so follow suit.

Doesn't change the ABI, so no bump required.

ok blymn@
2024-05-17 23:32:50 +00:00
thorpej a7aa342f5e G/C MDP_AST -- it's not referenced anywhere. 2024-05-17 22:21:17 +00:00
thorpej e71269a14e Implement _UC_SETSTACK / _UC_CLRSTACK. 2024-05-17 21:37:07 +00:00
christos 9a57126d1c use IMAGESPECEXTRA to include libdata and don't include IMAGERUNTIME 2024-05-17 21:31:10 +00:00
christos 1f259ef1e5 Add /dev/pipe to the spec list using IMAGESPECEXTRA 2024-05-17 20:27:09 +00:00
christos fa65999dca use IMAGERUNTIME to copy extra data instead of random pax commands 2024-05-17 20:26:48 +00:00
christos d308a2f4e0 Add IMAGERUNTIME and IMAGESPECEXTRA variables 2024-05-17 19:54:28 +00:00
nia 48b353f191 eap(4): Restore the full set of supported hardware encodings from netbsd-7
Tested in QEMU.
2024-05-17 12:20:02 +00:00
nia d833e8b264 Add some "simpler" PCI audio devices to aarch64's GENERIC64
These serve as alternatives to hdaudio.  Tested in QEMU.
2024-05-17 10:25:43 +00:00