VirtualBox

Changeset 102458 in vbox


Ignore:
Timestamp:
Dec 4, 2023 5:54:51 PM (12 months ago)
Author:
vboxsync
Message:

libs/xpcom: Get rid of PL_strcasecmp/PL_strncasecmp and replace with IPRT equivalents, bugref:10545

Location:
trunk/src/libs/xpcom18a4
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r102457 r102458  
    155155        nsprpub/lib/ds/plarenas.h \
    156156        nsprpub/lib/ds/plhash.h \
    157         nsprpub/lib/libc/include/plstr.h \
    158157        nsprpub/pr/include/prbit.h \
    159158        nsprpub/pr/include/prclist.h \
     
    389388        nsprpub/lib/ds/plarena.c \
    390389        nsprpub/lib/ds/plhash.c \
    391         nsprpub/lib/libc/src/strccmp.c \
    392390        nsprpub/pr/src/pthreads/ptsynch.c
    393391
  • trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp

    r102457 r102458  
    4141#include "nsIServiceManager.h"
    4242#include "nsReadableUtils.h"
    43 #include "plstr.h"
    4443#include "ipcITransactionObserver.h"
    4544#include "tmTransaction.h"
  • trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcStringList.h

    r7029 r102458  
    3939#define ipcStringList_h__
    4040
     41#include <iprt/string.h>
     42
    4143#include <string.h>
    42 #include "plstr.h"
    4344#include "nscore.h"
    4445#include "ipcList.h"
     
    5657
    5758    PRBool Equals(const char *val) const { return strcmp(mData, val) == 0; }
    58     PRBool EqualsIgnoreCase(const char *val) const { return PL_strcasecmp(mData, val) == 0; }
     59    PRBool EqualsIgnoreCase(const char *val) const { return RTStrICmp(mData, val) == 0; }
    5960
    6061    class ipcStringNode *mNext;
  • trunk/src/libs/xpcom18a4/vboxdeps.cpp

    r102457 r102458  
    22
    33
    4 #include <plstr.h>
    54#include <nsDeque.h>
    65#include <nsHashSets.h>
     
    1413uintptr_t deps[] =
    1514{
    16     (uintptr_t)PL_strcasecmp,
    1715    (uintptr_t)PL_HashString,
    1816    (uintptr_t)NS_ProxyRelease,
  • trunk/src/libs/xpcom18a4/xpcom/base/nsDebugImpl.cpp

    r102348 r102458  
    4141#include "nsDebugImpl.h"
    4242#include "nsDebug.h"
    43 #include "plstr.h"
    4443#include "nsError.h"
    4544
  • trunk/src/libs/xpcom18a4/xpcom/base/nsTraceRefcntImpl.cpp

    r102457 r102458  
    4343#include "nsISupports.h"
    4444#include "nsVoidArray.h"
    45 #include "plstr.h"
    4645#include <stdlib.h>
    4746#include "nsCOMPtr.h"
  • trunk/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp

    r102457 r102458  
    29052905    nsFactoryEntry* factoryEntry = entry->mFactoryEntry;
    29062906    if (data->cid->Equals(factoryEntry->mCid) &&
    2907         ((data->regName && !PL_strcasecmp(factoryEntry->mLocation, data->regName)) ||
     2907        ((data->regName && !RTStrICmp(factoryEntry->mLocation, data->regName)) ||
    29082908         (data->factory && data->factory == factoryEntry->mFactory.get())))
    29092909        return PL_DHASH_REMOVE;
     
    29832983    // next check to see if there is a CID registered
    29842984    old = GetFactoryEntry(aClass);
    2985     if (old && old->mLocation && !PL_strcasecmp(old->mLocation, registryName))
     2985    if (old && old->mLocation && !RTStrICmp(old->mLocation, registryName))
    29862986    {
    29872987        nsAutoMonitor mon(mMon);
  • trunk/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp

    r102204 r102458  
    6060
    6161#include <iprt/assert.h>
     62#include <iprt/string.h>
    6263#include <VBox/log.h>
    6364
     
    205206                    if (   NS_FAILED(rv)
    206207                        || leafName.Length() < sizeof(".dSYM")
    207                         || PL_strcasecmp(leafName.get() + (leafName.Length() - sizeof(".dSYM") + 1), ".dSYM"))
     208                        || RTStrICmp(leafName.get() + (leafName.Length() - sizeof(".dSYM") + 1), ".dSYM"))
    208209#endif
    209210                        rv = RegisterComponentsInDir(when, dirEntry);
     
    573574    size_t cchLeafName = strLeafName.Length();
    574575    if (   cchLeafName <= sizeof(s_szSuff)
    575         || PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuff) + 1, s_szSuff))
     576        || RTStrICmp(strLeafName.get() + cchLeafName - sizeof(s_szSuff) + 1, s_szSuff))
    576577    {
    577578        Log(("Skipping '%s'...", strLeafName.get()));
     
    580581#ifndef VBOX_IN_32_ON_64_MAIN_API
    581582    if (   cchLeafName >= sizeof(s_szSuffInvalid)
    582         && !PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuffInvalid) + 1, s_szSuffInvalid))
     583        && !RTStrICmp(strLeafName.get() + cchLeafName - sizeof(s_szSuffInvalid) + 1, s_szSuffInvalid))
    583584    {
    584585        Log(("Skipping '%s' (#2)...", strLeafName.get()));
  • trunk/src/libs/xpcom18a4/xpcom/ds/nsCRT.h

    r102457 r102458  
    4545#include <ctype.h>
    4646#include "nsMemory.h"
    47 #include "plstr.h"
    4847#include "nscore.h"
    4948#include "prtypes.h"
     
    145144    return PRUint32(::strlen(s));                                               
    146145  }                                                                             
    147 
    148   /// Case-insensitive string comparison.
    149   static PRInt32 strcasecmp(const char* s1, const char* s2) {
    150     return PRInt32(PL_strcasecmp(s1, s2));
    151   }
    152 
    153   /// Case-insensitive string comparison with length
    154   static PRInt32 strncasecmp(const char* s1, const char* s2, PRUint32 aMaxLen) {
    155     PRInt32 result=PRInt32(PL_strncasecmp(s1, s2, aMaxLen));
    156     //Egads. PL_strncasecmp is returning *very* negative numbers.
    157     //Some folks expect -1,0,1, so let's temper its enthusiasm.
    158     if (result<0)
    159       result=-1;
    160     return result;
    161   }
    162146 
    163147  static char* strdup(const char* str) {
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiMisc.cpp

    r102323 r102458  
    6868    for(const xptiFileTypeEntry* p = g_Entries; p->name; p++)
    6969    {
    70         if(len > p->len && 0 == PL_strcasecmp(p->name, &(name[len - p->len])))
     70        if(len > p->len && 0 == RTStrICmp(p->name, &(name[len - p->len])))
    7171            return p->type;
    7272    }
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiprivate.h

    r102457 r102458  
    7979
    8080#include "pldhash.h"
    81 #include "plstr.h"
    8281#include "prtime.h"
    8382
  • trunk/src/libs/xpcom18a4/xpcom/string/src/nsStringComparator.cpp

    r1 r102458  
    3636 *
    3737 * ***** END LICENSE BLOCK ***** */
     38#include <iprt/string.h>
    3839
    3940#include <ctype.h>
    4041#include "nsAString.h"
    41 #include "plstr.h"
    42 
    4342
    4443  // define nsStringComparator
     
    5655nsCaseInsensitiveCStringComparator::operator()( const char_type* lhs, const char_type* rhs, PRUint32 aLength ) const
    5756  {
    58     PRInt32 result=PRInt32(PL_strncasecmp(lhs, rhs, aLength));
     57    PRInt32 result=PRInt32(RTStrNICmp(lhs, rhs, aLength));
    5958    //Egads. PL_strncasecmp is returning *very* negative numbers.
    6059    //Some folks expect -1,0,1, so let's temper its enthusiasm.
  • trunk/src/libs/xpcom18a4/xpcom/string/src/nsStringObsolete.cpp

    r102345 r102458  
    289289  PRInt32 result=0;
    290290  if(aIgnoreCase)
    291     result=PRInt32(PL_strncasecmp(aStr1, aStr2, aCount));
     291    result=PRInt32(RTStrNICmp(aStr1, aStr2, aCount));
    292292  else
    293293    result=nsCharTraits<char>::compare(aStr1,aStr2,aCount);
  • trunk/src/libs/xpcom18a4/xpcom/tests/TestCRT.cpp

    r102457 r102458  
    3939#include "nsCRT.h"
    4040#include "nsString.h"
    41 #include "plstr.h"
    4241#include <stdlib.h>
    4342
     
    6362  PRIntn clib = RTStrCmp(s1, s2);
    6463  PRIntn clib_n = RTStrNCmp(s1, s2, n);
    65   PRIntn clib_case = PL_strcasecmp(s1, s2);
    66   PRIntn clib_case_n = PL_strncasecmp(s1, s2, n);
    6764
    6865  nsAutoString t1,t2;
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