Daniel P. Berrangé <[email protected]> writes: > On Thu, Mar 02, 2023 at 07:58:28AM +0100, Markus Armbruster wrote: >> Marc-André Lureau <[email protected]> writes: >> >> > Hi >> > >> > On Wed, Mar 1, 2023 at 5:16 PM Markus Armbruster <[email protected]> wrote: >> >> What about 3. have an additional command conditional on CONFIG_WIN32? >> >> Existing getfd stays the same: always fails when QEMU runs on a Windows >> >> host. The new command exists only when QEMU runs on a Windows host. >> >> We could additionally deprecate getfd for Windows. >> >> > This is what was suggested initially: >> > https://patchew.org/QEMU/[email protected]/[email protected]/ >> > >> > I also like it better, as a specific command for windows sockets, less >> > ways to use it wrongly. >> >> Daniel, what do you think? > > I wasn't especially a fan of platform specific APIs, but perhaps in > retrospect it will be the lesser of two evils.
Marc-André, let's go to your initial approach then. This breaks the dependence between this patch and the remainder of the series. We still need to consider this patch anyway. It partially fills gaps in code generation for unboxed conditional arguments. Partially, because the last argument must not be conditional. It needs work to either lift this restriction, or reject such arguments properly. Either way, the generated code will be ugly, and the handwritten code interfacing with it will be ugly, too. I'd like to tighten the restriction instead: conditional arguments require boxed. Less ugly and less awkward to document, I think.
