﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1128	stty termios struct, add feature test for speed attributes	hanDerPeder	Alex Shinn	"the stty egg fails to compile on android because of missing fields.

in android bionic termios is defined like this:
{{{
struct termio { 
  unsigned short c_iflag;	 /* input mode flags */ 
  unsigned short c_oflag;	 /* output mode flags */ 
  unsigned short c_cflag;	 /* control mode flags */ 
  unsigned short c_lflag;	 /* local mode flags */ 
  unsigned char c_line;	         /* line discipline */ 
  unsigned char c_cc[NCC];	 /* control characters */ 
};
}}}

while on linux (x86) it's:

{{{
struct termios 
{ 
  tcflag_t c_iflag;	 /* input mode flags */ 
  tcflag_t c_oflag;	 /* output mode flags */ 
  tcflag_t c_cflag;	 /* control mode flags */ 
  tcflag_t c_lflag;	 /* local mode flags */ 
  cc_t c_line;	         /* line discipline */ 
  cc_t c_cc[NCCS];	 /* control characters */ 
  speed_t c_ispeed;	 /* input speed */ 
  speed_t c_ospeed;	 /* output speed */ 
  #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 
  #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 
};
}}}

The attached patch adds feature tests for c_ispeed and c_ospeed. Have tested on my workstation (arch linux x86) and embedded android (arm).

My first time using feature-test so if you have any feedback please let me know. If it looks okay, please merge.

Regards,
Peder Refsnes"	defect	new	major	someday	extensions	4.9.x		stty termios	peder@…	hard
