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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user