Commit Graph

20191 Commits

Author SHA1 Message Date
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
christos
ccd77ba5a7 protect MIN from re-definition 2021-02-25 13:42:16 +00:00
christos
2cf99de680 reduce casts 2021-02-24 18:13:21 +00:00
wiz
2b21efb927 Restore NetBSD RCS Ids. 2021-02-24 09:10:12 +00:00
christos
1ee269c3a2 sync with FreeBSD:
- NLS support
    - GNU extensions
    - bug fixes
2021-02-23 22:14:59 +00:00
rillig
0249cb139b isascii.3: fix typo 2021-02-21 16:33:22 +00:00
simonb
0728b0ad24 Remove the incorrect register shuffle - we pass SYS___syscall as the
syscall number in v0 and pass all the original __syscall() args in their
original slots/regs.
2021-02-19 08:33:02 +00:00
dholland
33b1043c4f Document that rewinddir(3) might either reopen or just lseek the dir.
(Currently it depends on the underlying directory, but documenting the
exact details seems inadvisable.)

Also, Someone(TM) should check if POSIX permits this or if we ought to
improve the implementation.
2021-02-17 23:51:04 +00:00
dholland
7a305b1ba6 Fix some typos/malapropisms in directory(3). 2021-02-17 23:39:46 +00:00
wiz
5d6017335b Merge EINVAL descriptions; replace Xr to itself with Nm. 2021-02-17 22:55:20 +00:00
dholland
394b9005c2 Document more EINVAL cases for fsync_range.
Corresponds to previous code fix.
2021-02-17 17:43:09 +00:00
riastradh
14efb762fe Correct floating-point terminology.
Might want to harmonize the printf(3) and wprintf(3) descriptions of
`%a'.
2021-02-16 14:44:25 +00:00
wiz
026eaf4d13 Remove reference to multibyte(3) and trailing commas. 2021-02-15 15:38:43 +00:00
christos
53b5b1c0c5 Remove FreeBSD portions that are not relevant to our implementation (pointed
out by joerg@)
2021-02-15 15:36:53 +00:00
christos
da3ff69781 Add missing man pages (from FreeBSD) 2021-02-15 14:35:04 +00:00
rillig
609d11bc47 libcurses: fix wrong tab width for addch
In sysinst, the installation screen is indented with tabs.  Sysinst uses
msgc, which brings its own text layout engine.  This engine does not use
addbytes but addch.  In addch, the x position for each tab was advanced
twice as much as needed.  The menu items were thus not indented by 8
spaces but by 16, which caused an ugly line break in the German
translation.

This bug largely went unnoticed because most other applications use
addbytes instead, which worked fine all the time.  It had been
introduced somewhere between NetBSD 8.0 and NetBSD 9.0.

The code around this bug used aliased variables for win->curx and
win->cury a lot.  Getting this right is difficult and needs a thorough
test suite.  Even though libcurses has 201 tests, that is not nearly
enough to cover all the relations between the various functions in
libcurses that call each other, crossing API boundaries from internal
to external, doing character conversions on the way and juggling around
4 different types of characters (char, wchar_t, chtype, cchar_t).

The simplest fix was to remove all this aliasing, while keeping the
API the same.  If _cursesi_waddbytes is not considered part of the API,
it would be possible to replace px with win->curx in all places, same
for py and win->cury.

The complicated code with the aliasing may have been meant for
performance reasons, but it's hard to see any advantage if both points
of truth need to be synchronized all the time.

Libcurses can be built in 2 modes: with wide character support or
without (-DDISABLE_WCHAR).  The test suite only covers the variant with
wide characters.  The single-byte variant has to be tested manually.
Running sysinst with the single-byte libcurses produces the correct
layout.
2021-02-13 14:30:37 +00:00
rillig
76716cd400 curses.h: proofread, indent a bit more consistently 2021-02-13 10:37:00 +00:00
dholland
aad6139743 Document EINVAL for invalid flags given to fsync_range(). 2021-02-13 06:24:08 +00:00
wiz
d2560851e3 Try improving readability in wrt negations.
Use Nx.  Remove trailing whitespace.  Fix some typos.
2021-02-09 09:01:29 +00:00
dholland
d4c3ba45a9 Document in poll(2) that poll first appeared in NetBSD in NetBSD 1.3. 2021-02-09 01:12:01 +00:00
dholland
800d267b53 typo in previous. 2021-02-09 01:01:31 +00:00
dholland
cf51226d61 Rework the text of poll(2) for clarity. Bump date. 2021-02-09 00:50:47 +00:00
nia
1b135bd341 clarify what happens when kill(-1, ...) does nothing 2021-02-08 01:00:49 +00:00
rillig
a9a73810b2 curses_screen.3: fix typo 2021-02-07 23:00:57 +00:00
rillig
efd7ce1838 poll.2: fix typo in manual page 2021-02-07 18:22:51 +00:00
jdolecek
f0c6c300fa restore change from rev 1.23 "Avoid undefined behavior in fread(3)", mistakely
removed as part __SNBF optimization
2021-02-07 15:54:09 +00:00
rillig
ae30211ba7 libcurses: fix spelling in comment 2021-02-06 19:41:14 +00:00
rillig
e89f2cb186 libncurses: fix grammar in manual page 2021-02-06 13:58:09 +00:00
simonb
15fc23b5a4 For mips n32/n64 explicitly save the GP reg on the stack, and
restore it _after_ the call to __errno().  Fixes sending the
__errno() call off to nowhereland when this code is included
in another library (eg __posix_cerror() in libposix).  Failure
picked up by the ATF lib/libposix/posix1/t_rename test.
2021-02-06 06:58:59 +00:00
jdolecek
8e29352f70 change libc sched_yield() stub to actually still call the syscall
instead of doing nothing when app is not linked with pthread; this matches
other systems

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html
2021-02-06 00:08:58 +00:00
jdolecek
715c666a51 for fread(3) and fwrite(3) check for (size * nmemb) size_t overflow, and
error out with EOVERFLOW if it happens; this is less silly answer
to a silly call than returning some randomly wrapped length

change adapted from OpenBSD

FreeBSD has a similar check, but they return EINVAL instead, feel
free to adjust if SUS or other standard mandates specific value

suggested by Kamil Rytarowski
2021-02-01 17:50:53 +00:00
jdolecek
87a4031ae0 for unbuffered I/O arrange for the destination buffer to be filled in one
go, instead of triggering long series of 1 byte read(2)s; this speeds up
fread() several order of magnitudes for this case, directly proportional
to the size of the supplied buffer

change adapted from OpenBSD rev. 1.19

fixes PR lib/55808 by Roland Illig
2021-01-31 16:18:22 +00:00
joerg
bb682c3920 Optimize CPU and memory use of cdbw(3)
Reduce memory footprint and processing time by dropping the vertex parts
of the edges kept during the peeling. Hook up the
division-by-multiplication logic to help older platforms.
2021-01-07 14:41:50 +00:00
reinoud
e6b71c1487 Implement support for trapping REP CMPS instructions in NVMM.
Qemu would abort hard when NVMM would get a memory trap on the instruction
since it didn't know it.
2020-12-27 20:56:14 +00:00
nia
c1f0400234 ossaudio(3): Do not reuse results from AUDIO_GETBUFINFO in SETINFO
Should help PR 55876.
2020-12-19 12:55:28 +00:00
skrll
95cc57f231 spaces to tab 2020-12-05 11:18:21 +00:00
nia
aab2f38b54 Add some missing channel order related ioctl defines.
These are no-ops (unimplemented) on both FreeBSD and Solaris
and the one piece of code I've found that uses it seems to assume the
call will fail so it should be safe to leave this returning EINVAL.

However, it does need the definitions to compile...
2020-12-03 22:10:21 +00:00
wiz
0fff63c9f6 comparision -> comparison 2020-12-02 14:20:19 +00:00
riastradh
3766bfcd77 Note that open(O_ASYNC) does not work as advertised.
This matches Linux, which also advertises the same semantics and
fails to implement it, according to:

https://man7.org/linux/man-pages/man2/fcntl.2.html

(At what point should we collectively stop advertising the semantics
that doesn't work and call the bug a feature?)
2020-11-30 00:21:35 +00:00
kamil
e6959f1f85 Refine the documentation
Sort includes.
Correct the historical note, pipe first appeared in AT&T UNIX v3.
Document ENOMEM.
2020-11-27 16:42:00 +00:00
rillig
8f547784a9 fix typo in manual page for strchrnul(3) 2020-11-26 23:13:55 +00:00
is
84206f8865 Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).
2020-11-18 12:49:52 +00:00
rin
a8c74629f6 Support aarch64eb in */config.guess.
Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2020-11-17 10:35:10 +00:00
nia
f7f198978e ossaudio(3): Clone some useful behaviour from the Solaris kernel
Both SNDCTL_DSP_SPEED and SNDCTL_DSP_CHANNELS support a special value
0 to "query the configured value without changing it". In our case,
this actually means setting and querying the hardware rate.

I don't know if OSSv3 or FreeBSD or other implementations also do this.
But it seems safe and sensible to support.
2020-11-13 09:02:39 +00:00
skrll
87529819eb Catch up with aa64 is not mips change 2020-11-10 19:14:11 +00:00