50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
|
From 286b129249119b17facba8574d6cddd461619e80 Mon Sep 17 00:00:00 2001
|
|||
|
Date: Fri, 22 May 2015 18:55:44 +0300
|
|||
|
Subject: bug76628
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
Макрос на структуру. Ибо до этого тип переменной был u_int и при
|
|||
|
преобразовании типа в time_t записывались лишние символы, которые
|
|||
|
портили информацию о дате и времени.
|
|||
|
---
|
|||
|
rstat.x | 18 ++++++++++++++----
|
|||
|
1 file changed, 14 insertions(+), 4 deletions(-)
|
|||
|
|
|||
|
diff --git a/rstat.x b/rstat.x
|
|||
|
index ece14b9..3cde7fd 100644
|
|||
|
--- a/rstat.x
|
|||
|
+++ b/rstat.x
|
|||
|
@@ -36,13 +36,23 @@
|
|||
|
%#define FSHIFT 8 /* bits to right of fixed binary point */
|
|||
|
%#define FSCALE (1<<FSHIFT)
|
|||
|
|
|||
|
+%#ifdef __LCC__
|
|||
|
+struct rstat_timeval {
|
|||
|
+ unsigned long int tv_sec; /* seconds */
|
|||
|
+ unsigned long int tv_usec; /* and microseconds */
|
|||
|
+};
|
|||
|
+%#else
|
|||
|
+struct rstat_timeval {
|
|||
|
+ unsigned int tv_sec;
|
|||
|
+ unsigned int tv_usec;
|
|||
|
+};
|
|||
|
+%#endif /* for convert to time_t*/
|
|||
|
+
|
|||
|
+
|
|||
|
+
|
|||
|
const CPUSTATES = 4;
|
|||
|
const DK_NDRIVE = 4;
|
|||
|
|
|||
|
-struct rstat_timeval {
|
|||
|
- unsigned int tv_sec; /* seconds */
|
|||
|
- unsigned int tv_usec; /* and microseconds */
|
|||
|
-};
|
|||
|
|
|||
|
struct statsusers { /* RSTATVERS_USERS */
|
|||
|
int cp_time[CPUSTATES];
|
|||
|
--
|
|||
|
2.16.4
|
|||
|
|