svn commit: r250407 - in head/usr.sbin/makefs: . compat

Garrett Cooper yaneurabeya at gmail.com
Thu May 9 19:26:53 UTC 2013


On Thu, May 9, 2013 at 7:43 AM, Brooks Davis <brooks at 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


More information about the svn-src-head mailing list