VirtualBox

Changeset 45256 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 30, 2013 8:30:10 PM (12 years ago)
Author:
vboxsync
Message:

RTStrNCmp: solaris 10 workaround.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/RTStrNCmp.cpp

    r44528 r45256  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4242        return 1;
    4343
     44#ifdef RT_OS_SOLARIS
     45    /* Solaris: tstUtf8 found to fail for some RTSTR_MAX on testboxsh1:
     46       solaris.amd64 v5.10 (Generic_142901-12 (Assembled 30 March 2009)). */
     47    while (cchMax-- > 0)
     48    {
     49        char ch1 = *psz1++;
     50        char ch2 = *psz2++;
     51        if (ch1 != ch2)
     52            return ch1 > ch2 ? 1 : -1;
     53        else if (ch1 == 0)
     54            break;
     55    }
     56    return 0;
     57#else
    4458    return strncmp(psz1, psz2, cchMax);
     59#endif
    4560}
    4661RT_EXPORT_SYMBOL(RTStrNCmp);
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