Mail Archives: djgpp/2001/11/08/08:31:35
On Thu, 8 Nov 2001, ROLAND wrote:
> struct sgttyb lkterm;
>
> termst()
>
> {
> if(ioctl(f3,TIOCEXCL)==0 &&
> ioctl(f4,TIOCEXCL)==0){
> lkterm.sg_ispeed = bdrate;
> lkterm.sg_ospeed = bdrate;
> lkterm.sg_erase = ERASECH;
> lkterm.sg_kill = KILLCH;
> lkterm.sg_flags = FLAG;
> if(ioctl(f3,TIOCSETP,&lkterm)!=0 ||
> ioctl(f4,TIOCSETP,&lkterm)!=0){
> error("terminalsettings can not be
> changed",-1,"\n");
> finish(-1);
> }
> }
> else{
> error("device is busy",-1,"\n");
> finish(-1);
> }
> }
>
> finish(a)
>
> int a;
> {
> ioctl(f3,TIOCNXCL);
> ioctl(f4,TIOCNXCL);
> exit(a);
> }
What device is open on handles f3 and f4? If that is the terminal (as it
seems it is), you could try simply commenting out this code, I don't
think it's needed with DJGPP.
OTOH, if the device is not a terminal, but e.g. an async communication
port, then this code will not work with DJGPP at all.
- Raw text -