VirtualBox

Ignore:
Timestamp:
Nov 7, 2023 2:37:39 PM (18 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160041
Message:

libs/xpcom: Convert xcDll.{cpp,h} and nsLocalFileUnix.cpp to use our RTLdr* API directly instead of going through the API defined in prlink.h (which is also just using RTLdr* internally), bugref:10545

Location:
trunk/src/libs/xpcom18a4/xpcom/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/io/nsILocalFile.idl

    r1 r101944  
    4343%{C++
    4444#include "prio.h"
    45 #include "prlink.h"
    4645#include <stdio.h>
     46
     47#include <iprt/ldr.h>
    4748%}
    4849
    4950[ptr] native PRFileDescStar(PRFileDesc);
    50 [ptr] native PRLibraryStar(PRLibrary);
     51[ptr] native RTLDRMOD(RTLDRMODINTERNAL);
    5152[ptr] native FILE(FILE);
    5253
     
    105106    [noscript] FILE           openANSIFileDesc(in string mode);
    106107
    107     [noscript] PRLibraryStar  load();
     108    [noscript] RTLDRMOD       load();
    108109   
    109110    readonly attribute PRInt64 diskSpaceAvailable;
  • trunk/src/libs/xpcom18a4/xpcom/io/nsLocalFileUnix.cpp

    r101803 r101944  
    5858#include <ctype.h>
    5959#include <locale.h>
    60 #ifdef XP_BEOS
    61     #include <Path.h>
    62     #include <Entry.h>
    63     #include <Roster.h>
    64 #endif
    65 #if defined(VMS)
    66     #include <fabdef.h>
    67 #endif
    6860
    6961#include "nsDirectoryServiceDefs.h"
     
    8274#include "nsNativeCharsetUtils.h"
    8375
    84 // On some platforms file/directory name comparisons need to
    85 // be case-blind.
    86 #if defined(VMS)
    87     #define FILE_STRCMP strcasecmp
    88     #define FILE_STRNCMP strncasecmp
    89 #else
    90     #define FILE_STRCMP strcmp
    91     #define FILE_STRNCMP strncmp
    92 #endif
     76#include <iprt/errcore.h>
     77
     78#define FILE_STRCMP strcmp
     79#define FILE_STRNCMP strncmp
    9380
    9481#define VALIDATE_STAT_CACHE()                   \
     
    15321519
    15331520NS_IMETHODIMP
    1534 nsLocalFile::Load(PRLibrary **_retval)
    1535 {
    1536     CHECK_mPath();
    1537     NS_ENSURE_ARG_POINTER(_retval);
    1538 
    1539     *_retval = PR_LoadLibrary(mPath.get());
    1540 
    1541     if (!*_retval)
     1521nsLocalFile::Load(RTLDRMOD *phMod)
     1522{
     1523    CHECK_mPath();
     1524    NS_ENSURE_ARG_POINTER(phMod);
     1525
     1526    RTLDRMOD hMod = NIL_RTLDRMOD;
     1527    int vrc = RTLdrLoad(mPath.get(), &hMod);
     1528    if (RT_FAILURE(vrc))
    15421529        return NS_ERROR_FAILURE;
     1530
     1531    *phMod = hMod;
    15431532    return NS_OK;
    15441533}
Note: See TracChangeset for help on using the changeset viewer.

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