On Sat, 5 Sep 1998, Paul Eggert wrote:
It would be a good idea to use a common prefix for the structure elemen= ts (xtm_nsec, xtm_sec, etc.).
I never understood what these common prefixes are good for.
I believe that they were put in for historical reasons. In very old versions of the C compiler, all structure members lived in the same name space. Nowadays this original motivation is not important, but the tradition lives on in some places. Personally, I don't think the xtm_ is needed, but I don't care too much one way or the other.
There's still the interaction with the macro namespace (user macros named sec, etc.) - with a common prefix the standard could follow POSIX.1 and say that any name beginning xtm_ must not be declared or #defined by the application if <xtime.h> is included - which could help extensibility. (There's a discussion of structure extensibility and user macros in the POSIX.1 rationale - see B.2.7.2.) -- Joseph S. Myers jsm28@cam.ac.uk