dnl
AC_CHECK_FUNC(vasprintf, AC_DEFINE([HAVE_VASPRINTF]))
AC_CHECK_FUNC(asprintf, AC_DEFINE([HAVE_ASPRINTF]))
-AC_CHECK_FUNC(strcasestr, AC_DEFINE([HAVE_STRCASESTR]))
AC_FUNC_FSEEKO()
dnl
/* Utilities */
extern char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection);
-#ifndef HAVE_STRCASESTR
-extern char *strcasestr(const char *s, const char *find);
-#endif
-
/*******************************************************************************
* SQLMM internal functions - TODO: Move into separate header files
******************************************************************************/
return newsrid;
}
-#ifndef HAVE_STRCASESTR
-char *strcasestr(const char *s, const char *find)
-{
- char c, sc;
- size_t len;
-
- if ((c = *find++) != 0) {
- c = tolower((unsigned char)c);
- len = strlen(find);
- do {
- do {
- if ((sc = *s++) == 0)
- return (NULL);
- } while ((char)tolower((unsigned char)sc) != c);
- } while (strncasecmp(s, find, len) != 0);
- s--;
- }
- return ((char *)s);
-}
-#endif
gbox_init(&box);
- if (strcasestr(str,"BOX(") != str )
- {
- elog(ERROR,"box2d parser - doesnt start with BOX(");
- PG_RETURN_NULL();
- }
-
for(i = 0; str[i]; i++) {
str[i] = tolower(str[i]);
}