On 08.11.2017 23:19, Martin Storsjö wrote:
> We provide a version of __p___argv in all msvcrt versions now. This
> allows linking getopt from libmingwex against ucrtbase.
>
> Signed-off-by: Martin Storsjö <mar...@martin.st>
> ---
>  mingw-w64-crt/misc/getopt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mingw-w64-crt/misc/getopt.c b/mingw-w64-crt/misc/getopt.c
> index ac1fda4..a9b8065 100644
> --- a/mingw-w64-crt/misc/getopt.c
> +++ b/mingw-w64-crt/misc/getopt.c
> @@ -81,7 +81,7 @@ char    *optarg;            /* argument associated with 
> option */
>  #define      INORDER         (int)1
>  
>  #ifndef __CYGWIN__
> -#define __progname __argv[0]
> +#define __progname (* __p___argv())[0]


What would you think about changing headers to use __p___argv for all
platforms? That sounds like a bit cleaner solution for me.


This patch is also fine with me.


Thanks,

Jacek

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to