Subject: Re: [PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems

From: Johannes Sixt <[email-masked]>
Date: Mon, 29 Sep 2014 22:43:41 +0200

Am 28.09.2014 um 15:24 schrieb Marat Radchenko:
> This commit touches regcomp.c and poll.c from Gnulib,
> both were fixed upstream in 2012 the same way.
> 
> Wrt ShellExecute, see [1].
> 
> [1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx

Please do not force readers to visit a web site; provide at least a summary.

> 
> Signed-off-by: Marat Radchenko <[email-masked]>
> ---

> diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
> index 06f3088..d8bde06 100644
> --- a/compat/regex/regcomp.c
> +++ b/compat/regex/regcomp.c
> @@ -2577,7 +2577,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
>      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))
> @@ -3806,7 +3806,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
>  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;
>  

This breaks with

In file included from compat/regex/regex.c:77:
compat/regex/regcomp.c: In function 'parse_dup_op':
compat/regex/regcomp.c:2580: error: 'intptr_t' undeclared (first use in
this function)

when compiled using the msysgit environment.

-- Hannes

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to [email-masked]
To unsubscribe from this group, send email to
[email-masked]
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email-masked].
For more options, visit https://groups.google.com/d/optout.