bfd: Use MAP_FAILED for mmap failure
Use MAP_FAILED, instead of ((void *) -1), for mmap failure and use
((void *) -1) only if MAP_FAILED is undefined.
* bfdio.c (bfd_mmap): Replace (void *) -1 with MAP_FAILED for
mmap failure.
* bfdwin.c: Don't include <sys/mman.h>.
(MAP_FILE): Removed.
(bfd_get_file_window): Replace (void *) -1 with MAP_FAILED for
mmap failure.
* cache.c: Don't include <sys/mman.h>.
(cache_bmmap): Replace (void *) -1 with MAP_FAILED for mmap
failure.
* opncls.c (opncls_bmmap): Likewise.
* sysdep.h: Include <sys/mman.h> if HAVE_MMAP is define.
(MAP_FILE): New. Defined as 0 if undefined.
(MAP_FAILED): New. Defined as ((void *) -1) if undefined.
6 files changed