If picocom is compiled *with* custom-baudrate support (USE_CUSTOM_BAUD)
for Linux, then it uses a new set of ioctl's (TCGETS2 vs TCGETS, etc) to
access the serial ports. This patch allows the custom baudrate support
to be disabled at runtime (without recompiling), and picocom to switch
to using the old ioctl's.
To disable custom baudrate support (and switch back to the "old" ioctls)
simply define the environment variable NO_CUSTOM_BAUD, before starting
picocom.
This applies only to Linux and, obviously, only when picocom has been
compiled with custom baudrate support (USE_CUSTOM_BAUD).
For some systems (OSes, versions, architectures) custom-baudrate
support is enabled by default.
For others, support may work, but must be enabled by defining
USE_CUSTOM_BAUD in the Makefile
You can also disable custom baudrate support altogether (even for
systems where it's enabled by default), by defining NO_CUSTOM_BAUD in
the Makefile
The powerpc[64le] arch uses different ioctls for custom baud setting: It
uses the old TCSETS*, TCGETS ioctls, not the new TCSETS*2, TCGETS2 ones.
Cross-compiles cleanly, not tested (no h/w currently available).
Uses the "termios2" linux-kernel interface (ioctls TCGETS2, TCSETS2,
TCSETSF2, etc) to provide termios(3)-like functions that allow setting
custom baud rates.
Only works for Linux.