From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: sigaddset, sigdelset, sigmasks "wrong" in cygwin32 6 May 1998 16:47:49 -0700 Message-ID: <199805062319.TAA00935.cygnus.cygwin32.developers@kramden.cygnus.com> To: cgf AT cygnus DOT com, noer AT cygnus DOT com Cc: cygwin32-developers AT cygnus DOT com, gnu-win32-local AT cygnus DOT com >From: Geoffrey Noer >Date: Wed, 6 May 1998 15:59:00 -0700 (PDT) > >Christopher Faylor wrote: >> >> A net user has just brought to my attention the fact that there is, >> for some reason, macros in /usr/include/sys/signal.h which implement >> sigaddset and sigdelset. This is clearly wrong as there are library >> routines to handle this and the macro does no bounds checking. > >I looked in the POSIX standard and it doesn't seem to specify that >sigaddset and sigdelset be macros. The O'Reilly POSIX book doesn't >say one way or another either. The "Single UNIX Specification" refers to sigaddset, sigdelset, and sigismember as "functions". It also mentions that they set errno is set which the macros don't do. This is a generic newlib problem, actually. There is a macro for sigaddset which does not correspond with a function in libc/unix/sigset.c. I was mistaken in saying that sigdelset was a macro, btw. It is only sigaddset and sigemptyset. I'm not sure what to do. If we make this change now, that means that if we release B19.2 we'll also have to release every binary that uses sigaddset, sigdelset, etc. The current macro implementation is wrong and the current implementation in winsup is wron. I'm surprised that this hasn't broken something somewhere... cgf