diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-02-12 15:05:20 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-02-12 15:05:20 +0000 |
commit | 8cf0e565693192806c5c016c861a62ec0483b6ff (patch) | |
tree | b16836388f2d24f1146f4d3c9a52894609354dc8 /sal/systools | |
parent | fe84f8049ae837f4b1bf10a858849e7488006344 (diff) |
INTEGRATION: CWS mingwport11 (1.6.8); FILE MERGED
2008/02/08 17:44:01 vg 1.6.8.1: #i85952# catch-up fix for mingwport
Diffstat (limited to 'sal/systools')
-rw-r--r-- | sal/systools/win32/onlineupdate/onlinecheck.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sal/systools/win32/onlineupdate/onlinecheck.cxx b/sal/systools/win32/onlineupdate/onlinecheck.cxx index 2607feb75991..69a7ff6b8e44 100644 --- a/sal/systools/win32/onlineupdate/onlinecheck.cxx +++ b/sal/systools/win32/onlineupdate/onlinecheck.cxx @@ -4,9 +4,9 @@ * * $RCSfile: onlinecheck.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: vg $ $Date: 2008-01-28 13:55:54 $ + * last change: $Author: vg $ $Date: 2008-02-12 16:05:20 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -49,6 +49,9 @@ #define _UNICODE #endif #include <tchar.h> +#ifdef __MINGW32__ +#include <excpt.h> +#endif #define elementsof(a) (sizeof(a)/sizeof((a)[0])) @@ -58,7 +61,15 @@ extern "C" sal_Bool SAL_CALL hasInternetConnection() DWORD dwFlags; TCHAR szConnectionName[1024]; +#ifdef __MINGW32__ + jmp_buf jmpbuf; + __SEHandler han; + if (__builtin_setjmp(jmpbuf) == 0) + { + han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER); +#else __try { +#endif BOOL fIsConnected = InternetGetConnectedStateEx( &dwFlags, szConnectionName, @@ -67,7 +78,13 @@ extern "C" sal_Bool SAL_CALL hasInternetConnection() return fIsConnected ? sal_True : sal_False; +#ifdef __MINGW32__ + } + else return sal_False; + han.Reset(); +#else } __except( EXCEPTION_EXECUTE_HANDLER ) { return sal_False; } +#endif } |