Newsgroups: comp.sys.encore
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!skl
From: skl@wimsey.bc.ca (Samuel Lam)
Subject: Re: SIOCSARP doesn't seem to work
Reply-To: skl@wimsey.bc.ca (Samuel Lam)
Organization: Balliffe Intersystem, Vancouver, B.C., Canada
Date: Mon, 15 Apr 1991 08:55:09 GMT
Message-ID: <1991Apr15.085509.11229@wimsey.bc.ca>
References: <5184@goanna.cs.rmit.oz.au>

In article <5184@goanna.cs.rmit.oz.au>, dmh@goanna.cs.rmit.oz.au
 (Darren Hosking) wrote:
>I can't get the set arp cache ioctl (SIOCSARP) to work under UMAXV 2.4. The
>code that requires this ioctl is bootpd which previously compiled and
>ran correctly (under UMAXV 2.2m). However, under UMAXV 2.4 the ioctl always
>produces SIOCSARP: Invalid argument.

Did the C compiler change between the 2.2m compilation and the
2.4 compilation?  The problem you described sounds very much
like one I encountered a while ago on SCO XENIX.  The culpit
I found was in the definition for SIOCSARP in <sys/socket.h>.

For a macro like:

    #define A(x) ('x')

and an expression of

    A(b)

, an older compiler (actually preprocessor) will turn that into 'b'
while a newer one will turn it into 'x'.

What you have to do is change the macro to something like

    #define A(x) (x)

and then change the invoking expression to

    A('b')

In my case, I ended up editing my <sys/socket.h> to fix
the problem.  Fortunately, all the changes, both macros and
expressions, were confined within that one header file.

Hope this helps...

...Sam
-- 
<skl@wimsey.bc.ca>
