Introduce <slot> objects in GOOPS
[bpt/guile.git] / libguile / init.c
index 54f73a9..dd63574 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- *   2004, 2006, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004, 2006, 2009-2014 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
 #include "libguile/throw.h"
 #include "libguile/arrays.h"
 #include "libguile/trees.h"
+#include "libguile/unicode.h"
 #include "libguile/values.h"
 #include "libguile/variable.h"
 #include "libguile/vectors.h"
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 
 \f
@@ -222,6 +220,7 @@ scm_init_standard_ports ()
     (scm_standard_stream_to_port (1, isatty (1) ? "w0" : "w"));
   scm_set_current_error_port
     (scm_standard_stream_to_port (2, isatty (2) ? "w0" : "w"));
+  scm_set_current_warning_port (scm_current_error_port ());
 }
 
 
@@ -309,6 +308,11 @@ scm_boot_guile (int argc, char ** argv, void (*main_func) (), void *closure)
   void *res;
   struct main_func_closure c;
 
+  /* On Windows, convert backslashes in argv[0] to forward
+     slashes.  */
+  if (argc > 0)
+    scm_i_mirror_backslashes (argv[0]);
+
   c.main_func = main_func;
   c.closure = closure;
   c.argc = argc;
@@ -395,6 +399,7 @@ scm_i_init_guile (void *base)
   scm_bootstrap_vm ();
   scm_register_r6rs_ports ();
   scm_register_foreign ();
+  scm_register_foreign_object ();
   scm_register_srfi_1 ();
   scm_register_srfi_60 ();
   scm_register_poll ();
@@ -507,6 +512,7 @@ scm_i_init_guile (void *base)
 #endif
   scm_bootstrap_i18n ();
   scm_init_script ();
+  scm_init_unicode ();
 
   scm_init_goops ();