From owner-svn-src-head@FreeBSD.ORG Thu May 9 19:26:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 59B47A86; Thu, 9 May 2013 19:26:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [IPv6:2607:f8b0:400c:c01::229]) by mx1.freebsd.org (Postfix) with ESMTP id DC762DCD; Thu, 9 May 2013 19:26:52 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id jz10so3158002veb.14 for ; Thu, 09 May 2013 12:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=iLgXSKUmmmLkQG7DUrLUfBDhBFTm3yi3UiZ2POI9+WQ=; b=Z53dTJU78gA7A5bl1Cpu1KdSIvvat/kt4esS8uIMxPglgghE2skzUWSF39LYjoxYGd csvTnZIs5m6/+2/ncX48ESW7oTeS3kk9xo8xtA4rp2LuPlTp7OjLJDnveABBCWCnBY1K DgxXaqKcz1WOiH3yadhB8OeHc9uoYcTHWsftQcTZAlM1ZxnB6VnjmTqtuvl239GFNK1t DzHj9vyGKpIDqEDLyIrtjAfMN7MHMPa032vBIF6AawJm3YStnzTf+j3yjveZ4Z+YOpd1 p2dfYsX26FrQnUDD+W3p5sZEAUQdYfpOUqks83sfa7OY/ljTccY3sPnxa4Tm4cRxsPF6 Hpkg== MIME-Version: 1.0 X-Received: by 10.220.253.8 with SMTP id my8mr9010714vcb.23.1368127612455; Thu, 09 May 2013 12:26:52 -0700 (PDT) Received: by 10.220.141.72 with HTTP; Thu, 9 May 2013 12:26:52 -0700 (PDT) In-Reply-To: <201305091443.r49Ehbf9004229@svn.freebsd.org> References: <201305091443.r49Ehbf9004229@svn.freebsd.org> Date: Thu, 9 May 2013 12:26:52 -0700 Message-ID: Subject: Re: svn commit: r250407 - in head/usr.sbin/makefs: . compat From: Garrett Cooper To: Brooks Davis Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 19:26:53 -0000 On Thu, May 9, 2013 at 7:43 AM, Brooks Davis wrote: > Author: brooks > Date: Thu May 9 14:43:36 2013 > New Revision: 250407 > URL: http://svnweb.freebsd.org/changeset/base/250407 > > Log: > Remove duplicated copies of various NetBSD compatibility shims used by > makefs and use libnetbsd, contrib/mtree, and contrib/mknod instead. > > Sponsored by: DARPA, AFRLo > MFC after: 1 month > > Deleted: > head/usr.sbin/makefs/compat/ > head/usr.sbin/makefs/getid.c > Modified: > head/usr.sbin/makefs/Makefile > head/usr.sbin/makefs/makefs.h > head/usr.sbin/makefs/walk.c I like the idea of libnetbsd, but there really isn't a clean way to designate whether or not something needs to use the compat shims without extensively hacking imported sources. Some of the concerns are over: 1. __arraycount (NetBSD) vs nitems (FreeBSD/OpenBSD). 2. __DECONST (FreeBSD) vs __UNCONST (NetBSD). Also, nitems live in sys/param.h instead of sys/cdefs.h which causes issues when porting over code from NetBSD. Could we improve this to match NetBSD a bit more in the base system without having to extensively involve libnetbsd? Also, could we make a make snippet for interfacing with libnetbsd to avoid code duplication? Thanks, -Garrett