]> git.street.me.uk Git - andy/viking.git/blobdiff - src/babel.c
SF#3608411: Part 1 - Avoid warning about unbuffer on Windows Systems.
[andy/viking.git] / src / babel.c
index dfb16b100f17752585009b2765f00d078561febf..c5f8c615143cb966ddb5e3562f05c1a9ad31396a 100644 (file)
@@ -37,9 +37,6 @@
 #include "gpx.h"
 #include "babel.h"
 #include <stdio.h>
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -137,7 +134,7 @@ static gboolean babel_general_convert( BabelStatusFunc cb, gchar **args, gpointe
   gint babel_stdout;
 
   if (!g_spawn_async_with_pipes (NULL, args, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL, &babel_stdout, NULL, &error)) {
-    g_error("Async command failed: %s", error->message);
+    g_warning ("Async command failed: %s", error->message);
     g_error_free(error);
     ret = FALSE;
   } else {
@@ -535,9 +532,14 @@ void a_babel_init ()
   gpsbabel_loc = g_find_program_in_path( "gpsbabel" );
   if ( !gpsbabel_loc )
     g_critical( "gpsbabel not found in PATH" );
+
+  // Unlikely to package unbuffer on Windows so ATM don't even bother trying
+  // Highly unlikely unbuffer is available on a Windows system otherwise
+#ifndef WINDOWS
   unbuffer_loc = g_find_program_in_path( "unbuffer" );
   if ( !unbuffer_loc )
     g_warning( "unbuffer not found in PATH" );
+#endif
 
   load_feature ();
 }