OSDN Git Service

* src/header.c (wintime_to_unix_stamp): no use 64bit constant to
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Wed, 17 Dec 2003 18:30:42 +0000 (18:30 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Wed, 17 Dec 2003 18:30:42 +0000 (18:30 +0000)
avoid the warning `integer constant is too large for "long" type'
on GCC. however, for portability, no use the unsigned long long
suffix "ULL".

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@781 6a8cc165-1e22-0410-a132-eb4e3f353aba

src/header.c

index 3f36c83..0a4f29c 100644 (file)
@@ -424,7 +424,10 @@ wintime_to_unix_stamp()
 {
 #if HAVE_UINT64_T
     uint64_t t;
-    uint64_t epoch = 0x019db1ded53e8000; /* 1970-01-01 00:00:00 (UTC) */
+    uint64_t epoch = ((uint64_t)0x019db1de << 32) + 0xd53e8000;
+                     /* 0x019db1ded53e8000ULL: 1970-01-01 00:00:00 (UTC) */
+
+    epoch = 0x019db1ded53e8000;
 
     t = (unsigned long)get_longword();
     t |= (uint64_t)(unsigned long)get_longword() << 32;