From owner-svn-src-all@freebsd.org Sun Jun 17 03:09:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C321100A78D for ; Sun, 17 Jun 2018 03:09:33 +0000 (UTC) (envelope-from juli@northcloak.com) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 362227BEAB for ; Sun, 17 Jun 2018 03:09:33 +0000 (UTC) (envelope-from juli@northcloak.com) Received: by mail-qt0-x231.google.com with SMTP id y20-v6so12528553qto.8 for ; Sat, 16 Jun 2018 20:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=northcloak-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oO0X2qLdmLssDnMkKMSjWLxqjRpCOdhjpXHsmqjdBv8=; b=jQovmrNPFBafOaWz+byzFNFEdRRVsHs0yJ4hgK7yq62LKodsQknazkyhXgm1J2TNQG yISsV1kZvycr/ac9kjrbvBT7oZUicD6AUbmB2tpyWjhV2UNlmkd+N8vsIAesSJdOMyMj IzueLOXOeZ5SYIJTzW+9zROQDG9mGB1jPNLx9a5KpP+S4bt6XQ1P40jwmzsz1opAtKqM +BK84Vn1qjTz3ziltecrEfJt0+pT0acCrVTGQhhVpAXt7J0tt6EmozBf1EqJc/fS5pzb yCs2khGoThc0i4ySWkpkzcjWQKZmTunk6BcCu3ISSotCVOLIRyK2XVDrM6oXIozLp2Gv E+RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oO0X2qLdmLssDnMkKMSjWLxqjRpCOdhjpXHsmqjdBv8=; b=odiW1cdG5Hqjdm0RRA4c8uvDHFCm1CHFcQoOe58Yxcw5ZHbWURArJNmSOMIw/ZJA0t Fe5rMjf+ug2DAd8orBlqxkJftYmcO1/FRHL5km9cH3TVA8sGjZy/c5mF43YnQiuePHbj EPJXqJTRc0ITMHqdM/KyhgEZ46xu3bGRX+r+8TZ9kmxWT+njsJh/ArbIUXIQT5EOKgQR 0+IzkopwZb5BYzxdl1eenBAz8WGi2Fk/zV/IvLmY6pLvnb2Gp0q5eG/aYcN7+Y6qIR88 uc+hiPD8zutOJV9M5IQXvRqLv6bg7NEt0Asav7SIKY92qOulDK2NxrzfxB7F8SYkP/ws LXJQ== X-Gm-Message-State: APt69E0pF1KlDm16Nx8aHScku7KrBJ4rkaBp4QsD5pCd7vb68wKZXtH5 eUfykXP0WbuxmZHGdEiX177xNGU18HtvrXV53tWT/Q== X-Google-Smtp-Source: ADUXVKKOlFS4+y4+QWSiFnvLoZLBzGqubWn6+vixV9Vl0bD3alFhZchNlLJqlTOAd5zETs3E0yWCoNYCXJbn8z1KuTw= X-Received: by 2002:a0c:d2ee:: with SMTP id x43-v6mr6421830qvh.237.1529204972797; Sat, 16 Jun 2018 20:09:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:aed:2221:0:0:0:0:0 with HTTP; Sat, 16 Jun 2018 20:08:52 -0700 (PDT) In-Reply-To: <201806170306.w5H36VRQ058345@pdx.rh.CN85.dnsmgr.net> References: <201806170306.w5H36VRQ058345@pdx.rh.CN85.dnsmgr.net> From: Juli Mallett Date: Sat, 16 Jun 2018 20:08:52 -0700 Message-ID: Subject: Re: svn commit: r335270 - head/lib/liby To: rgrimes@freebsd.org Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 03:09:33 -0000 On 16 June 2018 at 20:06, Rodney W. Grimes wrote: > > On 16 June 2018 at 19:43, Rodney W. Grimes net> > > wrote: > > > > > > On 16 June 2018 at 18:10, Rodney W. Grimes > > > > wrote: > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > >> Author: eadler > > > > >> Date: Sat Jun 16 23:50:34 2018 > > > > >> New Revision: 335270 > > > > >> URL: https://svnweb.freebsd.org/changeset/base/335270 > > > > >> > > > > >> Log: > > > > >> liby: build with WARNS=6 > > > > >> > > > > >> Tested with amd64, arm64, i386, mips > > > > >> > > > > >> Added: > > > > >> head/lib/liby/yyerror.h (contents, props changed) > > > > >> Modified: > > > > >> head/lib/liby/Makefile > > > > >> head/lib/liby/main.c > > > > >> head/lib/liby/yyerror.c > > > > >> > > > > >> Modified: head/lib/liby/Makefile > > > > >> ============================================================ > > > ================== > > > > >> --- head/lib/liby/Makefile Sat Jun 16 23:49:22 2018 > > > (r335269) > > > > >> +++ head/lib/liby/Makefile Sat Jun 16 23:50:34 2018 > > > (r335270) > > > > >> @@ -5,6 +5,4 @@ LIB= y > > > > >> SRCS= main.c yyerror.c > > > > >> NO_PIC= > > > > >> > > > > >> -WARNS?= 1 > > > > >> - > > > > >> .include > > > > >> > > > > >> Modified: head/lib/liby/main.c > > > > >> ============================================================ > > > ================== > > > > >> --- head/lib/liby/main.c Sat Jun 16 23:49:22 2018 > > > (r335269) > > > > >> +++ head/lib/liby/main.c Sat Jun 16 23:50:34 2018 > > > (r335270) > > > > >> @@ -32,16 +32,17 @@ > > > > >> #include > > > > >> __FBSDID("$FreeBSD$"); > > > > >> > > > > >> -#ifndef lint > > > > >> +#if defined(LIBC_SCCS) && !defined(lint) > > > > >> static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/4/93"; > > > > >> -#endif /* not lint */ > > > > >> +#endif /* LIBC_SCCS and not lint */ > > > > >> > > > > >> #include > > > > >> > > > > >> -int yyparse(void); > > > > >> +#include "yyerror.h" > > > > >> > > > > >> int > > > > >> main(void) > > > > >> { > > > > >> + > > > > >> exit(yyparse()); > > > > >> } > > > > >> > > > > >> Modified: head/lib/liby/yyerror.c > > > > >> ============================================================ > > > ================== > > > > >> --- head/lib/liby/yyerror.c Sat Jun 16 23:49:22 2018 > > > (r335269) > > > > >> +++ head/lib/liby/yyerror.c Sat Jun 16 23:50:34 2018 > > > (r335270) > > > > >> @@ -32,16 +32,18 @@ > > > > >> #include > > > > >> __FBSDID("$FreeBSD$"); > > > > >> > > > > >> -#ifndef lint > > > > >> +#if defined(LIBC_SCCS) && !defined(lint) > > > > >> static char sccsid[] = "@(#)yyerror.c 8.1 (Berkeley) > 6/4/93"; > > > > >> -#endif /* not lint */ > > > > >> +#endif /* LIBC_SCCS and not lint */ > > > > >> > > > > >> #include > > > > >> > > > > >> +#include "yyerror.h" > > > > >> + > > > > >> int > > > > >> -yyerror(msg) > > > > >> -char *msg; > > > > >> +yyerror(const char *msg) > > > > >> { > > > > >> - (void)fprintf(stderr, "%s\n", msg); > > > > >> + > > > > >> + fprintf(stderr, "%s\n", msg); > > > > >> return(0); > > > > >> } > > > > >> > > > > >> Added: head/lib/liby/yyerror.h > > > > >> ============================================================ > > > ================== > > > > >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > > >> +++ head/lib/liby/yyerror.h Sat Jun 16 23:50:34 2018 > > > (r335270) > > > > >> @@ -0,0 +1,36 @@ > > > > > > > > > > Where did this file come from???? > > > > > > > > I added a header file instead of keeping the prototypes in the .c > > > > files. Is something wrong with that? > > > > > > If you extracted part of a c file and placed it in a .h file, you > > > should add a > > > * from: pathname > > > comment to this yyerror.h > > > > > > > Rod, > > > > It's two prototypes. For functions that are extern. Including the UCB > > copyright isn't even necessary, but seems reasonable. > > Actually including a 1990/1993 UCB copyright is -exactly- why > the from: line should be there. If he had assigned his own > copyright to this I wouldn't of batted an eye, but he didn't, > which means he copied it from someplace. I would like to have > that someplace clearly documented as has always historically > been done when copying parts of or whole files around the > BSD source tree. > > His commit message also lacked any details about this move > of code, it just said, build with WARNS=6. > > > > > No, people do not need to add "from:" notes when adding a header to > provide > > prototypes for extern functions. > > They do if they infact copied a portion of another file... I don't think this has been a FreeBSD norm since at least the late '90s for both trivial and nontrivial refactoring. We have good version control. If this is the expectation, I'd love it if you could find somewhere it's written down, or if it's not, start an FCP to get it written down. It seems important for this to be codified if people should expect to get called out on a mailing list for not doing it.