/*
 *  common.h
 *  
 *
 *  Created by Charles Mercadal on Fri Jul 19 2002.
 *
 */

#ifndef COMMON_H
#define COMMON_H


#if defined(HAVE_STDBOOL_H)
#include <stdbool.h>
#else
#if !defined(bool)
#define false 0
#define true 1
typedef unsigned int bool_internal;
#define bool bool_internal
#endif	/* !defined(bool) */
#endif	/* defined(HAVE_STDBOOL_H) */

#include <stdlib.h>

/* 
 * set up some defines to choose later which files need to be compiled.
 */
#if defined(HAVE_TASK_FOR_PID)
#define USE_MACH
#elif defined(HAVE_LIBKVM)
#define USE_KVM
#elif defined(HAVE__PROC)
#define USE_PROCFS
#endif

char *xstrdup(const char *);
void *xmalloc(size_t);
void *xrealloc(void *, size_t);


#endif	/* COMMON_H */
