summaryrefslogtreecommitdiff
path: root/desktop/netsurf.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-01-31 00:36:02 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-01-31 00:36:02 +0000
commit55162445db4c8ea46be671c2abed4ad4e77e1dcd (patch)
tree52b04422e2575987ef9617d35c8f21b078a4b696 /desktop/netsurf.c
parent6990c2cd049d6e1a36c8e6a6bb9ba2f8d8db9fac (diff)
downloadnetsurf-55162445db4c8ea46be671c2abed4ad4e77e1dcd.tar.gz
netsurf-55162445db4c8ea46be671c2abed4ad4e77e1dcd.tar.bz2
Add Windows frontend
svn path=/trunk/netsurf/; revision=9940
Diffstat (limited to 'desktop/netsurf.c')
-rw-r--r--desktop/netsurf.c26
1 files changed, 17 insertions, 9 deletions
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 <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-#include <sys/utsname.h>
+
#include <libxml/encoding.h>
#include <libxml/globals.h>
#include <libxml/xmlversion.h>
+
#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"));