This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: ‘SIG_SETMASK’ and -std=c99


On 8/6/2017 10:51 AM, Marco Atzeri wrote:
On 06/08/2017 11:44, Achim Gratz wrote:
The "-std=c*" options are not meant to expose any symbols that are not
defined in the respective C standard.  You almost always want to use
"-std=gnu*" instead if you target POSIX-y systems.

formally you are right. However it seems that Cygwin is now
more stringent than Linux where this problem does not arise.

That's not what I see on Linux (Scientific Linux 7.2):

$ cat test.c
#include <signal.h>
#include <stdio.h>

int
main ()
{
#ifdef SIG_SETMASK
  printf ("SIG_SETMASK is defined.\n");
#else
  printf ("SIG_SETMASK is not defined.\n");
#endif
}

$ gcc -o test test.c

$ gcc -std=c99 -o test_c99 test.c

$ ./test
SIG_SETMASK is defined.

$ ./test_c99
SIG_SETMASK is not defined.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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