]> git.saurik.com Git - bison.git/commitdiff
`stage' was accidently included in a previous patch.
authorAkim Demaille <akim@epita.fr>
Tue, 30 Jul 2002 08:15:04 +0000 (08:15 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 30 Jul 2002 08:15:04 +0000 (08:15 +0000)
Initiate its autoconfiscation.
* configure.in: Look for malloc.h and sys/times.h.
* src/main.c (stage): Adjust.
Report only when trace_flag.

ChangeLog
configure.in
src/main.c

index 93c1e52b0f679efcd04e25b89871d1a51618ec11..3c4a350f68163bc195afbcd2bd2ee37006831bf5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-07-30  Akim Demaille  <akim@epita.fr>
+
+       `stage' was accidently included in a previous patch.
+       Initiate its autoconfiscation.
+
+       * configure.in: Look for malloc.h and sys/times.h.
+       * src/main.c (stage): Adjust.
+       Report only when trace_flag.
+
 2002-07-29  Akim Demaille  <akim@epita.fr>
 
        * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
index cc45204eafcbe58fe3940afc398d58ff85a74d07..1a5a12fff906c87770a7e8356685e7c243c2dc31 100644 (file)
@@ -78,7 +78,8 @@ AC_DEFINE([_GNU_SOURCE],1,[Define to 1 for GNU C library extensions.])
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(ctype.h locale.h memory.h stdlib.h string.h unistd.h)
+AC_CHECK_HEADERS([ctype.h locale.h malloc.h memory.h stdlib.h string.h \
+                  sys/times.h unistd.h])
 
 
 # Checks for compiler characteristics.
index a4a9871fdbe6dc62695fbba89d22b56d06de39e4..d6a691af55dc036d4bdcd9f7c72851c38bb69719 100644 (file)
 #include "conflicts.h"
 #include "print_graph.h"
 #include "muscle_tab.h"
-#include <malloc.h>
-#include <sys/times.h>
 
 /* The name this program was run with, for messages.  */
 char *program_name;
 
+
+/*--------------------------.
+| Tracking space and time.  |
+`--------------------------*/
+
+#if HAVE_MALLOC_H & HAVE_SYS_TIMES_H
+# include <malloc.h>
+# include <sys/times.h>
+#endif
+
 static void
 stage (const char *title)
 {
-  struct mallinfo minfo = mallinfo ();
-  struct tms tinfo;
-  times (&tinfo);
-  fprintf (stderr, "STAGE: %30s: %9d (%9d): %ldu %lds\n",
-          title,
-          minfo.uordblks, minfo.arena,
-          tinfo.tms_utime, tinfo.tms_stime);
+#if HAVE_MALLOC_H & HAVE_SYS_TIMES_H
+  if (trace_flag)
+    {
+      struct mallinfo minfo = mallinfo ();
+      struct tms tinfo;
+      times (&tinfo);
+      fprintf (stderr, "STAGE: %30s: %9d (%9d): %ldu %lds\n",
+              title,
+              minfo.uordblks, minfo.arena,
+              tinfo.tms_utime, tinfo.tms_stime);
+    }
+#endif
 }
 
+
 int
 main (int argc, char *argv[])
 {