gozer 2003/06/09 20:12:52
Modified: . Changes lib/Apache Build.pm xs/APR/APR APR.pm xs/ModPerl/Const Const.pm Log: Fix DynaLoader breakeage when using DL_GLOBAL on OpenBSD Reviewed by: stas Revision Changes Path 1.193 +3 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.192 retrieving revision 1.193 diff -u -r1.192 -r1.193 --- Changes 4 Jun 2003 16:50:58 -0000 1.192 +++ Changes 10 Jun 2003 03:12:51 -0000 1.193 @@ -12,6 +12,9 @@ =item 1.99_10-dev +Fix DynaLoader breakeage when using DL_GLOBAL on OpenBSD +[Philippe M. Chiasson <[EMAIL PROTECTED]>] + renamed the private modperl_module_config_get_obj function to modperl_module_config_create_obj, since the logic creates the object but doesn't dig it out if it already exists. then, 1.126 +2 -1 modperl-2.0/lib/Apache/Build.pm Index: Build.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v retrieving revision 1.125 retrieving revision 1.126 diff -u -r1.125 -r1.126 --- Build.pm 20 May 2003 23:52:42 -0000 1.125 +++ Build.pm 10 Jun 2003 03:12:52 -0000 1.126 @@ -15,6 +15,7 @@ use constant AIX => $^O eq 'aix'; use constant DARWIN => $^O eq 'darwin'; use constant HPUX => $^O eq 'hpux'; +use constant OPENBSD => $^O eq 'openbsd'; use constant WIN32 => $^O eq 'MSWin32'; use constant MSVC => WIN32() && ($Config{cc} eq 'cl'); @@ -1049,7 +1050,7 @@ my $ranlib = "\t" . '$(MODPERL_RANLIB) $@'; - $link .= "\n" . $ranlib unless DARWIN; + $link .= "\n" . $ranlib unless (DARWIN or OPENBSD); $link; } 1.4 +4 -1 modperl-2.0/xs/APR/APR/APR.pm Index: APR.pm =================================================================== RCS file: /home/cvs/modperl-2.0/xs/APR/APR/APR.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- APR.pm 19 Mar 2003 02:51:59 -0000 1.3 +++ APR.pm 10 Jun 2003 03:12:52 -0000 1.4 @@ -6,7 +6,10 @@ #dlopen("APR.so", RTDL_GLOBAL); so we only need to link libapr.a once # XXX: see xs/ModPerl/Const/Const.pm for issues of using 0x01 -sub dl_load_flags { 0x01 } +use Config (); +use constant DL_GLOBAL => + ( $Config::Config{dlsrc} eq 'dl_dlopen.xs' && $^O ne 'openbsd' ) ? 0x01 : 0x0; +sub dl_load_flags { DL_GLOBAL } unless (defined &APR::XSLoader::BOOTSTRAP) { __PACKAGE__->bootstrap($VERSION); 1.6 +1 -1 modperl-2.0/xs/ModPerl/Const/Const.pm Index: Const.pm =================================================================== RCS file: /home/cvs/modperl-2.0/xs/ModPerl/Const/Const.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Const.pm 19 Mar 2003 02:51:59 -0000 1.5 +++ Const.pm 10 Jun 2003 03:12:52 -0000 1.6 @@ -16,7 +16,7 @@ # even when RTDL_GLOBAL is available, patch submitted to p5p use Config (); use constant DL_GLOBAL => - $Config::Config{dlsrc} eq 'dl_dlopen.xs' ? 0x01 : 0x0; + ( $Config::Config{dlsrc} eq 'dl_dlopen.xs' && $^O ne 'openbsd' ) ? 0x01 : 0x0; sub dl_load_flags { DL_GLOBAL } #only bootstrap for use outside of mod_perl