pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Dealing with Linux-only functions in a package
Steven M. Bellovin wrote:
> On Fri, 20 Oct 2006 21:15:53 +0200, Christian Biere
> <christianbiere%gmx.de@localhost> wrote:
> > Have you asked the original developers? I think the fix is obvious:
> > Add a compile-time check for the header file and the functions. If
> > they are not available use GCC's inline assembler. Those functions
> > should be one-liners and map directly to x86 assembler instructions.
> How is that best done in the pkgsrc framework? Right now, I have a
> patch-ab file, which is applied unconditionally. There's no autoconfig
> framework to do that.
I meant to let the original developers do the work and then pick up their
changes from CVS/SVN or whatever.
> I could, I suppose, patch the offending file to use
> some local #include file, and write a post-patch target that checked
> for /usr/include/sys/io.h and used either that or the inline copy.
I'd just grab those functions, rename them so that they can't clash with the
Linux definitions and drop the sys/io.h inclusion so that it's more portable
and doesn't require a compile-time check. That's also better because the same
code will be used for each platform.
--
Christian
Home |
Main Index |
Thread Index |
Old Index