Commit Graph

20769 Commits

Author SHA1 Message Date
rillig b2baa50111 lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
2023-03-28 14:44:34 +00:00
joerg a2c7f636a9 Use snprintf_ss in pthread__assertfunc and update comment in
pthread__errorfunc. snprintf can use locks in some code paths and we
only care about the restricted subset here.
2023-03-24 14:18:18 +00:00
riastradh 40028e8037 libm: Bump minor for new long double transcendental functions.
XXX Still missing: remquol, remainderl.
2023-03-23 12:38:13 +00:00
kre f1eb86a44f Add (newly added): expm1l log1pl log2l lgammal tgammal
so that the library gets the correct symbols defined in it.
2023-03-14 05:49:03 +00:00
riastradh 7739de6469 libm: Need <math.h> for __HAVE_LONG_DOUBLE.
Fixes missing definitions of lrintl, llrintl on various platforms.
2023-03-13 18:26:32 +00:00
riastradh 91f6ee0820 libm: Fill in more dummy long double transcendental functions.
This should cover everything from C99.
2023-03-13 18:18:36 +00:00
thorpej 8ff22ec6c6 Document the error code when O_REGULAR is specified and the last
path component is not a regular file.
2023-03-05 16:24:31 +00:00
riastradh 0670f81a19 mremap(2): Note MAP_REMAPDUP bug.
XXX pullup-10, unless we fix the bug first
2023-03-03 12:53:04 +00:00
riastradh 0119a38611 mremap(2): Fix example to use MAP_PRIVATE.
It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.

XXX pullup-9
XXX pullup-10
2023-03-01 20:08:41 +00:00
uwe af2cb705a7 mmap(2): minor markup tweaks 2023-03-01 15:11:28 +00:00
rillig 17359e5a32 hcreate.3: fix typo 2023-02-21 19:27:14 +00:00
gutteridge d6bd763cb8 intro.5: fix typo and grammar and simplify a phrase 2023-02-20 02:05:47 +00:00
andvar 2773222a6c s/chracter/character/ in documentation. 2023-02-13 23:02:27 +00:00
christos 7a0279c013 Remove unused stuff, and limit the scope of some of the used ones.
(from des@freebsd)
2023-02-04 14:34:28 +00:00
christos 3ce4aa662f Add a entry point for the complete function for FreeBSD compatibility with sh. 2023-02-03 22:01:42 +00:00
christos 0428f1e1b1 Don't clear the handle to el "sel" and set it earlier to prevent handling
a signal before the handle is set. (From: des at FreeBSD)
2023-02-03 19:47:38 +00:00
andvar 96dad784b6 fix few typos in comments. 2023-01-31 21:11:24 +00:00
simonb a411c1a557 Note that strchrnul() first appeared in glibc 2.1.1 and appeared in
FreeBSD 10 before it appeared in NetBSD 8.
2023-01-31 01:42:32 +00:00
rillig 2f7da51144 fmtmsg.3: fix typo 2023-01-22 13:38:48 +00:00
riastradh e10add6b30 inet(3): Fix typo in description of size argument.
This is the size of dst, not of src.  The size of src is determined
by the address family.

Fix markup while here: .Fa for function arguments, not .Ar which is
for command arguments.
2023-01-18 23:16:05 +00:00
simonb 1daaca1c6c KNF nit: opening brace of a function on next line. 2023-01-18 08:07:22 +00:00
uwe 3268a4e25e crypt(3): Minor markup tweaks 2023-01-17 14:27:11 +00:00
msaitoh 997fd87f7e s/charater/character/ in comment. 2023-01-17 14:13:48 +00:00
christos e42273ba0d put attributes first for c23 compliance. 2023-01-17 13:18:03 +00:00
riastradh 642ce581b2 crypt(3): Call it password hashing, not `encrypting'.
Tidy up some of the markup while here, and be consistent about
calling the neatly formatted US-ASCII string an `encoded password
hash').
2023-01-17 01:56:43 +00:00
christos 20fbed3887 Apply 9cfe9507fcc22cd4a0c4da486ea1c7f0de6b075f for C23 attribute compliance.
Requested by Jan-Benedict Glaw.
2023-01-15 18:12:37 +00:00
kre b666381035 Add errc() and verrc() to the list of functions which do not return,
but exit() instead.

This was omitted when the *c() set of functions were added in 2014.
2023-01-05 15:13:57 +00:00
nia 4afdaab748 setlocale.3: Reflect state of NetBSD locale support in the 21st century
Don't use LC_COLLATE in a real code example, since a real call to set
LC_COLLATE will fail. Mention this.

Inconsistencies noticed by khw on IRC.
2022-12-31 14:35:56 +00:00
riastradh ddb0a7e7a7 swab(3): Rewrite this to be understandable.
And make the tests work, and exercise all lengths up to 100.

