Commit Graph

17569 Commits

Author SHA1 Message Date
christos
26ba80487b Fix non _REENTRANT build. 2015-01-20 18:31:24 +00:00
christos
9226f39def Factor out popen() code into separate functions and create popenve()
using the new functions, a safer version of popen() that does not
involve a shell. Correct manual page inaccuracies.
2015-01-20 17:28:00 +00:00
wiz
194f011f43 Fix date. Sort section. Sort errors. Sort SEE ALSO. Break too long
lines.
2015-01-19 11:47:41 +00:00
christos
57b77f77cd add estro{i,u} (Kamil Rytarowski) 2015-01-18 18:09:36 +00:00
christos
3d8157c11a cleanups from (Kamil Rytarowski) 2015-01-18 18:01:41 +00:00
christos
566fb07644 man page for strtonum.3 2015-01-18 17:59:36 +00:00
justin
1eb711493e Remove no longer required definitions 2015-01-17 23:49:40 +00:00
justin
7b800c0c00 Modern Android SDK does not need special cases 2015-01-17 19:34:50 +00:00
wiz
8a99473073 Remove trailing whitespace. 2015-01-16 23:46:37 +00:00
christos
435e4e69b0 bump libc for strtoi and strtou 2015-01-16 18:45:01 +00:00
christos
40195068d4 Add strtonum implemented as a wrapper of strtoi. 2015-01-16 18:41:33 +00:00
christos
fbb651a269 strtoi and strtou additions 2015-01-16 18:37:21 +00:00
manu
575ae72270 Fix atime update
FUSE filesystems assume that SETATTR with atime is the result of utiimes()
being called. As a result, atime and mtime will be updated.  This happens
with MooseFS and glusterFS. atime is supposed to be updated by the
filesystem itself when it gets read operations.

We fix the problem in SETATTR operations by
1) do not create a mtime update when we have an atime update (and vice
   versa), just fill the fields to avoid the filesystem restting the
   missing field to Epoch, but do not pretend we want to update it.
2) If the change is limited to atime, iscard it, as updates should be
   done by READ operations
3) Kernel part of PUFFS has been fixed to make sure reads on empty file
   are sent to the filesystem:
   http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html

Thanks to Tom Ivar Helbekkmo for reporting this issue.
2015-01-13 16:51:30 +00:00
martin
f91d4e28bb Simplify, now that rounding mode defines match the hardware bits. 2015-01-13 11:16:06 +00:00
dennis
75a496875b Replace the branch to __cerror() in powerpc64 syscall stubs
with inline code which does what __cerror() was doing.  #ifdef
that code (i.e. all code) out of cerror.S; __cerror() is no more.
This seems to be necessary to fix the link of rescue/rescue, and
should have the pleasant side effect of making all other workarounds
done to keep the 'b __cerror' working unnecessary.
2015-01-12 02:48:20 +00:00
riastradh
fe3ead6a42 Introduce membar_datadep_consumer.
Discussed briefly on tech-kern without objection:

