build: Don't include <config.h> in native programs when cross-compiling.
[bpt/guile.git] / libguile / root.c
index 688ec87..8c8fd1a 100644 (file)
@@ -1,22 +1,26 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001, 2002, 2006, 2008, 2009 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
  */
 
 
 \f
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <string.h>
 #include <stdio.h>
 #include "libguile/root.h"
 \f
 
-SCM scm_sys_protects[SCM_NUM_PROTECTS];
-
-\f
-
 /* {call-with-dynamic-root}
  *
  * Suspending the current thread to evaluate a thunk on the
@@ -121,7 +121,8 @@ scm_internal_cwdr (scm_t_catch_body body, void *body_data,
 
   my_handler_data.run_handler = 0;
   answer = scm_i_with_continuation_barrier (body, body_data,
-                                           cwdr_handler, &my_handler_data);
+                                           cwdr_handler, &my_handler_data,
+                                           NULL, NULL);
 
   scm_dynwind_end ();
 
@@ -154,9 +155,9 @@ cwdr (SCM proc, SCM a1, SCM args, SCM handler, SCM_STACKITEM *stack_start)
 
 SCM_DEFINE (scm_call_with_dynamic_root, "call-with-dynamic-root", 2, 0, 0,
            (SCM thunk, SCM handler),
-           "Call @var{thunk} with a new dynamic state and within"
-           "a continuation barrier.  The @var{handler} catches all"
-           "otherwise uncaught throws and executes within the same"
+           "Call @var{thunk} with a new dynamic state and within\n"
+           "a continuation barrier.  The @var{handler} catches all\n"
+           "otherwise uncaught throws and executes within the same\n"
            "dynamic context as @var{thunk}.")
 #define FUNC_NAME s_scm_call_with_dynamic_root
 {