rename mmap() and munmap()

. it's a good extra interface to have but doesn't
	  meet standardised functionality
	. applications (in pkgsrc) find it and expect
	  full functionality the minix mmap doesn't offter
	. on the whole probably better to hide these functions
	  (mmap and friends) until they are grown up; the base system
	  can use the new minix_* names
This commit is contained in:
Ben Gras
2011-07-16 03:11:10 +02:00
parent 76356eed97
commit 02081e4b62
23 changed files with 106 additions and 66 deletions

View File

@@ -102,7 +102,11 @@ re_input(void)
free(i_ptr);
i_ptr = NULL;
if (i_womp != NULL) {
#ifndef __minix
munmap(i_womp, i_size);
#else
free(i_womp);
#endif
i_womp = NULL;
}
} else {
@@ -139,7 +143,11 @@ reallocate_lines(size_t *lines_allocated)
new_size = *lines_allocated * 3 / 2;
p = realloc(i_ptr, (new_size + 2) * sizeof(char *));
if (p == NULL) { /* shucks, it was a near thing */
#ifndef __minix
munmap(i_womp, i_size);
#else
free(i_womp);
#endif
i_womp = NULL;
free(i_ptr);
i_ptr = NULL;