API_EXPORT(char *) ap_uudecode(ap_pool_t *p, const char *bufcoded);
API_EXPORT(char *) ap_uuencode(ap_pool_t *p, char *string);
-#ifndef HAVE_STRCASECMP
-int strcasecmp(const char *a, const char *b);
-#endif
-
-#ifndef HAVE_STRNCASECMP
-int strncasecmp(const char *a, const char *b, size_t n);
-#endif
-
#include "pcreposix.h"
API_EXPORT(regex_t *) ap_pregcomp(ap_pool_t *p, const char *pattern,
typedef char * caddr_t;
#define HAVE_MEMMOVE
-#define HAVE_STRCASECMP
-#define HAVE_STRNCASECMP
-#define HAVE_STRDUP
-#define HAVE_STRSTR
-
-#define strcasecmp(s1, s2) stricmp(s1, s2)
-#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
#define HAVE_SYS_STAT_H
#define lstat(x, y) stat(x, y)
return (x ? 1 : 0); /* If the first character is ':', it's broken, too */
}
-#ifndef HAVE_STRDUP
-char *strdup(const char *str)
-{
- char *sdup;
-
- if (!(sdup = (char *) malloc(strlen(str) + 1))) {
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Ouch! Out of memory in our strdup()!");
- return NULL;
- }
- sdup = strcpy(sdup, str);
-
- return sdup;
-}
-#endif
-
-/* The following two routines were donated for SVR4 by Andreas Vogel */
-#ifndef HAVE_STRCASECMP
-int strcasecmp(const char *a, const char *b)
-{
- const char *p = a;
- const char *q = b;
- for (p = a, q = b; *p && *q; p++, q++) {
- int diff = ap_tolower(*p) - ap_tolower(*q);
- if (diff)
- return diff;
- }
- if (*p)
- return 1; /* p was longer than q */
- if (*q)
- return -1; /* p was shorter than q */
- return 0; /* Exact match */
-}
-
-#endif
-
-#ifndef HAVE_STRNCASECMP
-int strncasecmp(const char *a, const char *b, size_t n)
-{
- const char *p = a;
- const char *q = b;
-
- for (p = a, q = b; /*NOTHING */ ; p++, q++) {
- int diff;
- if (p == a + n)
- return 0; /* Match up to n characters */
- if (!(*p && *q))
- return *p - *q;
- diff = ap_tolower(*p) - ap_tolower(*q);
- if (diff)
- return diff;
- }
- /*NOTREACHED */
-}
-#endif
-
-/* The following routine was donated for UTS21 by dwd@bell-labs.com */
-#ifndef HAVE_STRSTR
-char *strstr(char *s1, char *s2)
-{
- char *p1, *p2;
- if (*s2 == '\0') {
- /* an empty s2 */
- return(s1);
- }
- while((s1 = strchr(s1, *s2)) != NULL) {
- /* found first character of s2, see if the rest matches */
- p1 = s1;
- p2 = s2;
- while (*++p1 == *++p2) {
- if (*p1 == '\0') {
- /* both strings ended together */
- return(s1);
- }
- }
- if (*p2 == '\0') {
- /* second string ended, a match */
- break;
- }
- /* didn't find a match here, try starting at next character in s1 */
- s1++;
- }
- return(s1);
-}
-#endif
-
#ifndef HAVE_INITGROUPS
int initgroups(const char *name, gid_t basegid)
{