From: Krzysztof KosiƄski Date: Sun, 28 Feb 2010 17:38:28 +0000 (+0100) Subject: Compilation fixes for Windows 64-bit by Fridrich X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b7ce264feafa1fd753a4bc30ebbf36261018b0dc;p=inkscape.git Compilation fixes for Windows 64-bit by Fridrich --- diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 7c3c3d480..1b54c981c 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -51,10 +51,10 @@ SPCurve::new_from_rect(Geom::Rect const &rect) Geom::Point p = rect.corner(0); c->moveto(p); - for (int i=3; i>=0; i--) { + for (int i=3; i>=1; i--) { c->lineto(rect.corner(i)); } - c->closepath_current(); + c->closepath(); return c; } diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 5f1bef8d1..7a558b6fc 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -156,7 +156,7 @@ Script::resolveInterpreterExecutable(const Glib::ustring &interpNameArg) char szExePath[MAX_PATH]; char szCurrentDir[MAX_PATH]; GetCurrentDirectory(sizeof(szCurrentDir), szCurrentDir); - unsigned int ret = (unsigned int)FindExecutable( + HINSTANCE ret = (unsigned int)FindExecutable( interpName.c_str(), szCurrentDir, szExePath); if (ret > 32) { interpName = szExePath; diff --git a/src/io/sys.cpp b/src/io/sys.cpp index 2841f0af8..f25575c9c 100644 --- a/src/io/sys.cpp +++ b/src/io/sys.cpp @@ -36,9 +36,11 @@ #include // declares spawn functions #include // declares _wspawn functions -#ifdef __cplusplus + +#ifndef __MINGW32__ +# ifdef __cplusplus extern "C" { -#endif +# endif _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...); @@ -47,8 +49,9 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*); -#ifdef __cplusplus +# ifdef __cplusplus } +# endif #endif #include #include @@ -409,7 +412,7 @@ dup_noninherited (int fd, GetCurrentProcess (), &filehandle, 0, FALSE, DUPLICATE_SAME_ACCESS); close (fd); - return _open_osfhandle ((long) filehandle, mode | _O_NOINHERIT); + return _open_osfhandle ((LONG_PTR) filehandle, mode | _O_NOINHERIT); } diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp index c3889a62d..3cdd61184 100644 --- a/src/ui/dialog/filedialogimpl-win32.cpp +++ b/src/ui/dialog/filedialogimpl-win32.cpp @@ -454,15 +454,15 @@ UINT_PTR CALLBACK FileOpenDialogImplWin32::GetOpenFileName_hookproc( pImpl = (FileOpenDialogImplWin32*)ofn->lCustData; // Subclass the parent - pImpl->_base_window_proc = (WNDPROC)GetWindowLongPtr(hParentWnd, GWL_WNDPROC); - SetWindowLongPtr(hParentWnd, GWL_WNDPROC, (LONG_PTR)file_dialog_subclass_proc); + pImpl->_base_window_proc = (WNDPROC)GetWindowLongPtr(hParentWnd, GWLP_WNDPROC); + SetWindowLongPtr(hParentWnd, GWLP_WNDPROC, (LONG_PTR)file_dialog_subclass_proc); // Add a button to the toolbar pImpl->_toolbar_wnd = FindWindowEx(hParentWnd, NULL, "ToolbarWindow32", NULL); pImpl->_show_preview_button_bitmap = LoadBitmap( hInstance, MAKEINTRESOURCE(IDC_SHOW_PREVIEW)); - TBADDBITMAP tbAddBitmap = {NULL, (UINT)pImpl->_show_preview_button_bitmap}; + TBADDBITMAP tbAddBitmap = {NULL, (UINT_PTR)pImpl->_show_preview_button_bitmap}; const int iBitmapIndex = SendMessage(pImpl->_toolbar_wnd, TB_ADDBITMAP, 1, (LPARAM)&tbAddBitmap); diff --git a/src/verbs.cpp b/src/verbs.cpp index 421736b7f..f9a544186 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -767,7 +767,7 @@ FileVerb::perform(SPAction *action, void *data, void */*pdata*/) Gtk::Window *parent = desktop->getToplevel(); g_assert(parent != NULL); - switch ((long) data) { + switch (reinterpret_cast(data)) { case SP_VERB_FILE_NEW: sp_file_new_default(); break; @@ -1079,7 +1079,7 @@ void LayerVerb::perform(SPAction *action, void *data, void */*pdata*/) { SPDesktop *dt = static_cast(sp_action_get_view(action)); - unsigned int verb = reinterpret_cast(data); + size_t verb = reinterpret_cast(data); if ( !dt || !dt->currentLayer() ) { return; @@ -1568,7 +1568,7 @@ ZoomVerb::perform(SPAction *action, void *data, void */*pdata*/) gdouble zoom_inc = prefs->getDoubleLimited( "/options/zoomincrement/value", 1.414213562, 1.01, 10 ); - switch (GPOINTER_TO_INT(data)) { + switch (reinterpret_cast(data)) { case SP_VERB_ZOOM_IN: { gint mul = 1 + gobble_key_events( @@ -2025,7 +2025,7 @@ EffectLastVerb::perform(SPAction *action, void *data, void */*pdata*/) if (effect == NULL) return; if (current_view == NULL) return; - switch ((long) data) { + switch (reinterpret_cast(data)) { case SP_VERB_EFFECT_LAST_PREF: effect->prefs(current_view); break; @@ -2090,7 +2090,7 @@ FitCanvasVerb::perform(SPAction *action, void *data, void */*pdata*/) SPDocument *doc = sp_desktop_document(dt); if (!doc) return; - switch ((long) data) { + switch (reinterpret_cast(data)) { case SP_VERB_FIT_CANVAS_TO_SELECTION: verb_fit_canvas_to_selection(dt); break; @@ -2159,7 +2159,7 @@ LockAndHideVerb::perform(SPAction *action, void *data, void */*pdata*/) SPDocument *doc = sp_desktop_document(dt); if (!doc) return; - switch ((long) data) { + switch (reinterpret_cast(data)) { case SP_VERB_UNLOCK_ALL: unlock_all(dt); sp_document_done(doc, SP_VERB_UNLOCK_ALL, _("Unlock all objects in the current layer"));