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 lstat)
dnl Check for usual libc functions
-AC_CHECK_FUNCS(strdup strndup atof)
+AC_CHECK_FUNCS(strdup strndup atof lldiv)
AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
# define vlc_strtoll NULL
#endif
+#ifndef HAVE_LLDIV
+ typedef struct {
+ long long quot; /* Quotient. */
+ long long rem; /* Remainder. */
+ } lldiv_t;
+# define lldiv vlc_lldiv
+ VLC_EXPORT( lldiv_t, vlc_lldiv, ( long long numer, long long denom ) );
+#elif !defined(__PLUGIN__)
+# define vlc_lldiv NULL
+#endif
+
#ifndef HAVE_SCANDIR
# define scandir vlc_scandir
# define alphasort vlc_alphasort
}
#endif
+/*****************************************************************************
+ * lldiv: returns quotient and remainder
+ *****************************************************************************/
+#if !defined( HAVE_LLDIV )
+lldiv_t vlc_lldiv( long long numer, long long denom )
+{
+ lldiv_t d;
+ d.quot = numer / denom;
+ d.rem = numer % denom;
+ return d;
+}
+#endif
+
/*****************************************************************************
* vlc_*dir_wrapper: wrapper under Windows to return the list of drive letters
* when called with an empty argument or just '\'