[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make 4.2.93 release candidate available
From: |
Paul Smith |
Subject: |
Re: GNU make 4.2.93 release candidate available |
Date: |
Tue, 07 Jan 2020 20:39:35 -0500 |
User-agent: |
Evolution 3.34.1-2 |
On Mon, 2020-01-06 at 05:33 -0500, Dennis Clarke wrote:
> The only nit, and it is a little nit, is the strange use of a three
> parameter main() in src/main.c line 1054 and this is a "warning". Well
> strictly speaking, pun intended, that isn't a terrible sin but it isn't
> correct either. Sure, tossing in char **envp as the third rail on the
> main() can work and usually does work it isn't supposed to work.
>
> I looked in there and there is no good reason to not use getenv() but
> who knows what voodoo to do in windows32? I surely don't.
Just for clarity, getenv() isn't sufficient. That requires that you know
what variables you want to look up: in GNU make we need to walk through all
the variables so we can import each one as a make variable.
In POSIX we can use extern char** environ instead. On Windows you can use
_environ although my impression is that might not work everywhere (but it
might be good enough for make). On other systems there may be other
things.
While the third arg to main isn't actually part of any standard, even
POSIX, it's actually very widely supported.
- GNU make 4.2.93 release candidate available, Paul Smith, 2020/01/03
- Re: GNU make 4.2.93 release candidate available, Paul Smith, 2020/01/05
- Re: GNU make 4.2.93 release candidate available, Dennis Clarke, 2020/01/06
- Re: GNU make 4.2.93 release candidate available,
Paul Smith <=
- Re: GNU make 4.2.93 release candidate available, Dennis Clarke, 2020/01/10
- Re: GNU make 4.2.93 release candidate available, Paul Smith, 2020/01/10
- Re: GNU make 4.2.93 release candidate available, Paul Smith, 2020/01/10
- Re: GNU make 4.2.93 release candidate available, Paul Smith, 2020/01/10
- Re: GNU make 4.2.93 release candidate available, Paul Smith, 2020/01/11
- Re: GNU make 4.2.93 release candidate available, Martin Dorey, 2020/01/11
- Re: GNU make 4.2.93 release candidate available, Dennis Clarke, 2020/01/11
- Re: GNU make 4.2.93 release candidate available, Edward Welbourne, 2020/01/13
- Re: GNU make 4.2.93 release candidate available, John Marshall, 2020/01/13
- Re: GNU make 4.2.93 release candidate available, Dennis Clarke, 2020/01/11