This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: libc
- To: james chen <james_ch1 at sina dot com>
- Subject: Re: [ECOS] libc
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Fri, 15 Jun 2001 23:40:32 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <000501c0f53e$4a7da6a0$c408aa0a@inc.inventec>
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/