Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2013 12:26:52 -0700
From:      Garrett Cooper <yaneurabeya@gmail.com>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r250407 - in head/usr.sbin/makefs: . compat
Message-ID:  <CAGHfRMBL-9w3fF2FK_fCDY6MTNaU32iZnFa1eFCJrui-ZS=3sQ@mail.gmail.com>
In-Reply-To: <201305091443.r49Ehbf9004229@svn.freebsd.org>
References:  <201305091443.r49Ehbf9004229@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 9, 2013 at 7:43 AM, Brooks Davis <brooks@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMBL-9w3fF2FK_fCDY6MTNaU32iZnFa1eFCJrui-ZS=3sQ>