This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: libc


james chen wrote:
> 
> Hi,
> 
>     In eCos libc, stdin and stdout stream use the same device and the device
> is defined by CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE, now I want to stdin stream
> point to keyboard device and stdout stream point to lcd device. Will RedHat
> support two news macros CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE_IN and
> CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE_OUT.
> I must do it every time after updating CVS, it is very suffering.

I don't really feel this is the correct level to do this since the console
device should be a "tty" device and not a raw one.

I think it would be more accurate to refine the tty layer to accept
different underlying raw devices for input and output.

However if you don't have the stomach for that :-), the easiest thing to
avoid the CVS merge problems is to manually edit
language/c/libc/stdio/current/src/common/stdin.cxx, stdout.cxx and
stderr.cxx to be directly what you want rather than using
CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE. With a CVS update your changes will be
preserved (unless there's some conflict but that's another story).

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


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