Commit 125a27bb authored by Christophe Mutricy's avatar Christophe Mutricy

Test for assert() in configure.

parent 7b93bebc
......@@ -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)
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment