]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/win32con/gettimeofday.c
ncurses 6.4 - patch 20240420
[ncurses.git] / ncurses / win32con / gettimeofday.c
index e1ef3401de34a156a1a3345118b86fa1d3c50630..603a6f462b78767ec7c49e7b56671044f8639f03 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 2008,2010 Free Software Foundation, Inc.                   *
+ * Copyright 2020,2023 Thomas E. Dickey                                     *
+ * Copyright 2008-2010,2014 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  * authorization.                                                           *
  ****************************************************************************/
 
+#ifdef WINVER
+#  undef WINVER
+#endif
 #define WINVER 0x0501
 
 #include <curses.priv.h>
 
 #include <windows.h>
 
-MODULE_ID("$Id: gettimeofday.c,v 1.2 2010/01/16 15:18:51 tom Exp $")
+MODULE_ID("$Id: gettimeofday.c,v 1.7 2023/02/25 20:05:36 tom Exp $")
 
+#if HAVE_GETTIMEOFDAY == 2
 #define JAN1970 116444736000000000LL   /* the value for 01/01/1970 00:00 */
 
-int
+NCURSES_EXPORT(int)
 gettimeofday(struct timeval *tv, void *tz GCC_UNUSED)
 {
     union {
@@ -49,3 +54,4 @@ gettimeofday(struct timeval *tv, void *tz GCC_UNUSED)
     tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL);
     return (0);
 }
+#endif // HAVE_GETTIMEOFDAY == 2