Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
a4d304c7
Commit
a4d304c7
authored
Jul 14, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused gettimeofday() Win32 replacement
parent
a28ab849
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
46 deletions
+1
-46
configure.ac
configure.ac
+1
-1
src/misc/mtime.c
src/misc/mtime.c
+0
-45
No files found.
configure.ac
View file @
a4d304c7
...
@@ -567,7 +567,7 @@ need_libc=false
...
@@ -567,7 +567,7 @@ need_libc=false
dnl Check for usual libc functions
dnl Check for usual libc functions
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r
gettimeofday
if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
AC_REPLACE_FUNCS([asprintf atof atoll dirfd flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
AC_REPLACE_FUNCS([asprintf atof atoll dirfd flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
AC_CHECK_FUNCS(fdatasync,,
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
...
...
src/misc/mtime.c
View file @
a4d304c7
...
@@ -229,51 +229,6 @@ mtime_t date_Decrement( date_t *p_date, uint32_t i_nb_samples )
...
@@ -229,51 +229,6 @@ mtime_t date_Decrement( date_t *p_date, uint32_t i_nb_samples )
return
p_date
->
date
;
return
p_date
->
date
;
}
}
#ifndef HAVE_GETTIMEOFDAY
#ifdef WIN32
/*
* Number of micro-seconds between the beginning of the Windows epoch
* (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970).
*
* This assumes all Win32 compilers have 64-bit support.
*/
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) || defined(__WATCOMC__)
# define DELTA_EPOCH_IN_USEC 11644473600000000Ui64
#else
# define DELTA_EPOCH_IN_USEC 11644473600000000ULL
#endif
static
uint64_t
filetime_to_unix_epoch
(
const
FILETIME
*
ft
)
{
uint64_t
res
=
(
uint64_t
)
ft
->
dwHighDateTime
<<
32
;
res
|=
ft
->
dwLowDateTime
;
res
/=
10
;
/* from 100 nano-sec periods to usec */
res
-=
DELTA_EPOCH_IN_USEC
;
/* from Win epoch to Unix epoch */
return
(
res
);
}
static
int
gettimeofday
(
struct
timeval
*
tv
,
void
*
tz
)
{
FILETIME
ft
;
uint64_t
tim
;
if
(
!
tv
)
{
return
VLC_EGENERIC
;
}
GetSystemTimeAsFileTime
(
&
ft
);
tim
=
filetime_to_unix_epoch
(
&
ft
);
tv
->
tv_sec
=
(
long
)
(
tim
/
1000000L
);
tv
->
tv_usec
=
(
long
)
(
tim
%
1000000L
);
return
(
0
);
}
#endif
#endif
/**
/**
* @return NTP 64-bits timestamp in host byte order.
* @return NTP 64-bits timestamp in host byte order.
*/
*/
...
...
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