[vlc-devel] EPG on Win32 (#ifdef HAVE_LOCALTIME_R)
Marian Ďurkovič
md at bts.sk
Wed Aug 19 08:08:38 CEST 2009
Hi,
in src/input/item.c, function input_item_SetEpg(), the code is #ifdef-ed
with HAVE_LOCALTIME_R which means it won't get compilled on Win32. This
is also the only case where a code is #ifdef-ed like this, all other
occurences rely on localtime_r() replacement provided in VLC.
I checked several references google can find about localtime on Win32,
and they seem to agree that localtime() uses thread-local storage. This
one seems to be the most complete, mentioning in detail what is possible
and what is not:
http://article.gmane.org/gmane.comp.video.ffmpeg.devel/82653
As input_item_SetEpg() uses localtime() results right on the next line
without any function call in between, I believe we could enable EPG on
Win32 by changing the #ifdef to:
#if defined (HAVE_LOCALTIME_R) || defined (WIN32)
What do you think?
Thanks & kind regards,
M.
More information about the vlc-devel
mailing list