This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] setup: port to 64-bit, part 1
On Mon, 4 Mar 2013 01:55:42 -0600, Yaakov (Cygwin/X) wrote:
> On Mon, 4 Mar 2013 02:09:58 -0500, Christopher Faylor wrote:
> > On Sun, Mar 03, 2013 at 08:39:45PM +0100, Corinna Vinschen wrote:
> > >Yaakov already ported setup to 64 bit. Only the autoload stuff is
> > >missing and that can simply be deleted anyway.
> >
> > Ok, I thought there were more patches coming. If the #ifdef x86_64's in
> > Yaakov's code are actually not going to be there because of legacy going
> > away then those points are invalid.
>
> So OK to apply just the type-safety parts (install.cc, regex/regcomp.c,
> and setup.exe.manifest)?
IOW, the attached.
Yaakov
2013-03-04 Yaakov Selkowitz <yselkowitz@...>
* install.cc (FileInuseDlgProc): Fix return type.
* regex/regcomp.c (parse_dup_op): Fix invalid cast warning.
(create_token_tree): Ditto.
* setup.exe.manifest: Set processorArchitecture to "*".
Add explicit requestedExecutionLevel for 64-bit compatibility.
Index: install.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/install.cc,v
retrieving revision 2.103
diff -u -p -r2.103 install.cc
--- install.cc 8 Feb 2013 15:55:01 -0000 2.103
+++ install.cc 3 Mar 2013 06:23:38 -0000
@@ -197,7 +197,7 @@ typedef struct
int iteration;
} FileInuseDlgData;
-static BOOL CALLBACK
+static INT_PTR CALLBACK
FileInuseDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
Index: setup.exe.manifest
===================================================================
RCS file: /cvs/cygwin-apps/setup/setup.exe.manifest,v
retrieving revision 2.3
diff -u -p -r2.3 setup.exe.manifest
--- setup.exe.manifest 21 Aug 2012 14:43:41 -0000 2.3
+++ setup.exe.manifest 3 Mar 2013 06:23:38 -0000
@@ -2,7 +2,7 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
- processorArchitecture="X86"
+ processorArchitecture="*"
name="RedHat.Cygwin.Setup"
type="win32"
/>
@@ -13,12 +13,19 @@
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
- processorArchitecture="X86"
+ processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
Index: regex/regcomp.c
===================================================================
RCS file: /cvs/cygwin-apps/setup/regex/regcomp.c,v
retrieving revision 1.1
diff -u -p -r1.1 regcomp.c
--- regex/regcomp.c 17 Feb 2013 21:40:40 -0000 1.1
+++ regex/regcomp.c 3 Mar 2013 06:23:38 -0000
@@ -2510,7 +2510,7 @@ parse_dup_op (bin_tree_t *elem, re_strin
old_tree = NULL;
if (elem->token.type == SUBEXP)
- postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+ postorder (elem, mark_opt_subexp, (void *) (intptr_t) elem->token.opr.idx);
tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
if (BE (tree == NULL, 0))
@@ -3723,7 +3723,7 @@ create_token_tree (re_dfa_t *dfa, bin_tr
static reg_errcode_t
mark_opt_subexp (void *extra, bin_tree_t *node)
{
- int idx = (int) (long) extra;
+ int idx = (int) (intptr_t) extra;
if (node->token.type == SUBEXP && node->token.opr.idx == idx)
node->token.opt_subexp = 1;