Commit Graph

20535 Commits

Author SHA1 Message Date
nia f7145efd49 crypt(3): match the Argon2 reference implementation's Base64 exactly
There are too many minor variations regarding padding and exact alphabet
to safely use the implementation in libc or an existing implementation
in libcrypt.
2021-10-12 15:25:39 +00:00
andvar da66f63158 fix typos in man pages. 2021-10-12 15:25:27 +00:00
nia 80833458d2 crypt(3): Make Argon2 implementation match the reference impl by
making sure input salts are decoded as base64.
2021-10-12 13:24:00 +00:00
nia b073515511 paranoia: use explicit_memset 2021-10-12 12:11:04 +00:00
nia b4ff5a1e43 pw_gensalt.3: add argon2 bits 2021-10-12 12:03:47 +00:00
nia 88cf501805 crypt-argon2: Properly honor user's version number.
Follow upstream by defaulting to 0x10 if it's not specified.
2021-10-12 10:51:33 +00:00
nia d595d5c387 crypt-argon2: improve resilience of the parser.
Allow the version number to be unspecified as in the argon2 upstream
test suite, properly defaulting to a version if the v= block is
entirely missing, and treating the remaining block as parameters.

Fix a null pointer derefence when the encoded password is unspecified
in the settings string.
2021-10-12 09:40:38 +00:00
skrll 07347931de Fix the lib/libc/setjmp/t_setjmp:{,_}longjmp_zero test cases 2021-10-07 06:44:18 +00:00
andvar 50d9072672 remove duplicate the article in comments. 2021-10-04 21:02:39 +00:00
andvar e49c2d1bf9 remove duplicate the article in documentation. 2021-10-04 14:35:20 +00:00
christos a8d8435dfa remove parameter names from decls. 2021-10-01 20:13:38 +00:00
christos 0d258229ce PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented
in pthread_setcanceltype.3
2021-10-01 17:13:44 +00:00
christos 30d43af96b kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.
An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.
2021-09-30 12:35:55 +00:00
kim ab14361c39 Remove duplicate tm_isdst. Fixes PR misc/56419 for HEAD. 2021-09-28 06:45:08 +00:00
christos 02a0eff7c2 make flag unsigned to match prototype of the function used 2021-09-26 13:45:54 +00:00
christos 5679adf871 - Completion should not add a quote at the end of the line to match an
already quoted quote. (Piotr Stefaniak)
- fix lint unconst warnings for strchr
2021-09-26 13:45:37 +00:00
uwe b2936eaaca Spell the number of nanoseconds as 10^9. Forgotten in previous. 2021-09-23 13:59:27 +00:00
uwe bdf1f075ab Minor markup tweaks. 2021-09-23 13:58:26 +00:00
uwe 2d69b1f036 Spell the number of nanoseconds as 10^9.
10^9 is 1e9 (it's "e" that spells 10 here), not 10e9.  The target
audience of this man page is not likely to be very fluent in floating
point, so avoid significand/exponent spelling and use the spelling
that it is familiar with.
2021-09-23 13:49:59 +00:00
uwe 0659be6c07 Markup fixes. 2021-09-23 13:16:13 +00:00
wiz 39710f2616 printf(3): mention snprintb(3) 2021-09-23 12:17:57 +00:00
andvar 5e3df9b71e s/Plese/Please/ in comment, and fix an article in obio_wdc.c comment. 2021-09-19 20:52:47 +00:00
wiz 3bbb788fd6 Sort errors, remove extra comma. 2021-09-19 17:10:41 +00:00
thorpej e714af64e3 Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
2021-09-19 15:51:27 +00:00
andvar c46bd13f44 some love to double letters (in comments). 2021-09-17 08:13:06 +00:00
christos fa0758113b Robustness fix: handle libraries that contain . in their basename. 2021-09-17 02:12:16 +00:00
andvar b58602814f fix typos in word "successful". 2021-09-16 22:19:10 +00:00
andvar 72e44f84cb fix typos in word "successfully", mainly s/succesfully/successfully/. 2021-09-16 21:29:41 +00:00
andvar b780d9b67b fix various typos, mainly in comments. 2021-09-16 20:17:46 +00:00
andvar 80f2027016 sysinst/partitions.h: fix typos comments, also fix same typos in other files. 2021-09-11 21:30:46 +00:00
andvar 207defd036 Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
2021-09-11 20:28:03 +00:00
rillig 7f8984330e popen.3: move popenve from BUGS to HISTORY 2021-09-11 19:58:24 +00:00
rillig 26b8655ee8 fseek.3: fix grammar 2021-09-11 18:46:22 +00:00
christos 70764037a3 Ignore failed closes (if for example a closed file descriptor is passed as
a starting point). This is how the kernel behaves.
2021-09-11 14:23:04 +00:00
christos 42a6419698 remove fake closefrom() 2021-09-11 14:22:12 +00:00
rillig d539a31d62 librumphijack: fix typo for NetBSD < 5.99.7 2021-09-11 08:32:11 +00:00
christos 0c63703b78 Ignore closefrom(3) for now; too complicated to descern between regular
and rump fds.
2021-09-10 21:22:05 +00:00
christos 86d9720796 - implement pselect so that the ssh test has a chance to work
- 1 -> EXIT_FAILURE
- more info about fds
2021-09-10 20:33:38 +00:00
rillig b52ed19590 libedit: fix indentation
No change to the resulting object files.
2021-09-10 18:51:36 +00:00
christos 4fd19b1be2 Add an LLVM fuzzing wrapper for the portable libedit (Christian Holler) 2021-09-10 13:33:45 +00:00
christos 9b290a25b2 rl_startup_hook should be called each time. From Carlos Henrique Lima Melara 2021-09-10 13:29:06 +00:00
christos d6da975b02 fix memory issues found by fuzzing (double frees and buffer overflows) 2021-09-09 20:25:30 +00:00
christos e2b95d2cb4 Add casts to appease conversions between wchar_t and wint_t 2021-09-09 20:24:07 +00:00
rin a1122fa99f Do not compile in whole fileio.c for LIBHACK.
Fix build failure when built as libhack, due to missing fileio.h.

IMO, this should be cleaner than generating fileio.h for {get,put}win(3),
that are useless for install media.
2021-09-07 12:36:57 +00:00
rin 43ea4784d7 PR lib/56388
For __newwin() and __resizewin(), the line hash was calculated as if
HAVE_WCHAR is disabled.

Fix this bug by refactoring __hash_line() function, which calculates
the line hash by an appropriate method.
2021-09-07 01:23:09 +00:00
rin 31a83dd923 Always autogen fileio.h.
Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.
2021-09-06 15:17:25 +00:00
rin b09154d5e3 Style fixes most for __CTRACE(). 2021-09-06 07:45:48 +00:00
rin e149a10083 Unifdef DEBUG for CTRACE(). 2021-09-06 07:08:25 +00:00
rin 0bd3a62045 Expand __CTRACE() to __nothing #ifndef DEBUG.
Remove most of #ifdef DEBUG around __CTRACE() calls.

No binary changes, except for line numbers for assert().
2021-09-06 07:03:49 +00:00
rin 39c0485813 Fix old-style definition: curses_version() --> curses_version(void) 2021-09-06 02:50:43 +00:00
rin 19d0649ccf Fix old-style definition: use_default_colors() --> use_default_colors(void) 2021-09-06 02:48:54 +00:00
andvar f9faf20aef fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/ 2021-09-03 21:54:58 +00:00
christos 472ef8cc35 Try to refactor this in order to correct some of the memory issues
reported by Christian Holler.
2021-09-03 12:20:38 +00:00
christos cd15afc9e3 Remove lint workarounds 2021-08-30 13:12:16 +00:00
christos 6f436dc7ea Add a changes file 2021-08-30 09:18:17 +00:00
rillig 647ce63dda libc: suppress lint warning for namespacing mismatch for _mcount
This is the last remaining instance of lint warning 215, which is about
implicitly defined functions.  Since C99, these implicit declarations
have not been allowed anymore.
2021-08-29 16:44:16 +00:00
christos 152732a385 ^W is traditionally bound to ed-delete-prev-word and not kill-region
^R is traditionally bound to em-inc-search-next and not redisplay
This is what mksh, zsh bash, readline do (Baptiste Daroussin)
2021-08-29 09:41:59 +00:00
christos 6cac535e17 Respect $EDITOR when execution one (Baptiste Daroussin) 2021-08-28 17:17:47 +00:00
rillig b18bad8f33 libterminfo: remove redundant lint annotations
Since 2021-02-28, lint does not warn about constant conditions if they
involve sizeof.

The fallthrough annotations have never been necessary for case labels
that directly follow each other.
2021-08-27 18:40:28 +00:00
andvar 626fac18a1 s/priviledge/privilege/ in comments/log messages and fix one typo in descriptor. 2021-08-22 20:18:39 +00:00
andvar c69f42d323 fix mainly same typos as in my previous commit but outside sys/dev/dm. 2021-08-21 23:00:30 +00:00
christos 5b29c67870 PR/56370: mirabilos: libedit change from 2017 kills history in gdb 2021-08-21 12:38:56 +00:00
christos 7f1c6a0bae Add more api to make gdb-11 happy (but not gdbtui as usual) 2021-08-21 12:34:59 +00:00
andvar 60f3bf6a63 s/memry/memory+s/softare/software/+s/grapics/graphics+s/ouput/output 2021-08-19 20:56:36 +00:00
rillig e1288720a9 libedit: simplify calls to macro ADD_STRING
The lint comments CONSTCOND and LINTED were not necessary.  It is
simpler to just specify what to free.  GCC optimizes free(NULL) to be a
no-op.

No functional change.
2021-08-15 22:22:52 +00:00
rillig b6c4620261 readline: fix lint warning about effective unconst cast
Calling strchr to avoid the syntactical unconst cast is not necessary
here.  A simple pointer assignment is enough.

No functional change.
2021-08-15 22:14:45 +00:00
rillig 54391ee928 libcurses: fix usage of __warn_references
Since that macro can expand to an empty token list, it adds its own
semicolon as needed.  Removing the extra semicolon fixes the lint
warnings about empty declarations.  These empty declarations are a GCC
extension.
2021-08-15 15:12:36 +00:00
christos 596ba706cc This is a mess; always define MB_LEN_MAX so both the regular and libhack
version of curses compiles. Really we should not be defining MB_LEN_MAX here,
and include <limits.h> in curses_private.h to get it.
2021-08-15 12:39:39 +00:00
christos 9494102ed0 need limits.h 2021-08-15 11:54:12 +00:00
christos 1ac1056e8d Use MBL_LEN_MAX (constant) so that SSP works 2021-08-15 11:44:39 +00:00
wiz 81d6c9b9d7 Add verb to sentence. 2021-08-15 10:12:54 +00:00
christos da69b70b9f Disable attempts to handle EINTR and non-blocking I/O by default. It is
confusing to other programs and unexpected behavior. Reported by Ingo Schwarze.
This behavior is now controlled with EL_SAFEREAD.
2021-08-15 10:08:41 +00:00
christos c191adf61d Add a LINTED comment... Why doesn't NOTREACHED work? 2021-08-15 10:06:32 +00:00
andvar fbe76588ee fix typos in "environment" word. 2021-08-12 20:53:18 +00:00
christos 5aee859e4d cast from strchr fixed. 2021-08-11 09:12:07 +00:00
rillig 80321d1c1f libpam: clean up LINTFLAGS
Warning 346 is new, the other suppressions are not needed anymore.
2021-08-11 05:23:05 +00:00
andvar 6584ea569e fix various typos in compatibility, mainly in comments. 2021-08-09 20:49:08 +00:00
nia 213aa76def introduce a SOL_LOCAL for unix-domain socket level socket options
as an alias of the current 0 used for these options, as in FreeBSD.

reviewed by many.
2021-08-08 20:54:48 +00:00
dholland 22cff1a7de typo 2021-08-07 03:17:23 +00:00
andvar 461f07c9e2 fix typos in puffs man pages. 2021-08-04 09:31:25 +00:00
nia 083e568bb3 curses: clarify standout as the "best" _supported_ highlighting mode
of the current terminal
2021-08-03 07:58:50 +00:00
andvar f09c75af85 fix typo in README.compileopts text. 2021-08-02 17:45:10 +00:00
nia e8507174be curses: clarify documentation regarding the standout attribute 2021-08-02 11:11:20 +00:00
andvar 4b2769fe52 fix typos in word "otherwise". 2021-08-01 15:29:29 +00:00
andvar e16cbc3889 s/dependend/dependent/ 2021-07-31 20:51:32 +00:00
wiz 81a3b6c7f2 Fix typos, improve wording. 2021-07-28 11:29:59 +00:00
manu e5ffdc00de Tie the maximum file lock per unprivilegied uid to kern.maxfiles
This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
2021-07-27 09:32:55 +00:00
nia 1515619f1b The BUGS sections is incorrect again for "modern" terminals.
For example, wscons and xterm both display standout differently to bold.
2021-07-26 20:17:09 +00:00
rin 76020b2c7d Improve previous:
- Add suffix ``d'' for mkdep(1).
- Improve comment a little...
2021-07-26 12:49:13 +00:00
simonb 1045db0b2f Update to reflect current reality for template characters - the process
ID is not longer used and we replace each "X" with one of 64 values not
26 values.
2021-07-25 08:52:03 +00:00
rin 043dd10516 For evbppc, use C version of bcopy(3), memcpy(3), memcmp(3), and
memmove(3) consistently for debug library (*.go) in order to avoid
alignment faults for 403.
2021-07-24 05:27:25 +00:00
christos 83df97c2da revert changes to fflush.c (1.18) and fvwrite.c (1.25) until we investigate
collateral damage. Breaks h_intr.c test. Requested by RVP.
2021-07-22 17:08:15 +00:00
tnn cadd46023e libm: build fma(3), fmaf(3), fmal(3) on alpha
Alpha has no hardware-assisted fused multiply-add, so the fallback
C implementation must be used. A basic smoke test shows the
implementation works for
"x * x - 1.0f" vs "fmaf(x, x, -1.0f)" with "volatile float x = 1.0008f;"
2021-07-21 12:05:02 +00:00
christos 9aa2b02710 Match the declaration in <sys/kauth.h> 2021-07-19 10:30:36 +00:00
christos 8b5d7e93ef There's no need to adjust `iov' in the error path.
Returning the amount written is all that's needed.
from RVP
2021-07-19 10:00:32 +00:00
christos 60a1ed1f7a When fflush fails, adjust pointers and the io vectors. From RVP. Fixes
core-dump at cvs(1) exit(3).
2021-07-16 12:34:10 +00:00
christos 5291651b6a Via Jess Thrysoee, from Adrian Bunk: Fix libedit build on Linux/Alpha
Alpha is the only Linux architecture that has SIGINFO:
    https://sources.debian.org/src/manpages/5.10-1/man7/signal.7/#L522

But even on Alpha Ctrl-T is not supported, and therefore no VSTATUS:
    https://sources.debian.org/src/manpages/5.10-1/man3/termios.3/#L603-L608

For consistency check both signal existence and character existence
2021-07-14 07:47:23 +00:00
kre 144bb499f5 Make sure dd_size is init'd, even when nothing has been read (so it
will be 0).   Reported on tech-userlevel by Mouse 20210711T044753+0000
2021-07-11 16:30:41 +00:00
christos ace315b97a Don't adjust the buffers when write returns 0. This happens with fmemopen
and other synthetic write functions. This fixes the unit-tests for fmemopen,
but adjusting should be the right behavior for all cases?
2021-07-09 09:24:16 +00:00
christos c90ee0ee4a Include the 0 return from write. Although the real write system call does
not return 0, the synthetic writes from funopen/fmemopen could. This avoids
infinite loops in >= test19 in fmemopen, but the tests still fail, perhaps
because they assume the previous behavior, where flush does not adjust the
stdio pointers on error.
2021-07-08 15:44:44 +00:00
christos f280538df1 Obey EINTR and return immediately adjusting for unwritten. From RVP 2021-07-08 09:06:51 +00:00
christos 170ddb4aae Handle EINTR, from RVP. 2021-07-06 14:22:16 +00:00
thorpej 276edc129d Ensure that the stack is always 16-byte aligned by rounding sizes as needed.
All changes from rin@ except swapcontext.S, which is from me (added
symbolic constants to make the code clearer).
2021-07-06 12:38:40 +00:00
christos 28c1b2fc8a Account for partial writes when interrupted (from FreeBSD). 2021-07-05 07:26:00 +00:00
rillig 9034303f18 libc: remove special handling for lint
In namespace.h 1.102 from 2005-07-16, the #ifndef was added to fix the
broken lint2 pass.  Somewhere between 2005 and now, lint has been
changed so that it does not need this workaround anymore.

