| 
									
										
										
										
											2023-02-08 18:12:00 +01:00
										 |  |  | /* PipeWire */ | 
					
						
							|  |  |  | /* SPDX-FileCopyrightText: Copyright © 2021 Red Hat, Inc. */ | 
					
						
							|  |  |  | /* SPDX-License-Identifier: MIT */ | 
					
						
							| 
									
										
										
										
											2021-06-10 08:33:36 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "config.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-03 18:52:54 +01:00
										 |  |  | #ifndef HAVE_SIGABBREV_NP
 | 
					
						
							| 
									
										
										
										
											2021-06-10 08:33:36 +10:00
										 |  |  | #include <stddef.h>
 | 
					
						
							|  |  |  | #include <signal.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* glibc >= 2.32 */ | 
					
						
							|  |  |  | static inline const char *sigabbrev_np(int sig) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | #define SIGABBREV(a_) case SIG##a_: return #a_
 | 
					
						
							|  |  |  | 	switch(sig) { | 
					
						
							|  |  |  | 	SIGABBREV(INT); | 
					
						
							|  |  |  | 	SIGABBREV(ABRT); | 
					
						
							|  |  |  | 	SIGABBREV(BUS); | 
					
						
							|  |  |  | 	SIGABBREV(SEGV); | 
					
						
							|  |  |  | 	SIGABBREV(ALRM); | 
					
						
							|  |  |  | 	SIGABBREV(CHLD); | 
					
						
							|  |  |  | 	SIGABBREV(HUP); | 
					
						
							|  |  |  | 	SIGABBREV(PIPE); | 
					
						
							|  |  |  | 	SIGABBREV(CONT); | 
					
						
							|  |  |  | 	SIGABBREV(STOP); | 
					
						
							|  |  |  | 	SIGABBREV(ILL); | 
					
						
							|  |  |  | 	SIGABBREV(KILL); | 
					
						
							|  |  |  | 	SIGABBREV(TERM); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | #undef SIGABBREV
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	return NULL; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* HAVE_SIGABBREV_NP */
 |