Evidently the previous definition, presumably tightly optimized for
1980s-era compilers and CPUs, was too hard to understand, because it
was incorrectly tested for two decades and broken for years.

PR lib/57141

XXX pullup-8
XXX pullup-9
XXX pullup-10
2022-12-28 15:34:19 +00:00
kre aab5fac668 PR lib/57141 - never decrement len without actually performing a STEP. 2022-12-28 14:32:04 +00:00
wiz eb7b4f7765 Remove unneeded -D_OPENBSD_SOURCE 2022-12-21 17:44:15 +00:00
blymn 0d33635b3c Add more debug so a call to waddbytes can be traced to the caller. 2022-12-21 06:18:01 +00:00
blymn 9c6a0e327d Backout change to addnstr that broke other applications as n should be
the number of bytes to add - for multibyte characters n will be > 1.

Fix __slk_draw to pass in the actual length of the label instead of
the default label length because wide characters may make the
actual string length longer than the slk display length.
2022-12-20 04:57:01 +00:00
christos 93664a940b Handle the case the code originally intended to handle; systems where:
SIZE_MAX < PTRDIFF_MAX
2022-12-13 19:08:42 +00:00
skrll e311a492a7 Trailing whitespace 2022-12-13 12:43:32 +00:00
blymn 7c304c7fb1 Default the character width to 1 if wcwidth fails. 2022-12-12 21:14:15 +00:00
christos fa7b09b795 Merge in 2022g:
Although tzcode still works with C89, bugs found in recent routine
    maintenance indicate that bitrot has set in and that in practice
    C89 is no longer used to build tzcode.  As it is a maintenance
    burden, support for C89 is planned to be removed soon.  Instead,
    please use compilers compatible with C99, C11, C17, or C23.

    timegm, which tzcode implemented in 1989, will finally be
    standardized 34 years later as part of C23, so timegm is now
    supported even if STD_INSPIRED is not defined.

    Fix bug in zdump's tzalloc emulation on hosts that lack tm_zone.
    (Problem reported by Đoàn Trần Công Danh.)

    Fix bug in zic on hosts where malloc(0) yields NULL on success.
    (Problem reported by Tim McBrayer for AIX 6.1.)

    Fix zic configuration to avoid linkage failures on some platforms.
    (Problems reported by Gilmore Davidson and Igor Ivanov.)

    Work around MS-Windows nmake incompatibility with POSIX.
    (Problem reported by Manuela Friedrich.)

    Port mktime and strftime to debugging platforms where accessing
    uninitialized data has undefined behavior (strftime problem
    reported by Robert Elz).

    Check more carefully for unlikely integer overflows, preferring
    C23 <stdckdint.h> to overflow checking by hand, as the latter has
    had obscure bugs.
2022-12-11 17:57:23 +00:00
uwe 710059bb9f editrc(5): Markup fixes 2022-12-06 00:59:20 +00:00
uwe 1c9bc64659 getbsize(3): Use .Ev for BLOCKSIZE 2022-12-06 00:13:17 +00:00
blymn 5a712dcba0 Revert previous change, it is not correct. 2022-12-05 21:14:25 +00:00
uwe e8b127922c getnetpath(3): Sprinkle some markup 2022-12-04 23:02:57 +00:00
uwe cfe198168b login_cap(3): Markup fixes 2022-12-04 22:51:43 +00:00
jakllsch 78eb21a033 On VAX, compile gdtoa/misc.c at -O0 to avoid incorrect machine code
resulting in some doubles printing as garbage.
2022-12-04 22:35:15 +00:00
uwe 7440a63dca fcntl(2): Fix wrong markup in a couple of places 2022-12-04 19:01:19 +00:00
skrll 1beb9ce90d Consistently use the 'mv' instrucation (which is itself an alias) instead
of the (old) alternative alias 'move'.
2022-12-04 17:04:06 +00:00
uwe 495edbf836 re_format(7): Add subsection headings for ERE and BRE
The first paragraph could use some rewording.  While BRE may be
obsolete, it's still the default for regcomp(3) and the default for
grep(1), sed(1), etc.
2022-12-04 16:52:48 +00:00
uwe eff611cf1c Bump date for the fixed RETURN VALUES in previous 2022-12-04 16:21:54 +00:00
uwe 15c5c5f472 Tweak markup in _lwp_*(2) manual pages
Use .Rv where possible.  Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

  Note our current implementation mis-matches [man pages] slightly
  (error codes are stuffed into errno, where they should simply be
  returned by these calls).  This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
2022-12-04 16:17:50 +00:00
uwe 49e10846a6 lib: Mark up error names in man pages with .Er 2022-12-04 11:25:08 +00:00
uwe 27e8188424 flock(2): s/Eq/Er/ typo in the ERRORS section 2022-12-04 11:18:58 +00:00