After usr.bin/xlint/lint1/tree.c 1.303 from 2021-06-30, the #ifndef in
namespace.h caused the only warning about an implicit function
declaration in the whole NetBSD tree, in lib/libc/gen/sysconf.c:149,
where _getpagesize was not defined, but only getpagesize.
2021-07-04 16:18:50 +00:00
christos 155cd70e85 PR/56246: Yuichiro Naito: gprof(1) never show call graphs when profiling
multi-threaded application
2021-07-03 14:08:55 +00:00
skrll 45433ea2c3 Do previous differtly by pushing two registers in the same way as the
_INVOKE_CERROR macro
2021-06-30 21:20:29 +00:00
skrll 2cf21d216b The _INVOKE_CERROR macro deals with thumb so simplify the code (at the
expense of a couple more instructions).
2021-06-30 07:36:05 +00:00
skrll 9b62cdeb3a Trailing whitespace 2021-06-30 07:34:24 +00:00
rin c1d0bd11b7 Fix previous. For Thumb-1:
- sp cannot be manipulated directly
- {add,sub}s should be used instead of {add,sub}
2021-06-30 00:00:49 +00:00
rin 2251279c7d Align sp to 8-byte boundary as required by EABI.
IIUC, this change only affects libc compiled for ``Thumb-mode userland'',
which we've not officially supported yet.
2021-06-29 23:29:12 +00:00
pgoyette 74007e33ee Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE.  This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
  of MII_STR_oui_model definitions and use of oui and model rather than
  vendor and product.  This also changes the compressed data in the
  xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
  digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
  very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
  DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
  xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
  (to deal with the vendor/product vs oui/model issue), we need to
  make sure it gets compiled with -Wno-error=format-nonliteral, even
  in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO).  This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.
