Revision: 57189
          http://sourceforge.net/p/brlcad/code/57189
Author:   starseeker
Date:     2013-08-28 02:12:59 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
Looks like we will need _gmtime_s on Windows?

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt
    brlcad/trunk/src/libbu/date-time.c

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2013-08-27 21:53:30 UTC (rev 57188)
+++ brlcad/trunk/CMakeLists.txt 2013-08-28 02:12:59 UTC (rev 57189)
@@ -1703,6 +1703,8 @@
 BRLCAD_FUNCTION_EXISTS(getloadavg HAVE_GETLOADAVG)
 BRLCAD_FUNCTION_EXISTS(getopt_long HAVE_GETOPT_LONG)
 BRLCAD_FUNCTION_EXISTS(getprogname HAVE_GETPROGNAME)
+BRLCAD_FUNCTION_EXISTS(gmtime_r HAVE_GMTIME_R)
+BRLCAD_FUNCTION_EXISTS(_gmtime_s HAVE__GMTIME_S)
 BRLCAD_FUNCTION_EXISTS(kill HAVE_KILL)
 BRLCAD_FUNCTION_EXISTS(lrand48 HAVE_LRAND48)
 BRLCAD_FUNCTION_EXISTS(memset HAVE_MEMSET)

Modified: brlcad/trunk/src/libbu/date-time.c
===================================================================
--- brlcad/trunk/src/libbu/date-time.c  2013-08-27 21:53:30 UTC (rev 57188)
+++ brlcad/trunk/src/libbu/date-time.c  2013-08-28 02:12:59 UTC (rev 57189)
@@ -43,7 +43,11 @@
        return;
     }
 
+#ifdef HAVE__GMTIME_S
+    retval = _gmtime_s(&loctime, &curr_time);
+#else
     retval = gmtime_r(&curr_time, &loctime);
+#endif
     if (retval != &loctime) {
        /* time error: but set something */
        bu_vls_sprintf(vls_gmtime, "TIME_ERROR");

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to