thanks, that make thingfs clearer. i'm just working on a solution like this:
#if define(__QNX__) #include <sys/netmgr.h> #define Makedev(x,y) makedev(ND_LOCAL_NODE,x,y) #else #define Makedev(x,y) makedev(x,y) #endif <...> Makedev(x,y); <...> i will post the patches as it works on qnx and passes a netbsd cross check. -piet -------- Original-Nachricht -------- > Datum: Tue, 22 Jan 2008 16:41:38 +0100 > Von: "Ralf S. Engelschall" <[EMAIL PROTECTED]> > An: rpm-devel@rpm5.org > Betreff: Re: makedev() on qnx > On Tue, Jan 22, 2008, Peter Kalbus wrote: > > > on qnx makedev() takes three parameters. the third parameter (first in > the list) is needed to address the node in a qnet environment. i got the > following information from the foundry27 community: > > > > Most (all?) 3rd party code isn't QNET aware so to be totally > > correct it should be: > > > > #include <sys/netmgr.h> > > makedev(ND_LOCAL_NODE, x, y); > > > > Which is equivalent to what you had. > > > > i'd like to add this in a convinient way to the configure.ac file. idea > is to check for 2 or 3 parameters in the configure.ac file. if 3 three > parameters is detected, i could include sys/netmgr.h. but what is the best way > to get the lines containing the makedev() handled. i don't like to > #ifdef/#else/#endif around each makedev() call. > > > > initial idea is to use something like this: > > > > #ifdef MAKEDEV_HAVE_THREE_PARAMS > > #include <sys/netmgr.h> > > #define __makedev(x,y) makedev(ND_LOCAL_NODE,x,y) > > #else > > #define __makedev(x,y) makedev(x,y) > > #endif > > > > and replace all calls of makedev(x,y) to __makedev(x,y) > > When I look at the current code base, RPM's approach seems to be to > declare a function Makedev (capital "M") and then use the "#ifdef > MAKEDEV_HAVE_THREE_PARAMS" there just once at the C compile level and > replace all makedev() calls with Makedev() calls... > > Ralf S. Engelschall > [EMAIL PROTECTED] > www.engelschall.com > > ______________________________________________________________________ > RPM Package Manager http://rpm5.org > Developer Communication List rpm-devel@rpm5.org ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org