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
/* 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;
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 ();
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");
#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