~ubuntu-branches/ubuntu/trusty/glib2.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gio/tests/gtlsconsoleinteraction.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-05-14 14:00:47 UTC
  • mfrom: (1.63.19) (172.1.10 experimental)
  • Revision ID: package-import@ubuntu.com-20130514140047-0idsmbto2pmdhlmf
Tags: 2.37.0-0ubuntu1
* New upstream release
  + GApplication has gained a busy state. This feature is intended for
    clients that want to signal a desktop shell their busy state, for instance
    because a long-running operation is pending.
  + GLib can now be built with the bionic C library
  + GIcon can now be serialized to a GVariant
* debian/patches/git_dont_break_bindings,
  debian/patches/15_gio_desktop_app_info_test_bin_true_path.patch,
  debian/patches/17_check_abis_mips_symbols.patch: Dropped, upstream. 
* Update symbols file for this release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "config.h"
24
24
 
25
25
#include <glib.h>
 
26
#include <glib/gprintf.h>
26
27
#include <string.h>
27
28
 
28
29
#ifdef G_OS_WIN32
29
 
#include <glib/gprintf.h>
30
30
#include <conio.h>
31
31
#endif
32
32
 
40
40
 
41
41
G_DEFINE_TYPE (GTlsConsoleInteraction, g_tls_console_interaction, G_TYPE_TLS_INTERACTION);
42
42
 
43
 
#ifdef G_OS_WIN32
 
43
#if defined(G_OS_WIN32) || defined(__BIONIC__)
44
44
/* win32 doesn't have getpass() */
 
45
#include <stdio.h>
 
46
#ifndef BUFSIZ
 
47
#define BUFSIZ 8192
 
48
#endif
45
49
static gchar *
46
50
getpass (const gchar *prompt)
47
51
{
53
57
 
54
58
  for (i = 0; i < BUFSIZ - 1; ++i)
55
59
    {
 
60
#ifdef __BIONIC__
 
61
      buf[i] = getc (stdin);
 
62
#else
56
63
      buf[i] = _getch ();
 
64
#endif
57
65
      if (buf[i] == '\r')
58
66
        break;
59
67
    }