cvs commit: src/lib/libc/gen closedir.c

Dag-Erling Smørgrav des at
Thu Dec 6 04:57:05 PST 2007

Bruce Evans <brde at> writes:
> dd_lock cannot be declared as struct pthread_mutex *, since pthread_mutex
> is not permitted in the application namespace of dirent.h.  dirent.h
> is (was) careful about namespaces.  E.g., it keeps out of the application
> namespace for its own struct _dirdesc.  This doesn't work for pthread_mutex
> since that is misdesigned.  (I think pthread_mutex_t is supposed to
> hide the implementation and reduce namespace problems, but struct
> pthread was only declared in <pthread.h> where it is permitted in the
> namespace, so <pthread.h> doesn't bother naming it struct _pthread_mutex.
> Other headers can't define it with a different name (tag) because different
> tags give different structs.)

Since struct pthread_mutex is not part of the API, how about simply
renaming it to struct _pthread_mutex to circumvent the namespace issues?

Dag-Erling Smørgrav - des at

More information about the cvs-all mailing list