/* Forward declarations/prototypes for local functions */
-static struct mdesc *reuse PARAMS ((int));
+static struct mdesc *reuse (int fd);
/* Initialize access to a mmalloc managed region.
On failure returns NULL. */
-PTR
-mmalloc_attach (fd, baseaddr)
- int fd;
- PTR baseaddr;
+void *
+mmalloc_attach (int fd, void *baseaddr)
{
struct mdesc mtemp;
struct mdesc *mdp;
- PTR mbase;
+ void* mbase;
struct stat sbuf;
/* First check to see if FD is a valid file descriptor, and if so, see
return (NULL);
else if (sbuf.st_size > 0)
- return ((PTR) reuse (fd));
+ return ((void*) reuse (fd));
}
/* If the user provided NULL BASEADDR then fail */
// mdp = NULL;
}
- return ((PTR) mbase);
+ return ((void*) mbase);
}
/* Given an valid file descriptor on an open file, test to see if that file
unsuccessful for some reason. */
static struct mdesc *
-reuse (fd)
- int fd;
+reuse (int fd)
{
struct mdesc mtemp;
struct mdesc *mdp = NULL;
mdp -> morecore = __mmalloc_mmap_morecore;
if (mdp -> mfree_hook != NULL)
{
- mmcheckf ((PTR) mdp, (void (*) PARAMS ((void))) NULL, 1);
+ mmcheckf ((void*) mdp, (void (*) (void)) NULL, 1);
}
}
return (mdp);
always fails. */
/* ARGSUSED */
-PTR
-mmalloc_attach (fd, baseaddr)
- int fd;
- PTR baseaddr;
+void*
+mmalloc_attach (int fd, void* baseaddr)
{
return (NULL);
}