Module Name: src Committed By: rillig Date: Sat Sep 12 16:46:24 UTC 2020
Modified Files: src/usr.bin/make: nonints.h util.c Log Message: make(1): add typedef for signal handler Without this typedef, both the declaration and the definition of bmake_signal were as unreadable as the declaration in the signal(3) manual page. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/nonints.h cvs rdiff -u -r1.58 -r1.59 src/usr.bin/make/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/nonints.h diff -u src/usr.bin/make/nonints.h:1.113 src/usr.bin/make/nonints.h:1.114 --- src/usr.bin/make/nonints.h:1.113 Sat Sep 12 16:38:19 2020 +++ src/usr.bin/make/nonints.h Sat Sep 12 16:46:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.113 2020/09/12 16:38:19 rillig Exp $ */ +/* $NetBSD: nonints.h,v 1.114 2020/09/12 16:46:24 rillig Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -225,4 +225,5 @@ void Var_Export(const char *, Boolean); void Var_UnExport(const char *); /* util.c */ -void (*bmake_signal(int, void (*)(int)))(int); +typedef void (*SignalProc)(int); +SignalProc bmake_signal(int, SignalProc); Index: src/usr.bin/make/util.c diff -u src/usr.bin/make/util.c:1.58 src/usr.bin/make/util.c:1.59 --- src/usr.bin/make/util.c:1.58 Sat Aug 1 14:47:49 2020 +++ src/usr.bin/make/util.c Sat Sep 12 16:46:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.58 2020/08/01 14:47:49 rillig Exp $ */ +/* $NetBSD: util.c,v 1.59 2020/09/12 16:46:24 rillig Exp $ */ /* * Missing stuff from OS's @@ -8,11 +8,11 @@ #endif #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: util.c,v 1.58 2020/08/01 14:47:49 rillig Exp $"; +static char rcsid[] = "$NetBSD: util.c,v 1.59 2020/09/12 16:46:24 rillig Exp $"; #else #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: util.c,v 1.58 2020/08/01 14:47:49 rillig Exp $"); +__RCSID("$NetBSD: util.c,v 1.59 2020/09/12 16:46:24 rillig Exp $"); #endif #endif @@ -339,8 +339,8 @@ getwd(char *pathname) #endif /* __hpux */ /* force posix signals */ -void (* -bmake_signal(int s, void (*a)(int)))(int) +SignalProc +bmake_signal(int s, SignalProc a) { struct sigaction sa, osa;