Commit Graph

14 Commits

Author SHA1 Message Date
bjh21 767def4642 Re-introduce inclusion of config.h for libnbcompat, since the namespace.h trick
no longer works.
2002-04-24 17:45:14 +00:00
kleink f4346e4218 Protect inclusion of namespace.h with _LIBC. 2002-04-24 12:25:09 +00:00
kleink 937479fc3b Need internal names for strlcat() and strlcpy(). 2002-04-17 16:23:08 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv c08a2cb7c2 Add hooks for reachover builds from src/tools/compat. 2002-01-21 21:33:42 +00:00
itojun 26d3d87635 sync comment with latest openbsd code 2001-11-16 04:17:25 +00:00
itojun 0e83f5f0d1 pull in openbsd strlcat.c 1.3 -> 1.4.
Reverse the order of two loop invariant to make 'strlcat(0, "foo", 0)'
not get a SEGV; Richard Kettlewell <rjk@greenend.org.uk>
2001-01-13 04:19:54 +00:00
lukem 61017941ab remove register 2001-01-03 14:33:02 +00:00
itojun a1ce29330c sync with latest openbsd.
comment in strlcat(3) was wrong about return value.
2000-11-24 16:19:05 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
lukem cb7f9fc8ac due to an overwhelming rush of complaints, remove the check for NULL
pointers.  apparantly a lot of developers feel that potentially dumping
core is better than returning a status of `0 bytes copied'...
1999-09-10 23:13:09 +00:00
lukem e447fb4bb4 add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy
1999-09-08 22:56:55 +00:00
lukem 714b0ff65a strlcpy() and strlcat() by Todd Miller <Todd.Miller@courtesan.com>, via openbsd 1999-09-08 22:01:13 +00:00