After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 393310 - [pango] localtime_r does not exist in MinGW
[pango] localtime_r does not exist in MinGW
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Windows
: Normal normal
: 0.10.12
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-05 22:53 UTC by Vincent Torri
Modified: 2007-01-08 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Torri 2007-01-05 22:53:53 UTC
The compilation of the pango plugin fails because localtime_r does not exists in Windows. A solution would be to implement that function. Something like:

#ifdef WIN32

struct tm *
localtime_r (const time_t *t, struct tm *tp)
{
  struct tm *l = localtime (t);
  if (! l)
    return NULL;
  if (tp)
    *tp = *l;
  return tp;
}

#endif /* WIN32 */

I don't know if it can be a problem, but it seems that localtime is not threadsafe.
Comment 1 Tim-Philipp Müller 2007-01-08 13:33:49 UTC
Should be fixed now:

 2007-01-08  Tim-Philipp Müller  <tim at centricular dot net>
 
       * configure.ac:
         Check if localtime_r() is available.

       * ext/pango/gstclockoverlay.c: (gst_clock_overlay_render_time):
         If localtime_r() is not available, fall back to localtime(). Should
         fix build on MingW (#393310).

Please re-open if it's not (even after running autoregen.sh manually).