aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-02-20 15:05:23 +0100
committerCorinna Vinschen <corinna@vinschen.de>2018-02-20 15:05:31 +0100
commit0a3f4e6087e0e44fd36ca2d88f619fae2dfaa02c (patch)
treedb2a3516aa0e170b07dc738a8ff595e991705b5a /winsup
parentea543d3ffa129dd4976aa19d47cf6c8f7ce09a11 (diff)
downloadnewlib-0a3f4e6087e0e44fd36ca2d88f619fae2dfaa02c.zip
newlib-0a3f4e6087e0e44fd36ca2d88f619fae2dfaa02c.tar.gz
newlib-0a3f4e6087e0e44fd36ca2d88f619fae2dfaa02c.tar.bz2
Cygwin: Make sure fraction of seconds constants enforce 64 bit computation
Dropping the 'LL' specifier leads to 32 bit truncation during timestamp computation. Revert it. Exempt MSPERSEC which is used for 32 bit values. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/hires.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h
index a28efcd..5c75cf6 100644
--- a/winsup/cygwin/hires.h
+++ b/winsup/cygwin/hires.h
@@ -30,13 +30,13 @@ details. */
/* 100ns difference between Windows and UNIX timebase. */
#define FACTOR (0x19db1ded53e8000LL)
/* # of nanosecs per second. */
-#define NSPERSEC (1000000000)
+#define NSPERSEC (1000000000LL)
/* # of 100ns intervals per second. */
-#define NS100PERSEC (10000000)
+#define NS100PERSEC (10000000LL)
/* # of microsecs per second. */
-#define USPERSEC (1000000)
+#define USPERSEC (1000000LL)
/* # of millisecs per second. */
-#define MSPERSEC (1000)
+#define MSPERSEC (1000L)
class hires_base
{