Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Fri, 3 Aug 2001 17:43:14 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Cc: mmillard AT vidiom DOT com Subject: Re: Using POSIX functions in Cygwin? Message-ID: <20010803174314.C31097@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, mmillard AT vidiom DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: ; from mmillard@vidiom.com on Fri, Aug 03, 2001 at 03:37:35PM -0600 On Fri, Aug 03, 2001 at 03:37:35PM -0600, Mark S. Millard wrote: >Are there any compiler options to gcc that I need to use in order to use the >POSIX functionality? I'm trying to use sigaction() and I can't resolve SA_* >macros in sys/signal.h without defining __rtems__ (-D__rtems__). This >doesn't seem right. > >Thank you for any help recieved. (That's "received" -- "ei" not "ie") sigaction is part of the cygwin DLL and there are certainly some SA_ macros defined in ~msinclude/sys/signal.h: #define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */ #ifdef __CYGWIN__ # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ # define SA_NODEFER 0x40000000 /* Don't automatically block the signal when its handler is being executed. */ # define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ #endif AFAICT, these are invoked by gcc. If they weren't we wouldn't be able to actually build Cygwin which uses these. I suggest gcc -v to figure out what include files you're using and what flags are being passed. You should see a -D__CYGWIN__ on a command line which should cause these defines to be activated. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/