aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-04-16 13:21:26 -0700
committerPaul Eggert2011-04-16 13:21:26 -0700
commitc339dc2e7e86248a60f484ccdca228ed68826c0b (patch)
treec3518bf515999b82ff8b37a0ccdf15a698c8c217
parent94578f9cc20799f18df786248afd235bb06f423e (diff)
downloademacs-c339dc2e7e86248a60f484ccdca228ed68826c0b.tar.gz
emacs-c339dc2e7e86248a60f484ccdca228ed68826c0b.zip
* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
so that we aren't warned about unused symbols.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/emacs.c14
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 @@
12011-04-16 Paul Eggert <eggert@cs.ucla.edu> 12011-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. */
165static unsigned long heap_bss_diff; 165static 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. */
172int noninteractive; 168int noninteractive;
173 169
@@ -2100,7 +2096,6 @@ This is used in the file `loadup.el' when building Emacs.
2100You must run Emacs in batch mode in order to dump it. */) 2096You 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