Mercurial > hg > fxanalyse
annotate future.h @ 239:ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Thu, 12 Feb 2015 19:13:55 +0100 |
parents | a2f99632a80c |
children | 7fd5cb857d07 |
rev | line source |
---|---|
91
4102fe614df2
Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
81
diff
changeset
|
1 #ifndef __FUTURE_H__ |
4102fe614df2
Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
81
diff
changeset
|
2 #define __FUTURE_H__ |
4102fe614df2
Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
81
diff
changeset
|
3 |
239
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
4 /* required for time_t definition */ |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
5 #include <time.h> |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
6 |
227
a2f99632a80c
Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
208
diff
changeset
|
7 #define PTR_TO_INT(p) ((int) ((intptr_t)(p))) |
a2f99632a80c
Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
208
diff
changeset
|
8 #define INT_TO_PTR(u) ((void *) ((intptr_t)(u))) |
a2f99632a80c
Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
208
diff
changeset
|
9 |
16
9d57d1fcbcd5
Implementation of the C99 round() function
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff
changeset
|
10 double round(double x); |
81
be814b934eca
Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
16
diff
changeset
|
11 |
239
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
12 /* struct timeval is defined in `WinSock2.h` but we cannot safely include |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
13 * this header because it includes `Windows.h` and CVI does not like to |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
14 * have that included after his includes. resort to this ugly hack to |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
15 * avoid to include windows headers and to avoid name clashes */ |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
16 struct __timeval { |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
17 time_t tv_sec; |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
18 long tv_usec; |
81
be814b934eca
Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
16
diff
changeset
|
19 }; |
be814b934eca
Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
16
diff
changeset
|
20 |
239
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
21 #define timeval __timeval |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
22 |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
23 /* we never use struct timezone so leave it as on opaque struct */ |
ec81395bf08d
Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
24 struct timezone; |
81
be814b934eca
Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
16
diff
changeset
|
25 |
be814b934eca
Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
16
diff
changeset
|
26 int gettimeofday(struct timeval *tp, struct timezone *tzp); |
be814b934eca
Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
16
diff
changeset
|
27 |
91
4102fe614df2
Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
81
diff
changeset
|
28 #endif |