File: z10-ftbfs-gcc-4.8

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (50 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
 swlibs/fxmisc/fxos.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

--- a/swlibs/fxmisc/fxos.c
+++ b/swlibs/fxmisc/fxos.c
@@ -44,12 +44,12 @@ int fxGethostname(char *name, int n)
 #endif
 #if !macintosh
 /* return current time in seconds (floating point)      */
-float fxTime(void)
-{
 #if defined ( __sparc__ ) || defined ( __DJGPP__ )
 /* times returns 0 in BSD Unix, so we use ftime instead */
 #   include <sys/types.h>
 #   include <sys/timeb.h>
+float fxTime(void)
+{
     struct timeb tb;
     static time_t once;                 // saves first time value
 
@@ -57,21 +57,25 @@ float fxTime(void)
     if (once == 0)                      // stash away first call
         once = tb.time;                 // as float is not big enough
     return (tb.time - once) + tb.millitm * .001;
-    
+}
 #else
 #if defined ( WIN32 ) || ( __DOS__ )
 #   include <time.h>
 #   define times(a) clock()
+#   define T(var)
 #   define HZ   CLOCKS_PER_SEC
 #else
 #   include <sys/types.h>
 #   include <sys/times.h>
 #   include <sys/param.h>
-    struct tms foo;
+#   define T(var) struct tms var
 #endif
+float fxTime(void)
+{
+    T(foo);
     return times(&foo)/(float)HZ;
-#endif
 }
+#endif
 
 /* returns elapsed time in seconds */
 float timer(int flag)