From b245b90a64600cf277ee80d384d4a5a0f48ad27a Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 16 Dec 1998 18:59:47 +0000 Subject: Declare size_t and ssize_t if they are not already declared, so that 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(). --- include/kvm.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/kvm.h b/include/kvm.h index fb2d22435fee..9e0d9212a444 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 #include -__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_ */ -- cgit v1.3