https://mail-index.netbsd.org/tech-kern/2014/11/20/msg018054.html
https://mail-index.netbsd.org/tech-kern/2015/01/07/msg018326.html
2015-01-08 22:27:17 +00:00
wiz
17c647e734 Add more markup. 2015-01-04 21:38:58 +00:00
christos
848cec6390 Correct API for the gethostby{name,addr} 2015-01-04 16:06:29 +00:00
pooka
bc3e3c852d check that sys/cdefs.h builds with -Werror (not the case on alpine linux
where it contains an unconditional #warning)
2015-01-03 13:16:41 +00:00
justin
e42c569056 Just abort on currently unsupported functions. 2014-12-29 21:50:09 +00:00
martin
f5c779f5d9 Fix exception status vs mask confusion, of course feenableexcept(),
fedisableexcept() and fegetexcept() all operate on the mask.
2014-12-29 19:11:13 +00:00
martin
06e406a946 Add missing return in __SOFTFP__ variant, pointed out by htodd. 2014-12-28 10:15:29 +00:00
martin
b137db7576 Add our common non standard extensions and fix typo (FE_EXCEPT_ALL ->
FE_ALL_EXCEPT).
2014-12-27 17:54:24 +00:00
martin
b19178f8f4 Fix consistent typo: it is FE_ALL_EXCEPT instead of FE_EXCEPT_ALL (this
went unnoticed as the undefined macro evaluated to 0 and the expression
was always used with ~)
2014-12-27 17:52:45 +00:00
martin
dce8d6f504 fenv(3) support for hppa 2014-12-27 16:54:02 +00:00
wiz
724c4ed029 Bump date for previous. 2014-12-25 13:39:41 +00:00
wiz
eb157f70b1 From Ingo Schwarze, based on changes from Kaspars Bankovskis:
* Document error handling of el_init(), el_set(), el_source(),
   and history_init().
 * Fix a typo an improve punctuation below H_SETUNIQUE.
 * The ellipsis already implies "optional", no need for [].
 * Sort options in editrc(5).
 * Prevent e.g. rom being misconstrued as the end of a sentence.
 * Drop a useless duplicate .Ar macro.
 * Put telltc in its proper place in the alphabetical order.
 * A few typos in vi editor command names.
 * Some missing vi editor command names.
 * Some missing author macros.
2014-12-25 13:39:05 +00:00
christos
0f10d12f2f whitelist O_CLOEXEC flag, should fix lastlogin issue. 2014-12-22 17:01:42 +00:00
manu
8ee430e576 Do not warn about relative path because of trailing slash
libpuffs calls realpath() to obtain an absolute path to use for mounting.
If the obtained path is different from the one given by the caller, a
warning is issued. This included the situation where the path passed by
the caller just have trailing slashes, a situation where we just want them
to be striped without a warning.
2014-12-22 08:16:21 +00:00
pooka
aa91aeb3c8 include correct header for "last minute just-in-case defensive addition
that's too trivial to check"
2014-12-17 01:49:08 +00:00
pooka
082d249a16 Allow for arbitrary MI scheduler implementations.
A concrete result is enabling unpatched libpthread to run on the
rumprun stacks (e.g. Xen and bare metal) with a non-NetBSD scheduler.
Those schedulers hook into the existing _lwp_frobnitz() NetBSD syscall
interfaces (well, "syscall" interfaces in that scenario ;)

More specifically about the change itself:

1) instead of calling _lwp_makecontext() followed by _lwp_create()
   and passing the entry point in ucontext_t (MD) through the calls, roll
   the calls into pthread__makelwp() and allow alternate implementations
   for that MI interface.

2) allow compile-time overriding of __lwp_gettcb_fast() or
   __lwp_getprivate_fast, which are inline and leak MD scheduler/thread
   details into libpthread


Additionally, two small nits:

I)  define LIB=pthread before including mk.conf so that it's possible
    to test for LIB==pthread in mk.conf

II) make it possible to leave out pthread_cancelstub.c.  This is required
    by the current implementation of rumprun-posix (i.e. rumprun on
    POSIX hosts) due to symbol collisions.  It needs to be fixed properly
    some day, but for now allows an almost-correct libpthread to run.
    I am sure @justin will be happy to explain the details ;)


