Commit Graph

20246 Commits

Author SHA1 Message Date
nia
6383164a17 ossaudio: Set handle on OSSv4 mixer devices 2021-05-09 12:51:45 +00:00
nia
5d7326fb2a libossaudio: Various OSSv4 fixes to allow reference programs to compile
- Define various new AFMT_*. These are not returned as supported
  formats by SNDCTL_DSP_GETFMTS, because it would be very silly to
  have Vorbis in the kernel.

- Implement PLAYTGT and RECSRC. For each NetBSD audio device
  we only return one playback and recording source, "primary".

- Return preferred channel configuration in capabilities.
  Either DSP_CH_STEREO, DSP_CH_MONO, or DSP_CH_MULTI
  depending on the current hardware format.

- SNDCTL_DSP_HALT_* simply flushes the audio device.
2021-05-09 11:28:25 +00:00
mrg
ef48836c2e avoid accessing stack garbage.
on arm64eb resuming vi(1) would often crash.  in makech(), the 'csp'
variable is either set to current window data, or a local stack
variable's address '&blank'.  the window data has many lines of info
stored, and 'csp++' is used per line here.  unfortunately, a case
existed where 'csp++' operated on csp initialised from '&blank' which
eventually crashes when, on my display with 160 columns and 'csp + 155'
exceeds the mapped stack and crashes.

match the '!_cursesi_screen->curwin' conditional that initialises csp,
and avoid csp++ here.  assert() that csp != &blank in both places that
modify csp.

thanks to jdc@ and mlelstv@.

XXX: possibly also should avoid the putch() here as well.
2021-05-08 04:29:07 +00:00
christos
9feb722ead PR/56148: Andreas Gustafsson: lib/libc/stdio/t_printf:snprintf_float test
randomly fails.
Add checks to all places where lshift is called because it can return NULL
2021-05-06 16:15:33 +00:00
christos
20fa0b90d9 PR/56147: Miroslav Lichvar: Avoid memory leak if strdup fails. 2021-05-05 14:49:59 +00:00
simonb
e85380d6f9 Add links for the other functions documented in arc4random(3). 2021-05-03 11:07:55 +00:00
simonb
0cdd944264 Whitespace police. 2021-05-03 08:30:30 +00:00
mrg
1c682a68c9 use GCC_NO_IMPLICIT_FALLTHRU. 2021-04-26 07:17:30 +00:00
christos
e8ee02e023 Use ${MACHINE_MIPS64} 2021-04-25 23:43:20 +00:00
christos
185787c65b PR/56120: Chris Pinnock: build.sh (-m alpha) release fails on current on
Darwin in libc compilation
We build the regex code in tools without nls. We don't include any nls headers
for that, but on Darwin wint_t gets defined, so we end up with a compilation
error. The cleaner fix would have been to always use regex_foo_t types, but
the minimal fix is to only do this for the tools build, using cpp.
2021-04-22 19:20:24 +00:00
christos
c510facea2 Instead of compiling files with -fcommon, create an include file and declare
the 3 symbols that need to be common using an attribute. Put all the 3 symbol
definitions in libc in one place (initfini.c). Reviewed by joerg@
2021-04-20 21:42:31 +00:00
mrg
403c2981b5 for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.
2021-04-14 08:07:49 +00:00
christos
0cf983201b - fix memory leak
- xxx questionable allocation
- remove casts
- use sizeof(*var)
- bcopy -> memcpy/memmove
2021-04-13 13:13:03 +00:00
mrg
98c521ff90 fake-use alloca()'s return value to quieten -Werror=unused-result 2021-04-13 00:31:54 +00:00
mrg
6c68c9665f allocate the potential trailing nul as well. 2021-04-13 00:29:42 +00:00
mrg
02402fe110 pass dest buffer size to strncpy() and ensure nul termination. 2021-04-13 00:29:22 +00:00
mrg
23b921d781 pass the right enum to krb5_auth_con_setkeytype(). 2021-04-12 09:17:48 +00:00
mrg
43e80ef7a6 avoid an unlikely buffer truncation. 2021-04-12 09:17:10 +00:00
mrg
72aaaacc35 add a default: case to __kernel_standard(), failing with EDOM 2021-04-12 09:15:52 +00:00
mrg
7e5e03e2b7 new GCC_NO_* uses for warning issues. most of the users of the new
GCC_NO_RETURN_LOCAL_ADDR are bugs in GCC itself, not the code.
2021-04-12 06:08:30 +00:00
mrg
4084f973da use -fcommon where necessary. 2021-04-12 03:57:06 +00:00
jkoshy
3d43236771 Avoid duplicate directory traversals when building Elftoolchain sources. 2021-04-09 20:49:05 +00:00
jkoshy
d2544b1c1b Redo r1.288: traverse the complete imported Elftoolchain tree during a build. 2021-04-08 08:10:30 +00:00
jkoshy
ffb100ca4c Attempt to unbreak the build by reverting r1.288. 2021-04-06 21:13:04 +00:00
jkoshy
f42f5ef49e Traverse the complete imported Elftoolchain tree during a build. 2021-04-06 20:13:43 +00:00
reinoud
e0d9d410b7 Implement nvmm_vcpu::stop, a race-free exit from nvmm_vcpu_run() without
signals. This introduces a new kernel and userland NVMM version indicating
this support.

