On Mon, 30 Apr 2001, Don Dugger wrote: > Keith- > > The number of defines is not the issue. This issue is that with > the current system these defines are only defined once. If you > create two different definitions that must match then I can > guarantee that some time in the future the definitions will get > out of sync and we'll spend an inordinate amount of time tracking > down a glitch that never would have occurred if we'd kept with > the current scheme of generating `offsets.h'. > > If the only solution you can come up with is to create multiple > definitions then I'm with David, let's just keep the current scheme. We have similar issues in FreeBSD (and all the other BSDs too). Our current solution is to compile a file which uses offsetof() to determine the symbol values and then use a script to extract those values. Earlier versions used to compile and run a program which used offsetof() but that made cross-builds harder. For your amusement, I have attached the definitions file for the FreeBSD/ia64 port and the script which pulls out the values. The script output is used to make assym.s which is included by all assembler files. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160