I'm writing some code which uses the AFS header files and libraries.  The
header files make extensive use of the _IOW define from the system header
files.  I've found that on the solaris machine (but not the hp, rs6k or sunos
machine), I have to include sys/ioccom.h to get the _IOW definition.  On all
the other platforms the AFS include files end up getting the right definition.

I mailed Transarc, and they say that on their solaris machine the program 
below compiles without problems, but it's not for me, and I'm wondering what
happens for other people:

(pdx799, sunos 5.4) % cat i.c
#include <afs/afsint.h>
#include <netinet/in.h>
#include <afs/venus.h>

main() {
     struct ViceIoctl param;
     char space[2048];

     param.out = space;
     param.out_size = sizeof(space);
     param.in_size = 0;
     return pioctl("/afs/pdx.intel.com", VIOCGETVOLSTAT, &param, 1);
}

(pdx799, sunos 5.4) % gcc -I/usr/afsws/include i.c 
i.c: In function `main':
i.c:12: parse error before `struct'


Putting '#include <sys/ioccom.h>' before the afsint.h include file makes
it work fine.


--
Scott Grosch            JF1-22, Pole D18, first floor           503-264-4812

Reply via email to