Opened 8 months ago

Last modified 8 months ago

#18852 new bug

getopt is broken

Reported by: X512 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/POSIX Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev57628.

Muon [1] fails to compile Glvnd [2], but it can be fixed by using built-in Muon getopt implementation based on Musl Libc [3].

  1. https://github.com/annacrombie/muon
  2. https://github.com/NVIDIA/libglvnd
  3. https://github.com/annacrombie/muon/blob/2ce00a5a779baaba1f2db6688ecd6945ce94bc5d/src/platform/windows/os.c#L66

Change History (1)

comment:1 by kallisti5, 8 months ago

confirming here. muon is using getopt like this:

https://git.sr.ht/~lattis/muon/tree/master/item/src/main.c#L672

find_cmd iterates through the list of commands provided OPTSTART / OPTEND are defines to automate getopt.

see https://git.sr.ht/~lattis/muon/tree/master/item/include/opts.h#L12 for OPTSTART/END

This needs to be reproduced with some simple code.

Note: See TracTickets for help on using tickets.