[libgda] Don't try to use termios.h on Windows



commit 854b0a41b1a95ae4897c7b75b7a8ab05ba958ea7
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Jun 7 21:28:16 2010 +0200

    Don't try to use termios.h on Windows

 tools/gda-sql.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tools/gda-sql.c b/tools/gda-sql.c
index 465e142..5c4da5b 100644
--- a/tools/gda-sql.c
+++ b/tools/gda-sql.c
@@ -31,7 +31,9 @@
 #include "tools-input.h"
 #include "command-exec.h"
 #include <unistd.h>
+#ifndef G_OS_WIN32
 #include <termios.h>
+#endif
 #include <sys/types.h>
 #include <libgda/gda-quark-list.h>
 #include <libgda/gda-meta-struct.h>
@@ -1514,6 +1516,8 @@ static gchar*
 read_hidden_passwd (void)
 {
 	gchar *p, password [100];
+
+#ifndef G_OS_WIN32
 	int fail;
 	struct termios termio;
 	
@@ -1525,10 +1529,14 @@ read_hidden_passwd (void)
 	fail = tcsetattr (0, TCSANOW, &termio);
 	if (fail)
 		return NULL;
+#endif
 	
 	p = fgets (password, sizeof (password) - 1, stdin);
+
+#ifndef G_OS_WIN32
 	termio.c_lflag |= ECHO;
 	tcsetattr (0, TCSANOW, &termio);
+#endif
 	
 	if (!p)
 		return NULL;



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