Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1b73c740
Commit
1b73c740
authored
Mar 08, 2006
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emulate C99's lldiv() if necessary
parent
c8f1e3fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
configure.ac
configure.ac
+1
-1
include/vlc_common.h
include/vlc_common.h
+11
-0
src/extras/libc.c
src/extras/libc.c
+13
-0
No files found.
configure.ac
View file @
1b73c740
...
...
@@ -404,7 +404,7 @@ 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 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)])
...
...
include/vlc_common.h
View file @
1b73c740
...
...
@@ -873,6 +873,17 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
# 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
...
...
src/extras/libc.c
View file @
1b73c740
...
...
@@ -343,6 +343,19 @@ int64_t vlc_atoll( const char *nptr )
}
#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 '\'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment