]> git.sesse.net Git - vlc/commitdiff
Test for assert() in configure.
authorChristophe Mutricy <xtophe@videolan.org>
Wed, 1 Feb 2006 14:39:05 +0000 (14:39 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Wed, 1 Feb 2006 14:39:05 +0000 (14:39 +0000)
configure.ac
src/libvlc.c

index 677ea7a3e912068fe170bc54f3c6b79f91731d7c..bc9abc57a075cf6e7b32335a7f18c9a6483bb162 100644 (file)
@@ -373,7 +373,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd
 dnl Check for system libs needed
 need_libc=false
 
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch assert)
 
 dnl Check for usual libc functions
 AC_CHECK_FUNCS(strdup strndup atof)
index 52dd7499467ce38d034a632130be2d3dbfb42e5b..0b8e664fae99617516664b717fedffc1bd7ca4f8 100644 (file)
@@ -2729,11 +2729,12 @@ char *FromLocale( const char *locale )
             vlc_iconv( libvlc.from_locale, NULL, NULL, NULL, NULL );
         }
         vlc_mutex_unlock( &libvlc.from_locale_lock );
-
+#ifdef HAVE_ASSERT
         assert (inb == 0);
         assert (*iptr == '\0');
         assert (*optr == '\0');
         assert (strlen( output ) == (size_t)(optr - output));
+#endif
         return realloc( output, optr - output + 1 );
     }
     return (char *)locale;
@@ -2776,11 +2777,13 @@ char *ToLocale( const char *utf8 )
         }
         vlc_mutex_unlock( &libvlc.to_locale_lock );
 
+#ifdef HAVE_ASSERT
         assert (inb == 0);
         assert (*iptr == '\0');
         assert (*optr == '\0');
         assert (strlen( output ) == (size_t)(optr - output));
-        return realloc( output, optr - output + 1 );
+#endif
+       return realloc( output, optr - output + 1 );
     }
     return (char *)utf8;
 }