X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fdropin.h;h=f020f215c6bf11a82c00c6551db1d12a002dec31;hb=b39b69a2e4b20c8fb9c49af4156734437b42f910;hp=da10cd9ad0757bbf3851b1be27c735f115369bb8;hpb=6075fb8c185d0461070a9f16288e9d3673708735;p=tinc diff --git a/src/dropin.h b/src/dropin.h index da10cd9a..f020f215 100644 --- a/src/dropin.h +++ b/src/dropin.h @@ -71,11 +71,16 @@ 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 typedef int mode_t;