summaryrefslogtreecommitdiff
path: root/lib/timegm.c
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@users.sourceforge.net>2005-11-14 12:34:45 +0000
committerFrantišek Dvořák <valtri@users.sourceforge.net>2005-11-14 12:34:45 +0000
commit678b4e9cad47a6c176bb05de32aa0dd56742f15a (patch)
treebbf9721ae6fb2fde3326bfece1af08ba34d3a164 /lib/timegm.c
parentdd90d5f61610a7bd59fe3f778d07000cc9746516 (diff)
downloadxine-lib-678b4e9cad47a6c176bb05de32aa0dd56742f15a.tar.gz
xine-lib-678b4e9cad47a6c176bb05de32aa0dd56742f15a.tar.bz2
*BUGFIX*
Testsuite for M$ Windows: - init mutex in all video drivers ('none' for testsuite, fixes crashes), was OK for linux pthreads - use WaitForSingleObject for console file descriptirs in _x_io_select (fixes stdin:/) - workaround heavy debug messages in asf demuxer for some samples (fixes full disk :->) Fixed previous fix, s/gmtime/timgm/ :-) Aalib cross detection + udate docs CVS patchset: 7799 CVS date: 2005/11/14 12:34:45
Diffstat (limited to 'lib/timegm.c')
-rw-r--r--lib/timegm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/timegm.c b/lib/timegm.c
new file mode 100644
index 000000000..182a1b527
--- /dev/null
+++ b/lib/timegm.c
@@ -0,0 +1,19 @@
+#include "config.h"
+
+#include <time.h>
+#include <stdlib.h>
+
+time_t _xine_private_timegm(struct tm *tm) {
+ time_t ret;
+ char *tz;
+
+ tz = getenv("TZ");
+ setenv("TZ", "", 1);
+ tzset();
+ ret = mktime(tm);
+ if (tz) setenv("TZ", tz, 1);
+ else unsetenv("TZ");
+ tzset();
+
+ return ret;
+}