Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
ways of 386BSD, and one in stdlib, which is from Lite-2. The former was
picked up by the build process and has seen a little more maintenance
while the latter's location is "right", so bring the latter up to par
with the former and dispose of the (now) latter.
Reported by David A. Holland in PR lib/25160, which is worded in a
far less mind-boggling fashion than the above.
as denominator; regenerate the randtbl[] with new generator
patch provided in lib/22853 by KIHARA Hideto; code actually present
in libkern/random.c since 1994/06/03
matches similar change done in glibc in 1995, and FreeBSD & OpenBSD in 1996
* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h
* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.
These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
- Use NULL where appropriate.
- No need to pull in stdint.h.
- Get rid of "register" keywords in the hope that the compiler will
do a better job for us. :-)
- Every message ends with a period.
- MMAP() macro is supposed to return MAP_FAILED rather than -1 if it
fails.
- De-__P.
for a 64-bit target on a 32-bit host.
NB: There seems to be a bug in either gcc itself or the way we import
it, b/c the incorrect #define HAVE_ATOLL is picked from (e.g. for
sparc64) gnu/usr.bin/gcc/arch/sparc64/auto-host.h - so when gen*
auxilary (host) programs are built in gnu/usr.bin/gcc/backend, they
incorrectly pick-up target's HAVE_ATOLL.
For now providing atoll(3) in libnbcompat is a simple and sufficient
workaround.
implementation in not permitting a "name=value" argument.
* Add a conforming __unsetenv13() and do function renaming for
unsetenv(); preserve old symbol with old behavior.
* Make visible setenv() and unsetenv() for 1003.1-2001 feature selection
macros; resolves PR standards/20479.
decrement the recursion count.
Fixes the problem of uic dying with a no-next-thread assertion while
building kdeadmin3; reported by Perry Metzger and others on
tech-pkg.
that these calls be thread-safe with respect to the environment, and it
causes serious problems for threaded applications which call vfork() and
exec*() (including indirectly, via popen() or system()).
Acquire and release __environ_lock in the parent in popen() and system() to
play safe and provide the child with a stable environment.
__environ_lock should also have an atfork() handler; still under development.
A dynamically linked program invokes the rtld cleanup routine via
an atexit handler. This rtld cleanup routine invokes _fini() for
shared libraries, which in-turn invoke __cxa_finalize() with their
DSO handle. By luck, this happens to work okay for non-threaded
programs, but for a threaded program, this leads to deadlock (sometimes
manifested as an assertion failure, if the program didn't actually
create any threads).
Fixed by teaching __cxa_finalize() that it can be recursively invoked,
adjusting the handler list manipulation accordingly.
as specified by the C++ ABI for Itanium. Despite the ABI document's name,
many of the items in it are implemented for other architectures.
See the following URL for a reference:
http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor
Fixes lib/18379 (from Joel Baker).