diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | examples/viewer-main.c | 9 |
2 files changed, 10 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2006-02-07 Tor Lillqvist <tml@novell.com> + * examples/viewer-main.c (main): Initialise GError pointer to + NULL. Use waitpid() only on Unix. + * pango-zip.sh.in: Drop the timestamp from the zipfile names. 2006-02-06 Behdad Esfahbod <behdad@gnome.org> diff --git a/examples/viewer-main.c b/examples/viewer-main.c index 377b625a..7823025b 100644 --- a/examples/viewer-main.c +++ b/examples/viewer-main.c @@ -24,11 +24,14 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include <sys/wait.h> #include <glib.h> #include <glib/gstdio.h> +#ifdef G_OS_UNIX +#include <sys/wait.h> +#endif + #include "viewer.h" #include "renderdemo.h" @@ -123,7 +126,7 @@ main (int argc, int fd; FILE *stream; const gchar *display_argv[5] = {"display", "-title", "%s", "-"}; - GError *error; + GError *error = NULL; GPid pid; if (!view->save) @@ -140,7 +143,9 @@ main (int argc, stream = fdopen (fd, "wb"); view->save (instance, surface, stream, width, height); fclose (stream); +#ifdef G_OS_UNIX waitpid (pid, NULL, 0); +#endif g_spawn_close_pid (pid); } |