[gtk-vnc] build: remove checks for pwd.h and termios.h



commit 7d81cddb877804952deaf51a6cabe08d94598fd5
Author: Daniel P. Berrangé <berrange redhat com>
Date:   Mon Aug 5 16:39:44 2019 +0100

    build: remove checks for pwd.h and termios.h
    
    Simply use a win32 platform check for these headers
    
    Signed-off-by: Daniel P. Berrangé <berrange redhat com>

 configure.ac        | 2 --
 src/vncconnection.c | 4 ++--
 tools/gvnccapture.c | 5 +++--
 3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 75236fa..d22bcc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,8 +90,6 @@ AC_SUBST([GTK_API_VERSION])
 AC_SUBST([GTK_REQUIRED])
 AC_SUBST([GTK_VNC_API_VERSION])
 
-AC_CHECK_HEADERS([pwd.h termios.h])
-
 GTK_VNC_COMPILE_WARNINGS
 
 AC_ARG_WITH(examples,
diff --git a/src/vncconnection.c b/src/vncconnection.c
index ffecf02..c43861e 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -48,7 +48,7 @@
 #include <sasl/sasl.h>
 #endif
 
-#ifdef HAVE_PWD_H
+#ifndef G_OS_WIN32
 #include <pwd.h>
 #endif
 
@@ -5919,7 +5919,7 @@ static gboolean vnc_connection_set_credential_x509(VncConnection *conn,
     VncConnectionPrivate *priv = conn->priv;
     char *sysdir = g_strdup_printf("%s/pki", SYSCONFDIR);
     int ret;
-#ifndef WIN32
+#ifndef G_OS_WIN32
     struct passwd *pw;
 
     if (!(pw = getpwuid(getuid())))
diff --git a/tools/gvnccapture.c b/tools/gvnccapture.c
index c830ca4..9bbf449 100644
--- a/tools/gvnccapture.c
+++ b/tools/gvnccapture.c
@@ -89,7 +89,8 @@ vinagre(1)
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#ifdef HAVE_TERMIOS_H
+#include <glib.h>
+#ifndef G_OS_WIN32
 #include <termios.h>
 #endif
 #include <unistd.h>
@@ -136,7 +137,7 @@ static const guint preferable_auths[] = {
 };
 
 
-#ifdef HAVE_TERMIOS_H
+#ifndef G_OS_WIN32
 static gchar *
 do_vnc_get_credential(const gchar *prompt, gboolean doecho)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]