summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 15:56:33 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 16:17:24 +0400
commit360bc5bfd8c4b67487bef77fa9343779bd2ca6e6 (patch)
tree7057f0b72d31b32ae1fb0638c03aa1eb30992e08
parent0e04bca260780b2ce04e123d09302ce98d9b597a (diff)
downloadpcp-360bc5bfd8c4b67487bef77fa9343779bd2ca6e6.tar.gz
Check for cfmakeraw
-rwxr-xr-xconfigure11
-rw-r--r--configure.ac1
-rw-r--r--src/include/pcp/config.h.in1
-rw-r--r--src/libpcp/src/secureconnect.c4
-rw-r--r--src/pmdas/roomtemp/mlan/linuxlnk.c3
5 files changed, 16 insertions, 4 deletions
diff --git a/configure b/configure
index 6609a52..717f9ee 100755
--- a/configure
+++ b/configure
@@ -10172,6 +10172,17 @@ _ACEOF
fi
done
+for ac_func in cfmakeraw
+do :
+ ac_fn_c_check_func "$LINENO" "cfmakeraw" "ac_cv_func_cfmakeraw"
+if test "x$ac_cv_func_cfmakeraw" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CFMAKERAW 1
+_ACEOF
+
+fi
+done
+
if test $target_os != linux -a $target_os != freebsd -a $target_os != kfreebsd -a $target_os != netbsd; then
for ac_func in readdir64
diff --git a/configure.ac b/configure.ac
index 208c027..6f89ab6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1216,6 +1216,7 @@ AC_CHECK_FUNCS(getuid getgid)
AC_CHECK_FUNCS(getgrent getgrent_r getgrnam getgrnam_r getgrgid getgrgid_r)
AC_CHECK_FUNCS(getpwent getpwent_r getpwnam getpwnam_r getpwuid getpwuid_r)
AC_CHECK_FUNCS(sysinfo trace_back_stack backtrace)
+AC_CHECK_FUNCS(cfmakeraw)
dnl only define readdir64 on non-linux platforms that support it
if test $target_os != linux -a $target_os != freebsd -a $target_os != kfreebsd -a $target_os != netbsd; then
diff --git a/src/include/pcp/config.h.in b/src/include/pcp/config.h.in
index ae1ccdd..4081499 100644
--- a/src/include/pcp/config.h.in
+++ b/src/include/pcp/config.h.in
@@ -281,6 +281,7 @@ extern "C" {
#undef HAVE_FLOG10
#undef HAVE_POW
#undef HAVE_DIRNAME
+#undef HAVE_CFMAKERAW
#undef HAVE_BASENAME
#undef HAVE_SYSINFO
#undef HAVE_TRACE_BACK_STACK
diff --git a/src/libpcp/src/secureconnect.c b/src/libpcp/src/secureconnect.c
index 3391329..4778a47 100644
--- a/src/libpcp/src/secureconnect.c
+++ b/src/libpcp/src/secureconnect.c
@@ -23,10 +23,8 @@
#include <secerr.h>
#include <sslerr.h>
#include <pk11pub.h>
+#include <termios.h>
#include <sys/stat.h>
-#ifdef HAVE_SYS_TERMIOS_H
-#include <sys/termios.h>
-#endif
/*
* We shift NSS/NSPR/SSL/SASL errors below the valid range for other
diff --git a/src/pmdas/roomtemp/mlan/linuxlnk.c b/src/pmdas/roomtemp/mlan/linuxlnk.c
index aa20695..4c90796 100644
--- a/src/pmdas/roomtemp/mlan/linuxlnk.c
+++ b/src/pmdas/roomtemp/mlan/linuxlnk.c
@@ -96,6 +96,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "config.h"
#include <stdio.h>
#include <unistd.h>
@@ -126,7 +127,7 @@ void CloseCOM(void);
// LinuxLNK global
int fd;
-#ifdef IS_SOLARIS
+#ifndef HAVE_CFMAKERAW
int cfmakeraw(struct termios *termios_p)
{
termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP