VirtualBox

Changeset 86066 in vbox


Ignore:
Timestamp:
Sep 8, 2020 2:16:53 PM (4 years ago)
Author:
vboxsync
Message:

scm: New svn and apr search locations for solaris and a hack for dealing with libapr*.so being installed in a different location from the svn bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/scmsubversion.cpp

    r85696 r86066  
    723723            { "../lib64/lib", ".so" },
    724724            { "../lib64/lib", "-1.so" },
     725#   ifdef RT_OS_SOLARIS
     726            { "../lib/svn/amd64/lib", ".so" },
     727            { "../lib/svn/amd64/lib", "-1.so" },
     728            { "../apr/1.6/lib/amd64/lib", ".so" },
     729            { "../apr/1.6/lib/amd64/lib", "-1.so" },
     730#   endif
    725731#  endif
    726732#  ifdef RT_ARCH_X86
    727733            { "../lib/i386-linux-gnu/lib", ".so" },
    728734            { "../lib/i386-linux-gnu/lib", "-1.so" },
    729 #  else
     735#  elif defined(RT_ARCH_AMD64)
    730736            { "../lib/x86_64-linux-gnu/lib", ".so" },
    731737            { "../lib/x86_64-linux-gnu/lib", "-1.so" },
     
    769775                    }
    770776                }
     777# ifdef RT_OS_SOLARIS
     778                /*
     779                 * HACK: Solaris may keep libapr.so separately from svn, so do a separate search for it.
     780                 */
     781                /** @todo It would make a lot more sense to use the dlfcn.h machinery to figure
     782                 *        out which libapr*.so* file was loaded into the process together with
     783                 *        the two svn libraries and get a dlopen handle for it.  We risk ending
     784                 *        up with the completely wrong libapr here! */
     785                if (iLib == RT_ELEMENTS(s_apszLibraries) - 1 && RT_FAILURE(rc))
     786                {
     787                    ahMods[iLib] = NIL_RTLDRMOD;
     788                    for (unsigned iVar2 = 0; iVar2 < RT_ELEMENTS(s_aVariations) && ahMods[iLib] == NIL_RTLDRMOD; iVar2++)
     789                        for (unsigned iSuff2 = 0; iSuff2 < RT_ELEMENTS(s_apszSuffixes) && ahMods[iLib] == NIL_RTLDRMOD; iSuff2++)
     790                        {
     791                            *pszEndPath = '\0';
     792                            rc = RTPathAppend(szPath, sizeof(szPath), s_aVariations[iVar2].pszPrefix);
     793                            if (RT_SUCCESS(rc))
     794                                rc = RTStrCat(szPath, sizeof(szPath), s_apszLibraries[iLib]);
     795                            if (RT_SUCCESS(rc))
     796                                rc = RTStrCat(szPath, sizeof(szPath), s_aVariations[iVar2].pszSuffix);
     797                            if (RT_SUCCESS(rc))
     798                                rc = RTStrCat(szPath, sizeof(szPath), s_apszSuffixes[iSuff2]);
     799                            if (RT_SUCCESS(rc))
     800                                rc = RTLdrLoadEx(szPath, &ahMods[iLib], RTLDRLOAD_FLAGS_NT_SEARCH_DLL_LOAD_DIR, NULL);
     801                            if (RT_SUCCESS(rc))
     802                                RTMEM_WILL_LEAK(ahMods[iLib]);
     803                            else
     804                                ahMods[iLib] = NIL_RTLDRMOD;
     805                        }
     806                }
     807# endif /* RT_OS_SOLARIS */
    771808            }
    772809            if (iLib == RT_ELEMENTS(s_apszLibraries) && RT_SUCCESS(rc))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette