diff mbox series

[1/2] Hurd: Use __sigmask in favor of deprecated sigmask

Message ID 87zh9smn3a.fsf@totally-fudged-out-message-id
State Committed
Headers show
Series [1/2] Hurd: Use __sigmask in favor of deprecated sigmask | expand

Commit Message

Florian Weimer May 28, 2020, 9:22 a.m. UTC
This fixes various build errors due to deprecation warnings.

Fixes commit 02802fafcf6e11ea3f998f685035ffe568dfddeb
("signal: Deprecate additional legacy signal handling functions").

---
 hurd/catch-signal.c               | 10 +++++-----
 hurd/hurd/sigpreempt.h            |  2 +-
 hurd/hurdfault.h                  |  2 +-
 hurd/hurdsig.c                    |  4 ++--
 sysdeps/generic/sigset-cvt-mask.h |  4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

Comments

Samuel Thibault May 28, 2020, 9:31 a.m. UTC | #1
Florian Weimer, le jeu. 28 mai 2020 11:22:51 +0200, a ecrit:
> This fixes various build errors due to deprecation warnings.
> 
> Fixes commit 02802fafcf6e11ea3f998f685035ffe568dfddeb
> ("signal: Deprecate additional legacy signal handling functions").

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  hurd/catch-signal.c               | 10 +++++-----
>  hurd/hurd/sigpreempt.h            |  2 +-
>  hurd/hurdfault.h                  |  2 +-
>  hurd/hurdsig.c                    |  4 ++--
>  sysdeps/generic/sigset-cvt-mask.h |  4 ++--
>  5 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/hurd/catch-signal.c b/hurd/catch-signal.c
> index 67667443a5..059a8690f6 100644
> --- a/hurd/catch-signal.c
> +++ b/hurd/catch-signal.c
> @@ -84,7 +84,7 @@ hurd_safe_memset (void *dest, int byte, size_t nbytes)
>        memset (dest, byte, nbytes);
>        return 0;
>      }
> -  return __hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
> +  return __hurd_catch_signal (__sigmask (SIGBUS) | __sigmask (SIGSEGV),
>  			      (vm_address_t) dest, (vm_address_t) dest + nbytes,
>  			      &operate, SIG_ERR);
>  }
> @@ -98,7 +98,7 @@ hurd_safe_copyout (void *dest, const void *src, size_t nbytes)
>        memcpy (dest, src, nbytes);
>        return 0;
>      }
> -  return __hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
> +  return __hurd_catch_signal (__sigmask (SIGBUS) | __sigmask (SIGSEGV),
>  			      (vm_address_t) dest, (vm_address_t) dest + nbytes,
>  			      &operate, SIG_ERR);
>  }
> @@ -111,7 +111,7 @@ hurd_safe_copyin (void *dest, const void *src, size_t nbytes)
>        memcpy (dest, src, nbytes);
>        return 0;
>      }
> -  return __hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
> +  return __hurd_catch_signal (__sigmask (SIGBUS) | __sigmask (SIGSEGV),
>  			      (vm_address_t) src, (vm_address_t) src + nbytes,
>  			      &operate, SIG_ERR);
>  }
> @@ -125,13 +125,13 @@ hurd_safe_memmove (void *dest, const void *src, size_t nbytes)
>  
>    struct hurd_signal_preemptor src_preemptor =
>      {
> -      sigmask (SIGBUS) | sigmask (SIGSEGV),
> +      __sigmask (SIGBUS) | __sigmask (SIGSEGV),
>        (vm_address_t) src, (vm_address_t) src + nbytes,
>        NULL, (sighandler_t) &throw,
>      };
>    struct hurd_signal_preemptor dest_preemptor =
>      {
> -      sigmask (SIGBUS) | sigmask (SIGSEGV),
> +      __sigmask (SIGBUS) | __sigmask (SIGSEGV),
>        (vm_address_t) dest, (vm_address_t) dest + nbytes,
>        NULL, (sighandler_t) &throw,
>        &src_preemptor
> diff --git a/hurd/hurd/sigpreempt.h b/hurd/hurd/sigpreempt.h
> index 2591c472d3..4ab5b1369f 100644
> --- a/hurd/hurd/sigpreempt.h
> +++ b/hurd/hurd/sigpreempt.h
> @@ -51,7 +51,7 @@ struct hurd_signal_preemptor
>    };
>  
>  #define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
> -  (((preemptor)->signals & sigmask (signo)) \
> +  (((preemptor)->signals & __sigmask (signo)) \
>     && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
>  
>  
> diff --git a/hurd/hurdfault.h b/hurd/hurdfault.h
> index 61ccc785e5..a83717222e 100644
> --- a/hurd/hurdfault.h
> +++ b/hurd/hurdfault.h
> @@ -43,7 +43,7 @@ extern struct hurd_signal_preemptor _hurdsig_fault_preemptor;
>  
>  
>  #define _hurdsig_catch_memory_fault(object) \
> -  _hurdsig_catch_fault (sigmask (SIGSEGV) | sigmask (SIGBUS), \
> +  _hurdsig_catch_fault (__sigmask (SIGSEGV) | __sigmask (SIGBUS), \
>  			(object), (object) + 1)
>  
>  
> diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
> index a2741bb7c8..1d0ec0d19a 100644
> --- a/hurd/hurdsig.c
> +++ b/hurd/hurdsig.c
> @@ -595,8 +595,8 @@ sigset_t _hurdsig_preempted_set;
>  weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
>  
>  /* Mask of stop signals.  */
> -#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) \
> -		  | sigmask (SIGSTOP) | sigmask (SIGTSTP))
> +#define STOPSIGS (__sigmask (SIGTTIN) | __sigmask (SIGTTOU) \
> +		  | __sigmask (SIGSTOP) | __sigmask (SIGTSTP))
>  
>  /* Actual delivery of a single signal.  Called with SS unlocked.  When
>     the signal is delivered, return SS, locked (or, if SS was originally
> diff --git a/sysdeps/generic/sigset-cvt-mask.h b/sysdeps/generic/sigset-cvt-mask.h
> index 16c655d8e9..ad2a4a4337 100644
> --- a/sysdeps/generic/sigset-cvt-mask.h
> +++ b/sysdeps/generic/sigset-cvt-mask.h
> @@ -37,7 +37,7 @@ sigset_set_old_mask (sigset_t *set, int mask)
>  	return -1;
>  
>        for (__sig = 1; __sig < NSIG && __sig <= sizeof (mask) * 8; __sig++)
> -	if (mask & sigmask (__sig))
> +	if (mask & __sigmask (__sig))
>  	  if (__sigaddset (set, __sig) < 0)
>  	    return -1;
>      }
> @@ -58,7 +58,7 @@ sigset_get_old_mask (const sigset_t *set)
>  
>        for (sig = 1; sig < NSIG && sig <= sizeof (mask) * 8; sig++)
>  	if (__sigismember (set, sig))
> -	  mask |= sigmask (sig);
> +	  mask |= __sigmask (sig);
>  
>        return mask;
>      }
> -- 
> 2.20.1
> 
>
diff mbox series

Patch

diff --git a/hurd/catch-signal.c b/hurd/catch-signal.c
index 67667443a5..059a8690f6 100644
--- a/hurd/catch-signal.c
+++ b/hurd/catch-signal.c
@@ -84,7 +84,7 @@  hurd_safe_memset (void *dest, int byte, size_t nbytes)
       memset (dest, byte, nbytes);
       return 0;
     }
-  return __hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
+  return __hurd_catch_signal (__sigmask (SIGBUS) | __sigmask (SIGSEGV),
 			      (vm_address_t) dest, (vm_address_t) dest + nbytes,
 			      &operate, SIG_ERR);
 }
@@ -98,7 +98,7 @@  hurd_safe_copyout (void *dest, const void *src, size_t nbytes)
       memcpy (dest, src, nbytes);
       return 0;
     }
-  return __hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
+  return __hurd_catch_signal (__sigmask (SIGBUS) | __sigmask (SIGSEGV),
 			      (vm_address_t) dest, (vm_address_t) dest + nbytes,
 			      &operate, SIG_ERR);
 }
@@ -111,7 +111,7 @@  hurd_safe_copyin (void *dest, const void *src, size_t nbytes)
       memcpy (dest, src, nbytes);
       return 0;
     }
-  return __hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
+  return __hurd_catch_signal (__sigmask (SIGBUS) | __sigmask (SIGSEGV),
 			      (vm_address_t) src, (vm_address_t) src + nbytes,
 			      &operate, SIG_ERR);
 }
@@ -125,13 +125,13 @@  hurd_safe_memmove (void *dest, const void *src, size_t nbytes)
 
   struct hurd_signal_preemptor src_preemptor =
     {
-      sigmask (SIGBUS) | sigmask (SIGSEGV),
+      __sigmask (SIGBUS) | __sigmask (SIGSEGV),
       (vm_address_t) src, (vm_address_t) src + nbytes,
       NULL, (sighandler_t) &throw,
     };
   struct hurd_signal_preemptor dest_preemptor =
     {
-      sigmask (SIGBUS) | sigmask (SIGSEGV),
+      __sigmask (SIGBUS) | __sigmask (SIGSEGV),
       (vm_address_t) dest, (vm_address_t) dest + nbytes,
       NULL, (sighandler_t) &throw,
       &src_preemptor
diff --git a/hurd/hurd/sigpreempt.h b/hurd/hurd/sigpreempt.h
index 2591c472d3..4ab5b1369f 100644
--- a/hurd/hurd/sigpreempt.h
+++ b/hurd/hurd/sigpreempt.h
@@ -51,7 +51,7 @@  struct hurd_signal_preemptor
   };
 
 #define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
-  (((preemptor)->signals & sigmask (signo)) \
+  (((preemptor)->signals & __sigmask (signo)) \
    && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
 
 
diff --git a/hurd/hurdfault.h b/hurd/hurdfault.h
index 61ccc785e5..a83717222e 100644
--- a/hurd/hurdfault.h
+++ b/hurd/hurdfault.h
@@ -43,7 +43,7 @@  extern struct hurd_signal_preemptor _hurdsig_fault_preemptor;
 
 
 #define _hurdsig_catch_memory_fault(object) \
-  _hurdsig_catch_fault (sigmask (SIGSEGV) | sigmask (SIGBUS), \
+  _hurdsig_catch_fault (__sigmask (SIGSEGV) | __sigmask (SIGBUS), \
 			(object), (object) + 1)
 
 
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index a2741bb7c8..1d0ec0d19a 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -595,8 +595,8 @@  sigset_t _hurdsig_preempted_set;
 weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
 
 /* Mask of stop signals.  */
-#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) \
-		  | sigmask (SIGSTOP) | sigmask (SIGTSTP))
+#define STOPSIGS (__sigmask (SIGTTIN) | __sigmask (SIGTTOU) \
+		  | __sigmask (SIGSTOP) | __sigmask (SIGTSTP))
 
 /* Actual delivery of a single signal.  Called with SS unlocked.  When
    the signal is delivered, return SS, locked (or, if SS was originally
diff --git a/sysdeps/generic/sigset-cvt-mask.h b/sysdeps/generic/sigset-cvt-mask.h
index 16c655d8e9..ad2a4a4337 100644
--- a/sysdeps/generic/sigset-cvt-mask.h
+++ b/sysdeps/generic/sigset-cvt-mask.h
@@ -37,7 +37,7 @@  sigset_set_old_mask (sigset_t *set, int mask)
 	return -1;
 
       for (__sig = 1; __sig < NSIG && __sig <= sizeof (mask) * 8; __sig++)
-	if (mask & sigmask (__sig))
+	if (mask & __sigmask (__sig))
 	  if (__sigaddset (set, __sig) < 0)
 	    return -1;
     }
@@ -58,7 +58,7 @@  sigset_get_old_mask (const sigset_t *set)
 
       for (sig = 1; sig < NSIG && sig <= sizeof (mask) * 8; sig++)
 	if (__sigismember (set, sig))
-	  mask |= sigmask (sig);
+	  mask |= __sigmask (sig);
 
       return mask;
     }