]> git.sesse.net Git - vlc/commitdiff
Remove untested strncasecmp replacement
authorRafaël Carré <funman@videolan.org>
Tue, 15 Jan 2013 08:29:33 +0000 (09:29 +0100)
committerRafaël Carré <funman@videolan.org>
Tue, 15 Jan 2013 08:36:51 +0000 (09:36 +0100)
Since it never built, it was never needed on any platform

compat/strncasecmp.c [deleted file]
configure.ac
extras/buildsystem/cmake/config.h.cmake
include/vlc_fixups.h

diff --git a/compat/strncasecmp.c b/compat/strncasecmp.c
deleted file mode 100644 (file)
index c968a7c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * strncasecmp.c: POSIX strncasecmp() replacement
- *****************************************************************************
- * Copyright © 1998-2009 VLC authors and VideoLAN
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-int strncasecmp (const char *s1, const char *s2)
-{
-#ifdef HAVE_STRNICMP
-    return strnicmp (s1, s2);
-#else
-    for (size_t i = 0; i < n; i++)
-    {
-        unsigned char c1 = s1[i], c2 = s2[i];
-        int d = tolower (c1) - tolower (c2);
-        if (d || !c1)
-            return d;
-        assert (c2);
-    }
-    return 0;
-#endif
-}
index 566a9f1b569854eaf8c74e6b5958690fabaec477..b0639e0559376d04afca5cca858f1c2dd938776b 100644 (file)
@@ -492,7 +492,7 @@ need_libc=false
 dnl Check for usual libc functions
 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
 AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
-AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
+AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
 ])
index 224adc3b92430ce13f676941997dd13a6232e491..f337e8a1868c12693f63129437babfb6792706dd 100644 (file)
 #cmakedefine HAVE_STRING_H
 #cmakedefine HAVE_STRISTR
 #cmakedefine HAVE_STRLCPY
-#cmakedefine HAVE_STRNCASECMP
 #cmakedefine HAVE_STRNDUP
 #cmakedefine HAVE_STRNICMP
 #cmakedefine HAVE_STRNLEN
index 9d20a2d54b657db16c8c11e8fb859a53dec2f82d..43405838835added01ec226c2c9c700aba1431d1 100644 (file)
@@ -118,10 +118,6 @@ char *strcasestr (const char *, const char *);
 char *strdup (const char *);
 #endif
 
-#ifndef HAVE_STRNCASECMP
-int strncasecmp (const char *, const char *, size_t);
-#endif
-
 #ifndef HAVE_STRVERSCMP
 int strverscmp (const char *, const char *);
 #endif