diff options
| author | Paul Eggert | 2011-07-27 17:48:01 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-27 17:48:01 -0700 |
| commit | 044c22e545acef592ed95e4e3bb9f8aeff67291a (patch) | |
| tree | 167a4c706b62b12ea979bdf6ad47e70b66bb0394 /src/emacs.c | |
| parent | dbf38e02c9ade4979418f24a99962cfef170b957 (diff) | |
| parent | 8265d3bb30544e58683fc16e23f9908f3d5d0abc (diff) | |
| download | emacs-044c22e545acef592ed95e4e3bb9f8aeff67291a.tar.gz emacs-044c22e545acef592ed95e4e3bb9f8aeff67291a.zip | |
Merge: Integer signedness and overflow and related fixes.
Fixes: debbugs:9079
Diffstat (limited to 'src/emacs.c')
| -rw-r--r-- | src/emacs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c index bc62735ab88..39870ec0079 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -170,8 +170,10 @@ char *stack_bottom; | |||
| 170 | /* The address where the heap starts (from the first sbrk (0) call). */ | 170 | /* The address where the heap starts (from the first sbrk (0) call). */ |
| 171 | static void *my_heap_start; | 171 | static void *my_heap_start; |
| 172 | 172 | ||
| 173 | #ifdef GNU_LINUX | ||
| 173 | /* The gap between BSS end and heap start as far as we can tell. */ | 174 | /* The gap between BSS end and heap start as far as we can tell. */ |
| 174 | static unsigned long heap_bss_diff; | 175 | static uprintmax_t heap_bss_diff; |
| 176 | #endif | ||
| 175 | 177 | ||
| 176 | /* Nonzero means running Emacs without interactive terminal. */ | 178 | /* Nonzero means running Emacs without interactive terminal. */ |
| 177 | int noninteractive; | 179 | int noninteractive; |
| @@ -716,6 +718,7 @@ main (int argc, char **argv) | |||
| 716 | setenv ("G_SLICE", "always-malloc", 1); | 718 | setenv ("G_SLICE", "always-malloc", 1); |
| 717 | #endif | 719 | #endif |
| 718 | 720 | ||
| 721 | #ifdef GNU_LINUX | ||
| 719 | if (!initialized) | 722 | if (!initialized) |
| 720 | { | 723 | { |
| 721 | extern char my_endbss[]; | 724 | extern char my_endbss[]; |
| @@ -726,6 +729,7 @@ main (int argc, char **argv) | |||
| 726 | 729 | ||
| 727 | heap_bss_diff = (char *)my_heap_start - max (my_endbss, my_endbss_static); | 730 | heap_bss_diff = (char *)my_heap_start - max (my_endbss, my_endbss_static); |
| 728 | } | 731 | } |
| 732 | #endif | ||
| 729 | 733 | ||
| 730 | #ifdef RUN_TIME_REMAP | 734 | #ifdef RUN_TIME_REMAP |
| 731 | if (initialized) | 735 | if (initialized) |
| @@ -2134,7 +2138,7 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2134 | { | 2138 | { |
| 2135 | fprintf (stderr, "**************************************************\n"); | 2139 | fprintf (stderr, "**************************************************\n"); |
| 2136 | fprintf (stderr, "Warning: Your system has a gap between BSS and the\n"); | 2140 | fprintf (stderr, "Warning: Your system has a gap between BSS and the\n"); |
| 2137 | fprintf (stderr, "heap (%lu bytes). This usually means that exec-shield\n", | 2141 | fprintf (stderr, "heap (%"pMu" bytes). This usually means that exec-shield\n", |
| 2138 | heap_bss_diff); | 2142 | heap_bss_diff); |
| 2139 | fprintf (stderr, "or something similar is in effect. The dump may\n"); | 2143 | fprintf (stderr, "or something similar is in effect. The dump may\n"); |
| 2140 | fprintf (stderr, "fail because of this. See the section about\n"); | 2144 | fprintf (stderr, "fail because of this. See the section about\n"); |