Changeset 1b73c740f371a37298ed85a5348a6ab2590ca869

Show
Ignore:
Timestamp:
03/09/06 00:32:08 (2 years ago)
Author:
Eric Petit <titer@videolan.org>
git-committer:
Eric Petit <titer@videolan.org> 1141860728 +0000
git-parent:

[c8f1e3fdf6027e4688a23eff25e91d13c7400e19]

git-author:
Eric Petit <titer@videolan.org> 1141860728 +0000
Message:

Emulate C99's lldiv() if necessary

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    rca0ddba r1b73c74  
    405405 
    406406dnl Check for usual libc functions 
    407 AC_CHECK_FUNCS(strdup strndup atof
     407AC_CHECK_FUNCS(strdup strndup atof lldiv
    408408AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)]) 
    409409AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)]) 
  • include/vlc_common.h

    rb641f67 r1b73c74  
    874874#endif 
    875875 
     876#ifndef HAVE_LLDIV 
     877    typedef struct { 
     878        long long quot; /* Quotient. */ 
     879        long long rem;  /* Remainder. */ 
     880    } lldiv_t; 
     881#   define lldiv vlc_lldiv 
     882    VLC_EXPORT( lldiv_t, vlc_lldiv, ( long long numer, long long denom ) ); 
     883#elif !defined(__PLUGIN__) 
     884#   define vlc_lldiv NULL 
     885#endif 
     886 
    876887#ifndef HAVE_SCANDIR 
    877888#   define scandir vlc_scandir 
  • src/extras/libc.c

    rb641f67 r1b73c74  
    345345 
    346346/***************************************************************************** 
     347 * lldiv: returns quotient and remainder 
     348 *****************************************************************************/ 
     349#if !defined( HAVE_LLDIV ) 
     350lldiv_t vlc_lldiv( long long numer, long long denom ) 
     351{ 
     352    lldiv_t d; 
     353    d.quot = numer / denom; 
     354    d.rem  = numer % denom; 
     355    return d; 
     356} 
     357#endif 
     358 
     359/***************************************************************************** 
    347360 * vlc_*dir_wrapper: wrapper under Windows to return the list of drive letters 
    348361 * when called with an empty argument or just '\'