You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ji...@apache.org on 2002/04/22 15:15:48 UTC

cvs commit: apr/dso/unix dso.c

jim         02/04/22 06:15:48

  Modified:    .        CHANGES
               dso/unix dso.c
  Log:
  To support modules like PHP, which implement their own
  loaded extensions, Darwin needs to place their public
  symbols in the global table. In Rhapsody, we simply set
  bindNow to False to achieve the same goal.
  
  Submitted by:	Marko Karppinen <ma...@php.net>
  Reviewed by:	Jim Jagielski, Fred Sanchez
  
  Revision  Changes    Path
  1.265     +5 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.264
  retrieving revision 1.265
  diff -u -r1.264 -r1.265
  --- CHANGES	22 Apr 2002 10:28:58 -0000	1.264
  +++ CHANGES	22 Apr 2002 13:15:48 -0000	1.265
  @@ -1,5 +1,10 @@
   Changes with APR b1
   
  +  *) To support modules like PHP, which implement their own
  +     loaded extensions, Darwin needs to place their public
  +     symbols in the global table. [Marko Karppinen <ma...@php.net>,
  +     Jim Jagielski]
  +
     *) Rename apr_get_groupname to apr_group_name_get.
        [Thom May <th...@planetarytramp.net>]
        
  
  
  
  1.50      +9 -3      apr/dso/unix/dso.c
  
  Index: dso.c
  ===================================================================
  RCS file: /home/cvs/apr/dso/unix/dso.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- dso.c	20 Mar 2002 19:45:02 -0000	1.49
  +++ dso.c	22 Apr 2002 13:15:48 -0000	1.50
  @@ -126,12 +126,18 @@
       NSModule os_handle = NULL;
       char* err_msg = NULL;
       if (NSCreateObjectFileImageFromFile(path, &image) == NSObjectFileImageSuccess) {
  -#ifdef NSLINKMODULE_OPTION_PRIVATE
  +
  +/*
  + * Under Darwin, we want/need to place dynamically loaded extensions'
  + * public symbols into the global symbol table. As long as modules
  + * don't have overlapping symbols, we're golden.
  + */
  +#if defined(NSLINKMODULE_OPTION_NONE)
           os_handle = NSLinkModule(image, path,
  -                                 NSLINKMODULE_OPTION_PRIVATE |
  +                                 NSLINKMODULE_OPTION_NONE |
                                    NSLINKMODULE_OPTION_RETURN_ON_ERROR);
   #else
  -        os_handle = NSLinkModule(image, path, TRUE);
  +        os_handle = NSLinkModule(image, path, FALSE);
   #endif
           NSDestroyObjectFileImage(image);
       }