Mercurial > hg > xemacs-beta
comparison src/unexfreebsd.c @ 274:ca9a9ec9c1c1 r21-0b35
Import from CVS: tag r21-0b35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:29:42 +0200 |
parents | 084402c475ba |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
273:411aac7253ef | 274:ca9a9ec9c1c1 |
---|---|
678 int | 678 int |
679 run_time_remap (char *dummy) | 679 run_time_remap (char *dummy) |
680 { | 680 { |
681 unsigned long current_sbrk = (unsigned long) sbrk (0); | 681 unsigned long current_sbrk = (unsigned long) sbrk (0); |
682 | 682 |
683 #if __FreeBSD_version < 300000 /* 2.x can work with this code */ | |
683 if (sbrk_of_0_at_unexec < current_sbrk) | 684 if (sbrk_of_0_at_unexec < current_sbrk) |
684 { | 685 { |
685 if (sbrk_of_0_at_unexec != 0) | 686 if (sbrk_of_0_at_unexec != 0) |
686 fprintf (stderr, "Absurd new brk addr = %lx (current = %lx)\n", | 687 fprintf (stderr, "Absurd new brk addr = %lx (current = %lx)\n", |
687 sbrk_of_0_at_unexec, current_sbrk); | 688 sbrk_of_0_at_unexec, current_sbrk); |
688 } | 689 } |
689 else | 690 else |
691 #endif | |
692 if (sbrk_of_0_at_unexec > current_sbrk) | |
690 { | 693 { |
691 errno = 0; | 694 errno = 0; |
692 if (brk ((caddr_t) sbrk_of_0_at_unexec)) | 695 if (brk ((caddr_t) sbrk_of_0_at_unexec)) |
693 fprintf (stderr, "failed to change brk addr to %lx: %s\n", | 696 fprintf (stderr, "failed to change brk addr to %lx: %s\n", |
694 sbrk_of_0_at_unexec, SYS_ERR); | 697 sbrk_of_0_at_unexec, SYS_ERR); |