From 55162445db4c8ea46be671c2abed4ad4e77e1dcd Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 31 Jan 2010 00:36:02 +0000 Subject: Add Windows frontend svn path=/trunk/netsurf/; revision=9940 --- desktop/netsurf.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'desktop/netsurf.c') diff --git a/desktop/netsurf.c b/desktop/netsurf.c index a1b7dabae..9acddaf87 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -23,11 +23,13 @@ #include #include #include -#include + #include #include #include + #include "utils/config.h" +#include "utils/utsname.h" #include "content/fetch.h" #include "content/fetchcache.h" #include "content/urldb.h" @@ -83,32 +85,38 @@ void netsurf_init(int argc, char** argv) { struct utsname utsname; +#ifdef HAVE_SIGPIPE /* Ignore SIGPIPE - this is necessary as OpenSSL can generate these * and the default action is to terminate the app. There's no easy * way of determining the cause of the SIGPIPE (other than using * sigaction() and some mechanism for getting the file descriptor * out of libcurl). However, we expect nothing else to generate a * SIGPIPE, anyway, so may as well just ignore them all. */ + signal(SIGPIPE, SIG_IGN); +#endif #if !((defined(__SVR4) && defined(__sun)) || defined(__NetBSD__) || \ - defined(__OpenBSD__)) + defined(__OpenBSD__) || defined(_WIN32)) stdout = stderr; #endif if ((argc > 1) && (argv[1][0] == '-') && (argv[1][1] == 'v') && (argv[1][2] == 0)) { - int argcmv; - verbose_log = true; - for (argcmv = 2; argcmv < argc; argcmv++) { - argv[argcmv - 1] = argv[argcmv]; - } - argc--; + int argcmv; + verbose_log = true; + for (argcmv = 2; argcmv < argc; argcmv++) { + argv[argcmv - 1] = argv[argcmv]; + } + argc--; + +#ifndef HAVE_STDOUT + gui_stdout(); +#endif } #ifdef _MEMDEBUG_H_ memdebug_memdebug("memdump"); #endif - LOG(("version '%s'", netsurf_version)); if (uname(&utsname) < 0) LOG(("Failed to extract machine information")); -- cgit v1.2.3