On 02/11/11 21:58, Garrett Wollman wrote:
I would very much like to see this happen. The only quibble I would make with Christos's proposed API is that, because C does not have incomplete typedefs, a new foo_t type should not be introduced. Using such typedefs creates undesirable ordering dependencies between headers (not a problem for the Implementation but definitely a problem for applications if they want to minimize namespace pollution). Using an incomplete structure type has all the benefits of a typedef and none of the drawbacks. If the proposal is adopted by either C or POSIX, they will ignore the drawbacks and create a new _t type anyway, but since they have joint custody of the "_t" namespace, they can at least guarantee that it's defined in an official system header as well.
Isn't this an incomplete typedef? typedef struct _timezone_opaque_t *timezone_t; It's a typedef for an incomplete structure, I know, but there's precedent for this kind of thing. jch