diff options
author | bde <bde@FreeBSD.org> | 1998-12-16 18:59:47 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-12-16 18:59:47 +0000 |
commit | 933cffdd829551ce91a9696025d08f3e1b09909a (patch) | |
tree | cc7340fa503bd1a166784cf93e0423eb60b9d0e3 /include/kvm.h | |
parent | 4674dad527e098e67d75cc31e7d53776b25cc495 (diff) | |
download | FreeBSD-src-933cffdd829551ce91a9696025d08f3e1b09909a.zip FreeBSD-src-933cffdd829551ce91a9696025d08f3e1b09909a.tar.gz |
Declare size_t and ssize_t if they are not already declared, so that
<kvm.h> is self-sufficient again.
Moved typedefs and forward struct declarations out of __BEGIN_DECLS/
__END_DECLS.
Don't comment out the prototype for kvm_uread(). This was a 4 year
old kludge for previous breakage of self-sufficiency. The prototypwe
was broken instead.
Fixed bitrot (const poisoning) in the type of kvm_uread().
Fixed order of the declaration of kvm_uread().
Diffstat (limited to 'include/kvm.h')
-rw-r--r-- | include/kvm.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/kvm.h b/include/kvm.h index fb2d224..9e0d921 100644 --- a/include/kvm.h +++ b/include/kvm.h @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)kvm.h 8.1 (Berkeley) 6/2/93 + * $Id$ */ #ifndef _KVM_H_ @@ -43,11 +44,22 @@ #include <nlist.h> #include <sys/cdefs.h> -__BEGIN_DECLS +#ifdef _BSD_SIZE_T_ +typedef _BSD_SIZE_T_ size_t; +#undef _BSD_SIZE_T_ +#endif + +#ifdef _BSD_SSIZE_T_ +typedef _BSD_SSIZE_T_ ssize_t; +#undef _BSD_SSIZE_T_ +#endif typedef struct __kvm kvm_t; struct kinfo_proc; +struct proc; + +__BEGIN_DECLS int kvm_close __P((kvm_t *)); char **kvm_getargv __P((kvm_t *, const struct kinfo_proc *, int)); char **kvm_getenvv __P((kvm_t *, const struct kinfo_proc *, int)); @@ -62,12 +74,9 @@ kvm_t *kvm_open kvm_t *kvm_openfiles __P((const char *, const char *, const char *, int, char *)); ssize_t kvm_read __P((kvm_t *, unsigned long, void *, size_t)); -ssize_t kvm_write __P((kvm_t *, unsigned long, const void *, size_t)); -/* Comment this out until it can be fixed correctly. ssize_t kvm_uread - __P((kvm_t *, struct proc *, unsigned long, char *, size_t)); -*/ - + __P((kvm_t *, const struct proc *, unsigned long, char *, size_t)); +ssize_t kvm_write __P((kvm_t *, unsigned long, const void *, size_t)); __END_DECLS #endif /* !_KVM_H_ */ |