Ticket #13026: emacs_22_1_leopard.patch
File emacs_22_1_leopard.patch, 1.9 KB (added by lloyd@…, 17 years ago) |
---|
-
src/unexmacosx.c
old new 448 448 case, trailing pages are initialized with zeros. */ 449 449 for (p = ranges->address + ranges->size; p > ranges->address; 450 450 p -= sizeof (int)) 451 if (*((( int*) p)-1))451 if (*(((char *) p)-1)) 452 452 break; 453 filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address); 454 assert (filesize <= ranges->size); 453 filesize = p - ranges->address; 455 454 456 455 unexec_regions[num_unexec_regions].filesize = filesize; 457 456 unexec_regions[num_unexec_regions++].range = *ranges; … … 503 502 { 504 503 int i, n; 505 504 unexec_region_info r; 505 vm_size_t padsize; 506 506 507 507 qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]), 508 508 &unexec_regions_sort_compare); 509 509 n = 0; 510 510 r = unexec_regions[0]; 511 padsize = r.range.address & (pagesize - 1); 512 if (padsize) 513 { 514 r.range.address -= padsize; 515 r.range.size += padsize; 516 r.filesize += padsize; 517 } 518 511 519 for (i = 1; i < num_unexec_regions; i++) 512 520 { 513 521 if (r.range.address + r.range.size == unexec_regions[i].range.address … … 520 528 { 521 529 unexec_regions[n++] = r; 522 530 r = unexec_regions[i]; 531 padsize = r.range.address & (pagesize - 1); 532 if (padsize) 533 { 534 if ((unexec_regions[n-1].range.address 535 + unexec_regions[n-1].range.size) == r.range.address) 536 unexec_regions[n-1].range.size -= padsize; 537 538 r.range.address -= padsize; 539 r.range.size += padsize; 540 r.filesize += padsize; 541 } 523 542 } 524 543 } 525 544 unexec_regions[n++] = r; … … 562 581 case LC_TWOLEVEL_HINTS: 563 582 printf ("LC_TWOLEVEL_HINTS"); 564 583 break; 584 #ifdef LC_UUID 585 case LC_UUID: 586 printf ("LC_UUID "); 587 break; 588 #endif 565 589 default: 566 590 printf ("unknown "); 567 591 }