[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2] vl.c && linux-user/main.c : removed **envp f
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH V2] vl.c && linux-user/main.c : removed **envp from main() arguments |
Date: |
Mon, 18 Dec 2017 14:16:34 +0000 |
On 18 December 2017 at 13:13, Yoni Bettan <address@hidden> wrote:
> On 12/18/2017 02:54 PM, Peter Maydell wrote:
>> Did you test this on OSX? I'm pretty sure it will break,
>> because now the main() function in ui/cocoa.m will
>> recursively call itself, rather than calling the
>> function in vl.c. (Either that or it just won't
>> link at all because there are two main() functions.)
>
>
> I didn't checked it on OSX.
> I was actually convinced it is Ok but when I rethink it
> I understand that on Mac OSX the third argument is required (char **envp)
> as it seems to use it here: "return qemu_main(gArgc, gArgv,
> *_NSGetEnviron());"
> so the patch *idea* will literally break ui/coca.m.
No, the general idea of removing the 3rd argument from
qemu_main() is fine (you can just not pass the environment
to it from the ui/cocoa.m code). But you can't get rid
of the ifdef stuff that allows cocoa.m to provide its
own main() function and rename the vl.c one to qemu_main.
thanks
-- PMM