CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 08:47:09 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: array.c array.h compat.c graph.h main.c make.c nonints.h parse.c suff.c targ.c Log Message: Use more arrays and fewer lists. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/array.c \ othersrc/usr.bin/dholland-make2/graph.h \ othersrc/usr.bin/dholland-make2/parse.c cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/array.h cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/main.c \ othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/dholland-make2/nonints.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/array.c diff -u othersrc/usr.bin/dholland-make2/array.c:1.2 othersrc/usr.bin/dholland-make2/array.c:1.3 --- othersrc/usr.bin/dholland-make2/array.c:1.2 Mon Mar 4 07:27:54 2013 +++ othersrc/usr.bin/dholland-make2/array.c Mon Mar 4 08:47:08 2013 @@ -31,6 +31,9 @@ #include string.h #include portable.h +/* XXX this should go away */ +#include lst.h + #define ARRAYINLINE #include array.h @@ -159,3 +162,36 @@ array_removeval(struct array *a, void *v array_remove(a, ix); } } + + +// tools for interfacing with lst.lib + +static int +Lst_AddToArray(void *p, void *arrv) +{ + struct array *arr = arrv; + + array_add(arr, p, NULL); + return 0; +} + +void +Lst_IntoArray(Lst list, struct array *arr) +{ + Lst_ForEach(list, Lst_AddToArray, arr); +} + +Lst +LstFromArray(struct array *arr) +{ + Lst ret; + unsigned i; + void *p; + + ret = Lst_Init(FALSE); + for (i=0; iarray_num(arr); i++) { + p = array_get(arr, i); + Lst_AtEnd(ret, p); + } + return ret; +} Index: othersrc/usr.bin/dholland-make2/graph.h diff -u othersrc/usr.bin/dholland-make2/graph.h:1.2 othersrc/usr.bin/dholland-make2/graph.h:1.3 --- othersrc/usr.bin/dholland-make2/graph.h:1.2 Mon Mar 4 07:28:45 2013 +++ othersrc/usr.bin/dholland-make2/graph.h Mon Mar 4 08:47:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: graph.h,v 1.2 2013/03/04 07:28:45 dholland Exp $ */ +/* $NetBSD: graph.h,v 1.3 2013/03/04 08:47:08 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -158,7 +158,7 @@ struct GNode { GList iParents; /* Links to parents for which this is an * implied source, if any */ -Lst cohorts; /* Other nodes for the :: operator */ +GList cohorts; /* Other nodes for the :: operator */ Lst parents; /* Nodes that depend on this one */ Lst children; /* Nodes on which this one depends */ Lst order_pred; /* .ORDER nodes we need made */ Index: othersrc/usr.bin/dholland-make2/parse.c diff -u othersrc/usr.bin/dholland-make2/parse.c:1.2 othersrc/usr.bin/dholland-make2/parse.c:1.3 --- othersrc/usr.bin/dholland-make2/parse.c:1.2 Mon Feb 25 03:39:28 2013 +++ othersrc/usr.bin/dholland-make2/parse.c Mon Mar 4 08:47:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.2 2013/02/25 03:39:28 dholland Exp $ */ +/* $NetBSD: parse.c,v 1.3 2013/03/04 08:47:08 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -138,7 +138,7 @@ #include buf.h #include pathnames.h -MAKE_RCSID($NetBSD: parse.c,v 1.2 2013/02/25 03:39:28 dholland Exp $); +MAKE_RCSID($NetBSD: parse.c,v 1.3 2013/03/04 08:47:08 dholland Exp $); // types and constants @@ -829,8 +829,9 @@ ParseLinkSrc(void *pgnp, void *cgnp) GNode *pgn = (GNode *)pgnp; GNode *cgn = (GNode *)cgnp; -if ((pgn-type OP_DOUBLEDEP) !Lst_IsEmpty (pgn-cohorts)) - pgn = (GNode *)Lst_Datum(Lst_Last(pgn-cohorts)); +if ((pgn-type OP_DOUBLEDEP) glist_num(pgn-cohorts) 0) { + pgn = glist_get(pgn-cohorts, glist_num(pgn-cohorts) - 1); +} (void)Lst_AtEnd(pgn-children, cgn); if (specType == Not) (void)Lst_AtEnd(cgn-parents, pgn); @@ -906,7 +907,7 @@ ParseDoOp(void *gnp, void *opp) * traversals will no longer see this node anyway. -mycroft) */ cohort-type = op | OP_INVISIBLE; - (void)Lst_AtEnd(gn-cohorts, cohort); + glist_add(gn-cohorts, cohort, NULL); cohort-centurion = gn; gn-unmade_cohorts += 1; snprintf(cohort-cohort_num, sizeof cohort-cohort_num, #%d, @@ -1941,8 +1942,9 @@ ParseAddCmd(void *gnp, void *cmd) GNode *gn = (GNode *)gnp; /* Add to last (ie current) cohort for :: targets */ -if ((gn-type OP_DOUBLEDEP) !Lst_IsEmpty (gn-cohorts)) - gn = (GNode *)Lst_Datum(Lst_Last(gn-cohorts)); +if ((gn-type OP_DOUBLEDEP) glist_num(gn-cohorts) 0) { + gn = glist_get(gn-cohorts,
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: christos Date: Mon Mar 4 17:17:57 UTC 2013 Modified Files: src/lib/libc/rpc: auth_unix.c clnt_raw.c svc_generic.c svc_simple.c svc_vc.c xdr.c xdr_array.c xdr_rec.c xdr_reference.c Log Message: fix error messages and warnings. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/rpc/auth_unix.c cvs rdiff -u -r1.30 -r1.31 src/lib/libc/rpc/clnt_raw.c cvs rdiff -u -r1.12 -r1.13 src/lib/libc/rpc/svc_generic.c cvs rdiff -u -r1.31 -r1.32 src/lib/libc/rpc/svc_simple.c \ src/lib/libc/rpc/xdr.c cvs rdiff -u -r1.26 -r1.27 src/lib/libc/rpc/svc_vc.c cvs rdiff -u -r1.17 -r1.18 src/lib/libc/rpc/xdr_array.c cvs rdiff -u -r1.33 -r1.34 src/lib/libc/rpc/xdr_rec.c cvs rdiff -u -r1.16 -r1.17 src/lib/libc/rpc/xdr_reference.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/rpc/auth_unix.c diff -u src/lib/libc/rpc/auth_unix.c:1.23 src/lib/libc/rpc/auth_unix.c:1.24 --- src/lib/libc/rpc/auth_unix.c:1.23 Tue Mar 20 13:14:50 2012 +++ src/lib/libc/rpc/auth_unix.c Mon Mar 4 12:17:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: auth_unix.c,v 1.23 2012/03/20 17:14:50 matt Exp $ */ +/* $NetBSD: auth_unix.c,v 1.24 2013/03/04 17:17:56 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -35,7 +35,7 @@ static char *sccsid = @(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro; static char *sccsid = @(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC; #else -__RCSID($NetBSD: auth_unix.c,v 1.23 2012/03/20 17:14:50 matt Exp $); +__RCSID($NetBSD: auth_unix.c,v 1.24 2013/03/04 17:17:56 christos Exp $); #endif #endif @@ -115,14 +115,14 @@ authunix_create(char *machname, int uid, auth = mem_alloc(sizeof(*auth)); #ifndef KERNEL if (auth == NULL) { - warnx(authunix_create: out of memory); + warn(%s: out of memory, __func__); goto cleanup_authunix_create; } #endif au = mem_alloc(sizeof(*au)); #ifndef KERNEL if (au == NULL) { - warnx(authunix_create: out of memory); + warn(%s: out of memory, __func__); goto cleanup_authunix_create; } #endif @@ -155,7 +155,7 @@ authunix_create(char *machname, int uid, au-au_origcred.oa_base = mem_alloc((size_t)len); #else if ((au-au_origcred.oa_base = mem_alloc((size_t)len)) == NULL) { - warnx(authunix_create: out of memory); + warn(%s: out of memory, __func__); goto cleanup_authunix_create; } #endif @@ -342,7 +342,7 @@ marshal_new_auth(AUTH *auth) xdrmem_create(xdrs, au-au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); if ((! xdr_opaque_auth(xdrs, (auth-ah_cred))) || (! xdr_opaque_auth(xdrs, (auth-ah_verf - warnx(auth_none.c - Fatal marshalling problem); + warnx(%s: Fatal marshalling problem, __func__); else au-au_mpos = XDR_GETPOS(xdrs); XDR_DESTROY(xdrs); Index: src/lib/libc/rpc/clnt_raw.c diff -u src/lib/libc/rpc/clnt_raw.c:1.30 src/lib/libc/rpc/clnt_raw.c:1.31 --- src/lib/libc/rpc/clnt_raw.c:1.30 Tue Mar 20 13:14:50 2012 +++ src/lib/libc/rpc/clnt_raw.c Mon Mar 4 12:17:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: clnt_raw.c,v 1.30 2012/03/20 17:14:50 matt Exp $ */ +/* $NetBSD: clnt_raw.c,v 1.31 2013/03/04 17:17:56 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -35,7 +35,7 @@ static char *sccsid = @(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro; static char *sccsid = @(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC; #else -__RCSID($NetBSD: clnt_raw.c,v 1.30 2012/03/20 17:14:50 matt Exp $); +__RCSID($NetBSD: clnt_raw.c,v 1.31 2013/03/04 17:17:56 christos Exp $); #endif #endif @@ -128,7 +128,7 @@ clnt_raw_create(rpcprog_t prog, rpcvers_ call_msg.rm_call.cb_vers = (u_int32_t)vers; xdrmem_create(xdrs, clp-u.mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); if (! xdr_callhdr(xdrs, call_msg)) - warnx(clntraw_create - Fatal header serialization error.); + warnx(%s: Fatal header serialization error, __func__); clp-mcnt = XDR_GETPOS(xdrs); XDR_DESTROY(xdrs); Index: src/lib/libc/rpc/svc_generic.c diff -u src/lib/libc/rpc/svc_generic.c:1.12 src/lib/libc/rpc/svc_generic.c:1.13 --- src/lib/libc/rpc/svc_generic.c:1.12 Tue Mar 20 13:14:50 2012 +++ src/lib/libc/rpc/svc_generic.c Mon Mar 4 12:17:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: svc_generic.c,v 1.12 2012/03/20 17:14:50 matt Exp $ */ +/* $NetBSD: svc_generic.c,v 1.13 2013/03/04 17:17:56 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = @(#)svc_generic.c 1.21 89/02/28 Copyr 1988 Sun Micro; #else -__RCSID($NetBSD: svc_generic.c,v 1.12 2012/03/20 17:14:50 matt Exp $); +__RCSID($NetBSD: svc_generic.c,v 1.13 2013/03/04 17:17:56 christos Exp $); #endif #endif @@ -105,7 +105,7 @@ svc_create( /* VARIABLES PROTECTED BY xprtlist_lock: xprtlist */ if ((handle = __rpc_setconf(nettype)) == NULL) { - warnx(svc_create: unknown protocol); + warnx(%s: unknown
CVS commit: src
Module Name:src Committed By: christos Date: Mon Mar 4 17:29:03 UTC 2013 Modified Files: src/include/rpc: svc.h src/lib/libc/rpc: rpc_soc.3 rpc_svc_reg.3 svc.c svc_dg.c svc_raw.c svc_vc.c Log Message: PR/47617: Thorsten Brehm: Memory and socket leak in librpc To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/include/rpc/svc.h cvs rdiff -u -r1.13 -r1.14 src/lib/libc/rpc/rpc_soc.3 cvs rdiff -u -r1.9 -r1.10 src/lib/libc/rpc/rpc_svc_reg.3 cvs rdiff -u -r1.31 -r1.32 src/lib/libc/rpc/svc.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/rpc/svc_dg.c cvs rdiff -u -r1.22 -r1.23 src/lib/libc/rpc/svc_raw.c cvs rdiff -u -r1.27 -r1.28 src/lib/libc/rpc/svc_vc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/rpc/svc.h diff -u src/include/rpc/svc.h:1.24 src/include/rpc/svc.h:1.25 --- src/include/rpc/svc.h:1.24 Tue Aug 30 13:06:20 2011 +++ src/include/rpc/svc.h Mon Mar 4 12:29:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: svc.h,v 1.24 2011/08/30 17:06:20 plunky Exp $ */ +/* $NetBSD: svc.h,v 1.25 2013/03/04 17:29:03 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -221,7 +221,7 @@ __END_DECLS * SVCXPRT *xprt; */ __BEGIN_DECLS -extern void xprt_register (SVCXPRT *); +extern bool_t xprt_register (SVCXPRT *); __END_DECLS /* Index: src/lib/libc/rpc/rpc_soc.3 diff -u src/lib/libc/rpc/rpc_soc.3:1.13 src/lib/libc/rpc/rpc_soc.3:1.14 --- src/lib/libc/rpc/rpc_soc.3:1.13 Sat Jan 10 21:46:29 2009 +++ src/lib/libc/rpc/rpc_soc.3 Mon Mar 4 12:29:03 2013 @@ -1,5 +1,5 @@ .\ @(#)rpc.3n 2.4 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI -.\ $NetBSD: rpc_soc.3,v 1.13 2009/01/11 02:46:29 christos Exp $ +.\ $NetBSD: rpc_soc.3,v 1.14 2013/03/04 17:29:03 christos Exp $ .\ Converted to mdoc by Thomas Klausner w...@netbsd.org .\ .Dd December 12, 2008 @@ -221,7 +221,7 @@ .Fn xdr_rejected_reply XDR *xdrs struct rejected_reply *rr .Ft int .Fn xdr_replymsg XDR *xdrs struct rpc_msg *rmsg -.Ft void +.Ft bool_t .Fn xprt_register SVCXPRT *xprt .Ft void .Fn xprt_unregister SVCXPRT *xprt Index: src/lib/libc/rpc/rpc_svc_reg.3 diff -u src/lib/libc/rpc/rpc_svc_reg.3:1.9 src/lib/libc/rpc/rpc_svc_reg.3:1.10 --- src/lib/libc/rpc/rpc_svc_reg.3:1.9 Wed Mar 11 09:36:01 2009 +++ src/lib/libc/rpc/rpc_svc_reg.3 Mon Mar 4 12:29:03 2013 @@ -2,7 +2,7 @@ .\ Copyright 1989 ATT .\ @(#)rpc_svc_call 1.6 89/07/20 SMI; .\ Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. -.\ $NetBSD: rpc_svc_reg.3,v 1.9 2009/03/11 13:36:01 joerg Exp $ +.\ $NetBSD: rpc_svc_reg.3,v 1.10 2013/03/04 17:29:03 christos Exp $ .Dd May 3, 1993 .Dt RPC_SVC_REG 3 .Os @@ -27,7 +27,7 @@ .Fn svc_unreg const rpcprog_t prognum const rpcvers_t versnum .Ft int .Fn svc_auth_reg const int cred_flavor const enum auth_stat (*handler(struct svc_req *, struct rpc_msg *)) -.Ft void +.Ft bool_t .Fn xprt_register const SVCXPRT *xprt .Ft void .Fn xprt_unregister const SVCXPRT *xprt Index: src/lib/libc/rpc/svc.c diff -u src/lib/libc/rpc/svc.c:1.31 src/lib/libc/rpc/svc.c:1.32 --- src/lib/libc/rpc/svc.c:1.31 Tue Mar 20 13:14:50 2012 +++ src/lib/libc/rpc/svc.c Mon Mar 4 12:29:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: svc.c,v 1.31 2012/03/20 17:14:50 matt Exp $ */ +/* $NetBSD: svc.c,v 1.32 2013/03/04 17:29:03 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -35,7 +35,7 @@ static char *sccsid = @(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro; static char *sccsid = @(#)svc.c 2.4 88/08/11 4.0 RPCSRC; #else -__RCSID($NetBSD: svc.c,v 1.31 2012/03/20 17:14:50 matt Exp $); +__RCSID($NetBSD: svc.c,v 1.32 2013/03/04 17:29:03 christos Exp $); #endif #endif @@ -125,7 +125,7 @@ static void __xprt_do_unregister(SVCXPRT /* * Activate a transport handle. */ -void +bool_t xprt_register(SVCXPRT *xprt) { int sock; @@ -138,18 +138,25 @@ xprt_register(SVCXPRT *xprt) if (__svc_xports == NULL) { __svc_xports = mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); if (__svc_xports == NULL) { - warn(xprt_register); + warn(%s: out of memory, __func__); goto out; } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } - if (sock FD_SETSIZE) { - __svc_xports[sock] = xprt; - FD_SET(sock, svc_fdset); - svc_maxfd = max(svc_maxfd, sock); - } + if (sock = FD_SETSIZE) { + warnx(%s: socket descriptor %d too large for setsize %u, + __func__, sock, (unsigned)FD_SETSIZE); + goto out; + } + __svc_xports[sock] = xprt; + FD_SET(sock, svc_fdset); + svc_maxfd = max(svc_maxfd, sock); + rwlock_unlock(svc_fd_lock); + return (TRUE); + out: rwlock_unlock(svc_fd_lock); + return (FALSE); } void Index: src/lib/libc/rpc/svc_dg.c diff -u src/lib/libc/rpc/svc_dg.c:1.14 src/lib/libc/rpc/svc_dg.c:1.15 --- src/lib/libc/rpc/svc_dg.c:1.14 Tue Mar 20 13:14:50 2012 +++ src/lib/libc/rpc/svc_dg.c Mon Mar 4 12:29:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD:
CVS commit: src/sys/rump/kern/lib/libsys_linux
Module Name:src Committed By: stacktic Date: Mon Mar 4 19:12:56 UTC 2013 Modified Files: src/sys/rump/kern/lib/libsys_linux: rump_linux_syscallargs.h rump_linux_syscalls.c rump_linux_sysent.c syscalls.master Log Message: Regen to use getdents64 instead of getdents To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h \ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c \ src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c \ src/sys/rump/kern/lib/libsys_linux/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.2 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.3 --- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.2 Sun Feb 17 15:17:40 2013 +++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h Mon Mar 4 19:12:55 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: rump_linux_syscallargs.h,v 1.2 2013/02/17 15:17:40 stacktic Exp $ */ +/* $NetBSD: rump_linux_syscallargs.h,v 1.3 2013/03/04 19:12:55 stacktic Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.1 2012/09/19 21:45:40 pooka Exp + * created from NetBSD: syscalls.master,v 1.2 2013/02/17 15:17:40 stacktic Exp */ #ifndef _RUMP_LINUX_SYS_SYSCALLARGS_H_ @@ -273,12 +273,12 @@ struct sys___getcwd_args; struct sys_fchroot_args; -struct linux_sys_getdents_args { +struct linux_sys_getdents64_args { syscallarg(int) fd; - syscallarg(struct linux_dirent *) dent; + syscallarg(struct linux_dirent64 *) dent; syscallarg(unsigned int) count; }; -check_syscall_args(linux_sys_getdents) +check_syscall_args(linux_sys_getdents64) struct linux_sys_socket_args { syscallarg(int) domain; @@ -479,7 +479,7 @@ int sys___getcwd(struct lwp *, const str int sys_fchroot(struct lwp *, const struct sys_fchroot_args *, register_t *); -int linux_sys_getdents(struct lwp *, const struct linux_sys_getdents_args *, register_t *); +int linux_sys_getdents64(struct lwp *, const struct linux_sys_getdents64_args *, register_t *); int linux_sys_socket(struct lwp *, const struct linux_sys_socket_args *, register_t *); Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.2 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.3 --- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.2 Sun Feb 17 15:17:40 2013 +++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c Mon Mar 4 19:12:55 2013 @@ -1,14 +1,14 @@ -/* $NetBSD: rump_linux_syscalls.c,v 1.2 2013/02/17 15:17:40 stacktic Exp $ */ +/* $NetBSD: rump_linux_syscalls.c,v 1.3 2013/03/04 19:12:55 stacktic Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.1 2012/09/19 21:45:40 pooka Exp + * created from NetBSD: syscalls.master,v 1.2 2013/02/17 15:17:40 stacktic Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_linux_syscalls.c,v 1.2 2013/02/17 15:17:40 stacktic Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_linux_syscalls.c,v 1.3 2013/03/04 19:12:55 stacktic Exp $); #if defined(_KERNEL_OPT) #include sys/param.h @@ -414,7 +414,7 @@ const char *const rump_linux_syscallname /* 387 */ #387 (unimplemented stat30), /* 388 */ #388 (unimplemented fstat30), /* 389 */ #389 (unimplemented lstat30), - /* 390 */ getdents, + /* 390 */ getdents64, /* 391 */ #391 (unimplemented old posix_fadvise), /* 392 */ #392 (unimplemented fhstat), /* 393 */ #393 (unimplemented ntp_gettime), Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.2 src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.3 --- src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.2 Sun Feb 17 15:17:40 2013 +++ src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c Mon Mar 4 19:12:56 2013 @@ -1,14 +1,14 @@ -/* $NetBSD: rump_linux_sysent.c,v 1.2 2013/02/17 15:17:40 stacktic Exp $ */ +/* $NetBSD: rump_linux_sysent.c,v 1.3 2013/03/04 19:12:56 stacktic Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.1 2012/09/19 21:45:40 pooka Exp + * created from NetBSD: syscalls.master,v 1.2 2013/02/17 15:17:40 stacktic Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_linux_sysent.c,v 1.2 2013/02/17 15:17:40 stacktic Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_linux_sysent.c,v 1.3 2013/03/04 19:12:56 stacktic Exp $); #include sys/param.h #include sys/systm.h @@ -806,8 +806,8 @@ struct sysent rump_linux_sysent[]
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: christos Date: Mon Mar 4 20:10:51 UTC 2013 Modified Files: src/usr.sbin/crash: Makefile Added Files: src/usr.sbin/crash/arch: sparc.c Log Message: make crash traces work on sparc64 To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/crash/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/crash/arch/sparc.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.sbin/crash/Makefile diff -u src/usr.sbin/crash/Makefile:1.23 src/usr.sbin/crash/Makefile:1.24 --- src/usr.sbin/crash/Makefile:1.23 Sun Nov 4 06:12:32 2012 +++ src/usr.sbin/crash/Makefile Mon Mar 4 15:10:50 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2012/11/04 11:12:32 apb Exp $ +# $NetBSD: Makefile,v 1.24 2013/03/04 20:10:50 christos Exp $ PROG= crash MAN= crash.8 @@ -53,6 +53,9 @@ MACHINE_FAMILY = x86 . elif ${MACHINE_ARCH} == m68k \ || ${MACHINE_ARCH} == arm MACHINE_FAMILY = ${MACHINE_ARCH} +. elif${MACHINE} == sparc64 \ + || ${MACHINE} == sparc64 +MACHINE_FAMILY = sparc . else MACHINE_FAMILY = ${MACHINE} . endif Added files: Index: src/usr.sbin/crash/arch/sparc.c diff -u /dev/null src/usr.sbin/crash/arch/sparc.c:1.1 --- /dev/null Mon Mar 4 15:10:51 2013 +++ src/usr.sbin/crash/arch/sparc.c Mon Mar 4 15:10:51 2013 @@ -0,0 +1,66 @@ +/* $NetBSD: sparc.c,v 1.1 2013/03/04 20:10:51 christos Exp $ */ + +/*- + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Andrew Doran. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/cdefs.h +#ifndef lint +__RCSID($NetBSD: sparc.c,v 1.1 2013/03/04 20:10:51 christos Exp $); +#endif /* not lint */ + +#include ddb/ddb.h + +#include kvm.h +#include nlist.h +#include err.h +#include stdlib.h + +#include machine/pcb.h + +#include extern.h + +static struct nlist nl[] = { + { .n_name = dumppcb }, + { .n_name = NULL }, +}; + +struct pcb pcb; + +void +db_mach_init(kvm_t *kd) +{ + + if (kvm_nlist(kd, nl) == -1) { + errx(EXIT_FAILURE, kvm_nlist: %s, kvm_geterr(kd)); + } + if ((size_t)kvm_read(kd, nl[0].n_value, pcb, sizeof(pcb)) != + sizeof(pcb)) { + errx(EXIT_FAILURE, cannot read dumppcb: %s, kvm_geterr(kd)); + } +}
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: christos Date: Mon Mar 4 20:17:46 UTC 2013 Modified Files: src/sys/arch/sparc64/sparc64: db_trace.c Log Message: make traces work from crash(8) To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sparc64/sparc64/db_trace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/db_trace.c diff -u src/sys/arch/sparc64/sparc64/db_trace.c:1.49 src/sys/arch/sparc64/sparc64/db_trace.c:1.50 --- src/sys/arch/sparc64/sparc64/db_trace.c:1.49 Sun Feb 12 11:34:10 2012 +++ src/sys/arch/sparc64/sparc64/db_trace.c Mon Mar 4 15:17:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: db_trace.c,v 1.49 2012/02/12 16:34:10 matt Exp $ */ +/* $NetBSD: db_trace.c,v 1.50 2013/03/04 20:17:46 christos Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: db_trace.c,v 1.49 2012/02/12 16:34:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: db_trace.c,v 1.50 2013/03/04 20:17:46 christos Exp $); #include sys/param.h #include sys/proc.h @@ -38,6 +38,7 @@ __KERNEL_RCSID(0, $NetBSD: db_trace.c,v #include machine/ctlreg.h #include ddb/db_access.h +#include ddb/db_proc.h #include ddb/db_sym.h #include ddb/db_interface.h #include ddb/db_output.h @@ -91,35 +92,45 @@ db_stack_trace_print(db_expr_t addr, boo kernel_only = false; } - if (!have_addr) + if (!have_addr) { +#ifndef _KERNEL + extern struct pcb pcb; + frame = (vaddr_t)pcb.pcb_sp; +#else frame = (vaddr_t)DDB_TF-tf_out[6]; - else { +#endif + } else { if (trace_thread) { - struct proc *p; - struct lwp *l; + proc_t p; + lwp_t l; struct pcb *pcb; if (lwpaddr) { -l = (struct lwp *)(uintptr_t)addr; -p = l-l_proc; -(*pr)(trace: pid %d , p-p_pid); +db_read_bytes(addr, sizeof(l), (char *)l); +db_read_bytes((db_addr_t)l.l_proc, +sizeof(p), (char *)p); + +(*pr)(trace: pid %d , p.p_pid); } else { +proc_t *pp; (*pr)(trace: pid %d , (int)addr); -#ifdef _KERNEL -p = proc_find_raw(addr); -if (p == NULL) { +pp = db_proc_find((pid_t)addr); +if (pp == NULL) { (*pr)(not found\n); return; } -l = LIST_FIRST(p-p_lwps); -KASSERT(l != NULL); -#else -(*pr)(no proc_find_raw() in crash\n); -return; -#endif +db_read_bytes((db_addr_t)pp, sizeof(p), +(char *)p); +addr = (db_addr_t)p.p_lwps.lh_first; +db_read_bytes(addr, sizeof(l), (char *)l); } - (*pr)(lid %d , l-l_lid); - pcb = lwp_getpcb(l); + (*pr)(lid %d , l.l_lid); + pcb = lwp_getpcb(l); +#ifndef _KERNEL + db_read_bytes((db_addr_t)pcb-pcb_sp, + sizeof(frame), (char *)frame); +#else frame = (vaddr_t)pcb-pcb_sp; +#endif (*pr)(at %p\n, frame); } else { frame = (vaddr_t)addr;
CVS commit: src/lib/libc/time
Module Name:src Committed By: joerg Date: Mon Mar 4 21:18:51 UTC 2013 Modified Files: src/lib/libc/time: zic.c Log Message: usage is dead. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/lib/libc/time/zic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/zic.c diff -u src/lib/libc/time/zic.c:1.36 src/lib/libc/time/zic.c:1.37 --- src/lib/libc/time/zic.c:1.36 Sat Mar 2 21:39:48 2013 +++ src/lib/libc/time/zic.c Mon Mar 4 21:18:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: zic.c,v 1.36 2013/03/02 21:39:48 christos Exp $ */ +/* $NetBSD: zic.c,v 1.37 2013/03/04 21:18:51 joerg Exp $ */ /* ** This file is in the public domain, so clarified as of ** 2006-07-17 by Arthur David Olson. @@ -10,7 +10,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: zic.c,v 1.36 2013/03/02 21:39:48 christos Exp $); +__RCSID($NetBSD: zic.c,v 1.37 2013/03/04 21:18:51 joerg Exp $); #endif /* !defined lint */ #include version.h @@ -435,7 +435,7 @@ warning(const char *const string) --errors; } -static void +__dead static void usage(FILE *stream, int status) { (void) fprintf(stream, _(%s: usage is %s \
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 23:03:42 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c compat.c graph.h job.c make.c parse.c suff.c targ.c Log Message: Use arrays instead of lists for graph links. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/arch.c \ othersrc/usr.bin/dholland-make2/job.c cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/graph.h \ othersrc/usr.bin/dholland-make2/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/arch.c diff -u othersrc/usr.bin/dholland-make2/arch.c:1.2 othersrc/usr.bin/dholland-make2/arch.c:1.3 --- othersrc/usr.bin/dholland-make2/arch.c:1.2 Mon Feb 25 03:39:28 2013 +++ othersrc/usr.bin/dholland-make2/arch.c Mon Mar 4 23:03:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.2 2013/02/25 03:39:28 dholland Exp $ */ +/* $NetBSD: arch.c,v 1.3 2013/03/04 23:03:41 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -137,7 +137,7 @@ #includedir.h #includeconfig.h -MAKE_RCSID($NetBSD: arch.c,v 1.2 2013/02/25 03:39:28 dholland Exp $); +MAKE_RCSID($NetBSD: arch.c,v 1.3 2013/03/04 23:03:41 dholland Exp $); #ifdef TARGET_MACHINE @@ -1105,17 +1105,16 @@ Arch_MTime(GNode *gn) time_t Arch_MemMTime(GNode *gn) { -LstNode ln; GNode *pgn; char *nameStart, *nameEnd; +unsigned i; -if (Lst_Open(gn-parents) != SUCCESS) { - gn-mtime = 0; - return (0); -} -while ((ln = Lst_Next(gn-parents)) != NULL) { - pgn = (GNode *)Lst_Datum(ln); +/* by default, in case parents[] is empty (I think) */ +gn-mtime = 0; + +for (i=0; iglist_num(gn-parents); i++) { + pgn = glist_get(gn-parents, i); if (pgn-type OP_ARCHV) { /* @@ -1142,8 +1141,6 @@ Arch_MemMTime(GNode *gn) } } -Lst_Close(gn-parents); - return (gn-mtime); } @@ -1237,9 +1234,9 @@ Arch_LibOODate(GNode *gn) if (gn-type OP_PHONY) { oodate = TRUE; -} else if (OP_NOP(gn-type) Lst_IsEmpty(gn-children)) { +} else if (OP_NOP(gn-type) glist_num(gn-children) == 0) { oodate = FALSE; -} else if ((!Lst_IsEmpty(gn-children) gn-cmgn == NULL) || +} else if ((glist_num(gn-children) 0 gn-cmgn == NULL) || (gn-mtime now) || (gn-cmgn != NULL gn-mtime gn-cmgn-mtime)) { oodate = TRUE; Index: othersrc/usr.bin/dholland-make2/job.c diff -u othersrc/usr.bin/dholland-make2/job.c:1.2 othersrc/usr.bin/dholland-make2/job.c:1.3 --- othersrc/usr.bin/dholland-make2/job.c:1.2 Mon Feb 25 03:39:28 2013 +++ othersrc/usr.bin/dholland-make2/job.c Mon Mar 4 23:03:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.2 2013/02/25 03:39:28 dholland Exp $ */ +/* $NetBSD: job.c,v 1.3 2013/03/04 23:03:42 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -149,7 +149,7 @@ #include trace.h # define STATIC static -MAKE_RCSID($NetBSD: job.c,v 1.2 2013/02/25 03:39:28 dholland Exp $); +MAKE_RCSID($NetBSD: job.c,v 1.3 2013/03/04 23:03:42 dholland Exp $); /* * error handling variables @@ -1193,7 +1193,7 @@ Boolean Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...)) { if (OP_NOP(gn-type) Lst_IsEmpty(gn-commands) - ((gn-type OP_LIB) == 0 || Lst_IsEmpty(gn-children))) { + ((gn-type OP_LIB) == 0 || glist_num(gn-children) == 0)) { /* * No commands. Look for .DEFAULT rule from which we might infer * commands @@ -2585,7 +2585,7 @@ Job_Finish(void) { if (postCommands != NULL (!Lst_IsEmpty(postCommands-commands) || - !Lst_IsEmpty(postCommands-children))) { + glist_num(postCommands-children) 0)) { if (errors) { Error(Errors reported so .END ignored); } else { Index: othersrc/usr.bin/dholland-make2/compat.c diff -u othersrc/usr.bin/dholland-make2/compat.c:1.4 othersrc/usr.bin/dholland-make2/compat.c:1.5 --- othersrc/usr.bin/dholland-make2/compat.c:1.4 Mon Mar 4 08:47:08 2013 +++ othersrc/usr.bin/dholland-make2/compat.c Mon Mar 4 23:03:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.4 2013/03/04 08:47:08 dholland Exp $ */ +/* $NetBSD: compat.c,v 1.5 2013/03/04 23:03:41 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -101,7 +101,7 @@ #includejob.h #includepathnames.h -MAKE_RCSID($NetBSD: compat.c,v 1.4 2013/03/04 08:47:08 dholland Exp $); +MAKE_RCSID($NetBSD: compat.c,v 1.5 2013/03/04 23:03:41 dholland Exp $); /* * The following array is used to make a fast determination of which @@ -512,7 +512,13 @@ Compat_Make(void *gnp, void *pgnp) gn-made = BEINGMADE; if ((gn-type
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 23:31:57 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: make.c make.h targ.c Log Message: Use (far) fewer void pointers now that we're free of that list library. Also drop meaningless always-zero integer return values that the list library needed for its function pointers. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/dholland-make2/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/make.c diff -u othersrc/usr.bin/dholland-make2/make.c:1.5 othersrc/usr.bin/dholland-make2/make.c:1.6 --- othersrc/usr.bin/dholland-make2/make.c:1.5 Mon Mar 4 23:03:42 2013 +++ othersrc/usr.bin/dholland-make2/make.c Mon Mar 4 23:31:57 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.5 2013/03/04 23:03:42 dholland Exp $ */ +/* $NetBSD: make.c,v 1.6 2013/03/04 23:31:57 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #includedir.h #includejob.h -MAKE_RCSID($NetBSD: make.c,v 1.5 2013/03/04 23:03:42 dholland Exp $); +MAKE_RCSID($NetBSD: make.c,v 1.6 2013/03/04 23:31:57 dholland Exp $); static unsigned int checked = 1;/* Sequence # to detect recursion */ static Lst toBeMade; /* The current fringe of the graph. These @@ -120,18 +120,17 @@ static Lst toBeMade; /* The current * Make_Update and subtracted from by * MakeStartJobs */ -static int MakeAddChild2(void *, void *); -static int MakeFindChild(void *, void *); -static int MakeUnmark(void *, void *); -static int MakeAddAllSrc(void *, void *); -static int MakeTimeStamp(void *, void *); -static int MakeHandleUse(void *, void *); +static void MakeAddChild(GNode *, GList *); +static void MakeFindChild(GNode *, GNode *); +static void MakeUnmark(GNode *); +static void MakeAddAllSrc(GNode *, GNode *); +static void MakeHandleUse(GNode *, GNode *); static Boolean MakeStartJobs(void); -static int MakePrintStatus(void *, void *); -static int MakeCheckOrder(void *, void *); +static int MakePrintStatus(GNode *, int *); +static int MakeCheckOrder(GNode *); static int DoMakeCheckOrder(GList *); -static int MakeBuildChild(void *, void *); -static int MakeBuildParent(void *, void *); +static int MakeBuildChild(GNode *, LstNode); +static void MakeBuildParent(GNode *, LstNode); MAKE_ATTR_DEAD static void make_abort(GNode *gn, int line) @@ -156,33 +155,21 @@ make_abort(GNode *gn, int line) * cgn the child we've just examined * * Results: - * Always returns 0. + * None * * Side Effects: * The cmgn of the parent node will be changed if the mtime * field of the child is greater than it. *--- */ -int +void Make_TimeStamp(GNode *pgn, GNode *cgn) { if (pgn-cmgn == NULL || cgn-mtime pgn-cmgn-mtime) { pgn-cmgn = cgn; } -return (0); } -/* - * Input: - * pgn the current parent - * cgn the child we've just examined - * - */ -static int -MakeTimeStamp(void *pgn, void *cgn) -{ -return Make_TimeStamp((GNode *)pgn, (GNode *)cgn); -} /*- *--- @@ -342,7 +329,7 @@ Make_OODate(GNode *gn) unsigned i; for (i=0; iglist_num(gn-parents); i++) { - MakeTimeStamp(glist_get(gn-parents, i), gn); + Make_TimeStamp(glist_get(gn-parents, i), gn); } } @@ -354,51 +341,28 @@ Make_OODate(GNode *gn) * MakeAddChild -- * Function used by Make_Run to add a child to the list l. * It will only add the child if its make field is FALSE. - * MakeAddChild2 -- - * Same but lp is a GList, not a Lst. * * Input: * gnp the node to add * lp the list to which to add it * * Results: - * Always returns 0 + * None * * Side Effects: * The given list is extended *--- */ -#if 0 -static int -MakeAddChild(void *gnp, void *lp) -{ -GNode *gn = (GNode *)gnp; -Lstl = (Lst) lp; -if ((gn-flags REMAKE) == 0 !(gn-type (OP_USE|OP_USEBEFORE))) { - if (DEBUG(MAKE)) - fprintf(debug_file, MakeAddChild: need to examine %s%s\n, - gn-name, gn-cohort_num); - (void)Lst_EnQueue(l, gn); -} -return (0); -} -#endif - -/* array variant */ -static int -MakeAddChild2(void *gnp, void *lp) +static void +MakeAddChild(GNode *gn, GList *l) { -GNode *gn = (GNode *)gnp; -GList *l = lp; - if ((gn-flags REMAKE) == 0 !(gn-type (OP_USE|OP_USEBEFORE))) { if (DEBUG(MAKE)) fprintf(debug_file, MakeAddChild: need to examine %s%s\n, gn-name, gn-cohort_num); glist_add(l, gn, NULL); } -return (0); } /*- @@ -408,27 +372,23 @@ MakeAddChild2(void
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 23:52:07 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c Log Message: Use arrays, not lists. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/arch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/arch.c diff -u othersrc/usr.bin/dholland-make2/arch.c:1.3 othersrc/usr.bin/dholland-make2/arch.c:1.4 --- othersrc/usr.bin/dholland-make2/arch.c:1.3 Mon Mar 4 23:03:41 2013 +++ othersrc/usr.bin/dholland-make2/arch.c Mon Mar 4 23:52:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.3 2013/03/04 23:03:41 dholland Exp $ */ +/* $NetBSD: arch.c,v 1.4 2013/03/04 23:52:07 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -137,8 +137,7 @@ #includedir.h #includeconfig.h -MAKE_RCSID($NetBSD: arch.c,v 1.3 2013/03/04 23:03:41 dholland Exp $); - +MAKE_RCSID($NetBSD: arch.c,v 1.4 2013/03/04 23:52:07 dholland Exp $); #ifdef TARGET_MACHINE #undef MAKE_MACHINE @@ -149,8 +148,6 @@ MAKE_RCSID($NetBSD: arch.c,v 1.3 2013/0 #define MAKE_MACHINE_ARCH TARGET_MACHINE_ARCH #endif -static Lst archives; /* Lst of archives we've already examined */ - typedef struct Arch { char *name; /* Name of archive */ Hash_Table members;/* All the members of the archive described @@ -159,10 +156,10 @@ typedef struct Arch { size_t fnamesize; /* Size of the string table */ } Arch; -static int ArchFindArchive(const void *, const void *); -#ifdef CLEANUP -static void ArchFree(void *); -#endif +DECLARRAY_BYTYPE(archlist, struct Arch, static); +DEFARRAY_BYTYPE(archlist, struct Arch, MAKE_ATTR_UNUSED static); +typedef struct archlist ArchList; + static struct ar_hdr *ArchStatMember(char *, char *, Boolean); static FILE *ArchFindMember(char *, char *, struct ar_hdr *, const char *); #if defined(__svr4__) || defined(__SVR4) || defined(__ELF__) @@ -170,6 +167,9 @@ static FILE *ArchFindMember(char *, char static int ArchSVR4Entry(Arch *, char *, size_t, FILE *); #endif +/* Archives we've already examined */ +static ArchList archives; + #ifdef CLEANUP /*- *--- @@ -185,9 +185,8 @@ static int ArchSVR4Entry(Arch *, char *, *--- */ static void -ArchFree(void *ap) +ArchFree(Arch *a) { -Arch *a = (Arch *)ap; Hash_Search search; Hash_Entry *entry; @@ -206,7 +205,6 @@ ArchFree(void *ap) #endif - /*- *--- * Arch_ParseArchive -- @@ -470,26 +468,34 @@ Arch_ParseArchive(char **linePtr, Lst no /*- *--- - * ArchFindArchive -- - * See if the given archive is the one we are looking for. Called - * From ArchStatMember and ArchFindMember via Lst_Find. + * FindArchive -- + * Find an archive by name. Called from ArchStatMember. * * Input: - * ar Current list element - * archName Name we want + * name Name we want * * Results: - * 0 if it is, non-zero if it isn't. + * The archive, or NULL if it doesn't exist. * * Side Effects: * None. * *--- */ -static int -ArchFindArchive(const void *ar, const void *archName) +static Arch * +FindArchive(const char *name) { -return (strcmp(archName, ((const Arch *)ar)-name)); + unsigned i, num; + Arch *a; + + num = archlist_num(archives); + for (i=0; inum; i++) { + a = archlist_get(archives, i); + if (!strcmp(name, a-name)) { + return a; + } + } + return NULL; } /*- @@ -523,7 +529,6 @@ ArchStatMember(char *archive, char *memb int size; /* Size of archive member */ char *cp; /* Useful character pointer */ char magic[SARMAG]; -LstNode ln; /* Lst member containing archive descriptor */ Arch *ar; /* Archive descriptor */ Hash_Entry *he; /* Entry containing member's description */ struct ar_hdr arh;/* archive-member header for reading archive */ @@ -541,10 +546,8 @@ ArchStatMember(char *archive, char *memb member = cp + 1; } -ln = Lst_Find(archives, archive, ArchFindArchive); -if (ln != NULL) { - ar = (Arch *)Lst_Datum(ln); - +ar = FindArchive(archive); +if (ar != NULL) { he = Hash_FindEntry(ar-members, member); if (he != NULL) { @@ -688,7 +691,7 @@ ArchStatMember(char *archive, char *memb fclose(arch); -(void)Lst_AtEnd(archives, ar); +archlist_add(archives, ar, NULL); /* * Now that the archive has been read and cached, we can look into @@ -1286,7 +1289,7 @@ Arch_LibOODate(GNode *gn) void Arch_Init(void) { -archives = Lst_Init(FALSE); +
CVS commit: othersrc/usr.bin/dholland-make2
: sysIncPath); +patharray_num(sysIncPath) == 0 ? defIncPath : sysIncPath); if (!name || (fd = open(name, O_RDONLY)) == -1) { if (name) free(name); Index: othersrc/usr.bin/dholland-make2/parse.c diff -u othersrc/usr.bin/dholland-make2/parse.c:1.4 othersrc/usr.bin/dholland-make2/parse.c:1.5 --- othersrc/usr.bin/dholland-make2/parse.c:1.4 Mon Mar 4 23:03:42 2013 +++ othersrc/usr.bin/dholland-make2/parse.c Tue Mar 5 01:44:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.4 2013/03/04 23:03:42 dholland Exp $ */ +/* $NetBSD: parse.c,v 1.5 2013/03/05 01:44:34 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -138,7 +138,7 @@ #include buf.h #include pathnames.h -MAKE_RCSID($NetBSD: parse.c,v 1.4 2013/03/04 23:03:42 dholland Exp $); +MAKE_RCSID($NetBSD: parse.c,v 1.5 2013/03/05 01:44:34 dholland Exp $); // types and constants @@ -269,9 +269,9 @@ static IFile *curFile; static Lst includes; /* include paths (lists of directories) */ -Lst parseIncPath; /* dirs for ... includes */ -Lst sysIncPath; /* dirs for ... includes */ -Lst defIncPath; /* default for sysIncPath */ +struct patharray parseIncPath; /* dirs for ... includes */ +struct patharray sysIncPath; /* dirs for ... includes */ +struct patharray defIncPath; /* default for sysIncPath */ // parser tables @@ -345,8 +345,6 @@ static int ParseLinkSrc(void *, void *); static int ParseDoOp(void *, void *); static void ParseDoSrc(int, const char *); static int ParseFindMain(void *, void *); -static int ParseAddDir(void *, void *); -static int ParseClearPath(void *, void *); static void ParseDoDependency(char *); static int ParseAddCmd(void *, void *); static void ParseHasCommands(void *); @@ -1074,46 +1072,6 @@ ParseFindMain(void *gnp, void *dummy) } /*- - *--- - * ParseAddDir -- - * Front-end for Dir_AddDir to make sure Lst_ForEach keeps going - * - * Results: - * === 0 - * - * Side Effects: - * See Dir_AddDir. - * - *--- - */ -static int -ParseAddDir(void *path, void *name) -{ -(void)Dir_AddDir((Lst) path, (char *)name); -return(0); -} - -/*- - *--- - * ParseClearPath -- - * Front-end for Dir_ClearPath to make sure Lst_ForEach keeps going - * - * Results: - * === 0 - * - * Side Effects: - * See Dir_ClearPath - * - *--- - */ -static int -ParseClearPath(void *path, void *dummy) -{ -Dir_ClearPath((Lst) path); -return(dummy ? 0 : 0); -} - -/*- *- * ParseDoDependency -- * Parse the dependency line in line. @@ -1157,8 +1115,8 @@ ParseDoDependency(char *line) GNode *gn = NULL; /* a general purpose temporary node */ int op; /* the operator on the line */ charsavec; /* a place to save a character */ -Lst paths; /* List of search paths to alter when parsing - * a list of .PATH targets */ +/* List of search paths to alter when parsing a list of .PATH targets */ +struct patharrayarray paths; int tOp; /* operator from special target */ Lst sources; /* list of archive source names after * expansion */ @@ -1171,7 +1129,7 @@ ParseDoDependency(char *line) tOp = 0; specType = Not; -paths = NULL; +patharrayarray_init(paths); curTargs = Lst_Init(FALSE); @@ -1289,10 +1247,7 @@ ParseDoDependency(char *line) */ switch (specType) { case ExPath: - if (paths == NULL) { - paths = Lst_Init(FALSE); - } - (void)Lst_AtEnd(paths, dirSearchPath); + patharrayarray_add(paths, dirSearchPath, NULL); break; case Main: if (!Lst_IsEmpty(create)) { @@ -1331,7 +1286,7 @@ ParseDoDependency(char *line) * Call on the suffix module to give us a path to * modify. */ - Lst path; + struct patharray *path; specType = ExPath; path = Suff_GetPath(line[5]); @@ -1341,10 +1296,7 @@ ParseDoDependency(char *line) line[5]); goto out; } else { - if (paths == NULL) { - paths = Lst_Init(FALSE); - } - (void)Lst_AtEnd(paths, path); + patharrayarray_add(paths, path, NULL); } } } @@ -1360,12 +1312,15 @@ ParseDoDependency(char *line) * so create an empty path for the thing. Note we need to * use Dir_Destroy in the destruction of the path as the * Dir module could have added a directory to the path... + * + * Note dholland 20130304: this is now not supposed to + * happen, so we can just zap it. */ - Lst emptyPath = Lst_Init(FALSE); - - Dir_Expand(line, emptyPath, curTargs); + struct patharray emptyPath; - Lst_Destroy
CVS commit: src/usr.bin/mkdep
Module Name:src Committed By: christos Date: Tue Mar 5 01:59:56 UTC 2013 Modified Files: src/usr.bin/mkdep: mkdep.1 mkdep.c Log Message: add -i and -v To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mkdep/mkdep.1 cvs rdiff -u -r1.41 -r1.42 src/usr.bin/mkdep/mkdep.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/mkdep/mkdep.1 diff -u src/usr.bin/mkdep/mkdep.1:1.17 src/usr.bin/mkdep/mkdep.1:1.18 --- src/usr.bin/mkdep/mkdep.1:1.17 Sun Aug 26 18:37:19 2012 +++ src/usr.bin/mkdep/mkdep.1 Mon Mar 4 20:59:56 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mkdep.1,v 1.17 2012/08/26 22:37:19 jmmv Exp $ +.\ $NetBSD: mkdep.1,v 1.18 2013/03/05 01:59:56 christos Exp $ .\ .\ Copyright (c) 1987, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)mkdep.1 8.1 (Berkeley) 6/6/93 .\ -.Dd August 26, 2012 +.Dd March 4, 2013 .Dt MKDEP 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd construct Makefile dependency list .Sh SYNOPSIS .Nm -.Op Fl aDdopq +.Op Fl aDdiopqv .Op Fl f Ar file .Op Fl P Ar prefix .Op Fl s Ar suffixes @@ -80,6 +80,13 @@ depend files into a single file. Write the include file dependencies to .Ar file , instead of the default ``.depend''. +.It Fl i +When +.Fl d +or +.Fl D +is used, instead of inlining the contents of the files to the resulting +depend file, use include statements to include the source dependency files. .It Fl o Add an additional .OPTIONAL line for each dependent file. .It Fl P @@ -118,6 +125,8 @@ Expand each target filename to a list, r suffix with each element of .Ar suffixes . The list of suffixes may be space or comma separated. +.It Fl v +print debugging output. .El .Sh FILES .Bl -tag -width .depend -compact Index: src/usr.bin/mkdep/mkdep.c diff -u src/usr.bin/mkdep/mkdep.c:1.41 src/usr.bin/mkdep/mkdep.c:1.42 --- src/usr.bin/mkdep/mkdep.c:1.41 Sun Aug 26 18:37:19 2012 +++ src/usr.bin/mkdep/mkdep.c Mon Mar 4 20:59:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mkdep.c,v 1.41 2012/08/26 22:37:19 jmmv Exp $ */ +/* $NetBSD: mkdep.c,v 1.42 2013/03/05 01:59:56 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #if !defined(lint) __COPYRIGHT(@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\ All rights reserved.); -__RCSID($NetBSD: mkdep.c,v 1.41 2012/08/26 22:37:19 jmmv Exp $); +__RCSID($NetBSD: mkdep.c,v 1.42 2013/03/05 01:59:56 christos Exp $); #endif /* not lint */ #include sys/mman.h @@ -74,12 +74,13 @@ typedef struct suff_list { /* tree of includes for -o processing */ static opt_t *opt; static int width; +static int verbose; #define DEFAULT_PATH _PATH_DEFPATH #define DEFAULT_FILENAME .depend static void save_for_optional(const char *, const char *); -static int write_optional(int, opt_t *, int); +static size_t write_optional(int, opt_t *, size_t); static inline void * deconst(const void *p) @@ -91,7 +92,7 @@ __dead static void usage(void) { (void)fprintf(stderr, - usage: %s [-aDdopq] [-f file] [-P prefix] [-s suffixes] + usage: %s [-aDdiopqv] [-f file] [-P prefix] [-s suffixes] -- [flags] file ...\n, getprogname()); exit(EXIT_FAILURE); @@ -132,6 +133,13 @@ run_cc(int argc, char **argv, const char (void)unlink(tmpfilename); *fname = tmpfilename; + if (verbose) { + char **a; + for (a = args; *a; a++) + printf(%s , *a); + printf(\n); + } + switch (cpid = vfork()) { case 0: (void)dup2(tmpfd, STDOUT_FILENO); @@ -208,7 +216,7 @@ addsuff(suff_list_t **l, const char *s, int main(int argc, char **argv) { - int aflag, dflag, oflag, qflag; + int aflag, dflag, iflag, oflag, qflag; const char *filename; int dependfile; char *buf, *lim, *ptr, *line, *suf, *colon, *eol; @@ -229,6 +237,7 @@ main(int argc, char **argv) aflag = O_WRONLY | O_APPEND | O_CREAT | O_TRUNC; dflag = 0; + iflag = 0; oflag = 0; qflag = 0; filename = DEFAULT_FILENAME; @@ -237,7 +246,7 @@ main(int argc, char **argv) opterr = 0; /* stop getopt() bleating about errors. */ for (;;) { ok_ind = optind; - ch = getopt_long(argc, argv, aDdf:oP:pqRs:, longopt, NULL); + ch = getopt_long(argc, argv, aDdf:ioP:pqRs:v, longopt, NULL); switch (ch) { case -1: ok_ind = optind; @@ -256,6 +265,9 @@ main(int argc, char **argv) case 'f': /* Name of output file */ filename = optarg; continue; + case 'i': + iflag = 1; + continue; case 'o': /* Mark dependent files .OPTIONAL */ oflag = 1; continue; @@ -274,6 +286,9 @@ main(int argc, char **argv) case 's': /* Suffix list */ suffixes = optarg; continue; + case 'v': + verbose = 1; + continue; default: if (dflag) usage(); @@ -302,8 +317,7 @@ main(int argc, char **argv) dependfile = open(filename, aflag, 0666); if (dependfile == -1) - err(EXIT_FAILURE, unable to %s to file %s\n, - aflag
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Mar 5 02:02:08 UTC 2013 Modified Files: src/share/mk: bsd.README bsd.dep.mk Log Message: MKDEPINCLUDES support. To generate a diff of this commit: cvs rdiff -u -r1.313 -r1.314 src/share/mk/bsd.README cvs rdiff -u -r1.75 -r1.76 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.313 src/share/mk/bsd.README:1.314 --- src/share/mk/bsd.README:1.313 Sat Feb 16 16:40:45 2013 +++ src/share/mk/bsd.README Mon Mar 4 21:02:07 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.313 2013/02/16 21:40:45 jmmv Exp $ +# $NetBSD: bsd.README,v 1.314 2013/03/05 02:02:07 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make include files for the NetBSD @@ -157,6 +157,13 @@ MKDEBUGLIB Build *_g.a debugging librari with -DDEBUG. Default: no +MKDEPINCLUDES If yes issue .include statements in the .depend file + instead of inlining the contents of the .d files. Useful + when stale dependencies are present, to list the exact + files that need refreshing. It is off by default because + it is possibly slower. + Default no + MKDOC If no, don't build or install the documentation. Default: yes Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.75 src/share/mk/bsd.dep.mk:1.76 --- src/share/mk/bsd.dep.mk:1.75 Sun Nov 18 14:48:29 2012 +++ src/share/mk/bsd.dep.mk Mon Mar 4 21:02:07 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.75 2012/11/18 19:48:29 apb Exp $ +# $NetBSD: bsd.dep.mk,v 1.76 2013/03/05 02:02:07 christos Exp $ # Basic targets realdepend: beforedepend .depend afterdepend @@ -36,34 +36,44 @@ __DPSRCS.notd= ${__DPSRCS.all:O:u:N*.d} ${__DPSRCS.d}: ${__DPSRCS.notd} ${DPSRCS} .endif # } +MKDEPSUFFLAGS=-s ${MKDEP_SUFFIXES:Q} + +.if defined(MKDEPINCLUDES) ${MKDEPINCLUDES} != no +_MKDEP_MERGEFLAGS=-i +_MKDEP_FILEFLAGS=${MKDEPSUFFLAGS} +.else +_MKDEP_MERGEFLAGS=${MKDEPSUFFLAGS} +_MKDEP_FILEFLAGS= +.endif + .depend: ${__DPSRCS.d} ${_MKTARGET_CREATE} rm -f .depend - ${MKDEP} -d -f ${.TARGET} -s ${MKDEP_SUFFIXES:Q} ${__DPSRCS.d} + ${MKDEP} ${_MKDEP_MERGEFLAGS} -d -f ${.TARGET} ${__DPSRCS.d} .SUFFIXES: .d .s .S .c .C .cc .cpp .cxx .m .c.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} .m.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${OBJCFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} .s.d .S.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${AFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${__acpp_flags} ${.IMPSRC} .C.d .cc.d .cpp.d .cxx.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${CXXFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Tue Mar 5 02:04:11 UTC 2013 Modified Files: src/usr.bin/make: dir.c job.c parse.c Log Message: Keep track of the location where a dependency is defined, so we can report about it. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/usr.bin/make/dir.c cvs rdiff -u -r1.170 -r1.171 src/usr.bin/make/job.c cvs rdiff -u -r1.185 -r1.186 src/usr.bin/make/parse.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/dir.c diff -u src/usr.bin/make/dir.c:1.65 src/usr.bin/make/dir.c:1.66 --- src/usr.bin/make/dir.c:1.65 Tue Jun 12 15:21:50 2012 +++ src/usr.bin/make/dir.c Mon Mar 4 21:04:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: dir.c,v 1.66 2013/03/05 02:04:10 christos 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.65 2012/06/12 19:21:50 joerg Exp $; +static char rcsid[] = $NetBSD: dir.c,v 1.66 2013/03/05 02:04:10 christos 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.65 2012/06/12 19:21:50 joerg Exp $); +__RCSID($NetBSD: dir.c,v 1.66 2013/03/05 02:04:10 christos Exp $); #endif #endif /* not lint */ #endif @@ -1464,8 +1464,9 @@ Dir_MTime(GNode *gn, Boolean recheck) */ gn-path = bmake_strdup(fullName); fprintf(stdout, -%s: ignoring stale %s for %s, found %s\n, -progname, makeDependfile, gn-name, fullName); + %s: %s, %d: ignoring stale %s for %s, found %s\n, + progname, gn-fname, gn-lineno, + makeDependfile, gn-name, fullName); } } } Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.170 src/usr.bin/make/job.c:1.171 --- src/usr.bin/make/job.c:1.170 Mon Feb 25 19:45:27 2013 +++ src/usr.bin/make/job.c Mon Mar 4 21:04:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $ */ +/* $NetBSD: job.c,v 1.171 2013/03/05 02:04:10 christos 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.170 2013/02/26 00:45:27 christos Exp $; +static char rcsid[] = $NetBSD: job.c,v 1.171 2013/03/05 02:04:10 christos 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.170 2013/02/26 00:45:27 christos Exp $); +__RCSID($NetBSD: job.c,v 1.171 2013/03/05 02:04:10 christos Exp $); #endif #endif /* not lint */ #endif @@ -1232,8 +1232,8 @@ Job_CheckCommands(GNode *gn, void (*abor static const char msg[] = : don't know how to make; if (gn-flags FROM_DEPEND) { - fprintf(stdout, %s: ignoring stale %s for %s\n, - progname, makeDependfile, gn-name); + fprintf(stdout, %s: %s, %d: ignoring stale %s for %s\n, + progname, gn-fname, gn-lineno, makeDependfile, gn-name); return TRUE; } Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.185 src/usr.bin/make/parse.c:1.186 --- src/usr.bin/make/parse.c:1.185 Tue Jun 12 15:21:51 2012 +++ src/usr.bin/make/parse.c Mon Mar 4 21:04:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: parse.c,v 1.186 2013/03/05 02:04:11 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = $NetBSD: parse.c,v 1.185 2012/06/12 19:21:51 joerg Exp $; +static char rcsid[] = $NetBSD: parse.c,v 1.186 2013/03/05 02:04:11 christos 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.185 2012/06/12 19:21:51 joerg Exp $); +__RCSID($NetBSD: parse.c,v 1.186 2013/03/05 02:04:11 christos Exp $); #endif #endif /* not lint */ #endif @@ -905,6 +905,8 @@ ParseDoOp(void *gnp, void *opp) gn-type |= op ~OP_OPMASK; cohort = Targ_FindNode(gn-name, TARG_NOHASH); + if (doing_depend) + ParseMark(cohort); /* * Make the cohort invisible as well to avoid duplicating it into * other variables. True, parents of this target won't tend to do @@ -977,6 +979,8 @@ ParseDoSrc(int tOp, const char *src) */ snprintf(wait_src, sizeof wait_src, .WAIT_%u, ++wait_number); gn = Targ_FindNode(wait_src, TARG_NOHASH); + if (doing_depend) + ParseMark(gn); gn-type = OP_WAIT | OP_PHONY | OP_DEPENDS | OP_NOTMAIN; Lst_ForEach(targets, ParseLinkSrc, gn); return; @@ -1008,6 +1012,8 @@ ParseDoSrc(int tOp, const char *src) * source and the current one. */ gn = Targ_FindNode(src, TARG_CREATE); + if (doing_depend) + ParseMark(gn); if (predecessor != NULL)
CVS commit: src/lib/libc/gen
Module Name:src Committed By: soda Date: Tue Mar 5 02:46:33 UTC 2013 Modified Files: src/lib/libc/gen: realpath.3 Log Message: a sequel to getcwd.c revision 1.52 and realpath.3 revision 1.13 by christos: explicitly mention that NULL is allowed as second argument in the description part as well. PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/realpath.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/realpath.3 diff -u src/lib/libc/gen/realpath.3:1.14 src/lib/libc/gen/realpath.3:1.15 --- src/lib/libc/gen/realpath.3:1.14 Thu Jun 21 21:35:25 2012 +++ src/lib/libc/gen/realpath.3 Tue Mar 5 02:46:33 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: realpath.3,v 1.14 2012/06/21 21:35:25 wiz Exp $ +.\ $NetBSD: realpath.3,v 1.15 2013/03/05 02:46:33 soda Exp $ .\ .\ Copyright (c) 1994 .\ The Regents of the University of California. All rights reserved. @@ -65,7 +65,8 @@ argument .Em must refer to a buffer capable of storing at least .Dv MAXPATHLEN -characters. +characters, or be +.Dv NULL . .Pp The .Fn realpath
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Tue Mar 5 03:04:01 UTC 2013 Modified Files: src/sys/kern: kern_module.c Log Message: remove extra chatty messages To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/kern/kern_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.88 src/sys/kern/kern_module.c:1.89 --- src/sys/kern/kern_module.c:1.88 Sun Mar 3 11:55:26 2013 +++ src/sys/kern/kern_module.c Mon Mar 4 22:04:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.88 2013/03/03 16:55:26 christos Exp $ */ +/* $NetBSD: kern_module.c,v 1.89 2013/03/05 03:04:00 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.88 2013/03/03 16:55:26 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.89 2013/03/05 03:04:00 christos Exp $); #define _MODULE_INTERNAL @@ -460,12 +460,8 @@ module_init_class(modclass_t class) do { TAILQ_FOREACH(mod, module_builtins, mod_chain) { mi = mod-mod_info; - if (!MODULE_CLASS_MATCH(mi, class)) { -#ifdef DIAGNOSTIC -module_incompat(mi, class); -#endif + if (!MODULE_CLASS_MATCH(mi, class)) continue; - } /* * If initializing a builtin module fails, don't try * to load it again. But keep it around and queue it @@ -491,12 +487,8 @@ module_init_class(modclass_t class) do { TAILQ_FOREACH(mod, module_bootlist, mod_chain) { mi = mod-mod_info; - if (!MODULE_CLASS_MATCH(mi, class)) { -#ifdef DIAGNOSTIC -module_incompat(mi, class); -#endif + if (!MODULE_CLASS_MATCH(mi, class)) continue; - } module_do_load(mi-mi_name, false, 0, NULL, NULL, class, false); break;
CVS commit: src/lib/libc/gen
Module Name:src Committed By: enami Date: Tue Mar 5 03:11:27 UTC 2013 Modified Files: src/lib/libc/gen: realpath.3 Log Message: - Refer the argument with correct name. - Mark up the function as a function like rest of this paragraph does. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/realpath.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/realpath.3 diff -u src/lib/libc/gen/realpath.3:1.15 src/lib/libc/gen/realpath.3:1.16 --- src/lib/libc/gen/realpath.3:1.15 Tue Mar 5 02:46:33 2013 +++ src/lib/libc/gen/realpath.3 Tue Mar 5 03:11:27 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: realpath.3,v 1.15 2013/03/05 02:46:33 soda Exp $ +.\ $NetBSD: realpath.3,v 1.16 2013/03/05 03:11:27 enami Exp $ .\ .\ Copyright (c) 1994 .\ The Regents of the University of California. All rights reserved. @@ -75,7 +75,7 @@ and return the absolute pathname corresp .Fa pathname . .Sh RETURN VALUES If -.Fa resolvednamed +.Fa resolvedname is .Dv NULL , it will be allocated and the returned pointer can be deallocated using @@ -92,7 +92,7 @@ returns and .Fa resolvedname was not allocated by -.Nm , +.Fn realpath , it will contain the pathname which caused the problem. .Sh ERRORS The function
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 03:32:08 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c compat.c cond.c dir.c dir.h graph.h main.c make.c make.h nonints.h parse.c suff.c targ.c Log Message: more arrays; fewer lists. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/arch.c \ othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/main.c \ othersrc/usr.bin/dholland-make2/parse.c cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/cond.c \ othersrc/usr.bin/dholland-make2/nonints.h cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/dir.c \ othersrc/usr.bin/dholland-make2/graph.h cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/dir.h cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.8 -r1.9 othersrc/usr.bin/dholland-make2/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/arch.c diff -u othersrc/usr.bin/dholland-make2/arch.c:1.5 othersrc/usr.bin/dholland-make2/arch.c:1.6 --- othersrc/usr.bin/dholland-make2/arch.c:1.5 Tue Mar 5 01:44:34 2013 +++ othersrc/usr.bin/dholland-make2/arch.c Tue Mar 5 03:32:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.5 2013/03/05 01:44:34 dholland Exp $ */ +/* $NetBSD: arch.c,v 1.6 2013/03/05 03:32:08 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -137,7 +137,7 @@ #includedir.h #includeconfig.h -MAKE_RCSID($NetBSD: arch.c,v 1.5 2013/03/05 01:44:34 dholland Exp $); +MAKE_RCSID($NetBSD: arch.c,v 1.6 2013/03/05 03:32:08 dholland Exp $); #ifdef TARGET_MACHINE #undef MAKE_MACHINE @@ -228,7 +228,7 @@ ArchFree(Arch *a) *--- */ ReturnStatus -Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode *ctxt) +Arch_ParseArchive(char **linePtr, GList *nodeList, GNode *ctxt) { char *cp; /* Pointer into line */ GNode *gn; /* New node */ @@ -352,7 +352,7 @@ Arch_ParseArchive(char **linePtr, Lst no /* * Now form an archive spec and recurse to deal with nested * variables and multi-word variable values The results - * are just placed at the end of the nodeLst we're returning. + * are just placed at the end of the node list we're returning. */ sz = strlen(memName)+strlen(libName)+3; buf = sacrifice = bmake_malloc(sz); @@ -372,9 +372,9 @@ Arch_ParseArchive(char **linePtr, Lst no return(FAILURE); } else { gn-type |= OP_ARCHV; - (void)Lst_AtEnd(nodeLst, gn); + glist_add(nodeList, gn, NULL); } - } else if (Arch_ParseArchive(sacrifice, nodeLst, ctxt)!=SUCCESS) { + } else if (Arch_ParseArchive(sacrifice, nodeList, ctxt)!=SUCCESS) { /* * Error in nested call -- free buffer and return FAILURE * ourselves. @@ -387,14 +387,17 @@ Arch_ParseArchive(char **linePtr, Lst no */ free(buf); } else if (Dir_HasWildcards(memName)) { - Lst members = Lst_Init(FALSE); - char *member; + struct stringarray members; + char *member; + unsigned i; size_t sz = MAXPATHLEN, nsz; nameBuf = bmake_malloc(sz); - Dir_Expand(memName, dirSearchPath, members); - while (!Lst_IsEmpty(members)) { - member = (char *)Lst_DeQueue(members); + stringarray_init(members); + + Dir_Expand(memName, dirSearchPath, members); + for (i=0; istringarray_num(members); i++) { + member = stringarray_get(members, i); nsz = strlen(libName) + strlen(member) + 3; if (sz nsz) nameBuf = bmake_realloc(nameBuf, sz = nsz * 2); @@ -414,10 +417,11 @@ Arch_ParseArchive(char **linePtr, Lst no * end of the provided list. */ gn-type |= OP_ARCHV; - (void)Lst_AtEnd(nodeLst, gn); + glist_add(nodeList, gn, NULL); } } - Lst_Destroy(members, NULL); + stringarray_setsize(members, 0); + stringarray_cleanup(members); free(nameBuf); } else { size_t sz = strlen(libName) + strlen(memName) + 3; @@ -436,7 +440,7 @@ Arch_ParseArchive(char **linePtr, Lst no * provided list. */ gn-type |= OP_ARCHV; - (void)Lst_AtEnd(nodeLst, gn); + glist_add(nodeList, gn, NULL); } } if (doSubst) { Index: othersrc/usr.bin/dholland-make2/compat.c diff -u othersrc/usr.bin/dholland-make2/compat.c:1.5 othersrc/usr.bin/dholland-make2/compat.c:1.6 --- othersrc/usr.bin/dholland-make2/compat.c:1.5 Mon Mar 4 23:03:41 2013 +++ othersrc/usr.bin/dholland-make2/compat.c Tue Mar 5 03:32:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.5 2013/03/04 23:03:41 dholland Exp $ */ +/* $NetBSD: compat.c,v 1.6 2013/03/05 03:32:08 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 04:27:27 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: compat.c cond.c graph.h job.c job.h main.c make.c make.h nonints.h parse.c suff.c targ.c Log Message: Clean up the last non-file-local lists. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/main.c \ othersrc/usr.bin/dholland-make2/parse.c cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/cond.c \ othersrc/usr.bin/dholland-make2/nonints.h cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/graph.h cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/job.c cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/dholland-make2/job.h cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.9 -r1.10 othersrc/usr.bin/dholland-make2/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/compat.c diff -u othersrc/usr.bin/dholland-make2/compat.c:1.6 othersrc/usr.bin/dholland-make2/compat.c:1.7 --- othersrc/usr.bin/dholland-make2/compat.c:1.6 Tue Mar 5 03:32:08 2013 +++ othersrc/usr.bin/dholland-make2/compat.c Tue Mar 5 04:27:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.6 2013/03/05 03:32:08 dholland Exp $ */ +/* $NetBSD: compat.c,v 1.7 2013/03/05 04:27:27 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -101,7 +101,7 @@ #includejob.h #includepathnames.h -MAKE_RCSID($NetBSD: compat.c,v 1.6 2013/03/05 03:32:08 dholland Exp $); +MAKE_RCSID($NetBSD: compat.c,v 1.7 2013/03/05 04:27:27 dholland Exp $); /* * The following array is used to make a fast determination of which @@ -198,7 +198,7 @@ CompatInterrupt(int signo) *--- */ int -CompatRunCommand(void *cmdp, void *gnp) +CompatRunCommand(char *cmdp, unsigned cmdindex, GNode *gn) { char *cmdStart; /* Start of expanded command */ char *cp, *bp; @@ -209,7 +209,6 @@ CompatRunCommand(void *cmdp, void *gnp) int status; /* Description of child's death */ pid_t cpid; /* Child actually found */ pid_t retstat; /* Result of wait */ -LstNode cmdNode; /* Node where current command is located */ const char ** volatile av; /* Argument vector for thing to exec */ char ** volatile mav;/* Copy of the argument vector for freeing */ int argc; /* Number of arguments in av or 0 if not @@ -218,14 +217,14 @@ CompatRunCommand(void *cmdp, void *gnp) * locally */ Boolean useShell; /* TRUE if command should be executed * using a shell */ -char * volatile cmd = (char *)cmdp; -GNode *gn = (GNode *)gnp; +char * volatile cmd = cmdp; silent = gn-type OP_SILENT; errCheck = !(gn-type OP_IGNORE); doIt = FALSE; + +assert(stringarray_get(gn-commands, cmdindex) == cmd); -cmdNode = Lst_Member(gn-commands, cmd); cmdStart = Var_Subst(NULL, cmd, gn, FALSE); /* @@ -240,10 +239,9 @@ CompatRunCommand(void *cmdp, void *gnp) return(0); } cmd = cmdStart; -Lst_Replace(cmdNode, cmdStart); - +stringarray_set(gn-commands, cmdindex, cmdStart); if ((gn-type OP_SAVE_CMDS) (gn != ENDNode)) { - (void)Lst_AtEnd(ENDNode-commands, cmdStart); + stringarray_add(ENDNode-commands, cmdStart, NULL); return(0); } if (strcmp(cmdStart, ...) == 0) { @@ -384,7 +382,8 @@ again: free(mav); if (bp) free(bp); -Lst_Replace(cmdNode, NULL); +/* XXX is this really right? */ +stringarray_set(gn-commands, cmdindex, NULL); #ifdef USE_META if (useMeta) { @@ -496,6 +495,8 @@ Compat_Make(void *gnp, void *pgnp) { GNode *gn = (GNode *)gnp; GNode *pgn = (GNode *)pgnp; +unsigned i; +char *cmd; if (!meta[0]) /* we came here from jobs */ Compat_Init(); @@ -589,7 +590,12 @@ Compat_Make(void *gnp, void *pgnp) meta_job_start(NULL, gn); } #endif - Lst_ForEach(gn-commands, CompatRunCommand, gn); + for (i=0; istringarray_num(gn-commands); i++) { + cmd = stringarray_get(gn-commands, i); + if (CompatRunCommand(cmd, i, gn)) { + break; + } + } curTarg = NULL; } else { Job_Touch(gn, gn-type OP_SILENT); Index: othersrc/usr.bin/dholland-make2/main.c diff -u othersrc/usr.bin/dholland-make2/main.c:1.6 othersrc/usr.bin/dholland-make2/main.c:1.7 --- othersrc/usr.bin/dholland-make2/main.c:1.6 Tue Mar 5 03:32:08 2013 +++ othersrc/usr.bin/dholland-make2/main.c Tue Mar 5 04:27:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.6 2013/03/05 03:32:08 dholland Exp $ */ +/* $NetBSD: main.c,v 1.7 2013/03/05 04:27:27
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 04:31:27 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: main.c Log Message: Simplify twisted logic of ReadAllMakefiles. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/dholland-make2/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/main.c diff -u othersrc/usr.bin/dholland-make2/main.c:1.7 othersrc/usr.bin/dholland-make2/main.c:1.8 --- othersrc/usr.bin/dholland-make2/main.c:1.7 Tue Mar 5 04:27:27 2013 +++ othersrc/usr.bin/dholland-make2/main.c Tue Mar 5 04:31:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.7 2013/03/05 04:27:27 dholland Exp $ */ +/* $NetBSD: main.c,v 1.8 2013/03/05 04:31:27 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -128,7 +128,7 @@ MAKE_COPYRIGHT(@(#) Copyright (c) 1988, 1989, 1990, 1993\ The Regents of the University of California. All rights reserved.); -MAKE_RCSID($NetBSD: main.c,v 1.7 2013/03/05 04:27:27 dholland Exp $); +MAKE_RCSID($NetBSD: main.c,v 1.8 2013/03/05 04:31:27 dholland Exp $); #ifndef DEFMAXLOCAL @@ -667,19 +667,6 @@ Main_SetObjdir(const char *path) return rc; } -/*- - * ReadAllMakefiles -- - * wrapper around ReadMakefile() to read all. - * - * Results: - * TRUE if ok, FALSE on error - */ -static int -ReadAllMakefiles(const void *p, const void *q) -{ - return (ReadMakefile(p, q) == 0); -} - int str2Lst_Append(struct stringarray *lp, char *str, const char *sep) { @@ -1133,7 +1120,7 @@ main(int argc, char **argv) for (i=0; istringarray_num(makefiles); i++) { mf = stringarray_get(makefiles, i); - if (ReadAllMakefiles(mf, NULL) == 0) { + if (ReadMakefile(mf, NULL) != 0) { Fatal(%s: cannot open %s., progname, mf); break; }
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 04:32:57 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: array.c array.h Log Message: No longer need hacks for converting Lst to array and vice versa. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/array.c cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/array.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/dholland-make2/array.c diff -u othersrc/usr.bin/dholland-make2/array.c:1.3 othersrc/usr.bin/dholland-make2/array.c:1.4 --- othersrc/usr.bin/dholland-make2/array.c:1.3 Mon Mar 4 08:47:08 2013 +++ othersrc/usr.bin/dholland-make2/array.c Tue Mar 5 04:32:56 2013 @@ -31,9 +31,6 @@ #include string.h #include portable.h -/* XXX this should go away */ -#include lst.h - #define ARRAYINLINE #include array.h @@ -162,36 +159,3 @@ array_removeval(struct array *a, void *v array_remove(a, ix); } } - - -// tools for interfacing with lst.lib - -static int -Lst_AddToArray(void *p, void *arrv) -{ - struct array *arr = arrv; - - array_add(arr, p, NULL); - return 0; -} - -void -Lst_IntoArray(Lst list, struct array *arr) -{ - Lst_ForEach(list, Lst_AddToArray, arr); -} - -Lst -LstFromArray(struct array *arr) -{ - Lst ret; - unsigned i; - void *p; - - ret = Lst_Init(FALSE); - for (i=0; iarray_num(arr); i++) { - p = array_get(arr, i); - Lst_AtEnd(ret, p); - } - return ret; -} Index: othersrc/usr.bin/dholland-make2/array.h diff -u othersrc/usr.bin/dholland-make2/array.h:1.5 othersrc/usr.bin/dholland-make2/array.h:1.6 --- othersrc/usr.bin/dholland-make2/array.h:1.5 Mon Mar 4 08:47:08 2013 +++ othersrc/usr.bin/dholland-make2/array.h Tue Mar 5 04:32:56 2013 @@ -290,12 +290,5 @@ array_add(struct array *a, void *val, un DECLARRAY_BYTYPE(stringarray, char, ARRAYINLINE); DEFARRAY_BYTYPE(stringarray, char, ARRAYINLINE); - -// tools for interacting with lst.lib -// (these are not typesafe and should go away) - -void Lst_IntoArray(Lst list, struct array *arr); -Lst LstFromArray(struct array *arr); - #endif /* ARRAY_H */
CVS commit: src/tests/fs/common/nfsrpc
Module Name:src Committed By: christos Date: Tue Mar 5 05:39:54 UTC 2013 Modified Files: src/tests/fs/common/nfsrpc: svc.c Log Message: catch up with libc. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/common/nfsrpc/svc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/common/nfsrpc/svc.c diff -u src/tests/fs/common/nfsrpc/svc.c:1.4 src/tests/fs/common/nfsrpc/svc.c:1.5 --- src/tests/fs/common/nfsrpc/svc.c:1.4 Thu Sep 23 05:38:14 2010 +++ src/tests/fs/common/nfsrpc/svc.c Tue Mar 5 00:39:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: svc.c,v 1.4 2010/09/23 09:38:14 he Exp $ */ +/* $NetBSD: svc.c,v 1.5 2013/03/05 05:39:54 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -35,7 +35,7 @@ static char *sccsid = @(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro; static char *sccsid = @(#)svc.c 2.4 88/08/11 4.0 RPCSRC; #else -__RCSID($NetBSD: svc.c,v 1.4 2010/09/23 09:38:14 he Exp $); +__RCSID($NetBSD: svc.c,v 1.5 2013/03/05 05:39:54 christos Exp $); #endif #endif @@ -180,9 +180,8 @@ get_fdsetmax() /* * Activate a transport handle. */ -void -xprt_register(xprt) - SVCXPRT *xprt; +bool_t +xprt_register(SVCXPRT *xprt) { int sock; @@ -194,18 +193,25 @@ xprt_register(xprt) if (__svc_xports == NULL) { __svc_xports = mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); if (__svc_xports == NULL) { - warn(xprt_register); + warn(%s: out of memory, __func__); goto out; } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } - if (sock FD_SETSIZE) { - __svc_xports[sock] = xprt; - FD_SET(sock, get_fdset()); - *get_fdsetmax() = max(*get_fdsetmax(), sock); - } + if (sock = FD_SETSIZE) { + warnx(%s: socket descriptor %d too large for setsize %u, + __func__, sock, (unsigned)FD_SETSIZE); + goto out; + } + __svc_xports[sock] = xprt; + FD_SET(sock, svc_fdset); + *get_fdsetmax() = max(*get_fdsetmax(), sock); + rwlock_unlock(svc_fd_lock); + return (TRUE); + out: rwlock_unlock(svc_fd_lock); + return (FALSE); } void
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Mar 5 07:22:27 UTC 2013 Modified Files: src/doc: 3RDPARTY Log Message: openldap-2.4.34 out. To generate a diff of this commit: cvs rdiff -u -r1.1008 -r1.1009 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1008 src/doc/3RDPARTY:1.1009 --- src/doc/3RDPARTY:1.1008 Sat Mar 2 21:49:01 2013 +++ src/doc/3RDPARTY Tue Mar 5 07:22:26 2013 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1008 2013/03/02 21:49:01 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1009 2013/03/05 07:22:26 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -856,7 +856,7 @@ We have lots of local fixes. Package: OpenLDAP Version: 2.4.23 -Current Vers: 2.4.32 +Current Vers: 2.4.34 Maintainer: OpenLDAP Foundation Archive Site: http://www.openldap.org/ Home Page: http://www.openldap.org/
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 08:47:09 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: array.c array.h compat.c graph.h main.c make.c nonints.h parse.c suff.c targ.c Log Message: Use more arrays and fewer lists. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/array.c \ othersrc/usr.bin/dholland-make2/graph.h \ othersrc/usr.bin/dholland-make2/parse.c cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/array.h cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/main.c \ othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/dholland-make2/nonints.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: christos Date: Mon Mar 4 17:17:57 UTC 2013 Modified Files: src/lib/libc/rpc: auth_unix.c clnt_raw.c svc_generic.c svc_simple.c svc_vc.c xdr.c xdr_array.c xdr_rec.c xdr_reference.c Log Message: fix error messages and warnings. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/rpc/auth_unix.c cvs rdiff -u -r1.30 -r1.31 src/lib/libc/rpc/clnt_raw.c cvs rdiff -u -r1.12 -r1.13 src/lib/libc/rpc/svc_generic.c cvs rdiff -u -r1.31 -r1.32 src/lib/libc/rpc/svc_simple.c \ src/lib/libc/rpc/xdr.c cvs rdiff -u -r1.26 -r1.27 src/lib/libc/rpc/svc_vc.c cvs rdiff -u -r1.17 -r1.18 src/lib/libc/rpc/xdr_array.c cvs rdiff -u -r1.33 -r1.34 src/lib/libc/rpc/xdr_rec.c cvs rdiff -u -r1.16 -r1.17 src/lib/libc/rpc/xdr_reference.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: christos Date: Mon Mar 4 17:29:03 UTC 2013 Modified Files: src/include/rpc: svc.h src/lib/libc/rpc: rpc_soc.3 rpc_svc_reg.3 svc.c svc_dg.c svc_raw.c svc_vc.c Log Message: PR/47617: Thorsten Brehm: Memory and socket leak in librpc To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/include/rpc/svc.h cvs rdiff -u -r1.13 -r1.14 src/lib/libc/rpc/rpc_soc.3 cvs rdiff -u -r1.9 -r1.10 src/lib/libc/rpc/rpc_svc_reg.3 cvs rdiff -u -r1.31 -r1.32 src/lib/libc/rpc/svc.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/rpc/svc_dg.c cvs rdiff -u -r1.22 -r1.23 src/lib/libc/rpc/svc_raw.c cvs rdiff -u -r1.27 -r1.28 src/lib/libc/rpc/svc_vc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/kern/lib/libsys_linux
Module Name:src Committed By: stacktic Date: Mon Mar 4 19:12:56 UTC 2013 Modified Files: src/sys/rump/kern/lib/libsys_linux: rump_linux_syscallargs.h rump_linux_syscalls.c rump_linux_sysent.c syscalls.master Log Message: Regen to use getdents64 instead of getdents To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h \ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c \ src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c \ src/sys/rump/kern/lib/libsys_linux/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: christos Date: Mon Mar 4 20:10:51 UTC 2013 Modified Files: src/usr.sbin/crash: Makefile Added Files: src/usr.sbin/crash/arch: sparc.c Log Message: make crash traces work on sparc64 To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/crash/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/crash/arch/sparc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: christos Date: Mon Mar 4 20:17:46 UTC 2013 Modified Files: src/sys/arch/sparc64/sparc64: db_trace.c Log Message: make traces work from crash(8) To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sparc64/sparc64/db_trace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/time
Module Name:src Committed By: joerg Date: Mon Mar 4 21:18:51 UTC 2013 Modified Files: src/lib/libc/time: zic.c Log Message: usage is dead. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/lib/libc/time/zic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 23:03:42 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c compat.c graph.h job.c make.c parse.c suff.c targ.c Log Message: Use arrays instead of lists for graph links. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/arch.c \ othersrc/usr.bin/dholland-make2/job.c cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/graph.h \ othersrc/usr.bin/dholland-make2/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Mon Mar 4 23:12:53 UTC 2013 Modified Files: src/sys/arch/arm/arm: sig_machdep.c Log Message: Fix boolean inversion in FPU setcontext. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/arm/sig_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 23:31:57 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: make.c make.h targ.c Log Message: Use (far) fewer void pointers now that we're free of that list library. Also drop meaningless always-zero integer return values that the list library needed for its function pointers. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/dholland-make2/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Mon Mar 4 23:52:07 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c Log Message: Use arrays, not lists. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/arch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 01:44:35 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c cond.c dir.c dir.h main.c make.h nonints.h parse.c suff.c Log Message: Use arrays instead of lists for path searching. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/arch.c \ othersrc/usr.bin/dholland-make2/main.c \ othersrc/usr.bin/dholland-make2/parse.c cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/cond.c \ othersrc/usr.bin/dholland-make2/nonints.h cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/dir.c cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/dholland-make2/dir.h cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/dholland-make2/make.h cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mkdep
Module Name:src Committed By: christos Date: Tue Mar 5 01:59:56 UTC 2013 Modified Files: src/usr.bin/mkdep: mkdep.1 mkdep.c Log Message: add -i and -v To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mkdep/mkdep.1 cvs rdiff -u -r1.41 -r1.42 src/usr.bin/mkdep/mkdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Mar 5 02:02:08 UTC 2013 Modified Files: src/share/mk: bsd.README bsd.dep.mk Log Message: MKDEPINCLUDES support. To generate a diff of this commit: cvs rdiff -u -r1.313 -r1.314 src/share/mk/bsd.README cvs rdiff -u -r1.75 -r1.76 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Tue Mar 5 02:04:11 UTC 2013 Modified Files: src/usr.bin/make: dir.c job.c parse.c Log Message: Keep track of the location where a dependency is defined, so we can report about it. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/usr.bin/make/dir.c cvs rdiff -u -r1.170 -r1.171 src/usr.bin/make/job.c cvs rdiff -u -r1.185 -r1.186 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gen
Module Name:src Committed By: soda Date: Tue Mar 5 02:46:33 UTC 2013 Modified Files: src/lib/libc/gen: realpath.3 Log Message: a sequel to getcwd.c revision 1.52 and realpath.3 revision 1.13 by christos: explicitly mention that NULL is allowed as second argument in the description part as well. PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/realpath.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Tue Mar 5 03:04:01 UTC 2013 Modified Files: src/sys/kern: kern_module.c Log Message: remove extra chatty messages To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/kern/kern_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools/host-mkdep
Module Name:src Committed By: christos Date: Tue Mar 5 03:06:21 UTC 2013 Modified Files: src/tools/host-mkdep: host-mkdep.in Log Message: account for -vi To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/tools/host-mkdep/host-mkdep.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gen
Module Name:src Committed By: enami Date: Tue Mar 5 03:11:27 UTC 2013 Modified Files: src/lib/libc/gen: realpath.3 Log Message: - Refer the argument with correct name. - Mark up the function as a function like rest of this paragraph does. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/realpath.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 03:32:08 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: arch.c compat.c cond.c dir.c dir.h graph.h main.c make.c make.h nonints.h parse.c suff.c targ.c Log Message: more arrays; fewer lists. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/dholland-make2/arch.c \ othersrc/usr.bin/dholland-make2/compat.c \ othersrc/usr.bin/dholland-make2/main.c \ othersrc/usr.bin/dholland-make2/parse.c cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/cond.c \ othersrc/usr.bin/dholland-make2/nonints.h cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/dholland-make2/dir.c \ othersrc/usr.bin/dholland-make2/graph.h cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/dir.h cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/dholland-make2/make.c \ othersrc/usr.bin/dholland-make2/suff.c \ othersrc/usr.bin/dholland-make2/targ.c cvs rdiff -u -r1.8 -r1.9 othersrc/usr.bin/dholland-make2/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.bin/dholland-make2
Module Name:othersrc Committed By: dholland Date: Tue Mar 5 04:31:27 UTC 2013 Modified Files: othersrc/usr.bin/dholland-make2: main.c Log Message: Simplify twisted logic of ReadAllMakefiles. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/dholland-make2/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/fs/common/nfsrpc
Module Name:src Committed By: christos Date: Tue Mar 5 05:39:54 UTC 2013 Modified Files: src/tests/fs/common/nfsrpc: svc.c Log Message: catch up with libc. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/common/nfsrpc/svc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.