This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Using POSIX functions in Cygwin?
- To: cygwin at cygwin dot com
- Subject: Re: Using POSIX functions in Cygwin?
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Fri, 3 Aug 2001 17:43:14 -0400
- Cc: mmillard at vidiom dot com
- References: <NEBBLGKNALOEJBHDHMENCEEDCGAA.mmillard@vidiom.com>
- Reply-To: cygwin at cygwin dot com
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/