Module Name: src Committed By: joerg Date: Tue Jun 12 19:21:51 UTC 2012
Modified Files: src/usr.bin/make: arch.c cond.c dir.c job.c main.c make.c make.h make_malloc.c nonints.h parse.c targ.c var.c Log Message: Replace __dead, __unused and the various printf format attributes with versions prefixed by MAKE_ATTR_* to avoid modifying the implementation namespace. Make sure they are available in all places using nonints.h to fix bootstrap on Linux. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/usr.bin/make/arch.c cvs rdiff -u -r1.63 -r1.64 src/usr.bin/make/cond.c src/usr.bin/make/nonints.h cvs rdiff -u -r1.64 -r1.65 src/usr.bin/make/dir.c cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/job.c cvs rdiff -u -r1.199 -r1.200 src/usr.bin/make/main.c cvs rdiff -u -r1.86 -r1.87 src/usr.bin/make/make.c cvs rdiff -u -r1.88 -r1.89 src/usr.bin/make/make.h cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/make_malloc.c cvs rdiff -u -r1.184 -r1.185 src/usr.bin/make/parse.c cvs rdiff -u -r1.56 -r1.57 src/usr.bin/make/targ.c cvs rdiff -u -r1.170 -r1.171 src/usr.bin/make/var.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/arch.c diff -u src/usr.bin/make/arch.c:1.62 src/usr.bin/make/arch.c:1.63 --- src/usr.bin/make/arch.c:1.62 Sat Nov 27 16:00:09 2010 +++ src/usr.bin/make/arch.c Tue Jun 12 19:21:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.62 2010/11/27 16:00:09 christos Exp $ */ +/* $NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.62 2010/11/27 16:00:09 christos Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.62 2010/11/27 16:00:09 christos Exp $"); +__RCSID("$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -1029,7 +1029,7 @@ Arch_Touch(GNode *gn) */ void #if !defined(RANLIBMAG) -Arch_TouchLib(GNode *gn __unused) +Arch_TouchLib(GNode *gn MAKE_ATTR_UNUSED) #else Arch_TouchLib(GNode *gn) #endif Index: src/usr.bin/make/cond.c diff -u src/usr.bin/make/cond.c:1.63 src/usr.bin/make/cond.c:1.64 --- src/usr.bin/make/cond.c:1.63 Mon May 21 06:30:02 2012 +++ src/usr.bin/make/cond.c Tue Jun 12 19:21:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.63 2012/05/21 06:30:02 sjg Exp $ */ +/* $NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.63 2012/05/21 06:30:02 sjg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.63 2012/05/21 06:30:02 sjg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -327,7 +327,7 @@ CondGetArg(char **linePtr, char **argPtr *----------------------------------------------------------------------- */ static Boolean -CondDoDefined(int argLen __unused, const char *arg) +CondDoDefined(int argLen MAKE_ATTR_UNUSED, const char *arg) { char *p1; Boolean result; @@ -376,7 +376,7 @@ CondStrMatch(const void *string, const v *----------------------------------------------------------------------- */ static Boolean -CondDoMake(int argLen __unused, const char *arg) +CondDoMake(int argLen MAKE_ATTR_UNUSED, const char *arg) { return Lst_Find(create, arg, CondStrMatch) != NULL; } @@ -395,7 +395,7 @@ CondDoMake(int argLen __unused, const ch *----------------------------------------------------------------------- */ static Boolean -CondDoExists(int argLen __unused, const char *arg) +CondDoExists(int argLen MAKE_ATTR_UNUSED, const char *arg) { Boolean result; char *path; @@ -428,7 +428,7 @@ CondDoExists(int argLen __unused, const *----------------------------------------------------------------------- */ static Boolean -CondDoTarget(int argLen __unused, const char *arg) +CondDoTarget(int argLen MAKE_ATTR_UNUSED, const char *arg) { GNode *gn; @@ -452,7 +452,7 @@ CondDoTarget(int argLen __unused, const *----------------------------------------------------------------------- */ static Boolean -CondDoCommands(int argLen __unused, const char *arg) +CondDoCommands(int argLen MAKE_ATTR_UNUSED, const char *arg) { GNode *gn; @@ -790,7 +790,7 @@ done: } static int -get_mpt_arg(char **linePtr, char **argPtr, const char *func __unused) +get_mpt_arg(char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) { /* * Use Var_Parse to parse the spec in parens and return @@ -831,7 +831,7 @@ get_mpt_arg(char **linePtr, char **argPt } static Boolean -CondDoEmpty(int arglen, const char *arg __unused) +CondDoEmpty(int arglen, const char *arg MAKE_ATTR_UNUSED) { return arglen == 1; } Index: src/usr.bin/make/nonints.h diff -u src/usr.bin/make/nonints.h:1.63 src/usr.bin/make/nonints.h:1.64 --- src/usr.bin/make/nonints.h:1.63 Fri Sep 16 15:38:04 2011 +++ src/usr.bin/make/nonints.h Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.63 2011/09/16 15:38:04 joerg Exp $ */ +/* $NetBSD: nonints.h,v 1.64 2012/06/12 19:21:51 joerg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -72,11 +72,6 @@ * from: @(#)nonints.h 8.3 (Berkeley) 3/19/94 */ -#ifndef MAKE_NATIVE -#undef __attribute__ -#define __attribute__(x) -#endif - /* arch.c */ ReturnStatus Arch_ParseArchive(char **, Lst, GNode *); void Arch_Touch(GNode *); @@ -114,21 +109,18 @@ void Main_ParseArgLine(const char *); void MakeMode(const char *); int main(int, char **); char *Cmd_Exec(const char *, const char **); -void Error(const char *, ...) __attribute__((__format__(__printf__, 1, 2))); -void Fatal(const char *, ...) - __attribute__((__format__(__printf__, 1, 2),__noreturn__)); -void Punt(const char *, ...) - __attribute__((__format__(__printf__, 1, 2),__noreturn__)); -void DieHorribly(void) __attribute__((__noreturn__)); +void Error(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2); +void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD; +void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD; +void DieHorribly(void) MAKE_ATTR_DEAD; int PrintAddr(void *, void *); -void Finish(int) __dead; +void Finish(int) MAKE_ATTR_DEAD; int eunlink(const char *); void execError(const char *, const char *); char *getTmpdir(void); /* parse.c */ -void Parse_Error(int, const char *, ...) - __attribute__((__format__(__printf__, 2, 3))); +void Parse_Error(int, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3); Boolean Parse_AnyExport(void); Boolean Parse_IsVar(char *); void Parse_DoVar(char *, GNode *); Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.64 src/usr.bin/make/dir.c:1.65 --- src/usr.bin/make/dir.c:1.64 Sat Apr 7 18:29:08 2012 +++ src/usr.bin/make/dir.c Tue Jun 12 19:21:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.64 2012/04/07 18:29:08 christos Exp $ */ +/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.64 2012/04/07 18:29:08 christos Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.64 2012/04/07 18:29:08 christos Exp $"); +__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -860,8 +860,8 @@ Dir_Expand(const char *word, Lst path, L *----------------------------------------------------------------------- */ static char * -DirLookup(Path *p, const char *name __unused, const char *cp, - Boolean hasSlash __unused) +DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, + Boolean hasSlash MAKE_ATTR_UNUSED) { char *file; /* the current filename to check */ @@ -1004,7 +1004,7 @@ DirLookupAbs(Path *p, const char *name, *----------------------------------------------------------------------- */ static char * -DirFindDot(Boolean hasSlash __unused, const char *name, const char *cp) +DirFindDot(Boolean hasSlash MAKE_ATTR_UNUSED, const char *name, const char *cp) { if (Hash_FindEntry(&dot->files, cp) != NULL) { Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.161 src/usr.bin/make/job.c:1.162 --- src/usr.bin/make/job.c:1.161 Sat Apr 7 18:29:08 2012 +++ src/usr.bin/make/job.c Tue Jun 12 19:21:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.161 2012/04/07 18:29:08 christos Exp $ */ +/* $NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.161 2012/04/07 18:29:08 christos Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.161 2012/04/07 18:29:08 christos Exp $"); +__RCSID("$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -352,7 +352,7 @@ static int JobStart(GNode *, int); static char *JobOutput(Job *, char *, char *, int); static void JobDoOutput(Job *, Boolean); static Shell *JobMatchShell(const char *); -static void JobInterrupt(int, int) __dead; +static void JobInterrupt(int, int) MAKE_ATTR_DEAD; static void JobRestartJobs(void); static void JobTokenAdd(void); static void JobSigLock(sigset_t *); @@ -475,7 +475,7 @@ JobCondPassSig(int signo) *----------------------------------------------------------------------- */ static void -JobChildSig(int signo __unused) +JobChildSig(int signo MAKE_ATTR_UNUSED) { write(childExitJob.outPipe, CHILD_EXIT, 1); } @@ -498,7 +498,7 @@ JobChildSig(int signo __unused) *----------------------------------------------------------------------- */ static void -JobContinueSig(int signo __unused) +JobContinueSig(int signo MAKE_ATTR_UNUSED) { /* * Defer sending to SIGCONT to our stopped children until we return @@ -523,14 +523,14 @@ JobContinueSig(int signo __unused) * *----------------------------------------------------------------------- */ -__dead static void +MAKE_ATTR_DEAD static void JobPassSig_int(int signo) { /* Run .INTERRUPT target then exit */ JobInterrupt(TRUE, signo); } -__dead static void +MAKE_ATTR_DEAD static void JobPassSig_term(int signo) { /* Dont run .INTERRUPT target then exit */ Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.199 src/usr.bin/make/main.c:1.200 --- src/usr.bin/make/main.c:1.199 Tue Apr 24 20:35:04 2012 +++ src/usr.bin/make/main.c Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.199 2012/04/24 20:35:04 sjg Exp $ */ +/* $NetBSD: main.c,v 1.200 2012/06/12 19:21:51 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.199 2012/04/24 20:35:04 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.200 2012/06/12 19:21:51 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.199 2012/04/24 20:35:04 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.200 2012/06/12 19:21:51 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -178,7 +178,7 @@ static const char * tracefile; static char * Check_Cwd_av(int, char **, int); static void MainParseArgs(int, char **); static int ReadMakefile(const void *, const void *); -static void usage(void) __dead; +static void usage(void) MAKE_ATTR_DEAD; static Boolean ignorePWD; /* if we use -C, PWD is meaningless */ static char objdir[MAXPATHLEN + 1]; /* where we chdir'ed to */ @@ -707,7 +707,7 @@ str2Lst_Append(Lst lp, char *str, const #ifdef SIGINFO /*ARGSUSED*/ static void -siginfo(int signo __unused) +siginfo(int signo MAKE_ATTR_UNUSED) { char dir[MAXPATHLEN]; char str[2 * MAXPATHLEN]; @@ -1301,7 +1301,7 @@ main(int argc, char **argv) * lots */ static int -ReadMakefile(const void *p, const void *q __unused) +ReadMakefile(const void *p, const void *q MAKE_ATTR_UNUSED) { const char *fname = p; /* makefile to read */ int fd; Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.86 src/usr.bin/make/make.c:1.87 --- src/usr.bin/make/make.c:1.86 Thu May 10 19:53:26 2012 +++ src/usr.bin/make/make.c Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.86 2012/05/10 19:53:26 christos Exp $ */ +/* $NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.86 2012/05/10 19:53:26 christos Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.86 2012/05/10 19:53:26 christos Exp $"); +__RCSID("$NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -139,7 +139,7 @@ static int MakeCheckOrder(void *, void * static int MakeBuildChild(void *, void *); static int MakeBuildParent(void *, void *); -__dead static void +MAKE_ATTR_DEAD static void make_abort(GNode *gn, int line) { static int two = 2; @@ -867,7 +867,7 @@ Make_Update(GNode *cgn) *----------------------------------------------------------------------- */ static int -MakeUnmark(void *cgnp, void *pgnp __unused) +MakeUnmark(void *cgnp, void *pgnp MAKE_ATTR_UNUSED) { GNode *cgn = (GNode *)cgnp; @@ -1005,7 +1005,7 @@ Make_DoAllVar(GNode *gn) */ static int -MakeCheckOrder(void *v_bn, void *ignore __unused) +MakeCheckOrder(void *v_bn, void *ignore MAKE_ATTR_UNUSED) { GNode *bn = v_bn; Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.88 src/usr.bin/make/make.h:1.89 --- src/usr.bin/make/make.h:1.88 Mon Jun 4 20:34:20 2012 +++ src/usr.bin/make/make.h Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.88 2012/06/04 20:34:20 sjg Exp $ */ +/* $NetBSD: make.h,v 1.89 2012/06/12 19:21:51 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -93,26 +93,33 @@ # include <sys/cdefs.h> #endif -#if !defined(__GNUC_PREREQ__) #if defined(__GNUC__) -#define __GNUC_PREREQ__(x, y) \ +#define MAKE_GNUC_PREREQ(x, y) \ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ (__GNUC__ > (x))) #else /* defined(__GNUC__) */ -#define __GNUC_PREREQ__(x, y) 0 +#define MAKE_GNUC_PREREQx, y) 0 #endif /* defined(__GNUC__) */ -#endif /* !defined(__GNUC_PREREQ__) */ -#if !defined(__unused) -#if __GNUC_PREREQ__(2, 7) -#define __unused __attribute__((__unused__)) +#if MAKE_GNUC_PREREQ(2, 7) +#define MAKE_ATTR_UNUSED __attribute__((__unused__)) #else -#define __unused /* delete */ +#define MAKE_ATTR_UNUSED /* delete */ #endif + +#if MAKE_GNUC_PREREQ(2, 5) +#define MAKE_ATTR_DEAD __attribute__((__noreturn__)) +#elif defined(__GNUC__) +#define MAKE_ATTR_DEAD __volatile +#else +#define MAKE_ATTR_DEAD /* delete */ #endif -#if !defined(__dead) -#define __dead +#if MAKE_GNUC_PREREQ(2, 7) +#define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) \ + __attribute__((__format__ (__printf__, fmtarg, firstvararg))) +#else +#define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) /* delete */ #endif #include "sprite.h" Index: src/usr.bin/make/make_malloc.c diff -u src/usr.bin/make/make_malloc.c:1.8 src/usr.bin/make/make_malloc.c:1.9 --- src/usr.bin/make/make_malloc.c:1.8 Sun Jun 10 21:44:12 2012 +++ src/usr.bin/make/make_malloc.c Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: make_malloc.c,v 1.8 2012/06/10 21:44:12 wiz Exp $ */ +/* $NetBSD: make_malloc.c,v 1.9 2012/06/12 19:21:51 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #ifdef MAKE_NATIVE #include <sys/cdefs.h> -__RCSID("$NetBSD: make_malloc.c,v 1.8 2012/06/10 21:44:12 wiz Exp $"); +__RCSID("$NetBSD: make_malloc.c,v 1.9 2012/06/12 19:21:51 joerg Exp $"); #endif #include <stdio.h> @@ -36,10 +36,11 @@ __RCSID("$NetBSD: make_malloc.c,v 1.8 20 #include <string.h> #include <errno.h> +#include "make.h" #include "make_malloc.h" #ifndef USE_EMALLOC -static void enomem(void) __dead; +static void enomem(void) MAKE_ATTR_DEAD; /* * enomem -- Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.184 src/usr.bin/make/parse.c:1.185 --- src/usr.bin/make/parse.c:1.184 Tue Apr 24 20:12:16 2012 +++ src/usr.bin/make/parse.c Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.184 2012/04/24 20:12:16 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.184 2012/04/24 20:12:16 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.184 2012/04/24 20:12:16 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -344,9 +344,9 @@ static const struct { static int ParseIsEscaped(const char *, const char *); static void ParseErrorInternal(const char *, size_t, int, const char *, ...) - __attribute__((__format__(__printf__, 4, 5))); + MAKE_ATTR_PRINTFLIKE(4,5); static void ParseVErrorInternal(FILE *, const char *, size_t, int, const char *, va_list) - __attribute__((__format__(__printf__, 5, 0))); + MAKE_ATTR_PRINTFLIKE(5, 0); static int ParseFindKeyword(const char *); static int ParseLinkSrc(void *, void *); static int ParseDoOp(void *, void *); Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.56 src/usr.bin/make/targ.c:1.57 --- src/usr.bin/make/targ.c:1.56 Thu Nov 25 21:31:09 2010 +++ src/usr.bin/make/targ.c Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.56 2010/11/25 21:31:09 christos Exp $ */ +/* $NetBSD: targ.c,v 1.57 2012/06/12 19:21:51 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: targ.c,v 1.56 2010/11/25 21:31:09 christos Exp $"; +static char rcsid[] = "$NetBSD: targ.c,v 1.57 2012/06/12 19:21:51 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: targ.c,v 1.56 2010/11/25 21:31:09 christos Exp $"); +__RCSID("$NetBSD: targ.c,v 1.57 2012/06/12 19:21:51 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -512,7 +512,7 @@ Targ_SetMain(GNode *gn) } static int -TargPrintName(void *gnp, void *pflags __unused) +TargPrintName(void *gnp, void *pflags MAKE_ATTR_UNUSED) { GNode *gn = (GNode *)gnp; @@ -717,7 +717,7 @@ Targ_PrintNode(void *gnp, void *passp) *----------------------------------------------------------------------- */ static int -TargPrintOnlySrc(void *gnp, void *dummy __unused) +TargPrintOnlySrc(void *gnp, void *dummy MAKE_ATTR_UNUSED) { GNode *gn = (GNode *)gnp; if (!OP_NOP(gn->type)) @@ -790,7 +790,7 @@ Targ_PrintGraph(int pass) *----------------------------------------------------------------------- */ static int -TargPropagateNode(void *gnp, void *junk __unused) +TargPropagateNode(void *gnp, void *junk MAKE_ATTR_UNUSED) { GNode *gn = (GNode *)gnp; Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.170 src/usr.bin/make/var.c:1.171 --- src/usr.bin/make/var.c:1.170 Mon Jun 4 20:34:20 2012 +++ src/usr.bin/make/var.c Tue Jun 12 19:21:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.170 2012/06/04 20:34:20 sjg Exp $ */ +/* $NetBSD: var.c,v 1.171 2012/06/12 19:21:51 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.170 2012/06/04 20:34:20 sjg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.171 2012/06/12 19:21:51 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.170 2012/06/04 20:34:20 sjg Exp $"); +__RCSID("$NetBSD: var.c,v 1.171 2012/06/12 19:21:51 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -1139,7 +1139,7 @@ Var_Value(const char *name, GNode *ctxt, *----------------------------------------------------------------------- */ static Boolean -VarHead(GNode *ctx __unused, Var_Parse_State *vpstate, +VarHead(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *dummy) { @@ -1187,7 +1187,7 @@ VarHead(GNode *ctx __unused, Var_Parse_S *----------------------------------------------------------------------- */ static Boolean -VarTail(GNode *ctx __unused, Var_Parse_State *vpstate, +VarTail(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *dummy) { @@ -1229,7 +1229,7 @@ VarTail(GNode *ctx __unused, Var_Parse_S *----------------------------------------------------------------------- */ static Boolean -VarSuffix(GNode *ctx __unused, Var_Parse_State *vpstate, +VarSuffix(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *dummy) { @@ -1270,7 +1270,7 @@ VarSuffix(GNode *ctx __unused, Var_Parse *----------------------------------------------------------------------- */ static Boolean -VarRoot(GNode *ctx __unused, Var_Parse_State *vpstate, +VarRoot(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *dummy) { @@ -1314,7 +1314,7 @@ VarRoot(GNode *ctx __unused, Var_Parse_S *----------------------------------------------------------------------- */ static Boolean -VarMatch(GNode *ctx __unused, Var_Parse_State *vpstate, +VarMatch(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *pattern) { @@ -1405,7 +1405,7 @@ VarSYSVMatch(GNode *ctx, Var_Parse_State *----------------------------------------------------------------------- */ static Boolean -VarNoMatch(GNode *ctx __unused, Var_Parse_State *vpstate, +VarNoMatch(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *pattern) { @@ -1442,7 +1442,7 @@ VarNoMatch(GNode *ctx __unused, Var_Pars *----------------------------------------------------------------------- */ static Boolean -VarSubstitute(GNode *ctx __unused, Var_Parse_State *vpstate, +VarSubstitute(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, void *patternp) { @@ -1638,7 +1638,8 @@ VarREError(int errnum, regex_t *pat, con *----------------------------------------------------------------------- */ static Boolean -VarRESubstitute(GNode *ctx __unused, Var_Parse_State *vpstate __unused, +VarRESubstitute(GNode *ctx MAKE_ATTR_UNUSED, + Var_Parse_State *vpstate MAKE_ATTR_UNUSED, char *word, Boolean addSpace, Buffer *buf, void *patternp) { @@ -1778,7 +1779,8 @@ VarRESubstitute(GNode *ctx __unused, Var *----------------------------------------------------------------------- */ static Boolean -VarLoopExpand(GNode *ctx __unused, Var_Parse_State *vpstate __unused, +VarLoopExpand(GNode *ctx MAKE_ATTR_UNUSED, + Var_Parse_State *vpstate MAKE_ATTR_UNUSED, char *word, Boolean addSpace, Buffer *buf, void *loopp) { @@ -1821,7 +1823,7 @@ VarLoopExpand(GNode *ctx __unused, Var_P *----------------------------------------------------------------------- */ static char * -VarSelectWords(GNode *ctx __unused, Var_Parse_State *vpstate, +VarSelectWords(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, const char *str, VarSelectWords_t *seldata) { Buffer buf; /* Buffer for the new string */ @@ -1896,9 +1898,9 @@ VarSelectWords(GNode *ctx __unused, Var_ * if successful. */ static Boolean -VarRealpath(GNode *ctx __unused, Var_Parse_State *vpstate, +VarRealpath(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate, char *word, Boolean addSpace, Buffer *buf, - void *patternp __unused) + void *patternp MAKE_ATTR_UNUSED) { struct stat st; char rbuf[MAXPATHLEN]; @@ -2121,7 +2123,7 @@ VarUniq(const char *str) *----------------------------------------------------------------------- */ static char * -VarGetPattern(GNode *ctxt, Var_Parse_State *vpstate __unused, +VarGetPattern(GNode *ctxt, Var_Parse_State *vpstate MAKE_ATTR_UNUSED, int errnum, const char **tstr, int delim, int *flags, int *length, VarPattern *pattern) {