[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signals on Mingw

From: Bruno Haible
Subject: Re: Signals on Mingw
Date: Sun, 22 Nov 2020 23:47:45 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; )

Hi Reuben,

> I find that it is necessary to #define _POSIX to get a full set of POSIX
> signal names defined in mingw's signal.h. I'm slightly surprised to find
> this is not implemented in gnulib: is there a reason?
> If not, it would be straightforward to add
> #ifdef __MINGW32__
> #define _POSIX
> #endif
> before the #include of the system signal.h
> in signal.in.h.

Two questions to consider:

  - What other effects would it have to define '_POSIX' ? In which other places
    is this macro being referenced?

  - Is it useful to have these signal names defined at all? If they can never
    occur on native Windows, it does not necessarily make sense to define them.
    Because then an application could not conditionalize like this:

      #ifdef SIGFOO
      ... install signal handler for SIGFOO ...

Also consider the workarounds that Gnulib already does, in
doc/posix-headers/signal.texi .


reply via email to

[Prev in Thread] Current Thread [Next in Thread]