view src/mingw-glpk-1-fixes.patch @ 4472:0fdeee4cfe11

gnuplot: enable Qt terminal and set default to wxt * src/gnuplot.mk: Depend on qt5 and build with QT=1 QT_DIR=$(HOST_PREFIX)/qt QT_BIN_DIR=(BUILD_TOOLS_PREFIX)/bin, install gnuplot_qt.exe * src/gnuplot-1-fixes.patch: add to patchto allow override of QT tools and paths * installer-files/octave-firsttime.vbs: set GNUTERM=wxt * installer-files/octave.vbs: set GNUTERM=wxt * installer-files/octave.bat: set GNUTERM=wxt * installer-files/cmdshell.bat: set GNUTERM=wxt
author Mike Miller <mtmiller@octave.org>
date Wed, 06 Sep 2017 16:19:37 -0700
parents d5757727d1dd
children
line wrap: on
line source

diff -ur glpk-4.55.orig/src/env/time.c glpk-4.55/src/env/time.c
--- glpk-4.55.orig/src/env/time.c	2016-01-14 09:41:16.135339481 -0500
+++ glpk-4.55/src/env/time.c	2016-01-14 09:48:05.279096864 -0500
@@ -44,9 +44,24 @@
 
 #define EPOCH 2440588 /* jday(1, 1, 1970) */
 
-/* POSIX version ******************************************************/
+#if defined(__MINGW32__)
+
+#include <windows.h>
 
-#if defined(HAVE_SYS_TIME_H) && defined(HAVE_GETTIMEOFDAY)
+double glp_time(void)
+{     SYSTEMTIME st;
+      int j;
+      double t;
+      GetSystemTime(&st);
+      j = jday(st.wDay, st.wMonth, st.wYear);
+      xassert(j >= 0);
+      t = ((((double)(j - EPOCH) * 24.0 + (double)st.wHour) * 60.0 +
+         (double)st.wMinute) * 60.0 + (double)st.wSecond) * 1000.0 +
+         (double)st.wMilliseconds;
+      return t;
+}
+/* POSIX version ******************************************************/
+#elif defined(HAVE_SYS_TIME_H) && defined(HAVE_GETTIMEOFDAY)
 
 #include <sys/time.h>
 #include <time.h>