kopia lustrzana https://github.com/Hamlib/Hamlib
timersub macro needed for timing in iofunc.c for win32
rodzic
8718881013
commit
084aaef2a5
|
@ -104,6 +104,18 @@ struct timezone {
|
||||||
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef timersub
|
||||||
|
# define timersub(a, b, result) \
|
||||||
|
do { \
|
||||||
|
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
||||||
|
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
||||||
|
if ((result)->tv_usec < 0) { \
|
||||||
|
--(result)->tv_sec; \
|
||||||
|
(result)->tv_usec += 1000000; \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SSIZE_T
|
#ifndef HAVE_SSIZE_T
|
||||||
typedef size_t ssize_t;
|
typedef size_t ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
Ładowanie…
Reference in New Issue