OpenBSD: Fix use of macros for AFS_KALLOC/AFS_KFREE

The macro definitions for AFS_KALLOC and AFS_KFREE used by
afs_osi_alloc.c to perform OS-specific memory allocation
are only defined by the OpenBSD osi_machdep.h header file
if they already exist, which means: never. This patch fixes
this situtation and makes sure that afs_osi_alloc.c
actually uses them, eliminating a direct OS-specific call
in afs_osi_alloc.c.

Change-Id: Ida1608774de3bc5861b223574f3cbf0d9647266c
Reviewed-on: http://gerrit.openafs.org/3682
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Antoine Verheijen 2011-01-19 11:52:10 -07:00 committed by Derrick Brashear
parent 1c74204223
commit d5367b5f14
2 changed files with 2 additions and 4 deletions

View File

@ -66,13 +66,13 @@ extern void osi_obsd_Free(void *p, size_t asize);
#ifdef AFS_KALLOC
#undef AFS_KALLOC
#define AFS_KALLOC(s) osi_obsd_Alloc((s), 1 /* cansleep */)
#endif
#define AFS_KALLOC(s) osi_obsd_Alloc((s), 1 /* cansleep */)
#ifdef AFS_KFREE
#undef AFS_KFREE
#define AFS_KFREE(p, s) (osi_obsd_Free((p), (s)))
#endif
#define AFS_KFREE(p, s) (osi_obsd_Free((p), (s)))
#ifdef AFS_OBSD42_ENV
/* removed, live with it */

View File

@ -73,8 +73,6 @@ afs_osi_Free(void *x, size_t asize)
osi_linux_free(x);
#elif defined(AFS_FBSD_ENV)
osi_fbsd_free(x);
#elif defined(AFS_OBSD_ENV)
osi_obsd_Free(x, asize);
#else
AFS_KFREE(x, asize);
#endif