delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/24/16:22:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: Wed, 24 Mar 2004 13:21:45 -0800 (PST)
From: "Curt, WE7U" <archer AT eskimo DOT com>
Reply-To: "Curt Mills, WE7U" <archer AT eskimo DOT com>
To: cygwin AT cygwin DOT com
cc: "Curt Mills, WE7U" <archer AT eskimo DOT com>
Subject: "test -c com1" hangs on some WinXP systems
Message-ID: <Pine.SUN.4.58.0403241253000.26969@eskimo.com>
MIME-Version: 1.0
X-IsSubscribed: yes

Our application runs on multiple OS'es.  A few of our WinXP users
(and perhaps Win2k, can't remember) have had "if test -c com1" hang
during our configure stage.

We've already figured out that we should be using "/dev/ttyS0"
instead of "com1", and have switched to that.  Because of the hang
we're trying "if test -d /proc/registry as the test".  If
/proc/registry is found, we skip the file test for the serial device
on Cygwin boxes, thereby avoiding the hang.

Excerpt (the version that hangs sometimes):


  AC_DEFUN([XASTIR_DETECT_DEVICES],
  [
  AC_MSG_CHECKING([for devices])
  if test -c com1 ; then
  ac_tnc_port=com1
  ac_gps_port=com2
  elif test -c /dev/cuaa0 ; then
  ac_tnc_port=/dev/cuaa0
  ac_gps_port=/dev/cuaa1


New improved version:


  AC_DEFUN([XASTIR_DETECT_DEVICES],
  [
  AC_MSG_CHECKING([for devices])
  if test -d /proc/registry ; then
  ac_tnc_port=/dev/ttyS0
  ac_gps_port=/dev/ttyS1
  elif test -c /dev/cuaa0 ; then
  ac_tnc_port=/dev/cuaa0
  ac_gps_port=/dev/cuaa1


Should "if test -c com1" or "if test -c /dev/ttyS0" work on Cygwin
across all Windows platforms it supports?

We'd rather do "if test -c /dev/ttyS0" if possible, so that it's
similar across all platforms we support.

--
Curt, WE7U			    archer at eskimo dot com
Arlington, WA, USA		http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"

--
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