Skip to content
Snippets Groups Projects
Commit 40a9e903 authored by deuce's avatar deuce
Browse files

Add xpmap to the build, fix xpmap enough for it to compile.

parent d07587ca
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ OBJS = \
$(OBJODIR)$(DIRSEP)xp_dl$(OFILE) \
$(OBJODIR)$(DIRSEP)xpbeep$(OFILE) \
$(OBJODIR)$(DIRSEP)xpdatetime$(OFILE) \
$(OBJODIR)$(DIRSEP)xpmap$(OFILE) \
$(OBJODIR)$(DIRSEP)xpprintf$(OFILE)
......@@ -46,6 +47,7 @@ MTOBJS = \
$(MTOBJODIR)$(DIRSEP)xp_dl$(OFILE) \
$(MTOBJODIR)$(DIRSEP)xpbeep$(OFILE) \
$(MTOBJODIR)$(DIRSEP)xpdatetime$(OFILE) \
$(MTOBJODIR)$(DIRSEP)xpmap$(OFILE) \
$(MTOBJODIR)$(DIRSEP)xpprintf$(OFILE)
TESTOBJS = \
......
......@@ -39,6 +39,8 @@
#if defined(__unix__)
#include <stdlib.h> // malloc()
#include <unistd.h> // close()
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
......@@ -51,7 +53,7 @@ struct xpmapping *xpmap(const char *filename, enum xpmap_type type)
int oflags;
int mflags;
int mprot;
struct stat *sb;
struct stat sb;
struct xpmapping *ret;
switch(type) {
......
......@@ -40,9 +40,6 @@
#include "gen_defs.h"
void *xpmap(const char *filename, int flags);
void xpunmap(struct xpmapping *map);
enum xpmap_type {
XPMAP_READ,
XPMAP_WRITE,
......@@ -72,3 +69,8 @@ struct xpmapping {
#error "Need mmap wrappers."
#endif
struct xpmapping *xpmap(const char *filename, enum xpmap_type type);
void xpunmap(struct xpmapping *map);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment