Index: archive_tar.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/archive_tar.cc,v retrieving revision 2.17 diff -u -p -r2.17 archive_tar.cc --- archive_tar.cc 8 Mar 2012 09:20:03 -0000 2.17 +++ archive_tar.cc 3 Jun 2012 13:57:34 -0000 @@ -171,7 +171,7 @@ archive_tar::next_file_name () else if (state.have_longname) state.have_longname = 0; - sscanf (state.tar_header.size, "%o", &state.file_length); + sscanf (state.tar_header.size, "%o", (unsigned int *)&state.file_length); state.file_offset = 0; // vp2 (_tar_vfile, "%c %9d %s\n", state.tar_header.typeflag, @@ -190,7 +190,7 @@ archive_tar::next_file_name () MAX_PATH); err++; state.parent->read (&state.tar_header, 512); - sscanf (state.tar_header.size, "%o", &state.file_length); + sscanf (state.tar_header.size, "%o", (unsigned int *)&state.file_length); state.file_offset = 0; skip_file (); return next_file_name (); Index: autoload.c =================================================================== RCS file: /cvs/cygwin-apps/setup/autoload.c,v retrieving revision 2.9 diff -u -p -r2.9 autoload.c --- autoload.c 17 Mar 2010 17:51:18 -0000 2.9 +++ autoload.c 3 Jun 2012 13:57:34 -0000 @@ -16,6 +16,8 @@ static const char *cvsid = "\n%%% $Id: autoload.c,v 2.9 2010/03/17 17:51:18 corinna Exp $\n"; #endif +#ifndef _WIN64 + #define WIN32_LEAN_AND_MEAN #include @@ -106,3 +108,5 @@ autoload_common (int x) *(int *)(&x-1) = (int)proc-5; } + +#endif Index: bootstrap.sh =================================================================== RCS file: /cvs/cygwin-apps/setup/bootstrap.sh,v retrieving revision 2.6 diff -u -p -r2.6 bootstrap.sh --- bootstrap.sh 24 Feb 2012 20:21:42 -0000 2.6 +++ bootstrap.sh 3 Jun 2012 13:57:34 -0000 @@ -50,7 +50,7 @@ fi cd "$builddir" build=`$srcdir/cfgaux/config.guess` -host="i686-pc-mingw32" +host="i686-w64-mingw32" if hash $host-g++ 2> /dev/null; then CC="$host-gcc" Index: filemanip.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/filemanip.cc,v retrieving revision 2.35 diff -u -p -r2.35 filemanip.cc --- filemanip.cc 1 Mar 2010 15:18:39 -0000 2.35 +++ filemanip.cc 3 Jun 2012 13:57:34 -0000 @@ -514,7 +514,7 @@ nt_wfopen (const wchar_t *wpath, const c return NULL; } wname[1] = L'\\'; - int fd = _open_osfhandle ((long) h, oflags); + int fd = _open_osfhandle ((intptr_t) h, oflags); if (fd < 0) return NULL; return _fdopen (fd, mode); Index: filemanip.h =================================================================== RCS file: /cvs/cygwin-apps/setup/filemanip.h,v retrieving revision 1.15 diff -u -p -r1.15 filemanip.h --- filemanip.h 11 May 2009 10:49:15 -0000 1.15 +++ filemanip.h 3 Jun 2012 13:57:34 -0000 @@ -16,6 +16,7 @@ #ifndef SETUP_FILEMANIP_H #define SETUP_FILEMANIP_H +#include #include extern int find_tar_ext (const char *path); Index: gpg-packet.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/gpg-packet.cc,v retrieving revision 2.1 diff -u -p -r2.1 gpg-packet.cc --- gpg-packet.cc 22 Jun 2008 02:37:16 -0000 2.1 +++ gpg-packet.cc 3 Jun 2012 13:57:34 -0000 @@ -42,7 +42,9 @@ static const char *cvsid = #define MESSAGE while (0) msg #endif /* CRYPTODEBUGGING */ +#ifndef ARRAYSIZE #define ARRAYSIZE(_ar) (sizeof (_ar) / sizeof (_ar[0])) +#endif static const struct { char from; char to; } RFC4880HashCodesToGPGHashCodes[] = { Index: main.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/main.cc,v retrieving revision 2.66 diff -u -p -r2.66 main.cc --- main.cc 24 Feb 2012 20:04:13 -0000 2.66 +++ main.cc 3 Jun 2012 13:57:34 -0000 @@ -247,7 +247,11 @@ main (int argc, char **argv) snprintf(locale, sizeof locale, ".%u", GetACP()); setlocale(LC_ALL, locale); +#ifndef __CYGWIN__ + set_legacy (command_line); +#else set_legacy (_argv[0]); +#endif if (is_legacy && IsWindowsNT ()) { Index: netio.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/netio.cc,v retrieving revision 2.15 diff -u -p -r2.15 netio.cc --- netio.cc 22 Jun 2008 02:37:16 -0000 2.15 +++ netio.cc 3 Jun 2012 13:57:34 -0000 @@ -233,7 +233,7 @@ auth_cmd (HWND h, int id, HWND hwndctl, return 0; } -static BOOL CALLBACK +static INT_PTR CALLBACK auth_proc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) Index: ntdll.h =================================================================== RCS file: /cvs/cygwin-apps/setup/ntdll.h,v retrieving revision 2.3 diff -u -p -r2.3 ntdll.h --- ntdll.h 10 Aug 2010 20:38:00 -0000 2.3 +++ ntdll.h 3 Jun 2012 13:57:34 -0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Red Hat, Inc. + * Copyright (c) 2009, 2012, Red Hat, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,15 @@ #define NTOSAPI +#ifdef _W64 +#include +#include +#include +#define DDKAPI __stdcall +#else #include "ddk/ntapi.h" #include "ddk/ntifs.h" +#endif extern "C" { NTSTATUS DDKAPI NtCreateFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, Index: proppage.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/proppage.cc,v retrieving revision 2.21 diff -u -p -r2.21 proppage.cc --- proppage.cc 19 Feb 2012 13:57:03 -0000 2.21 +++ proppage.cc 3 Jun 2012 13:57:34 -0000 @@ -81,7 +81,7 @@ PropertyPage::Create (DLGPROC dlgproc, return true; } -BOOL CALLBACK +INT_PTR CALLBACK PropertyPage::FirstDialogProcReflector (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { @@ -96,25 +96,25 @@ PropertyPage::FirstDialogProcReflector ( This = (PropertyPage *) (((PROPSHEETPAGE *) lParam)->lParam); - SetWindowLong (hwnd, DWL_USER, (DWORD) This); - SetWindowLong (hwnd, DWL_DLGPROC, (DWORD) DialogProcReflector); + SetWindowLongPtr (hwnd, DWLP_USER, (LONG_PTR) This); + SetWindowLongPtr (hwnd, DWLP_DLGPROC, (LONG_PTR) DialogProcReflector); This->SetHWND (hwnd); return This->DialogProc (message, wParam, lParam); } -BOOL CALLBACK +INT_PTR CALLBACK PropertyPage::DialogProcReflector (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { PropertyPage *This; - This = (PropertyPage *) GetWindowLong (hwnd, DWL_USER); + This = (PropertyPage *) GetWindowLongPtr (hwnd, DWLP_USER); return This->DialogProc (message, wParam, lParam); } -BOOL CALLBACK +INT_PTR CALLBACK PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam) { try @@ -143,7 +143,7 @@ PropertyPage::DialogProc (UINT message, { case PSN_APPLY: { - SetWindowLong (GetHWND (), DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, PSNRET_NOERROR); return TRUE; } case PSN_SETACTIVE: @@ -178,7 +178,7 @@ PropertyPage::DialogProc (UINT message, if(!wantsActivation()) { - ::SetWindowLong (GetHWND (), DWL_MSGRESULT, -1); + ::SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, -1); return TRUE; } @@ -194,29 +194,29 @@ PropertyPage::DialogProc (UINT message, if (nextwindow == -2) { unattended_mode = attended; - SetWindowLong (GetHWND (), DWL_MSGRESULT, 0); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, 0); return TRUE; } else if (nextwindow == -1) { - SetWindowLong (GetHWND (), DWL_MSGRESULT, 0); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, 0); return TRUE; } else if (nextwindow == 0) { - SetWindowLong (GetHWND (), DWL_MSGRESULT, -1); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, -1); return TRUE; } else { - SetWindowLong (GetHWND (), DWL_MSGRESULT, nextwindow); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, nextwindow); return TRUE; } } else { // 0 == Accept activation, -1 = Don't accept - ::SetWindowLong (GetHWND (), DWL_MSGRESULT, 0); + ::SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, 0); return TRUE; } @@ -226,28 +226,28 @@ PropertyPage::DialogProc (UINT message, { OnDeactivate (); // FALSE = Allow deactivation - SetWindowLong (GetHWND (), DWL_MSGRESULT, FALSE); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, FALSE); return TRUE; } case PSN_WIZNEXT: { LONG retval; retval = OnNext (); - SetWindowLong (GetHWND (), DWL_MSGRESULT, retval); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, retval); return TRUE; } case PSN_WIZBACK: { LONG retval; retval = OnBack (); - SetWindowLong (GetHWND (), DWL_MSGRESULT, retval); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, retval); return TRUE; } case PSN_WIZFINISH: { OnFinish (); // False = Allow the wizard to finish - SetWindowLong (GetHWND (), DWL_MSGRESULT, FALSE); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, FALSE); return TRUE; } case TTN_GETDISPINFO: @@ -270,7 +270,7 @@ PropertyPage::DialogProc (UINT message, if (retval == true) { // Handled, return 0 - SetWindowLong (GetHWND (), DWL_MSGRESULT, 0); + SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, 0); return TRUE; } else if (cmdproc != NULL) @@ -336,7 +336,7 @@ PropertyPage::DialogProc (UINT message, // now this is really crazy, but apparently MSDN says we are to // cast this brush as a BOOL and return it (?!) - return (BOOL)theURL->second.brush; + return (LONG_PTR)theURL->second.brush; } case WM_MOUSEWHEEL: // we do this so that derived classes that wish to process this message @@ -428,10 +428,10 @@ PropertyPage::urlWinProc (HWND hwnd, UIN case WM_LBUTTONDOWN: { // they clicked our URL! yay! - int rc = (int)ShellExecute (hwnd, "open", + int *rc = (int *)ShellExecute (hwnd, "open", theURL->second.url.c_str (), NULL, NULL, SW_SHOWNORMAL); - if (rc <= 32) + if (*rc <= 32) log(LOG_PLAIN) << "Unable to launch browser for URL " << theURL->second.url << " (rc = " << rc << ")" << endLog; break; Index: proppage.h =================================================================== RCS file: /cvs/cygwin-apps/setup/proppage.h,v retrieving revision 2.14 diff -u -p -r2.14 proppage.h --- proppage.h 15 Apr 2006 21:21:25 -0000 2.14 +++ proppage.h 3 Jun 2012 13:57:34 -0000 @@ -42,10 +42,10 @@ class PropertyPage:public Window // For setting the back/finish buttons properly. bool IsFirst, IsLast; - static BOOL CALLBACK FirstDialogProcReflector (HWND hwnd, UINT message, + static INT_PTR CALLBACK FirstDialogProcReflector (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - static BOOL CALLBACK DialogProcReflector (HWND hwnd, UINT message, + static INT_PTR CALLBACK DialogProcReflector (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); void setTitleFont (); @@ -78,7 +78,7 @@ class PropertyPage:public Window protected: SizeProcessor sizeProcessor; - virtual BOOL CALLBACK DialogProc (UINT message, WPARAM wParam, + virtual INT_PTR CALLBACK DialogProc (UINT message, WPARAM wParam, LPARAM lParam); virtual BOOL CALLBACK OnMouseWheel (UINT message, WPARAM wParam, LPARAM lParam); Index: propsheet.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/propsheet.cc,v retrieving revision 2.17 diff -u -p -r2.17 propsheet.cc --- propsheet.cc 10 Nov 2010 20:25:27 -0000 2.17 +++ propsheet.cc 3 Jun 2012 13:57:34 -0000 @@ -37,7 +37,10 @@ typedef struct _DllVersionInfo } DLLVERSIONINFO; typedef HRESULT CALLBACK (*DLLGETVERSIONPROC) (DLLVERSIONINFO * pdvi); + +#ifndef PROPSHEETHEADER_V1_SIZE #define PROPSHEETHEADER_V1_SIZE 40 +#endif // Sort of a "hidden" Windows structure. Used in the PropSheetCallback. #include Index: setup.exe.manifest =================================================================== RCS file: /cvs/cygwin-apps/setup/setup.exe.manifest,v retrieving revision 2.2 diff -u -p -r2.2 setup.exe.manifest --- setup.exe.manifest 19 Feb 2012 13:57:03 -0000 2.2 +++ setup.exe.manifest 3 Jun 2012 13:57:34 -0000 @@ -2,7 +2,7 @@ @@ -13,7 +13,7 @@ type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" - processorArchitecture="X86" + processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> Index: site.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/site.cc,v retrieving revision 2.51 diff -u -p -r2.51 site.cc --- site.cc 23 Feb 2012 14:34:07 -0000 2.51 +++ site.cc 3 Jun 2012 13:57:34 -0000 @@ -441,7 +441,7 @@ do_download_site_info (HINSTANCE hinst, CreateThread (NULL, 0, do_download_site_info_thread, context, 0, &threadID); } -static BOOL CALLBACK +static INT_PTR CALLBACK drop_proc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) Index: win32.h =================================================================== RCS file: /cvs/cygwin-apps/setup/win32.h,v retrieving revision 2.27 diff -u -p -r2.27 win32.h --- win32.h 8 Mar 2012 09:20:03 -0000 2.27 +++ win32.h 3 Jun 2012 13:57:34 -0000 @@ -17,6 +17,7 @@ #ifndef SETUP_WIN32_H #define SETUP_WIN32_H +#include #include /* Any include of should be through this file, which wraps it in @@ -42,10 +43,12 @@ * multiple declaration errors at link time. This define turns that off again. * It will default to off again in later w32api versions, but we need to work * with 3.1 for now. */ +#undef WINBASEAPI #define WINBASEAPI /* Require at least Internet Explorer 3, in order to have access to * sufficient Windows Common Controls features from . */ +#undef _WIN32_IE #define _WIN32_IE 0x0300 #include Index: window.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/window.cc,v retrieving revision 2.18 diff -u -p -r2.18 window.cc --- window.cc 29 Apr 2012 06:26:54 -0000 2.18 +++ window.cc 3 Jun 2012 13:57:34 -0000 @@ -66,13 +66,13 @@ Window::FirstWindowProcReflector (HWND h wnd = reinterpret_cast(((LPCREATESTRUCT)lParam)->lpCreateParams); // Set a backreference to this class instance in the HWND. - SetWindowLongPtr (hwnd, GWL_USERDATA, reinterpret_cast(wnd)); + SetWindowLongPtr (hwnd, GWLP_USERDATA, reinterpret_cast(wnd)); // Set a new WindowProc now that we have the peliminaries done. // We could instead simply do the contents of Window::WindowProcReflector // in the 'else' clause below, but this way we eliminate an unnecessary 'if/else' on // every message. Yeah, it's probably not worth the trouble. - SetWindowLongPtr (hwnd, GWL_WNDPROC, (LONG_PTR) & Window::WindowProcReflector); + SetWindowLongPtr (hwnd, GWLP_WNDPROC, (LONG_PTR) & Window::WindowProcReflector); // Finally, store the window handle in the class. wnd->WindowHandle = hwnd; } @@ -92,7 +92,7 @@ Window::WindowProcReflector (HWND hwnd, Window *This; // Get our this pointer - This = reinterpret_cast(GetWindowLongPtr (hwnd, GWL_USERDATA)); + This = reinterpret_cast(GetWindowLongPtr (hwnd, GWLP_USERDATA)); return This->WindowProc (uMsg, wParam, lParam); }