Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Sun, 12 Nov 2000 15:35:46 -0500
From: Christopher Faylor <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: serial programming HOWTO
Message-ID: <20001112153546.A31042@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <000901c04ce6$85ea7ca0$0201a8c0@mark>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.6i
In-Reply-To: <000901c04ce6$85ea7ca0$0201a8c0@mark>; from f.wagner@gmx.net on Sun, Nov 12, 2000 at 09:24:12PM +0100

On Sun, Nov 12, 2000 at 09:24:12PM +0100, Frank Wagner wrote:
>I encountered something confusing.
>This part of c-sourccode is from the asynchronous input example included
>in the serial programming HOWTO document:
>
> /* install the signal handler before making the device asynchronous */
> saio.sa_handler = signal_handler_IO;
> saio.sa_mask = 0;
> saio.sa_flags = 0;
> saio.sa_restorer = NULL;
> sigaction(SIGIO,&saio,NULL);
>
>I tried to compile this example under Win95 with cygwin and got the
>following error:
>
>  ! program.c:41: structure has no member named `sa_restorer'
>
>OK. There was no declaration of "sa_restorer" in the file /sys/signal.h.
>Why?

From the linux man page:

       "The sa_restorer element is  obsolete  and  should  not  be
       used."

It's also not mentioned in the Single UNIX Specification.

>After that I tried to compile that example under Linux and got the
>follwing error message
>
>program.c: 39 incompatible types in assignment --dir=.
>
>that refers to the folloing line of the source:
>
> saio.sa_mask = 0;
>
>Why do I get a error message form an example that is written for linux?

Because cygwin is not linux?  The above use of saio.sa_mask is
incorrect.  You should be using sigemptyset() to clear the mask.  This
will also work on linux.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

