Add sunrpc.

This commit is contained in:
rsc 2004-04-21 03:04:30 +00:00
parent fa256eecfa
commit 551445b92c
16 changed files with 7163 additions and 0 deletions

34
src/libsunrpc/emalloc.c Normal file
View file

@ -0,0 +1,34 @@
#include <u.h>
#include <libc.h>
#include <thread.h>
#include <sunrpc.h>
void*
emalloc(ulong n)
{
void *v;
v = mallocz(n, 1);
if(v == nil)
{
abort();
sysfatal("out of memory");
}
setmalloctag(v, getcallerpc(&n));
return v;
}
void*
erealloc(void *v, ulong n)
{
v = realloc(v, n);
if(v == nil)
{
abort();
sysfatal("out of memory");
}
setrealloctag(v, getcallerpc(&n));
return v;
}