]> granicus.if.org Git - postgis/commitdiff
Do not (re)define strcasestr in a public header (#3088)
authorSandro Santilli <strk@keybit.net>
Mon, 23 Mar 2015 16:04:08 +0000 (16:04 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 23 Mar 2015 16:04:08 +0000 (16:04 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13389 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
liblwgeom/liblwgeom.h.in
liblwgeom/lwutil.c
postgis/lwgeom_box.c

index 643c7e8784715c050269bf99733a4e2e1e2097a6..580cd983090018d49047f1af3b3a879bb6b1a196 100644 (file)
@@ -114,7 +114,6 @@ dnl Check for platform-specific functions
 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 
index 0b82836a68de724c12dd6ad227d515a64deab4d9..eb0bff1234b9fbd4e32cce890bb17ed48369e70d 100644 (file)
@@ -1991,10 +1991,6 @@ extern void lwfree(void *mem);
 /* 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
  ******************************************************************************/
index ee552ea8b71c0ce84ddebc6b389f176845e61f20..d7f59ae60ce6c45d820ad461ab2aaee3a69f022a 100644 (file)
@@ -328,23 +328,3 @@ clamp_srid(int srid)
        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
index 1dbea2dc7ff0d4cf4febacceb38be87a3b821d19..4806cbfec805fe37fcb0aee3389b6a4470c867f4 100644 (file)
@@ -52,12 +52,6 @@ Datum BOX2D_in(PG_FUNCTION_ARGS)
        
        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]);
        }