This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Split ttyname.c to avoid unnecessary dependencies


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]