On Monday 22 August 2005 12:13, Joe Orton wrote: > > OK, I guess what we really want here is an additional return code > > APR_NOOP. NOTIMPL is inappropriate, and you've raised an objection to > > SUCCESS. > > Why is ENOTIMPL inappropriate?
Erm, because ENOTIMPL is an error, whereas this noop isn't? > The function is not implemented for the > non-threaded build. If you want to be able to use these functions > unconditionally then you have to check for SUCCESS or (something) and > (something) may as well be APR_ENOTIMPL as some new code. > > What's really needed is a feature-detection API along with the ENOTIMPL > stubs. > > if (apr_has_feature(APR_FEATURE_THREADS)) > /* create mutex */ That would also work, but it's more complexity, and looks a bit like just shifting the #ifdefs away from the precompiler. I prefer Jeff's suggestion of tying that kind of thing into startup. Or APR_NOOP. -- Nick Kew