Where does <sys/features.h> come from?
Peter Dufault
dufault at hda.com
Wed Apr 21 21:18:53 UTC 2010
On Apr 21, 2010, at 4:43 , Joel Sherrill wrote:
> It is part of newlib. But be careful. Chris Johns is working on an
> mmap() implementation that is compliant but won't support
> mmap files.
>
That's fine, once that work is in I assume it will include a <sys/mmap.h>, mmap() and munmap() so that things will compile, build, and run properly, right? Until then, though, _POSIX_MAPPED_FILES should be undefined.
Here's one that given an appropriate <sys/mmap.h> is compliant but won't support mmap files:
void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off) {
errno = ENOSYS;
return MAP_FAILED;
}
int munmap(void *addr, size_t len) {
errno = ENOSYS;
return -1;
}
Peter
-----------------
Peter Dufault
HD Associates, Inc. Software and System Engineering
More information about the users
mailing list