Don't use type sighandler_t, which is a GNU extension. Reported by
[pspp-builds.git] / src / ui / debugger.c
index 49f23415a60e17a1e5a16f64978ac7e248264cc4..7b9c0b925fb73215d04af10992a88777a407ee6a 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 2006 Free Software Foundation, Inc.
-   Written by John Darrington <john@darrington.wattle.id.au>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -19,6 +18,9 @@
 
 #include <config.h>
 
+#include "debugger.h"
+
+#if HAVE_SYS_TYPES_H && HAVE_SYS_WAIT_H
 #include <errno.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/wait.h>
 
-
-#include "debugger.h"
-
 /* Fork, start gdb and connect to the parent process. 
    If that happens successfully, then this function does not return,
    but exits with EXIT_FAILURE. Otherwise it returns.
  */
-   
 void
 connect_debugger (void)
 {
@@ -65,3 +63,12 @@ connect_debugger (void)
   exit (EXIT_FAILURE);
 }
 
+#else /* !(HAVE_SYS_TYPES_H && HAVE_SYS_WAIT_H) */
+/* Don't know how to connect to gdb.
+   Just return.
+ */
+void 
+connect_debugger (void) 
+{
+}
+#endif /* !(HAVE_SYS_TYPES_H && HAVE_SYS_WAIT_H) */