diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/emacs.c | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9c172f5849d..d555e74c219 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-04-16 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-04-16 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used, | ||
| 4 | so that we aren't warned about unused symbols. | ||
| 5 | |||
| 3 | * xfns.c (Fx_file_dialog): Rename local to avoid shadowing. | 6 | * xfns.c (Fx_file_dialog): Rename local to avoid shadowing. |
| 4 | 7 | ||
| 5 | * xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized | 8 | * xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized |
diff --git a/src/emacs.c b/src/emacs.c index cccd07417e1..0a132e156a0 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -164,10 +164,6 @@ static void *my_heap_start; | |||
| 164 | /* The gap between BSS end and heap start as far as we can tell. */ | 164 | /* The gap between BSS end and heap start as far as we can tell. */ |
| 165 | static unsigned long heap_bss_diff; | 165 | static unsigned long heap_bss_diff; |
| 166 | 166 | ||
| 167 | /* If the gap between BSS end and heap start is larger than this | ||
| 168 | output a warning in dump-emacs. */ | ||
| 169 | #define MAX_HEAP_BSS_DIFF (1024*1024) | ||
| 170 | |||
| 171 | /* Nonzero means running Emacs without interactive terminal. */ | 167 | /* Nonzero means running Emacs without interactive terminal. */ |
| 172 | int noninteractive; | 168 | int noninteractive; |
| 173 | 169 | ||
| @@ -2100,7 +2096,6 @@ This is used in the file `loadup.el' when building Emacs. | |||
| 2100 | You must run Emacs in batch mode in order to dump it. */) | 2096 | You must run Emacs in batch mode in order to dump it. */) |
| 2101 | (Lisp_Object filename, Lisp_Object symfile) | 2097 | (Lisp_Object filename, Lisp_Object symfile) |
| 2102 | { | 2098 | { |
| 2103 | extern char my_edata[]; | ||
| 2104 | Lisp_Object tem; | 2099 | Lisp_Object tem; |
| 2105 | Lisp_Object symbol; | 2100 | Lisp_Object symbol; |
| 2106 | int count = SPECPDL_INDEX (); | 2101 | int count = SPECPDL_INDEX (); |
| @@ -2111,6 +2106,10 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2111 | error ("Dumping Emacs works only in batch mode"); | 2106 | error ("Dumping Emacs works only in batch mode"); |
| 2112 | 2107 | ||
| 2113 | #ifdef GNU_LINUX | 2108 | #ifdef GNU_LINUX |
| 2109 | |||
| 2110 | /* Warn if the gap between BSS end and heap start is larger than this. */ | ||
| 2111 | # define MAX_HEAP_BSS_DIFF (1024*1024) | ||
| 2112 | |||
| 2114 | if (heap_bss_diff > MAX_HEAP_BSS_DIFF) | 2113 | if (heap_bss_diff > MAX_HEAP_BSS_DIFF) |
| 2115 | { | 2114 | { |
| 2116 | fprintf (stderr, "**************************************************\n"); | 2115 | fprintf (stderr, "**************************************************\n"); |
| @@ -2157,7 +2156,10 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2157 | #ifndef WINDOWSNT | 2156 | #ifndef WINDOWSNT |
| 2158 | /* On Windows, this was done before dumping, and that once suffices. | 2157 | /* On Windows, this was done before dumping, and that once suffices. |
| 2159 | Meanwhile, my_edata is not valid on Windows. */ | 2158 | Meanwhile, my_edata is not valid on Windows. */ |
| 2160 | memory_warnings (my_edata, malloc_warning); | 2159 | { |
| 2160 | extern char my_edata[]; | ||
| 2161 | memory_warnings (my_edata, malloc_warning); | ||
| 2162 | } | ||
| 2161 | #endif /* not WINDOWSNT */ | 2163 | #endif /* not WINDOWSNT */ |
| 2162 | #if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT | 2164 | #if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT |
| 2163 | /* Pthread may call malloc before main, and then we will get an endless | 2165 | /* Pthread may call malloc before main, and then we will get an endless |