apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B. W. Fitzpatrick" <f...@apple.com>
Subject Re: [PATCH] Make DSO work on Darwin
Date Tue, 20 Nov 2001 16:48:36 GMT
One good turn deserves another. I just committed this patch:

   Index: dso.c
   ===================================================================
   RCS file: /home/cvs/apr/dso/unix/dso.c,v
   retrieving revision 1.45
   retrieving revision 1.46
   diff -u -r1.45 -r1.46
   --- dso.c	2001/11/20 08:18:38	1.45
   +++ dso.c	2001/11/20 16:31:25	1.46
   @@ -117,7 +117,7 @@

    #elif defined(DSO_USE_DYLD)
        NSObjectFileImage image;
   -    NSModule os_handle;
   +    NSModule os_handle = NULL;
        char* err_msg = NULL;
        if (NSCreateObjectFileImageFromFile(path, &image) != 
NSObjectFileImageSuccess) {
    	err_msg = "cannot create object file image";


So DSO should be considerably happier on Darwin now. :)

-Fitz


On Tuesday, November 20, 2001, at 01:46  AM, Sander Temme wrote:

> We were not returning the pointer to the module structure that we just
> pulled out of the DSO file. No wonder the module structure we tried to use
> in mod_so.c:load_module was total garbage! The following patch fixes that
> problem.
>
> Index: dso.c
> ===================================================================
> RCS file: /home/cvspublic/apr/dso/unix/dso.c,v
> retrieving revision 1.44
> diff -u -r1.44 dso.c
> --- dso.c       2001/11/13 21:15:33     1.44
> +++ dso.c       2001/11/20 07:21:02
> @@ -209,6 +209,7 @@
>          handle->errormsg = "cannot resolve symbol";
>         return APR_EINIT;
>      }
> +    *ressym = retval;
>      return APR_SUCCESS;
>  #elif defined(DSO_USE_DLFCN)
>
> Enjoy,
>
> Sander


Mime
View raw message