Permalink
Browse files

Remove the mapserver provided strdup() function and the HAVE_STRDUP c…

…make check
  • Loading branch information...
geographika
geographika committed Sep 3, 2016
1 parent dcb8291 commit d9ce708f41bf2a7c19f9cc8df428cab6af796b2d
Showing with 0 additions and 21 deletions.
  1. +0 −1 CMakeLists.txt
  2. +0 −4 mapserver.h
  3. +0 −16 mapstring.c
@@ -92,7 +92,6 @@ endif(NOT(WIN32))
check_function_exists("strrstr" HAVE_STRRSTR)
check_function_exists("strcasecmp" HAVE_STRCASECMP)
check_function_exists("strcasestr" HAVE_STRCASESTR)
check_function_exists("strdup" HAVE_STRDUP)
check_function_exists("strlcat" HAVE_STRLCAT)
check_function_exists("strlcpy" HAVE_STRLCPY)
check_function_exists("strlen" HAVE_STRLEN)
@@ -2237,10 +2237,6 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
MS_DLL_EXPORT char* msStringEscape( const char * pszString );
MS_DLL_EXPORT int msStringInArray( const char * pszString, char **array, int numelements);
#ifndef HAVE_STRDUP
MS_DLL_EXPORT char *strdup(char *s);
#endif /* NEED_STRDUP */
#ifndef HAVE_STRRSTR
MS_DLL_EXPORT char *strrstr(char *string, char *find);
#endif /* NEED_STRRSTR */
@@ -278,22 +278,6 @@ char *strcasestr(const char *s, const char *find)
}
#endif
#ifndef HAVE_STRDUP
char *strdup(char *s)
{
char *s1;
if(!s)
return(NULL);
s1 = (char *)malloc(strlen(s) + 1);
if(!s1)
return(NULL);
strcpy(s1,s);
return(s1);
}
#endif
#ifndef HAVE_STRNCASECMP
int strncasecmp(const char *s1, const char *s2, int len)
{

0 comments on commit d9ce708

Please sign in to comment.