Problems regenerating ioctlent.sh on UnixWare
John Hughes
john at calva.com
Fri Oct 26 01:09:07 UTC 2001
On UnixWare I can't rebuild ioctlent.sh because some #defines are inside
#ifdef blocks:
$ gmake
/bin/sh ./ioctlent.sh /usr/include >ioctlent.c
gcc -E ioctlent.c | sed 1,/xyzzy/d >ioctlent.raw
gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I. -g -c ./../ioctlsort.c
In file included from ./../ioctlsort.c:44:
ioctlent.raw:196: `V_SETPARMS' undeclared here (not in a function)
ioctlent.raw:196: initializer element is not constant
ioctlent.raw:196: (near initialization for `ioctlent[190].code')
...
inside /usr/include/sys/vtoc.h we have:
#ifdef MERGE386
/* Floppy driver ioctl() commands for MERGE386 */
#define V_SETPARMS (VIOC|128) /* Set floppy parameters */
...
This could be fixed either by adding a "-DMERGE386" to the cpp command
in the Makefile, but how can we work out the list of -D's to add?
Or by fixing ioctlent.sh to protect the lines in ioctlent.c with an
#ifdef, i.e. something like:
#ifdef ASY_GETSTATS
{ "sys/asyc.h", "ASY_GETSTATS", ASY_GETSTATS },
#endif
#ifdef ASY_SETUARTMODE
{ "sys/asyc.h", "ASY_SETUARTMODE", ASY_SETUARTMODE },
#endif
This would lose some rare ioctl's, but at least we could regenerate
ioctlent.h.
More information about the Strace-devel
mailing list