* Makefile.am (EXTRA_libguile_la_SOURCES): New variable to hold
[bpt/guile.git] / libguile / stackchk.c
index de7c96c..9284617 100644 (file)
@@ -42,7 +42,9 @@
 
 #include <stdio.h>
 #include "_scm.h"
+#include "genio.h"
 
+#include "stackchk.h"
 \f
 
 /* {Stack Checking}
 #ifdef STACK_CHECKING
 int scm_stack_checking_enabled_p;
 
+SCM_SYMBOL (scm_stack_overflow_key, "stack-overflow");
+
 void
 scm_report_stack_overflow ()
 {
   scm_stack_checking_enabled_p = 0;
-  scm_wta (SCM_UNDEFINED, (char *) SCM_STACK_OVFLOW, NULL);
+  scm_error (scm_stack_overflow_key,
+            NULL,
+            "Stack overflow",
+            SCM_BOOL_F,
+            SCM_BOOL_F);
 }
 
 #endif
-#ifdef __STDC__
-long 
-scm_stack_size (SCM_STACKITEM *start)
-#else
+
 long 
 scm_stack_size (start)
      SCM_STACKITEM *start;
-#endif
 {
   SCM_STACKITEM stack;
 #ifdef SCM_STACK_GROWS_UP
@@ -76,13 +80,9 @@ scm_stack_size (start)
 #endif /* def SCM_STACK_GROWS_UP */
 }
 
-#ifdef __STDC__
-void 
-scm_stack_report (void)
-#else
+
 void 
 scm_stack_report ()
-#endif
 {
   SCM_STACKITEM stack;
   scm_intprint (scm_stack_size (SCM_BASE (scm_rootcont)) * sizeof (SCM_STACKITEM),
@@ -96,13 +96,9 @@ scm_stack_report ()
 
 
 
-#ifdef __STDC__
-void
-scm_init_stackchk (void)
-#else
+
 void
 scm_init_stackchk ()
-#endif
 {
 #include "stackchk.x"
 }