Details

[Home]

Issue of the Standard # S0026

Brief

Contradiction between macro definitions of terminal speed in different sections of LSB 3.1

Detailed Description

The values of constants for various speed of data transmission between system and terminal are defined in a different way in different sections of LSB 3.1.

Linux Standard Base Core Specification 3.1, 9.4. Data Definitions for libc, 9.4.58,
termios.h has the following definitions:


#define B0      0000000
#define B50     0000001
#define B75     0000002
#define B110    0000003
#define B134    0000004
#define B150    0000005
#define B200    0000006
#define B300    0000007
#define B600    0000010
#define B1200   0000011
#define B1800   0000012
#define B2400   0000013
#define B4800   0000014
#define B9600   0000015
#define B19200  0000016
#define B38400  0000017

Linux Standard Base Core Specification 3.1, 9.5. Interface Definitions for libc,
cfsetspeed has another definitions:


#define B0      0
#define B50     50
#define B75     75
#define B110    110
#define B134    134
#define B150    150
#define B200    200
#define B300    300
#define B600    600
#define B1200   1200
#define B1800   1800
#define B2400   2400
#define B4800   4800
#define B9600   9600
#define B19200  19200
#define B38400  38400

Possible consequences

Incompatibility of applications and implementations of libc that implemented in different assumptions of values of the constants, if these literal values are used instead of constant name or values of constant are comparing with literal values.

Accepted

LSB Bugzilla, 1294

Status

Fixed in LSB 3.2

[Home]