diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-10 13:09:25 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-10 14:03:37 +0200 |
commit | 3e7eb8bcad60d12328198684287c59d6b8ebc84e (patch) | |
tree | d50a76ec3f621194b49b156965543a2a89677970 /extensions/source | |
parent | 90e16066593047915b7007bb7a6846eabeeca567 (diff) |
mingw64: Use the *LongPtr Windows api
Change-Id: I00c753f71460bee9f2bce3af35b352a25a3b8484
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/nsplugin/source/nsp_windows.cxx | 23 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/nsp_windows.hxx | 19 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/so_main.cxx | 4 |
3 files changed, 25 insertions, 21 deletions
diff --git a/extensions/source/nsplugin/source/nsp_windows.cxx b/extensions/source/nsplugin/source/nsp_windows.cxx index e143a693d871..3315ec15a1e4 100644 --- a/extensions/source/nsplugin/source/nsp_windows.cxx +++ b/extensions/source/nsplugin/source/nsp_windows.cxx @@ -27,28 +27,19 @@ ************************************************************************/ -#ifdef WNT -#ifdef _MSC_VER - #pragma warning (push,1) - #pragma warning (disable:4668) -#endif - #include <windows.h> -#ifdef _MSC_VER - #pragma warning (pop) -#endif -#endif +#include "nsp_windows.hxx" -int NSP_ResetWinStyl(long hParent) +int NSP_ResetWinStyl(LONG_PTR hParent) { int ret = 0; #ifdef WNT - LONG dOldStyl = GetWindowLong( (HWND)hParent, GWL_STYLE); + LONG_PTR dOldStyl = GetWindowLongPtr( (HWND)hParent, GWL_STYLE); ret = dOldStyl; if(ret != 0) { - LONG dNewStyl = dOldStyl|WS_CLIPCHILDREN; - if(0 == SetWindowLong((HWND)hParent, GWL_STYLE, dNewStyl)) + LONG_PTR dNewStyl = dOldStyl|WS_CLIPCHILDREN; + if(0 == SetWindowLongPtr((HWND)hParent, GWL_STYLE, dNewStyl)) ret = 0; } #endif @@ -56,11 +47,11 @@ int NSP_ResetWinStyl(long hParent) } -int NSP_RestoreWinStyl(long hParent, long dOldStyle) +int NSP_RestoreWinStyl(LONG_PTR hParent, LONG_PTR dOldStyle) { int ret = 0; #ifdef WNT - ret = SetWindowLong((HWND)hParent, GWL_STYLE, dOldStyle); + ret = SetWindowLongPtr((HWND)hParent, GWL_STYLE, dOldStyle); #endif return ret; } diff --git a/extensions/source/nsplugin/source/nsp_windows.hxx b/extensions/source/nsplugin/source/nsp_windows.hxx index 1a2d49711973..cd08c936175b 100644 --- a/extensions/source/nsplugin/source/nsp_windows.hxx +++ b/extensions/source/nsplugin/source/nsp_windows.hxx @@ -28,10 +28,23 @@ #ifndef __NSP_WINDOWS_HXX__ #define __NSP_WINDOWS_HXX__ +#ifdef WNT +#ifdef _MSC_VER + #pragma warning (push,1) + #pragma warning (disable:4668) +#endif + #include <windows.h> +#ifdef _MSC_VER + #pragma warning (pop) +#endif +#else +#ifndef LONG_PTR + #define LONG_PTR long +#endif +#endif - -int NSP_ResetWinStyl(long hParent); -int NSP_RestoreWinStyl(long hParent, long dOldStyle); +int NSP_ResetWinStyl(LONG_PTR hParent); +int NSP_RestoreWinStyl(LONG_PTR hParent, LONG_PTR dOldStyle); #endif diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx index ba6ee2cab02f..35af67f3e30d 100644 --- a/extensions/source/nsplugin/source/so_main.cxx +++ b/extensions/source/nsplugin/source/so_main.cxx @@ -449,8 +449,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) iPipe[1] = atoi(argv[2]); // fd_pipe[0]: read, fd_pipe[0]: write - fd_pipe[0] = (NSP_PIPE_FD) iPipe[0] ; - fd_pipe[1] = (NSP_PIPE_FD) iPipe[1] ; + fd_pipe[0] = (NSP_PIPE_FD) (sal_IntPtr) iPipe[0] ; + fd_pipe[1] = (NSP_PIPE_FD) (sal_IntPtr) iPipe[1] ; NSP_Close_Pipe(fd_pipe[1]); if(iPipe[0] < 0) |