call cfmakeraw only when available

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@900 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.3
Stéphane Fillod, F8CFE 2002-01-22 21:17:55 +00:00
rodzic 6c85ddd92a
commit bb1593d737
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -20,6 +20,9 @@
/* Define if you have the `atexit' function. */ /* Define if you have the `atexit' function. */
#undef HAVE_ATEXIT #undef HAVE_ATEXIT
/* Define if you have the `cfmakeraw' function. */
#undef HAVE_CFMAKERAW
/* Define if you have the <dirent.h> header file, and it defines `DIR'. */ /* Define if you have the <dirent.h> header file, and it defines `DIR'. */
#undef HAVE_DIRENT_H #undef HAVE_DIRENT_H

Wyświetl plik

@ -4,7 +4,7 @@
* Parts of the PTT handling are derived from soundmodem, an excellent * Parts of the PTT handling are derived from soundmodem, an excellent
* ham packet softmodem written by Thomas Sailer, HB9JNX. * ham packet softmodem written by Thomas Sailer, HB9JNX.
* *
* $Id: serial.c,v 1.23 2002-01-16 22:58:50 fillods Exp $ * $Id: serial.c,v 1.24 2002-01-22 21:17:54 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -126,7 +126,10 @@ int serial_open(port_t *rp) {
#else /* sgtty */ #else /* sgtty */
ioctl (fd, TIOCGETP, &sg); ioctl (fd, TIOCGETP, &sg);
#endif #endif
#ifdef HAVE_CFMAKERAW
cfmakeraw(&options); /* Set serial port to RAW mode by default. */ cfmakeraw(&options); /* Set serial port to RAW mode by default. */
#endif
/* /*
* Set the baud rates to requested values * Set the baud rates to requested values