Author: al
Date: 2009-12-30 21:36:07 +0100 (Wed, 30 Dec 2009)
New Revision: 2908

Modified:
   trunk/librawstudio/rs-utils.c
Log:
gmtime_r() is in pthread.h on MinGW, strptime() does not excsist in MinGW.

Modified: trunk/librawstudio/rs-utils.c
===================================================================
--- trunk/librawstudio/rs-utils.c       2009-12-30 20:33:21 UTC (rev 2907)
+++ trunk/librawstudio/rs-utils.c       2009-12-30 20:36:07 UTC (rev 2908)
@@ -22,6 +22,9 @@
 #include <config.h>
 #include <glib.h>
 #include <glib/gstdio.h>
+#ifdef WIN32
+#include <pthread.h> /* MinGW WIN32 gmtime_r() */
+#endif
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -73,9 +76,10 @@
 {
        struct tm *tm = g_new0(struct tm, 1);
        GTime timestamp = -1;
-
+#ifndef WIN32 /* There is no strptime() in time.h in MinGW */
        if (strptime(str, "%Y:%m:%d %H:%M:%S", tm))
                timestamp = (GTime) mktime(tm);
+#endif
 
        g_free(tm);
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to