Commit Graph

25 Commits

Author SHA1 Message Date
groo
50d2b6a96f botched strncpy -> strlcpy
from xs@kittenz.org
2002-04-16 19:08:43 +00:00
mycroft
605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +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
fvdl
0536609b97 Keep track of the number of encountered symlinks and fail with ELOOP
if they exceed MAXSYMLINKS.
1999-08-10 13:03:11 +00:00
sommerfeld
508d2d0e9e Avoid infinite loop if pathname is longer than the maximum the kernel
is willing to return from getcwd().
(this can only happen in -current).
1999-07-11 18:01:46 +00:00
christos
d3afd1cc44 make this compile under linux 1999-06-11 15:38:40 +00:00
christos
c52c8cc0b1 int -> size_t problems, change do { } while (0) to for (;;) 1999-05-03 14:33:50 +00:00
sommerfe
bb8c6c869a move __getcwd prototypes to libc-private header file.
XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).
1999-03-26 22:23:57 +00:00
sommerfe
27a01cc18e Use __getcwd() system call in getcwd() unless OLD_GETCWD is defined 1999-03-26 04:04:13 +00:00
christos
ccbb2cb989 port to svr4. 1998-11-06 19:43:23 +00:00
perry
98b9f211ee fix bcopy->memcpy with memcpy->memmove -- not strictly needed, but... 1998-08-26 00:38:39 +00:00
perry
a843f0f8a5 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-10 02:43:08 +00:00
lukem
2b0e1bd9bd backout parts of the lite2 merge; it causes undesirable lossage:
* $PWD was used if it appeared ``correct''. this `enhancment' was
  not documented in getcwd(3), and caused problems for pwd(1) (which
  uses getcwd(3)), and in turn <bsd.obj.mk> (which uses pwd) when $PWD
  is set to the logical path instead of the real path (e.g, symlink
  /usr/src -> /z/NetBSD-current/src).
  [$PWD is set to the logical path by tcsh(1) with set symlinks=expand]
* as getcwd() without the $PWD code is just a wrapper to getcwd_physical(),
  rename the latter to the latter. hack realpath() to use the getcwd().

yet another case of `it was a good idea, but...'
1998-03-14 03:27:59 +00:00
perry
1ea84adf39 trivial changes to reduce lint complaints 1998-02-26 02:40:11 +00:00
perry
4146d58604 remove obsolete register declarations 1998-02-03 18:23:37 +00:00
perry
5769bb1db8 add some fixes to realpath() that were in the old realpath.c 1998-02-02 23:33:44 +00:00
perry
08b0946f73 merge/update to lite-2 1998-02-02 02:41:17 +00:00
jtc
43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
christos
d177cac3ba Fix RCSID's
Fix gcc warnings.
1997-07-13 19:00:13 +00:00
jtc
915b76dd9f Don't cast void functions to void. 1995-06-16 07:05:27 +00:00
cgd
b585e843ca update from Lite, with local changes. fix Ids, etc. 1995-02-27 04:12:15 +00:00
jtc
9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
mycroft
f23f94cb77 Add even more RCS frobs. 1993-07-30 08:21:41 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00