third argument - the old version relies on the compiler to use the same
address for identical strings.
Spotted by segv at netctl dot net in libnbcompat context, details
in PR pkg/32097.
2. return ENAMETOOLONG instead of ENOMEM if name is too long to fit.
3. only decrement cp if we are pointing to the end of the string.
[this fixes the cp truncation of the last char problem reported]
going from:
activate -verbose
to:
reset -activation
results in:
reset -activationverbose"
instead of:
reset -activation
This is because we choose to insert "reset -" before the current line,
and the delete "e -" and insert "ion" in the appropriate place. The
cleareol code did not handle this case properly; we now cleareol to
the maximum number of characters of the first difference, the second
difference and the difference in line length.
- add _citrus_stdenc_get_state_desc() interface to get
encoding-scheme-independent encoder/decoder state descriptions.
- make sure that iconv_std module uses it to judge whether the last
sequences forms complete shift sequences.
- bump minor of i18n_module because of get_state_desc().
which is needed for things like S/KEY. We abuse the SRA_CONTINUE message
passing the password prompt there. That is usually NULL, so SRA
implementations usually ignore it. While I am here, if telnet_gets() fails
[user hit <eof> for example], then we exit.
any threads are created turned out to be not such a good idea.
there are stronger requirements on what has to work in a forked child
while a process is still single-threaded. so take all that stuff
back out and fix the problems with single-threaded programs that
are linked with libpthread differently, by checking if the library
has been started and doing completely different stuff if it hasn't been:
- for pthread_rwlock_timedrdlock(), just fail with EDEADLK immediately.
- for sem_wait(), the only thing that can unlock the semaphore is a
signal handler, so use sigsuspend() to wait for a signal.
- for pthread_mutex_lock_slow(), just go into an infinite loop
waiting for signals.
I also noticed that there's a "sem2" test that has never worked in its
single-threaded form. the problem there is that a signal handler tries
to take a sem_t interlock which is already held when the signal is received.
fix this too, by adding a single-threaded case for sig_trywait() that
blocks signals instead of using the userland interlock.
character area.
This is reported by MORIYAMA Masayuki <msyk _at_ mtg.biglobe.ne.jp> and
"NARUSE, Yui" <naruse _at_ airemix.com>, and fixed by MORIYAMA-san.