mirror of
https://repo.or.cz/socat.git
synced 2024-12-23 07:52:32 +00:00
corrections for OpenEmbedded, especially termios SHIFT values andISPEED/OSPEED
This commit is contained in:
parent
a65b1c7c72
commit
799a6ba377
5 changed files with 30 additions and 16 deletions
3
CHANGES
3
CHANGES
|
@ -126,6 +126,9 @@ porting:
|
||||||
fixed compiler warnings on Mac OS X 64bit. Thanks to Guy Harris for
|
fixed compiler warnings on Mac OS X 64bit. Thanks to Guy Harris for
|
||||||
providing the patch.
|
providing the patch.
|
||||||
|
|
||||||
|
corrections for OpenEmbedded, especially termios SHIFT values and
|
||||||
|
ISPEED/OSPEED. Thanks to John Faith for providing the patch
|
||||||
|
|
||||||
####################### V 2.0.0-b7:
|
####################### V 2.0.0-b7:
|
||||||
|
|
||||||
security:
|
security:
|
||||||
|
|
|
@ -1341,10 +1341,13 @@ AC_CACHE_CHECK(shift offset of $1, $2,
|
||||||
],
|
],
|
||||||
[$2=`cat $conftestoffset`],
|
[$2=`cat $conftestoffset`],
|
||||||
[$2=-1],
|
[$2=-1],
|
||||||
[AC_MSG_RESULT(please determine $1_SHIFT manually)]
|
[$2=-1]
|
||||||
)
|
)
|
||||||
LIBS="$LIBS1"])
|
LIBS="$LIBS1"])
|
||||||
AC_DEFINE_UNQUOTED($1_SHIFT, ${$2})
|
AC_DEFINE_UNQUOTED($1_SHIFT, ${$2})
|
||||||
|
if test "$2" = -1; then
|
||||||
|
AC_MSG_WARN(please determine $1_SHIFT manually)
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_SHIFT_OFFSET(CRDLY, sc_cv_sys_crdly_shift)
|
AC_SHIFT_OFFSET(CRDLY, sc_cv_sys_crdly_shift)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* source: xio-termios.c */
|
/* source: xio-termios.c */
|
||||||
/* Copyright Gerhard Rieger 2001-2008 */
|
/* Copyright Gerhard Rieger 2001-2012 */
|
||||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||||
|
|
||||||
/* this file contains the source for terminal I/O options */
|
/* this file contains the source for terminal I/O options */
|
||||||
|
@ -270,8 +270,12 @@ const struct optdesc opt_raw = { "raw", NULL, OPT_RAW, GROUP_TER
|
||||||
const struct optdesc opt_sane = { "sane", NULL, OPT_SANE, GROUP_TERMIOS, PH_FD, TYPE_CONST, OFUNC_TERMIOS_SPEC };
|
const struct optdesc opt_sane = { "sane", NULL, OPT_SANE, GROUP_TERMIOS, PH_FD, TYPE_CONST, OFUNC_TERMIOS_SPEC };
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS_ISPEED
|
#ifdef HAVE_TERMIOS_ISPEED
|
||||||
|
#if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1)
|
||||||
|
#if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1)
|
||||||
const struct optdesc opt_ispeed = { "ispeed", NULL, OPT_ISPEED, GROUP_TERMIOS, PH_FD, TYPE_UINT, OFUNC_TERMIOS_SPEED, ISPEED_OFFSET };
|
const struct optdesc opt_ispeed = { "ispeed", NULL, OPT_ISPEED, GROUP_TERMIOS, PH_FD, TYPE_UINT, OFUNC_TERMIOS_SPEED, ISPEED_OFFSET };
|
||||||
const struct optdesc opt_ospeed = { "ospeed", NULL, OPT_OSPEED, GROUP_TERMIOS, PH_FD, TYPE_UINT, OFUNC_TERMIOS_SPEED, OSPEED_OFFSET };
|
const struct optdesc opt_ospeed = { "ospeed", NULL, OPT_OSPEED, GROUP_TERMIOS, PH_FD, TYPE_UINT, OFUNC_TERMIOS_SPEED, OSPEED_OFFSET };
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* HAVE_TERMIOS_ISPEED */
|
#endif /* HAVE_TERMIOS_ISPEED */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,15 @@ int xioinitialize(int xioflags) {
|
||||||
assert(tdata.termarg.c_oflag == tdata.flags[1]);
|
assert(tdata.termarg.c_oflag == tdata.flags[1]);
|
||||||
assert(tdata.termarg.c_cflag == tdata.flags[2]);
|
assert(tdata.termarg.c_cflag == tdata.flags[2]);
|
||||||
assert(tdata.termarg.c_lflag == tdata.flags[3]);
|
assert(tdata.termarg.c_lflag == tdata.flags[3]);
|
||||||
#if HAVE_TERMIOS_ISPEED
|
#if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1)
|
||||||
|
#if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1)
|
||||||
|
#if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1)
|
||||||
tdata.termarg.c_ispeed = 0x56789abc;
|
tdata.termarg.c_ispeed = 0x56789abc;
|
||||||
tdata.termarg.c_ospeed = 0x6789abcd;
|
tdata.termarg.c_ospeed = 0x6789abcd;
|
||||||
assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]);
|
assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]);
|
||||||
assert(tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET]);
|
assert(tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET]);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* WITH_TERMIOS */
|
#endif /* WITH_TERMIOS */
|
||||||
|
|
|
@ -786,7 +786,7 @@ const struct optname optionnames[] = {
|
||||||
IF_IP6 ("ipv6only", &opt_ipv6_v6only)
|
IF_IP6 ("ipv6only", &opt_ipv6_v6only)
|
||||||
#endif
|
#endif
|
||||||
IF_TERMIOS("isig", &opt_isig)
|
IF_TERMIOS("isig", &opt_isig)
|
||||||
#ifdef HAVE_TERMIOS_ISPEED
|
#if defined(HAVE_TERMIOS_ISPEED) && defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1)
|
||||||
IF_TERMIOS("ispeed", &opt_ispeed)
|
IF_TERMIOS("ispeed", &opt_ispeed)
|
||||||
#endif
|
#endif
|
||||||
IF_TERMIOS("istrip", &opt_istrip)
|
IF_TERMIOS("istrip", &opt_istrip)
|
||||||
|
@ -1057,7 +1057,7 @@ const struct optname optionnames[] = {
|
||||||
IF_OPENSSL("openssl-pseudo", &opt_openssl_pseudo)
|
IF_OPENSSL("openssl-pseudo", &opt_openssl_pseudo)
|
||||||
IF_OPENSSL("openssl-verify", &opt_openssl_verify)
|
IF_OPENSSL("openssl-verify", &opt_openssl_verify)
|
||||||
IF_TERMIOS("opost", &opt_opost)
|
IF_TERMIOS("opost", &opt_opost)
|
||||||
#ifdef HAVE_TERMIOS_ISPEED
|
#if defined(HAVE_TERMIOS_ISPEED) && defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1)
|
||||||
IF_TERMIOS("ospeed", &opt_ospeed)
|
IF_TERMIOS("ospeed", &opt_ospeed)
|
||||||
#endif
|
#endif
|
||||||
IF_ANY ("owner", &opt_user)
|
IF_ANY ("owner", &opt_user)
|
||||||
|
|
Loading…
Reference in a new issue