Hello, I speak only for my name.
Currently, the win32 port serves two purposes:
- provide a tcc ~C90 compiler on windows
- add "some" support to write windows compatible applications
As I'm aware of, the win32 port is not targeted to support POSIX applications.
While getopt is great, it introduces a third category and the gap from POSIX is huge. For example, among others, I would love to have mmap.
For this reason and unless the group decides to add more POSIX support for windows, I don't see the need to add getopt.h on win32.
You're welcome to add a new repository somewhere where you and others can push POSIX extensions for win32 port.
That said, if the group decides that's a good idea, I will not protest but, in this case put getopt.h in a new directory like include/posix to make it clear.
Le : 31 juillet 2019 à 19:21 (GMT +02:00)
De : "avih via Tinycc-devel" <address@hidden>
À : "address@hidden" <address@hidden>, "Michael Matz" <address@hidden>
Cc : "avih" <address@hidden>
Objet : Re: [Tinycc-devel] [PATCH] win32: add include/getopt.h with static
> > Patch is attached. If there are no objections, I'll push it in few days.
> But why? TCC is a compiler, it doesn't generally provide a C library.
> Use newlib or musl or the like for that.
You know as well as anyone that the Windows build of tcc is more than
that. It's a self contained vertical package which includes everything
required to build many programs without further dependencies. So your
statement, while correct in general, is not so true for Windows.
Most CLI programs process arguments, and getopt is the standard.
> The underlying objection is basically the answer to the question "where
> do you stop?"
Indeed that is the real question, and the only relevant question IMHO,
to which I don't have an answer, but I think it's along the lines of
"small and generally useful, not full blown".
I'm not familiar with TCC guidelines, official or not, to use it with
newlib or musl. If there were such then I'd agree getopt should not be
part of tcc itself, but I think it's not trivial on Windows, and this
patch is very small in the grand scheme of things, and provides a very
> So, please no.
So do you have a concrete answer to "where do we stop", or guidelines
to use musl or newlib with tcc for windows?
If yes, then the text should be incorporated into the repo IMO.
If no, then I think getopt has good value and low risk/complexity,
which IMHO makes it worth including for the Windows build.
Tinycc-devel mailing list