#include "header.h" #ifdef _WINDOWS int strcasecmp(const char *s1, const char *s2) { return stricmp(s1,s2); } int strncasecmp(const char *s1, const char *s2, size_t n) { return strnicmp(s1,s2,n); } void *mmap(void *x0, size_t len, int x1, int x2, int fd, size_t off) { void *buf; lseek(fd, off, SEEK_SET); if ((buf = malloc(len)) == NULL) { fprintf(stderr, "Unable to allocate memory for mmap.\n"); exit(1); } read(fd, buf, len); return(buf); } void munmap(void *buf) { free(buf); } #endif