devman: allow multiple event read calls up to EOF

Read calls may be repeated by VFS if the user destination memory is
not mapped in.  Devman currently assumes that all reads are
successful, and uses this to track whether EOF has been reached for
a particular event, discarding it as soon as this happens.  Upon
repetition, this may result in lost events for devmand.

With this patch, devman discards events only once devmand reads the
EOF marker, which itself can never generate a user page fault.  The
result is that read calls for data can be repeated safely, without
the risk of losing events in the process.

Change-Id: I9dfdf7f8c8992a20a10302d79c3506e61f8564b0
Fix fcntl(F_[GS]ETNOSIGPIPE) semantics

The new semantics should match those of NetBSD and other systems.

Change-Id: Ic9ca9d6b8c3e42d2a2953d9feea5f6bacaceb43c
VM: fix returning VFS error code for mmap

Change-Id: Ifcaa15fb8277be53515eb18c4f86a306c52d91d6
buildsystem: fix build errors for x86 on OSX

Define _NLS_PRIVATE in tools/llvm-tblgen/Makefile so that
<tools/compat/nl_types.h> will pull in <include/nl_types.h>. This is
necessary as Clang's c++/v1/locale implementation contains references
to catopen and other catalog symbols that aren't defined anywhere.
Moreover, the compiler will complain about NL_CAT_LOCALE not being
declared. The compat nl_types.h fixes these discrepancies.

However, <nl_types.h> uses __format_arg to add function attributes to
declarations. On NetBSD __format_arg(fmtarg) is defined by
<sys/cdefs.h> to be __attribute__((__format_arg__ (fmtarg))) for
briefness, but other platforms don't do that. Consequently, the build
will fail on catopen and friends function declarations because the
compiler doesn't know how to handle __format_arg(fmtarg). A fixup to
<tools/compat/nl_types.h> takes care of this, but it won't win any
beauty contest.

Change-Id: Ic4426eca8385aeef858e60304d6e8c06cd497d95
Signed-off-by: Thomas Veerman <tveerman@gmail.com>
Add trace(1): the MINIX3 system call tracer

Change-Id: Ib970c8647409196902ed53d6e9631a1673a4ab2e