Changeset 1b73c740f371a37298ed85a5348a6ab2590ca869
- 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
| rca0ddba |
r1b73c74 |
|
| 405 | 405 | |
|---|
| 406 | 406 | dnl Check for usual libc functions |
|---|
| 407 | | AC_CHECK_FUNCS(strdup strndup atof) |
|---|
| | 407 | AC_CHECK_FUNCS(strdup strndup atof lldiv) |
|---|
| 408 | 408 | AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)]) |
|---|
| 409 | 409 | AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)]) |
|---|
| rb641f67 |
r1b73c74 |
|
| 874 | 874 | #endif |
|---|
| 875 | 875 | |
|---|
| | 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 | |
|---|
| 876 | 887 | #ifndef HAVE_SCANDIR |
|---|
| 877 | 888 | # define scandir vlc_scandir |
|---|
| rb641f67 |
r1b73c74 |
|
| 345 | 345 | |
|---|
| 346 | 346 | /***************************************************************************** |
|---|
| | 347 | * lldiv: returns quotient and remainder |
|---|
| | 348 | *****************************************************************************/ |
|---|
| | 349 | #if !defined( HAVE_LLDIV ) |
|---|
| | 350 | lldiv_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 | /***************************************************************************** |
|---|
| 347 | 360 | * vlc_*dir_wrapper: wrapper under Windows to return the list of drive letters |
|---|
| 348 | 361 | * when called with an empty argument or just '\' |
|---|