no change to NetBSD
tested: anita+atf
2014-12-16 20:05:54 +00:00
pooka
68efe5aa2a With glibc on ARM kthread_exit() aborts because pthread_exit() fails
to unwind the stack.  Add a temporary workaround where we simply don't
allow the thread to exit (a kernel thread exit is a relatively uncommon
event in a rump kernel anyway).
2014-12-16 17:00:17 +00:00
msaitoh
5a1f437d33 Add "int showclass" argument to pci_devinfo(). The API was changed 10 years
ago.
2014-12-16 13:38:36 +00:00
chs
a60c43758e fix powerpc TLS problems by removing the hacks for PPC EABI.
the kernel no longer treats R2 specially and its use as
the TLS register is now handled entirely in userland.
2014-12-14 23:49:17 +00:00
justin
61b4fed96a Always use kqueue for BSDs in librumpclient
Tested now on the others
2014-12-13 17:18:55 +00:00
riastradh
212c8238ec Fix rcsid comment. 2014-12-11 21:54:13 +00:00
pooka
dc3c2e9560 Add two more Makefile conditionals required for RUMPRUN=yes
* do not build _errno.c (different thread/tls handling)
 * do not build either phk- or jemalloc (different backing page allocation)

Somehow I missed these in the previous commit, but now libc built with
RUMPRUN=yes works also with rumprun-posix, so there's reasonably high
confidence that I didn't miss anything anymore.
2014-12-10 16:55:54 +00:00
pooka
a17684a24c Add hooks for RUMPRUN build of libc
If "yes", does the following (default "no"):
  * prevents ASM syscalls from being built (librump provides syscalls)
  * does not include compat (useless when application is linked with libc)
  * does not build tags (no /var/db to install them to)
  * does not include tls

==> libc for rumprun can now be built against unmodified NetBSD sources
2014-12-10 00:37:30 +00:00
justin
7e80a07c88 Use kqueue in librumpclient for FreeBSD too 2014-12-08 01:10:07 +00:00
justin
af1fbf0457 Avoid uninitialised variable warning when gcc is feeling lazy 2014-12-08 00:12:03 +00:00
enami
11fe7239df Changes done in rsh.c rev. 1.36 was incomplete. As chuq pointed
in private mail, it broke rcp(1).

To achieve the documented behavior and to fix long standing incorrect
rsh(1) behavior which I've tried to fix in rev. 1.36, rcmd(1) should have
two operation mode; whether it should relay signal information on
auxiliary channel or not, depending on the argument `fd2p' passed to rcmd(3).
So, make rcmd(1) behave differntly depending on the environment variable and
set it when necessary in rcmd(3) according to how auxiliary channel
is set up by rcmd(3).
2014-11-26 23:44:21 +00:00
christos
fa438ee608 - Use O_DIRECTORY to open the file, so that we don't need to stat() after
that.
- Move the stat() call to fdopendir() and change it's error handling so that
  it does not hide errors.
- According to POSIX, fdopendir() transfers ownership of the fd only on
  success, so don't close it on failure. XXX: We still make it non-blocking
  on failure, but that's nitpicking.

XXX: pullup-7?
2014-11-26 16:48:43 +00:00
christos
94783bbf05 knf, no functional change. 2014-11-24 15:43:21 +00:00
christos
8a88bf6a6c Don't read past the end when the data is exactly the right size. Reported
by tedu @ openbsd in tech-userlevel. Thanks!
2014-11-24 15:41:18 +00:00
christos
625ac095d3 Fix ptrace %rcx corruption when pthread_errno() is used. Small example:
#include <sys/types.h>
    #include <stdio.h>
    #include <sys/ptrace.h>
    int main(void) { ptrace(18, getpid(), NULL, 0xabcd); }
The -lpthread cases pases 0 instead of 0xabcd
2014-11-24 15:33:18 +00:00
christos
6ced7fd882 welcome to 2014j 2014-11-18 01:58:59 +00:00
riastradh
b1fb140d0e Tweak wording, define `output', remove misplaced scaremongering. 2014-11-17 18:41:29 +00:00
christos
5f285f6d25 PR/49399: Henning Petersen: Add man pages for erfl and erfcl 2014-11-17 16:53:23 +00:00
riastradh
d8a3efd656 Fix Google Groups link. 2014-11-17 15:28:22 +00:00
wiz
7a50617bac Remove unnecessary Ns before punctuation. Fix a line. 2014-11-17 15:17:41 +00:00