Proposal: libsmbclient API

Derrell Lipman derrell.lipman at unwireduniverse.com
Tue Mar 31 18:40:26 GMT 2009


On Tue, Mar 31, 2009 at 2:24 PM, Volker Lendecke
<Volker.Lendecke at sernet.de>wrote:

> On Tue, Mar 31, 2009 at 01:05:05PM -0400, Derrell Lipman wrote:
> > 1. Assume a proper POSIX Threads implementation that guarantees
> > thread-specific errno. We then just need to ensure that the application
> (and
> > of course libsmbclient) doesn't call any of the prohibited, i.e.
> > known-non-thread-safe, functions.
>
> Just a stupid question: Are there pthreads implementations
> around that do not guarantee a thread-specific errno? Asked
> in a different way: Does the pthreads spec not mandate this?
> You can hardly program efficiently without that.
>

It *is* a requirement of POSIX Threads, but Andreas indicated that some
environments he's working on/with don't have thread-specific errno. If they
do all provide that, then the smbc_[sg]et_errno() functions he requested are
superfluous. Maybe I misunderstood him. I'm awaiting his comments.

If errno is guaranteed to be thread-specific along with the majority of
system and C library calls, we'd just need to go through and ensure that
we're not using any of the specifically-disallowed calls... a much easier
job (assuming there are replacement calls we can use).

Derrell


More information about the samba-technical mailing list