Future code information in iofunc.c

Hamlib-4.5
Mike Black W9MDB 2022-10-25 23:23:13 -05:00
rodzic 8c274456d4
commit b63460f05f
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -1339,10 +1339,14 @@ static int read_string_generic(hamlib_port_t *p,
*/
do
{
// The ioctl works on Linux but not mingw -- enable in 4.6 for non-mingw builds and see if it breaks anything
//int avail=0;
//ioctl(p->fd, FIONREAD, &avail);
#if 0
#ifndef __MINGW32__
// The ioctl works on Linux but not mingw
int avail=0;
ioctl(p->fd, FIONREAD, &avail);
//rig_debug(RIG_DEBUG_ERR, "xs: avail=%d expected_len=%d, minlen=%d, direct=%d\n", __func__, avail, expected_len, minlen, direct);
#endif
#endif
rd_count = port_read_generic(p, &rxbuffer[total_count],
expected_len == 1 ? 1 : minlen, direct);
rig_debug(RIG_DEBUG_VERBOSE, "%s: read %d bytes\n", __func__, (int)rd_count);