Patch by Kamil Rytarowski <kamil@netbsd.org> and committed on his request.

This is the missing libnvmm part I forgot to include in the origional commit.
2021-04-06 08:40:17 +00:00
simonb
8fab31f439 For MIPS N32, register_t needs to be uint64_t as "long" isn't
big enough.
2021-04-03 07:38:11 +00:00
rillig
bc7a3fe21e libc/gen: fix hack for previously unsupported lint initializers
Supported since init.c 1.182 from 2021-03-30.
2021-03-30 15:31:51 +00:00
christos
ba06fc1c94 Only unescape when we are quoting and don't add a space if we are quoting
(we already did) (Piotr Stefaniak)
2021-03-28 13:39:39 +00:00
christos
1740d9142b document the flag 2021-03-28 13:38:10 +00:00
christos
b94551931c Pass the unescaped filename the the append function so it has to do less work
(for example it can call stat(2) directly (Piotr Stefaniak)
2021-03-28 13:33:54 +00:00
dholland
2ab5b263a3 Document EINVAL for out of range socket address lengths.
This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).
2021-03-28 03:29:31 +00:00
dholland
7ec5b82b08 In getvfsstat(2), clarify that the size argument is in bytes.
That the size argument is in bytes (not the count of structures) and
the return value is the count of structures (not bytes) is
counterintuitive.
2021-03-27 23:35:37 +00:00
christos
65371df829 Add fn_complete2() that controls the quoting of the returned match.
Before it was based on the heuristic that we were not supplied an
attempted_completion_function, which worked well because programs
that supplied that function were not shells and did not want/understand
shell quoting. Recently though Piotr Stefaniak wanted to enhance command
completion for the Bourne Shell and this could benefit quoting the returned
command. This function adds an extra flags argument that controls that quoting.
2021-03-27 18:55:02 +00:00
mrg
f96996de73 note that ttyaction.[35] first appeared in netbsd 1.3. 2021-03-21 23:29:36 +00:00
christos
ef57a5cc6b simplify expression, daemon is an array can't be NULL. 2021-03-18 01:49:09 +00:00
wiz
b891559281 Remove superfluous article. 2021-03-17 08:13:29 +00:00
dholland
7e9db02257 Clarify use of open flags in open(2).
(Avoid using values of three that are equal to four.)
2021-03-17 08:04:39 +00:00
nia
53793f01c2 ossv4 mixer API: be extra careful with the inputs to AUDIO_MIXER_READ.
some drivers (not hdaudio(4), but uaudio(4), eap(4), sb(4), various other
old cards) will return error if a AUDIO_MIXER_VALUE is requested and the
number of channels is not specified as input. this is not documented as
well as it should be, unfortunately.
2021-03-15 10:58:05 +00:00
christos
9c2966c186 record the libblocklist dependency 2021-03-13 16:46:49 +00:00
christos
d48a1fa0b9 Underscore is a word character (thanks uwe@) 2021-03-11 18:49:18 +00:00
wiz
4481672ffb Remove trailing whitespace. 2021-03-11 17:13:29 +00:00
christos
be8d4886f8 improve wording. 2021-03-11 16:36:41 +00:00
christos
0ad4def4b8 Document the "C" language escapes supported in GNU mode. 2021-03-11 15:12:51 +00:00
christos
259eea82c4 recognize the "C" language backslash escapes like gnu does (except b which
is already taken)
2021-03-11 15:00:29 +00:00
msaitoh
44f4353477 s/skiping/skipping/ 2021-03-11 01:13:11 +00:00
christos
9c2964a923 Use __pthread_volatile for ptc_waiters (Greg A. Woods) 2021-03-10 15:05:11 +00:00
simonb
b2de856f1a Add manpage links for asysctl(3) and asysctlbyname(3), already described
in sysctl(3).
2021-03-10 13:30:34 +00:00
christos
e24596a734 cast to the proper enums for lint 2021-03-08 17:34:10 +00:00
christos
b7a595bc61 fix missing chars 2021-03-07 20:54:41 +00:00