* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Apr 2011 20:21:26 +0000 (13:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Apr 2011 20:21:26 +0000 (13:21 -0700)
so that we aren't warned about unused symbols.

src/ChangeLog
src/emacs.c

index 9c172f5..d555e74 100644 (file)
@@ -1,5 +1,8 @@
 2011-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
+       so that we aren't warned about unused symbols.
+
        * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
 
        * xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized
index cccd074..0a132e1 100644 (file)
@@ -164,10 +164,6 @@ static void *my_heap_start;
 /* The gap between BSS end and heap start as far as we can tell.  */
 static unsigned long heap_bss_diff;
 
-/* If the gap between BSS end and heap start is larger than this
-   output a warning in dump-emacs.  */
-#define MAX_HEAP_BSS_DIFF (1024*1024)
-
 /* Nonzero means running Emacs without interactive terminal.  */
 int noninteractive;
 
@@ -2100,7 +2096,6 @@ This is used in the file `loadup.el' when building Emacs.
 You must run Emacs in batch mode in order to dump it.  */)
   (Lisp_Object filename, Lisp_Object symfile)
 {
-  extern char my_edata[];
   Lisp_Object tem;
   Lisp_Object symbol;
   int count = SPECPDL_INDEX ();
@@ -2111,6 +2106,10 @@ You must run Emacs in batch mode in order to dump it.  */)
     error ("Dumping Emacs works only in batch mode");
 
 #ifdef GNU_LINUX
+
+  /* Warn if the gap between BSS end and heap start is larger than this.  */
+# define MAX_HEAP_BSS_DIFF (1024*1024)
+
   if (heap_bss_diff > MAX_HEAP_BSS_DIFF)
     {
       fprintf (stderr, "**************************************************\n");
@@ -2157,7 +2156,10 @@ You must run Emacs in batch mode in order to dump it.  */)
 #ifndef WINDOWSNT
   /* On Windows, this was done before dumping, and that once suffices.
      Meanwhile, my_edata is not valid on Windows.  */
-  memory_warnings (my_edata, malloc_warning);
+  {
+    extern char my_edata[];
+    memory_warnings (my_edata, malloc_warning);
+  }
 #endif /* not WINDOWSNT */
 #if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
   /* Pthread may call malloc before main, and then we will get an endless