| |
#include "private/utils.h"
|
| |
#include "yuarel.h"
|
| |
|
| + |
#ifndef timespeccmp
|
| + |
#define timespeccmp(tsp, usp, cmp) \
|
| + |
(((tsp)->tv_sec == (usp)->tv_sec) ? \
|
| + |
((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
|
| + |
((tsp)->tv_sec cmp (usp)->tv_sec))
|
| + |
#endif
|
| + |
#ifndef timespecsub
|
| + |
#define timespecsub(tsp, usp, vsp) \
|
| + |
do { \
|
| + |
(vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
|
| + |
(vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
|
| + |
if ((vsp)->tv_nsec < 0) { \
|
| + |
(vsp)->tv_sec--; \
|
| + |
(vsp)->tv_nsec += 1000000000L; \
|
| + |
} \
|
| + |
} while (0)
|
| + |
#endif
|
| + |
|
| |
static int ssh_read(void *data, char *buf, int len);
|
| |
static int ssh_write(void *data, const char *buf, int l);
|
| |
static int ssh_close(void *data);
|