Am Samstag, 26. Juni 2021, 20:51:08 CEST schrieb Weiwen Chen:
Besides, `getopt` is something standard, and I can refer to lots of implementations. If a dos-style `getopt` is done, maybe it could help new programs or improve existing programs.
Some examples of shared functionality would be include/wine/list.h and include/wine/rbtree.h. I think adding a dos/windows getopt flavor in a similar fashion would be an option. I agree that's something useful to share.
There's also libs/wine, but it is not suitable to link into PE modules. It contains a unix-y getopt.
We also have a shared static library that can get linked into PE modules, dlls/winecrt0. I think getopt would be slightly off-topic for it though.