]> code.delx.au - gnu-emacs/blobdiff - src/emacs.c
Merge from emacs--devo--0
[gnu-emacs] / src / emacs.c
index 27e349c637f45f335e1c19406b4a301399fe92f0..4bbbf84ebab7cfdeb9f076bd3fc1ef12d8400bca 100644 (file)
@@ -1770,16 +1770,21 @@ main (argc, argv
 #endif
     }
 
-  /* Set up for profiling.  This is known to work on FreeBSD and
-     GNU/Linux.  It might work on some other systems too.  Give it a
-     try and tell us if it works on your system.  To compile for
-     profiling use something like `make CFLAGS="-pg -g -O -DPROFILING=1'.  */
-#if defined (__FreeBSD__) || defined (__linux)
+  /* Set up for profiling.  This is known to work on FreeBSD,
+     GNU/Linux and MinGW.  It might work on some other systems too.
+     Give it a try and tell us if it works on your system.  To compile
+     for profiling use something like:
+       `make CFLAGS="-pg -g -O -DPROFILING=1'.  */
+#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined(__MINGW32__)
 #ifdef PROFILING
   if (initialized)
     {
       extern void _mcleanup ();
+#ifdef __MINGW32__
+      extern unsigned char etext asm ("etext");
+#else
       extern char etext;
+#endif
       extern void safe_bcopy ();
       extern void dump_opcode_frequencies ();
 
@@ -2253,7 +2258,7 @@ You must run Emacs in batch mode in order to dump it.  */)
   if (! noninteractive)
     error ("Dumping Emacs works only in batch mode");
 
-#ifdef __linux__
+#ifdef GNU_LINUX
   if (heap_bss_diff > MAX_HEAP_BSS_DIFF)
     {
       fprintf (stderr, "**************************************************\n");
@@ -2265,7 +2270,7 @@ You must run Emacs in batch mode in order to dump it.  */)
       fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n");
       fprintf (stderr, "**************************************************\n");
     }
-#endif /* __linux__ */
+#endif /* GNU_LINUX */
 
   /* Bind `command-line-processed' to nil before dumping,
      so that the dumped Emacs will process its command line