2021-06-29 21:03:36 +00:00
blymn d08b4150a2 Fix PR lib/55931
Only reset outcol if we actually emit a \n as cursor_down may not may
not put the cursor at the start of the next line.
2021-06-27 23:57:08 +00:00
christos 30911e5794 Fix SSP build 2021-06-27 16:24:52 +00:00
martin 042ecb94ba Fix printf format for size_t 2021-06-24 15:41:25 +00:00
blymn 5e680e5b3e Make sure we don't use wide char routines when DISABLE_WCHAR is in
effect.
2021-06-24 05:53:05 +00:00
blymn 73328adf3a Rework the fix for lib/56224.
Move the scroll check to _cursesi_addwchar
Perform the scroll check before updating the cursor location when
processing \n.
2021-06-22 07:49:09 +00:00
blymn e5cd7ade44 Fix how the slk are drawn by making sure we use ins_wchar in the
bottom left of the screen to avoid a scroll because this may cause
an ERR if scrollok is false.
2021-06-22 07:26:45 +00:00
blymn e204b5b4b7 Fix the debug output to stop spamming out the aline for row 0, we
may not be working on that row so the output is pointless.
2021-06-22 07:22:44 +00:00
christos 3151045394 fix proplib deprecation 2021-06-21 03:04:27 +00:00
christos 747b089bcb PR/56260: Alex Richardson: Out-of-bounds stack read in lib/libc/gen/vis.c
Also sync with other FreeBSD changes.
2021-06-18 10:57:14 +00:00
rin 749cec1f31 PR port-arm/55897
Fix ABI mismatch for armhf runtime routines for floating-point arithmetics;
For hard-float arm variants, provide

