This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using POSIX functions in Cygwin?

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.  */

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.


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]