]> git.sur5r.net Git - cc65/blobdiff - src/common/filestat.c
Merge remote-tracking branch 'upstream/master' into a5200
[cc65] / src / common / filestat.c
index 27a966fa10e39bb2549cdfe490f37e39313c5e98..d592c60cf40753dfd42d55bd0a4bd8be4231e36e 100644 (file)
@@ -2,7 +2,7 @@
 /*                                                                           */
 /*                                filestat.c                                 */
 /*                                                                           */
-/*                   Replacement for buggy Microsoft code                    */
+/*                       Replacement for Windows code                        */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#if defined(__WATCOMC__) && defined(__NT__)
-#define BUGGY_OS 1
-#include <errno.h>
-#include <windows.h>
+#if defined(_WIN32)
+#  include <errno.h>
+#  include <windows.h>
 #endif
 
 /* common */
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
 
-#if defined(BUGGY_OS)
+#if defined(_WIN32)
 
 
 
@@ -77,7 +76,7 @@ static time_t FileTimeToUnixTime (const FILETIME* T)
      * way to express a number > 32 bit (known to me) but is able to do
      * calculations with 64 bit integers, so we need to do it this way.
      */
-    static const ULARGE_INTEGER Offs = { 0xB6109100UL, 0x00000020UL };
+    static const ULARGE_INTEGER Offs = { { 0xB6109100UL, 0x00000020UL } };
     ULARGE_INTEGER V;
     V.LowPart  = T->dwLowDateTime;
     V.HighPart = T->dwHighDateTime;