(1) generic runtime routines with correct calling convention, and
(2) EABI runtime routines at the same time.

I've confirmed that no binary changes for kernels.

LGTM by skrll
2021-06-16 05:21:08 +00:00
blymn 98f6983ffd Correct a previous fix for PR lib/56224.
Use wdwitch to determine the width of a wide character on the screen not
the number from mbrtowc which is the number of bytes in the character.
Thanks to Michael Forney for spotting this.
2021-06-15 22:18:55 +00:00
christos 71acbe78a8 PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core
Don't write to ((char *)malloc(size))[-1];
2021-06-15 10:56:52 +00:00
mcf 21db06c179 Add missing newline to debug trace message
ok blymn@
2021-06-10 07:15:40 +00:00
nia 5f6355cc9e ossaudio(3): continue getting capabilities if AUDIO_GETFORMAT fails
we want this to work on mixer devices too
2021-06-09 14:49:13 +00:00
nia 1cb651a104 vfork.2: clarify posix_spawn recommendation, pointed out by kre 2021-06-09 06:00:16 +00:00
nia 200ab436dc ossaudio(3): nested switch statements are hard to read, refactor 2021-06-08 19:26:48 +00:00
nia 8170080d8e ossaudio(3): refactor library into separate files 2021-06-08 18:43:54 +00:00
nia f8ad651614 vfork.2: recommend posix_spawn instead 2021-06-08 16:15:11 +00:00
hannken 32a2fc002c Document NFSSVC_REPLACEEXPORTSLIST instead of NFSSVC_SETEXPORTSLIST.
The latter is deprecated and kept only for backwards compatibility.
2021-06-08 10:02:04 +00:00
blymn 7a398f9f51 Fix for PR lib/56224
Correct addstr behaviour so it truncates the string in the case where
a string is added on the bottom line of a window where scrolling is
disabled as per the SUSv2 specification.
2021-06-06 05:06:44 +00:00
mcf bd85fcf225 Fix initial line hash calculation for subwindows
lp->hash is not initialized at this point. Since the hash is
calculated in chunks using __hash_more(), it needs to be initialized
to 0 first (just as in doupdate()).

