[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] /dev/tty to CON:



Paul forgot to reply to the list.

2010/4/19 Vincent Rivière <vincent.riviere@freesbee.fr>:
> Hello.
>
> Some standard programs use open("/dev/tty") to write directly to the
> terminal, in case of redirections. This feature is especially used by the
> -fstack-protector function of GCC.
>
> Of course this fails with TOS, but if I'm not wrong the special filename
> "CON:" is exactly the same.
>
> Would it be wise to make a special case in open() inside the MiNTLib, and
> transparently replace /dev/tty to CON: when running on single TOS ?
>
> The alternative is to patch all the programs using /dev/tty and expected to
> run on single TOS.
>
> --
> Vincent Rivière
>
This is single TOS specific, right? ie not an issue with MiNT

The first question I would ask:
"is MiNTLib TOS aware?"

can it tell weather or not it is being run under single TOS or MiNT? I
mean this
in a general sense, as from what I have gathered from previous posts, some
functions already need to know, and therefore have appropriate detection code.

Would the "/dev/tty to CON" affect MiNTLib portability? (is it portable?)

And lastly, maybe similar to above, would it be affected by running under Magic.

It maybe that the last 2 questions are irrelavent, they are just
related queries. Is
there any other OS/kernel that MiNTLib can be used with that may only show up
as TOS when queried.

The main reason I ask, being, is there anything else similar to this
transparency
that could or should also be done. If so, does a coordinated approach need to
be add (if not already present), and does any detection code adversely affect
memory footprint, load times, or speed, particularly on low spec machines.

or ar these concerns unfounded?

Cheers

Paul