PR libf2c/7384
* libU77/datetime_.c: Use GetLocalTime on MS-Windows.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57142
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-09-14 Tim Prince <tprince@computer.org>
+
+ PR libf2c/7384
+ * libU77/datetime_.c: Use GetLocalTime on MS-Windows.
+
2002-08-31 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/6367
2002-08-31 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/6367
# include <time.h>
# endif
#endif
# include <time.h>
# endif
#endif
+#if defined (_WIN32)
+#include <windows.h>
+#undef min
+#undef max
+#endif
#include "f2c.h"
void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
#include "f2c.h"
void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
struct tm ltime = *localtime (<), gtime = *gmtime (<);
char dat[9], zon[6], ftim[11];
int i, vals[8];
struct tm ltime = *localtime (<), gtime = *gmtime (<);
char dat[9], zon[6], ftim[11];
int i, vals[8];
+#if defined (_WIN32)
+ struct _SYSTEMTIME wdattim;
+ GetLocalTime(&wdattim);
+ vals[7] = wdattim.wMilliseconds;
+#else
+ vals[7] = 0; /* no STDC/POSIX way to get this */
+ /* GNUish way; maybe use `ftime' on other systems. */
+#endif
vals[0] = 1900 + ltime.tm_year;
vals[1] = 1 + ltime.tm_mon;
vals[0] = 1900 + ltime.tm_year;
vals[1] = 1 + ltime.tm_mon;
vals[4] = ltime.tm_hour;
vals[5] = ltime.tm_min;
vals[6] = ltime.tm_sec;
vals[4] = ltime.tm_hour;
vals[5] = ltime.tm_min;
vals[6] = ltime.tm_sec;
- vals[7] = 0; /* no STDC/POSIX way to get this */
- /* GNUish way; maybe use `ftime' on other systems. */
#if HAVE_GETTIMEOFDAY
{
struct timeval tp;
#if HAVE_GETTIMEOFDAY
{
struct timeval tp;