Re: loc_t struct also defined in sys/localedef31.h
Posted in 1997
Colin M McGrath wrote: > > Dualta O'Briain (dualtaob@informix.com) sent me the simplest fix: > > "When compiling informix source on AIX use -D_H_LOCALEDEF to avoid the > inclusion of the header with the clashing definition." > > fglgo and fgldb have now compiled with our C function additions. > > I had written: > } > } One version of Informix we are using on our IBM RS6000 running AIX 2 3 is: > } INFORMIX-OnLine Version 5.05.UC6 > } and > } INFORMIX-4GL Rapid Development System Version 4.14.UC1 > } > } When compiling some C functions for linking into the fglgo runner, like so: > } > } cc -I/usr/informix-5/incl/tools -c usr_funcs.c > } > } I'm getting this error: > } > } "/usr/include/sys/localedef31.h", line 181.3: 1506-046 (S) Syntax error. > } "/usr/include/sys/localedef31.h", line 181.3: 1506-081 (S) Discarding previously defined typedef identifier: loc_t > } The error code from the last failed command is 1. > } > } Unfortunately, our "/usr/include/sys/localedef31.h" defines "loc_t" as > } the runtime locale tables struct, but as everyone knows, Informix defines > } "loc_t" in "incl/tools/locator.h" as the locator struct for blobs. > } > } Is it safe to comment out the loc_t in localedef31.h? Is it safe to change > > -- > Colin McGrath TRAC <Standard disclaimers apply> > email: cmm@trac3000 Phone Ext: 4144 FAX: 215-422-1445 However, if you need AIX loc_t (i.e. if you are using locales other than 'C'), it is safe to rename loc_t in /usr/include/sys/localedef31.h. The code that might use it is already compiled, so it does not care for structure names. Of course, if some of your code uses loc_t from localedef31.h, you should rename it there, too. Regards, Dragi "Bonzi" Raos +--------------------------------------------------------+ | 4-MATE Information Engineering Inc. | +--------------------------+-----------------------------+ | 4-MATE | Tel: +385 (1) 242-116 | | Kosa bb | +385 (1) 242-126 | | 10000 Zagreb | Fax: +385 (1) 242-121 | | Hrvatska (Croatia) | e-mail: bonzi@4mate.hr | | | URL: http://www.4mate.hr | +--------------------------+-----------------------------+