[fpc-devel] [PATCH] unix/serial.pp mods for darwin

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Oct 1 20:18:48 CEST 2008


On 01 Oct 2008, at 08:41, Brad Campbell wrote:

> This is actually only required on 10.5 on Intel, but it does not  
> seem to hurt on the other versions.
> If left in place, this just blocks and stalls the program.
>
> -
> +{$IFNDEF DARWIN}
>   tcflush(Handle, TCIOFLUSH);
> -  tcsetattr(Handle, TCSANOW, tios)
> +{$ENDIF}
> +  tcsetattr(Handle, TCSANOW, tios);
> end;

How about using "TCSADRAIN or TCSAFLUSH" instead of TCSANOW? As far as  
I can see, that should have the same effect as the "tcflush(Handle,  
TCIOFLUSH)". Does that hang too?

Thanks a lot for the explanations. Once this is settled, I'll commit  
your patch.


Jonas



More information about the fpc-devel mailing list