X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fdropin.h;h=9b196b6d31c9423e535b1e3d51517abec1226c70;hb=cfc9fee931c70554353ce6c4acc3407baac08745;hp=2aa6df106837905e5cb3427840660b81ea936efe;hpb=08f1e0cd33812f9d972dd7c59021443a8d02d0e0;p=tinc diff --git a/src/dropin.h b/src/dropin.h index 2aa6df10..9b196b6d 100644 --- a/src/dropin.h +++ b/src/dropin.h @@ -71,4 +71,30 @@ extern int gettimeofday(struct timeval *, void *); #define MAX(a,b) (((a)>(b))?(a):(b)) #endif -#endif +#ifdef _MSC_VER + +#define __attribute(args) +#define __attribute__(args) + +#define PATH_MAX MAX_PATH +#define strcasecmp _stricmp +#define strncasecmp _strnicmp +#define __const const + +typedef int mode_t; +typedef int pid_t; +typedef SSIZE_T ssize_t; + +static const int STDIN_FILENO = 0; +static const int F_OK = 0; +static const int X_OK = 0; +static const int W_OK = 2; +static const int R_OK = 4; + +#else // _MSC_VER + +#endif // _MSC_VER + +extern bool sleep_millis(unsigned int ms); + +#endif // TINC_DROPIN_H