2005-09-02 Ulrich Drepper <drepper@redhat.com>
* strings.c (main): Reset elfmap variable afte rmunmap call.
+ [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.
2005-08-28 Ulrich Drepper <drepper@redhat.com>
static void *
map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep)
{
+#if _MUDFLAP
+ (void) fd;
+ (void) start_off;
+ (void) fdlen;
+ (void) map_sizep;
+ return MAP_FAILED;
+#else
/* Maximum size we mmap. We use an #ifdef to avoid overflows on
32-bit machines. 64-bit machines these days do not have usable
address spaces larger than about 43 bits. Not that any file
should be that large. */
-#if SIZE_MAX > 0xffffffff
+# if SIZE_MAX > 0xffffffff
const size_t mmap_max = 0x4000000000lu;
-#else
+# else
const size_t mmap_max = 0x40000000lu;
-#endif
+# endif
/* Try to mmap the file. */
size_t map_size = MIN ((off64_t) mmap_max, fdlen);
*map_sizep = map_size;
return mem;
+#endif
}