Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!wuarchive!rex!ukma!seismo!dimacs.rutgers.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: finding offset of a member in C structures Message-ID: <16211@smoke.brl.mil> Date: 21 May 91 02:48:23 GMT References: <1276@unisql.UUCP> <16194@smoke.brl.mil> <1991May20.212338.24349@thyme.jpl.nasa.gov> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <1991May20.212338.24349@thyme.jpl.nasa.gov> kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) writes: >In article <16194@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: >>In article <1276@unisql.UUCP> pckim@unisql.UUCP (Pyung-Chul Kim) writes: >>-can I get the offset of member2 at *compiling time* and *portably* ? >>Yes, but you shouldn't very often need to do so. >Opinion or Fact? Both. >Here's how *they* do in the X Window System. I expect it's about as >portable as anything gets. Wrong! I posted a portable method.