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



commit 4f3d2d0f80c373a44c47e269f24fb76b7c2262a1
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 98f3d7f..1870dc5 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>
@@ -1504,6 +1506,8 @@ static gchar*
 read_hidden_passwd (void)
 {
 	gchar *p, password [100];
+
+#ifndef G_OS_WIN32
 	int fail;
 	struct termios termio;
 	
@@ -1515,10 +1519,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]