diff options
Diffstat (limited to 'include/libHX/misc.h')
-rw-r--r-- | include/libHX/misc.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/libHX/misc.h b/include/libHX/misc.h index adebf22..23607d2 100644 --- a/include/libHX/misc.h +++ b/include/libHX/misc.h @@ -35,11 +35,11 @@ extern "C" { #define HX_TIMESPEC_FMT "%ld.%09ld" #define HX_TIMEVAL_FMT "%ld.%06ld" #ifdef __cplusplus -# define HX_TIMESPEC_EXP(p) static_cast<long>((p)->tv_sec), (p)->tv_nsec -# define HX_TIMEVAL_EXP(p) static_cast<long>((p)->tv_sec), (p)->tv_usec +# define HX_TIMESPEC_EXP(p) static_cast<long>((p)->tv_sec), static_cast<long>((p)->tv_nsec) +# define HX_TIMEVAL_EXP(p) static_cast<long>((p)->tv_sec), static_cast<long>((p)->tv_usec) #else -# define HX_TIMESPEC_EXP(p) static_cast(long, (p)->tv_sec), (p)->tv_nsec -# define HX_TIMEVAL_EXP(p) static_cast(long, (p)->tv_sec), (p)->tv_usec +# define HX_TIMESPEC_EXP(p) static_cast(long, (p)->tv_sec), static_cast(long, (p)->tv_nsec) +# define HX_TIMEVAL_EXP(p) static_cast(long, (p)->tv_sec), static_cast(long, (p)->tv_usec) #endif struct stat; @@ -59,7 +59,10 @@ extern const char *HX_dlerror(void); */ extern int HX_ffs(unsigned long); extern int HX_fls(unsigned long); +#ifndef HX_HEXDUMP_DECLARATION +#define HX_HEXDUMP_DECLARATION 1 extern void HX_hexdump(FILE *, const void *, unsigned int); +#endif extern bool HX_timespec_isneg(const struct timespec *); extern struct timespec *HX_timespec_neg(struct timespec *, const struct timespec *); |