mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52:55 +02:00
source modifications to allow compilation on solaris
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@15 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -11,6 +11,30 @@ using std::stringstream;
|
||||
CUtils::CUtils() {}
|
||||
CUtils::~CUtils() {}
|
||||
|
||||
#ifdef __sun
|
||||
char *strcasestr(const char *big, const char *little)
|
||||
{
|
||||
int len;
|
||||
|
||||
if (!little || !big || !little[0])
|
||||
return (char *) big;
|
||||
|
||||
len = strlen(little);
|
||||
while (*big)
|
||||
{
|
||||
if (tolower(*big) == tolower(*little))
|
||||
{
|
||||
if (strncasecmp(big, little, len) == 0)
|
||||
return (char *) big;
|
||||
}
|
||||
|
||||
big++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif /* __sun */
|
||||
|
||||
string CUtils::GetIP(unsigned long addr) {
|
||||
char szBuf[16];
|
||||
memset((char*) szBuf, 0, 16);
|
||||
|
||||
Reference in New Issue
Block a user