Split ttyname.c to avoid unnecessary dependencies

Jeff Johnston jjohnstn@redhat.com
Tue Feb 24 09:27:00 GMT 2009


Patch checked in.  The license information was copied to both files.

-- Jeff J.

Howland Craig D (Craig) wrote:
> Here is a patch that does what Sebastian requested.  I did not include
> the regenerated Makefile.in, leaving it to Jeff to do that if it makes
> the cut to be put in.  (I did note the regeneration in the ChangeLog.)
> 				Craig
>
>
> -----Original Message-----
> From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
> On Behalf Of Joel Sherrill
> Sent: Thursday, February 12, 2009 10:00 AM
> To: Sebastian Huber
> Cc: newlib@sources.redhat.com
> Subject: Re: Split ttyname.c to avoid unnecessary dependencies
>
> Sebastian Huber wrote:
>   
>> Joel Sherrill wrote:
>>   
>>     
>>> Sebastian Huber wrote:
>>>     
>>>       
>>>> Hi,
>>>>
>>>> the two functions ttyname() and ttyname_r() are currently defined in
>>>> one file
>>>>
>>>> libc/unix/ttyname.c
>>>>
>>>> The ttyname() function needs 1030 bytes of data (with common
>>>>         
> _PATH_DEV
>   
>>>> and
>>>> MAXNAMLEN values).  This is quite much if you have a system with a
>>>> small memory
>>>> space.  The file should be split up into ttyname.c and ttyname_r.c
>>>>         
> to
>   
>>>> avoid
>>>> this memory requirement if you only use ttyname_r().
>>>>
>>>>   
>>>>       
>>>>         
>>> I don't disagree that this is a good idea but neither method
>>> shows up in the RTEMS minimum, hello, or ticker sample.
>>> What in RTEMS is pulling it into your application?
>>>     
>>>       
>> It is the telnet demon.
>>
>>   
>>     
> OK.  That is pretty far above a minimum configuration
> but unused code is unused code.  It should be split.
>
> Can you submit a patch?
>
>   



More information about the Newlib mailing list