Split ttyname.c to avoid unnecessary dependencies
Eric Bresie
ebresie@gmail.com
Tue Feb 24 14:22:00 GMT 2009
Shucks...I thought I had sent this comment out some time back and was
wondering why it never showed up...let me try again.
...
Not sure if newlib is trying to stay Unix/POSIX compliant, but
splitting the file might be counter to the standard.See
http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html
Would an #ifdef _TTYNAME / #ifdef _TTYNAME_R or some such item be
usable allowing on the needed function to be used?
--
Eric Bresie
ebresie@gmail.com
On Thu, Feb 12, 2009 at 3:41 AM, Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
> Hi,
>
> the two functions ttyname() and ttyname_r() are currently defined in one file
>
> libc/.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 ttynaunix/ttynameme_r.c to avoid
> this memory requirement if you only use ttyname_r().
>
> Have a nice day!
>
> Sebastian Huber, Embedded Brains GmbH
More information about the Newlib
mailing list