[PATCH]: Implement getprogname and setprogname

Nicholas Wourms nwourms@netscape.net
Tue Nov 18 19:33:00 GMT 2003

cgf@redhat.com wrote:
> On Mon, Nov 17, 2003 at 08:08:05PM -0500, Nicholas Wourms wrote:
>>Hi all,
>>Corrina's latest check-in for stdlib.h prodded me into finishing the 
>>documentation for my implementation of these two functions for newlib 
>>(as opposed to just Cygwin).  So, I'm submitting a patch with source, 
>>inline texinfo documentation, and the bsd manpage.  I am also working on 
>>quite a few other bsd/SuSv3/c99 functions which seem to be located in 
>>most libc's "gen" dir.  So I hope you don't mind that I created that 
>>dir.  More contributions to follow.
>>Also, if you approve it, please commit the bzipped patch, not the 
>>inlined text one, since my MUA is munging tabs and some whitespaces.

I suspected that you might chime in on this, but before you jump to 
conclusions, please hear me out.

> Then you should use another MUA.

I don't see what the fuss is all about, after all I did include an 
inlined txt version for commentary.  As for switching, I'm afraid that's 
not possible, since I'm not changing freemail providers and netscape.net 
requires that I use Netscape (not just mozilla) to get imap access to my 
mail.  I suppose I could just send it from a local exim daemon, so I 
guess I'll look into doing that in the future.

>>Code is based off of {Free,Net}BSD sources.
> This is entirely BSD specific.  IMO, it doesn't belong in newlib.

Indeed they are BSD specific, which was entirely my intent and I see no 
crime in it.  As for them not belonging in newlib, you have a right to 
your opinion, however you also had plenty of opportunity to chime in on 
this thread:


But seeing as you didn't and since the discussion generally indicates 
otherwise, I'll assume that they do belong and they are wanted.  Next up 
is my version of the *err/*warn functions from BSD, which benefit from 
having these two functions available.

In case anyone thinks I just copied the sources from Corinna's version 
in Cygwin, I didn't.  I had already let Corinna know that I had working, 
newlib versions of these functions and the err/warn functions back when 
she committed the err/warn functions to Cygwin.  The reason I hadn't 
already submitted them was because I hadn't finished my testing and 
fully documenting them at that time.  I asked her what I should do, and 
she told me just to submit my work to newlib and if it was acceptable 
she would transition Cygwin to use it instead.  I see this as a win/win 
situation, as it consolidates pure C implementations from Cygwin to 
newlib and extends newlib's core functionality for all platforms.  These 
aren't just off-the-wall functions, they are actually quite frequently used.

Finally, let me add that I purposely didn't make the functions compiled 
by default for embedded targets in the case they are trying to achieve a 
minimal libc.  If you or anyone else think I should set the ELIX level 
higher, then I'll be happy to comply.  However, as far as I'm concerned, 
I see no reason newlib can't be both as robust as glibc or as lean as 
people want it to be.  The great part about {free,opensource}-software 
is choice, and that's all I'm trying to offer here.  My code is 
seperated and compartmentalized, so worries about it being extra bloat 
or unmanageable are frankly bogus.  In any event, the prior interest for 
these and other BSD functions was indicated in that thread, which is 
what I intend to provide.


More information about the Newlib mailing list