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:
imaginos
2004-08-24 22:53:37 +00:00
parent 2a725fde45
commit abb61af25f
2 changed files with 33 additions and 0 deletions
+24
View File
@@ -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);