On Dec 5, 2007 10:42 AM, David Jones <[EMAIL PROTECTED]> wrote: > currently in the z/OS specific implementation of dso.c it is returning errno > directly asis on several functions. > It should be setting the returned status to expected values consistent with > the unix and other implementations. > This will also get testdso to pass on z/OS too. > > > > Index: dso.c > =================================================================== > --- dso.c (revision 601360) > +++ dso.c (working copy) > @@ -54,7 +54,7 @@ > return APR_SUCCESS; > } > dso->failing_errno = errno; > - return errno; > + return APR_EINIT;
AFAICT, dso/unix/dso.c is simply punting when it returns APR_EINIT from dlclose(). APR has no error code that indicates that library unloading failed. dlclose() doesn't claim to set errno on Linux and Solaris and perhaps others. Interestingly, z/OS' dllfree() has documented return codes and, when an error occurs, also sets errno. I think this code should be left as-is. I'll omit this part of the patch; otherwise, it looks reasonable. Thanks!