*** ./src/iri.c.ORIG Tue Dec 9 00:04:08 2014 --- ./src/iri.c Tue Dec 9 00:06:29 2014 *************** *** 46,51 **** --- 46,74 ---- /* Note: locale encoding is kept in options struct (opt.locale) */ + #ifdef _AIX + char * + strcasestr (char *haystack, char *needle) + { + char *p, *startn = 0, *np = 0; + + for (p = haystack; *p; p++) { + if (np) { + if (toupper(*p) == toupper(*np)) { + if (!*++np) + return startn; + } else + np = 0; + } else if (toupper(*p) == toupper(*needle)) { + np = needle + 1; + startn = p; + } + } + + return 0; + } + #endif + /* Given a string containing "charset=XXX", return the encoding if found, or NULL otherwise */ char *