Possible argp implementation questions regarding the use of <stdio.h>

Corinna Vinschen vinschen@redhat.com
Fri Feb 3 12:09:43 GMT 2023


On Feb  2 15:41, Ignacio Vargas wrote:
> As I mentioned when I e-mailed from outside the mailing list a while ago,
> I'm working on an very stripped down argp baremetal implementation that I
> would like to contribute to newlib at some point. As Corinna pointed out I
> don't want it to be GPLed so I've been writing an implementation from
> scratch that doesn't even depend on getopt.
> 
> I have a question regarding the use (or lack thereof) of <stdio.h>.
> 
> Context: For the target we support we can't use newlib's printing functions
> because we can't provide an implementation of all the required OS
> subroutines. This is due to working on a very limited target. This is all to
> say, our stripped down argp can't include <stdio.h>, and in the future I
> would like to contribute it to newlib in a way that doesn't require
> including <stdio.h>.
> 
> Question: From what I've been told by colleagues, newlib aims to be a very
> "drop-in" replacement for a regular stdlib. So I'm asking if it would be an
> issue to contribute my argp version that:
> 1. Already deviates from glibc's in the fact that it's a stripped-down
> version that doesn't implement all the features. And also deviates in small
> ways in certain features it does support.
> 
> 2. Has an additional mechanism for the user to specify which printing
> function to use, instead of just including <stdio.h> and using the provided
> printing functions. With the goal of having wider support across baremetal
> targets.

Rather than just theorizing about it, what about just sending the
patchset in git format-patch --cover-letter style, so we can discuss
this over the living code?


Corinna



More information about the Newlib mailing list