summaryrefslogtreecommitdiff
path: root/net/gftp/patches/patch-ac
blob: 2088f263641c53313e31ef7f86ac43fac8163007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-ac,v 1.1 2005/03/02 20:43:21 tron Exp $

--- src/text/gftp-text.c.orig	2005-01-25 01:11:00.000000000 +0000
+++ src/text/gftp-text.c	2005-03-02 20:32:41.000000000 +0000
@@ -155,7 +155,9 @@
 gftp_text_ask_question (const char *question, int echo, char *buf, size_t size)
 {
   struct termios term, oldterm;
+#if GLIB_MAJOR_VERSION > 1
   gchar *locale_question;
+#endif
   sigset_t sig, sigsave;
   char *pos, *termname;
   int singlechar;
@@ -185,6 +187,7 @@
   else
     infd = stdin;
 
+#if GLIB_MAJOR_VERSION > 1
   locale_question = g_locale_from_utf8 (question, -1, NULL, NULL, NULL);
   if (locale_question != NULL)
     {
@@ -193,6 +196,7 @@
       g_free (locale_question);
     }
   else
+#endif
     printf ("%s%s%s ", GFTPUI_COMMON_COLOR_BLUE, question,
             GFTPUI_COMMON_COLOR_DEFAULT);