X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fdropin.h;h=f020f215c6bf11a82c00c6551db1d12a002dec31;hb=e62fd508158749a0d55eae06c2e361df5d6da6e0;hp=384b4dbf54e74de2522c16b17e85a7a10391673b;hpb=b9a7444b9fa216d16d91f34d2e12f51fc4d60e46;p=tinc diff --git a/src/dropin.h b/src/dropin.h index 384b4dbf..f020f215 100644 --- a/src/dropin.h +++ b/src/dropin.h @@ -71,11 +71,15 @@ extern int gettimeofday(struct timeval *, void *); #define MAX(a,b) (((a)>(b))?(a):(b)) #endif +#define CLAMP(val, min, max) MIN((max), MAX((min), (val))) + #ifdef _MSC_VER #define PATH_MAX MAX_PATH #define strcasecmp _stricmp #define strncasecmp _strnicmp +#define isatty _isatty +#define fileno _fileno #define close CloseHandle #define __const const