Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
[platform/upstream/glib.git] / gbacktrace.c
index 7fa7768..7d131af 100644 (file)
@@ -2,23 +2,23 @@
  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
  *
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
+ * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2 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
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU Library General Public
+ * 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., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
 
 /*
- * Modified by the GLib Team and others 1997-1999.  See the AUTHORS
+ * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GLib Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
  * GLib at ftp://ftp.gtk.org/pub/gtk/. 
@@ -62,7 +62,7 @@
 #ifdef G_OS_WIN32
 #  define STRICT               /* Strict typing, please */
 #  include <windows.h>
-#  include <process.h>         /* For _getpid() */
+#  undef STRICT
 #endif
 
 #ifndef NO_FD_SET
@@ -76,7 +76,9 @@
 #endif
 
 
+#ifndef G_OS_WIN32
 static void stack_trace (char **args);
+#endif
 
 extern volatile gboolean glib_on_error_halt;
 volatile gboolean glib_on_error_halt = TRUE;
@@ -186,6 +188,8 @@ g_on_error_stack_trace (const gchar *prg_name)
 #endif
 }
 
+#ifndef G_OS_WIN32
+
 static gboolean stack_trace_done = FALSE;
 
 static void
@@ -197,7 +201,6 @@ stack_trace_sigchld (int signum)
 static void
 stack_trace (char **args)
 {
-#ifdef G_OS_UNIX
   pid_t pid;
   int in_fd[2];
   int out_fd[2];
@@ -292,7 +295,6 @@ stack_trace (char **args)
   close (out_fd[0]);
   close (out_fd[1]);
   _exit (0);
-#else
-  abort ();
-#endif
 }
+
+#endif /* !G_OS_WIN32 */