delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/07/10:44:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 7 Sep 2004 16:44:50 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
Message-ID: <1055102949.20040907164450@familiehaase.de>
To: Martin Haendler <Extern DOT Haendler AT kmweg DOT de>
CC: cygwin AT cygwin DOT com
Subject: Re: Ada: Text_Io.Get_Immediate() is blocking
In-Reply-To: <413DBF55.3050909@kmweg.de>
References: <413DBF55 DOT 3050909 AT kmweg DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes

Hallo Martin,

Am Dienstag, 7. September 2004 um 16:01 schriebst du:

> Hi,
> I'm working with ADA and Windows2000/Cygwin.

> A call to Text_Io.Get_Immediate() should return even if there is no 
> input waiting. I have no problems with Linux, but trying to shift 
> Software to Windows brings me into trouble: If there is no input 
> waiting, the call is blocking.

> Here is a simple example:
> (Save it as "keyboardtest.adb" and call "gnatmake keyboardtest".)
> ===================================================
> with Text_Io;
> procedure Keyboardtest is
>     Char : Character := ' ';
>     Key_Pressed : Boolean := False;
> begin
>     Text_Io.Get_Immediate(Char, Key_Pressed);
>     if Key_Pressed then
>         Text_Io.Put_Line("[" & Char & "]");
>     end if;
> end Keyboardtest;
> ===================================================

> With Linux (gcc version 3.2.3, GNAT Pro 5.02a) this program terminates
> immediately which is the correct behaviour. With Win2000/Cygwin it waits
> until a key is pressed, prints out the key and then terminates.

> "gcc -v" says:
> Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
> Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld
> --with-gnu-as --prefix=/usr --exec-prefix=/u
> sr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/sbin 
> --mandir=/usr/share/man --infodir=/usr/share/info -
> -enable-languages=c,ada,c++,f77,pascal,java,objc --enable-libgcj 
> --enable-threads=posix --with-system-zlib --enab
> le-nls --without-included-gettext --enable-interpreter 
> --enable-sjlj-exceptions --disable-version-specific-runtim
> e-libs --enable-shared --disable-win32-registry --enable-java-gc=boehm
> --disable-hash-synchronization --verbose -
> -target=i686-pc-cygwin --host=i686-pc-cygwin --build=i686-pc-cygwin
> Thread model: posix
> gcc version 3.3.1 (cygming special)

> "gnat" says:
> GNAT 3.3.1 (cygming special) Copyright 1996-2002 Free Software 
> Foundation, Inc.

> Do you know any solution or workaround? Thank you!!!


Please upgrade to gcc-3.3.3 or try the test release gcc-3.4
(experimental button in setup.exe installer).


Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019