bug-make
[Top][All Lists]
Advanced

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

[bug #58743] siggetmask should be called with no arguments.


From: anonymous
Subject: [bug #58743] siggetmask should be called with no arguments.
Date: Fri, 10 Jul 2020 02:28:56 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.61

URL:
  <https://savannah.gnu.org/bugs/?58743>

                 Summary: siggetmask should be called with no arguments.
                 Project: make
            Submitted by: None
            Submitted on: Fri 10 Jul 2020 06:28:55 AM UTC
                Severity: 3 - Normal
              Item Group: Build/Install
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.3
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Hi,

Porting make with tcc compiler on Linux, I’ve found that siggetmask is
called with argument 0 while it accepts none (see src/jobs.c)

It is defined in <signal.h> as:
extern int siggetmask (void) __THROW __attribute_deprecated__;

But src/jobs.c calls it this way.
static void
unblock_sigs ()
{
  sigsetmask (siggetmask (0) & ~fatal_signal_mask)
}

And tcc complains (with reasons):
src/job.c:507: error: too many arguments to function

Adding –Wall –Wextra also helps gcc to complain

Please note that sig[sg]etmask functions are deprecated.

While sigsetmask seems to always be defined with no arg, man siggetmask shows
an int argument on Debian while it is removed in more recent Linux man pages
like Fedora 32.

Changing siggetmask(0) to siggetmask() lets tcc to terminate compilation with
a working make (I recompiled make with this one compiled by tcc).

Christian Jullien





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58743>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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