Detected with valgrind while running python's test suite when
debugging an unrelated issue.

ok uwe@
2021-06-01 00:59:01 +00:00
joerg 9f6850785e Don't warn about frame pointer use for clang either. 2021-05-30 02:24:05 +00:00
nia 70294c72b4 wresize: don't bound pads to the size of the screen
allows avoiding a workaround in aiomixer,

ok blymn uwe
2021-05-29 09:11:14 +00:00
thorpej 2a8eed4fde POSIX sez:
The longjmp() function shall not cause setjmp() to return 0; if val
    is 0, setjmp() shall return 1.

Fixes the _longjmp_zero and longjmp_zero test cases in the t_setjmp
test on alpha.
2021-05-25 00:14:41 +00:00
riastradh 2b70a4d80e Clarify what happens when you longjmp(..., 0).
Derived from C99 7.13.2.1 `The longjmp function'.
2021-05-24 23:59:59 +00:00
kre 53e5e3df7a PR bin/56042
Fix typos (2nd acst should have been acdt), 0550 for ist should be 0530
(5.5 hours is not 5 hours and 50 minutes...).

Comment out the zp4 zp5 and zp6 zone names.   They are supposedly supported
by the source (they're in the table) but cannot work, as the parsedate
lexer doesn't allow a "word" to start with an alpha and also contain
digits.   Maybe (just maybe) that could be fixed sometime, but since these
have never worked, and no-one has ever seemed to miss them, and they're the
only words which are of that form, for now, just stop pretending they work.
2021-05-16 19:42:35 +00:00
uwe 21d563f5dc __newwin - fix BGWCOL initialization.
From Michael Forney in PR lib/56174
2021-05-15 11:06:07 +00:00
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
christos d54a6e0c5d Add blocklist support to libwrap which enables all programs using libwrap
to block access from hosts we deny. (libwrap support from Greg A. Woods)
2021-03-07 15:09:12 +00:00
christos 234ed2b238 Merge tzcode-2021a
- No comments in the changelog about the code changes.
2021-03-01 04:42:14 +00:00
christos 02b62279a7 arrange for tools build 2021-02-26 19:25:12 +00:00
christos f09b31947c Arrange for tools build 2021-02-26 19:24:47 +00:00
wiz e607de02f4 Fix xref, add missing word. 2021-02-26 06:39:14 +00:00
rin e0b51b0024 Add missing endutent.3 to MAN. 2021-02-26 04:28:14 +00:00
christos af5f2d14c6 put back line accidentally removed. 2021-02-26 03:19:34 +00:00
christos 64f644717c PR/56012: Kouichi Hashikawa: getutent(3) man page is missing 2021-02-26 03:05:01 +00:00
christos 67f076ea41 add missing _ 2021-02-25 21:59:27 +00:00
christos 6bde3cc411 fix NLS compilation 2021-02-25 21:47:46 +00:00
christos e37fce9162 Add glue to disable locale code in order to be smaller. 2021-02-25 21:28:40 +00:00