Commit Graph

11342 Commits

Author SHA1 Message Date
christos 7eace3da0c Add memfd_create(2) from GSoC 2023 by Theodore Preduta 2023-07-10 02:31:54 +00:00
riastradh 67e5e79509 select(2), poll(2): Clarify return values. 2023-07-07 01:31:25 +00:00
riastradh aeee56d1a9 libc: Fix missing membar_consumer in dl_iterate_phdr.
Pairs with the existing membar_producer.

XXX pullup-8
XXX pullup-9
XXX pullup-10
2023-07-04 19:24:25 +00:00
riastradh 437cf891b2 getrandom(2): Reduce editorializing tone in man page.
XXX pullup-10
2023-07-02 13:25:52 +00:00
dholland 4d2a6699db libc/shlib_version: note that *rand48* should be punted to libcompat 2023-07-02 00:52:04 +00:00
uwe 31f1ed95bf getentropy(3): use .Sx to xref CAVEATS 2023-06-30 22:15:14 +00:00
riastradh b36d83c44f getrandom(2), getentropy(3): Rework man pages.
Make supportable promises.  Omit needless verbiage.  Give caveats
with cross-references to entropy(7).  Emphasize that security is
necessarily relative to system configuration.

XXX pullup-10
2023-06-30 21:44:22 +00:00
riastradh d378359a95 vis(3): Avoid nonportable MIN in portable code. 2023-06-29 16:11:31 +00:00
msaitoh 4e7cd69809 Fix typo. unknwon -> unknown 2023-06-19 08:40:29 +00:00
msaitoh 305f6951ac Fix typo in the document. From FreeBSD. 2023-06-19 08:24:21 +00:00
andvar afc0aa83d8 fix typos in comments. 2023-06-16 20:01:20 +00:00
uwe 1ff3daa17a socket(2): change type flags list back to -tag
On second thought, convert the list of type flags back to -tag, but
don't make it -compact.  This way it's easier to see that it's related
to the list above.
2023-06-08 00:27:34 +00:00
uwe a9c3dfdd0a socket(2): fix macro invocation in a column 2023-06-06 23:31:01 +00:00
uwe eeed5a7d12 socket(2): use "provides" consistently in "type" descriptions 2023-06-06 23:29:16 +00:00
uwe 0c11cebb87 socket(2): use .Bl -column where appropriate 2023-06-06 23:27:15 +00:00
riastradh 9bf974fbd5 socket(2): Move prose list of socket type summaries into a table. 2023-06-06 09:14:27 +00:00
riastradh 98fb5a3b9b socket(2): Tidy up markup a bit.
Use a tag list, not a literal block with hand-formatted text, for
protocols and socket type flags.
2023-06-06 09:10:08 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
lukem f937c412f3 bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER
Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 08:52:53 +00:00
lukem c1aa87e38c libc: fix typo in comments: NO_SRSC -> NO_SRCS 2023-05-29 18:25:52 +00:00
skrll d0ff2affc8 Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
2023-05-19 06:50:07 +00:00
skrll 6d1cc151b5 No need for double semi-colon
Indent END the same as ENTRY.

NFCI.
2023-05-19 06:41:41 +00:00
skrll 83b9ddad41 KNF 2023-05-19 06:31:01 +00:00
skrll 75b842b847 RISC-V support that works on QEMU with a single hart.
Thanks for Simon Burge for plic(4).
2023-05-07 12:41:45 +00:00
mlelstv 9d5943131b Fix parsing a locale string with multiple components.
Also check for truncation of a long locale string.
2023-04-16 20:37:59 +00:00
christos c41e469284 PR/57250: Martin Husemann: dtoa mishandles infinite doubles on 32bit big
endian machines. When long double support was added, the old code was kept
for the regular double code. This code was never used because WIDE_DOUBLE
was always defined in the Makefile. Remove that old code, and conditionalize
the WIDE_DOUBLE code based on if long doubles are different than doubles on
the specific platform.
2023-04-04 19:26:06 +00:00
skrll 85c3279dc2 Trailing whitespace 2023-04-02 07:26:17 +00:00
dholland d3728fec90 Fix lying comment. 2023-04-01 23:44:11 +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
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
christos e42273ba0d put attributes first for c23 compliance. 2023-01-17 13:18:03 +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
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
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 1c9bc64659 getbsize(3): Use .Ev for BLOCKSIZE 2022-12-06 00:13:17 +00:00
uwe e8b127922c getnetpath(3): Sprinkle some markup 2022-12-04 23:02:57 +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