for the address of a variable used to store the error number instead
of writing to the global errno.
In a multi-threaded program, __errno() will return a pointer to a
thread-specific variable.
SYSCALL_NOERROR(x): Like SYSCALL except that "x" is a syscall
that can never fail.
RSYSCALL_NOERROR(x): Like RSYSCALL except that "x" is a syscall
that can never fail.
These macros simply call SYSCALL / RSYSCALL, and serve as placeholders
until an optimized implementation is done.
Changed all instances of ENTRY() to match the new calling convention
(it takes a second argument ).
Added new macros:
SYSTRAP(x): Expands to the code used to call syscall x.
This is used to simplify other macros.
SYSCALL_NOERROR(x): Like SYSCALL except that "x" is a syscall
that can never fail.
RSYSCALL_NOERROR(x): Like RSYSCALL except that "x" is a syscall
that can never fail.
SYSTRAP(x): Expands to the code used to call syscall x.
This is used to simplify other macros.
SYSCALL_NOERROR(x): Like SYSCALL except that "x" is a syscall
that can never fail.
RSYSCALL_NOERROR(x): Like RSYSCALL except that "x" is a syscall
that can never fail.
SYSTRAP(x): Expands to the code used to call syscall x.
This is used to simplify other macros.
SYSCALL_NOERROR(x): Like SYSCALL except that "x" is a syscall
that can never fail.
RSYSCALL_NOERROR(x): Like RSYSCALL except that "x" is a syscall
that can never fail.
SYSTRAP(x): Expands to the code used to call syscall x.
This is used to simplify other macros.
SYSCALL_NOERROR(x): Like SYSCALL except that "x" is a syscall
that can never fail.
RSYSCALL_NOERROR(x): Like RSYSCALL except that "x" is a syscall
that can never fail.
rename SYSCALL_NOLABEL as CALLSYS_ERROR (for consistency with CALLSYS_NOERROR
now in asm.h), and implement it using CALLSYS_NOERROR.
reimplement SYSCALL, RSYSCALL, and PSEUDO to use the appropriate macros.
implement SYSCALL_NOERROR and RSYSCALL_NOERROR to do the same thing as
SYSCALL and RSYSCALL, but without the error checking/handling.
the __strerror() and __strsignal() functions can not assume that the
messages will not overflow a NL_TEXTSIZE-sized buffer.
Noted by Mike Long <mike.long@analog.com> in PR
include bsd.own.mk early on, and if !alpha or if !ELF_TOOLCHAIN,
build c++rt0.o. ELF alphas don't use the 'normal' C++ runtime startup
routines. Eventually, there should be better ways to distinguish what
toolchain and object format is in use, and the Alpha C++ startup code
changes should be merged with that used by the other ports.
ELF64. On other architectures only include a.out support, since we don't
know whether or not they'll have the headers necessary for ECOFF and/or
ELF, and since they only want a.out for now (execpt the mips archs, but
they do Special things). There should be a better way to select which
bits of nlist code get compiled in, but currently there is not.
(1) split nlist() into multiple files, for clarity and to make
ELF 32/64 support easier,
(2) support multiple executable types at the same time, and
(3) add support for 32- and 64-bit ELF (32-bit ELF support
originally from OpenBSD, but with several bug fixes so
that it actually handles symbols types more correctly
(and therefore _works_ for some of the more tricky uses
of the nlist routines) and changes for 64-bit ELF support).
clean name for getlogin.
Moved _getlogin.o (now __getlogin.o) from PSEUDO to ASM, as this
syscall really does have a return value (although it will "always"
succeed since it should only be called from libc's getlogin())
reference to the "deflate" compression module. This can be used to
build a very small zcat for things like install media. (An example
of such a small zcat may be found in src/distrib/utils/zcat).
included without the other, private header files. Only zlib.h
should be installed in /usr/include; all others are private.
The Makefile has a "test" rule to verify that minigzip.c can
be compiled using only zlib.h (and that it actually works).
Note: This file has extensive modifications.
(currently the default), then it compiles on both an ECOFF toolchain
and on an ELF toolchain (but w/o support for dynamic linking or C++
constructors & destructors). If compiled without -DECOFF_COMPAT, it
supports statically- or dynamically-linked ELF binaries (and shared
libraries).
that flushing wasn't done right when input buffers were refilled, due
to a check like
if (foo == _A | _B) which, since _A and _B are both != 0, always
evaluates to true.
Found by proven@cygnus.com
char is sign extended before it is assigned to an unsigned int. This
fix, which has been tested with a different testcase, adds casts to
signed chars which results in proper behavior.
char is sign extended before it is assigned to an unsigned int. This
fix, which has been tested with a different testcase, adds explicit
casts to unsigned char before the value of a character is copied.
the C library "private" versions. Doing so results in unresolved
symbols the next time a dynamically linked program is run after the
new C library is installed.
passed to the execl(), execle(), and execlp() functions are in the form
of the argument vector to be passed to execve(). On these architectures,
it is unnecessary to count the number of arguments, allocate space on
the stack, copy the arguments, etc. The vector already on the stack
can be used instead.
When some arguments are passed in registers (like most RISC CPU's), it
should be possible to allocate stack space adjacent such that the
registers can be copied to that memory. After that, the same
approach described above can be used.
This change takes advantage of this on the i386, m68k, and ns32k. It
is probably true on the vax, but I am unable to check. RISC CPU's
probably need assembly language implementations to ensure everything
is placed exactly as needed when registers are copied to the stack...
> Prevent recursive invocation of mcount() while in kernel by setting profiling
> state to BUSY while in mcount(). This allows profiling to work when mcount()
> calls a profiled routine (for example, udiv on the SPARC).
never forwarded to me :-(.
> Clean up the FP stack before returning. The i387 exp() leaked an FP
> register on its first call. Subsequent calls reused the register so
> the leak didn't accumulate.
dump is present. This was caused by the fact that kvm_dump_mkheader() was
called *before* savecore checks the dump magic and kvm_dump_mkheader() returned
-1 without setting an error message. The latter is fixed now.
output emit newlines and those that return a pointer to string do not
append them.
The existing behavior was inherited from RPC4.0, but this seems to have
been corrected sometime before SunOS 4.1.
The documentation has been updated to reflect the new behavior.
xdr_ypbind_setdom() would always fail because the test for
xdr_ypdomain_wrap_string() was reversed. Fixed this and in
the process made all the function tests to be of the form:
if (!xdr_foo())
return FALSE;
....
return TRUE;
instead of having some of them like above and others like:
if (xdr_foo() == FALSE)
return FALSE;
...
return xdr_bar();
this is more consistant now and hopefully in the future people
will pattern match correctly and not introduce spurious errors.
using HASHFRACTION directly. in time-critical calculations, if HASHFRACTION
is a power of two, check that p->hashfraction == HASHFRACTION and if so do
the calculation with the compiled-in value so that the compiler can optimize
out (potentially) expensive divisions. if p->hashfraction != HASHFRACTION,
actually do the division. This has the result that on machines with slow
division, the division can be optimized out of the common case, but that
if HASHFRACTION changes from the compiled-in value (for whatever reason),
profiling will still work. Changes suggested by Chris Torek.
undefined behavior (so we can do whatever we want) while the latter
doesn't happen much in actual practice.
These changes make these functions considerably smaller and faster.