From: Justin B. <jus...@ll...> - 2008-06-18 16:57:27
|
Swig users- I am new to Swig so forgive me if I'm a bit naive. I was under the impression that Swig could handle any ANSI C code. I have some driver code from a vendor with the following struct in it: typedef volatile struct { uchar_t pad00; uchar_t asciiI; uchar_t pad02; uchar_t asciiP; uchar_t pad04; uchar_t asciiA; uchar_t pad06; uchar_t asciiC; uchar_t pad08; uchar_t manufacturerId; uchar_t pad0a; uchar_t modelId; uchar_t pad0c; uchar_t revision; uchar_t pad0e; uchar_t reserved; uchar_t pad10; uchar_t driverIdLow; uchar_t pad12; uchar_t driverIdHigh; uchar_t pad14; uchar_t bytesUsed; uchar_t pad16; uchar_t CRC; uchar_t pad18; uchar_t packSpecific[0x3f-0x18]; } ipac_idProm_t; This compiles just fine with gcc -ansi but Swig gives me a syntax error. Of course when I take out the volatile everything is just fine. I recognize that this may be bad programming practice, but this is vendor supplied code and I'd rather not modify it. Any ideas? Thanks -- ----------------------------------------------------------- Justin M. Bradley Electrical Engineer Lawrence Livermore National Laboratory jus...@ll... ----------------------------------------------------------- |