X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=compat%2Fmingw.h;h=cafc1eb08a71dd60566a7389ed606e777cf17fc8;hb=ed40ec551d4517323c6a46aa555b83cc7651ddbc;hp=99a746703f3c9fb19e043109e4a044efe151e0e7;hpb=39f04dbaacbb21864547c8cf087697469666d21e;p=git.git diff --git a/compat/mingw.h b/compat/mingw.h index 99a746703..cafc1eb08 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -14,12 +14,6 @@ typedef int socklen_t; #define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK) #define S_ISSOCK(x) 0 -#ifndef _STAT_H_ -#define S_IRUSR 0 -#define S_IWUSR 0 -#define S_IXUSR 0 -#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) -#endif #define S_IRGRP 0 #define S_IWGRP 0 #define S_IXGRP 0 @@ -37,6 +31,9 @@ typedef int socklen_t; #define WEXITSTATUS(x) ((x) & 0xff) #define WTERMSIG(x) SIGTERM +#define EWOULDBLOCK EAGAIN +#define SHUT_WR SD_SEND + #define SIGHUP 1 #define SIGQUIT 3 #define SIGKILL 9 @@ -319,35 +316,6 @@ int main(int argc, const char **argv) \ } \ static int mingw_main(c,v) -#ifndef NO_MINGW_REPLACE_READDIR -/* - * A replacement of readdir, to ensure that it reads the file type at - * the same time. This avoid extra unneeded lstats in git on MinGW - */ -#undef DT_UNKNOWN -#undef DT_DIR -#undef DT_REG -#undef DT_LNK -#define DT_UNKNOWN 0 -#define DT_DIR 1 -#define DT_REG 2 -#define DT_LNK 3 - -struct mingw_dirent -{ - long d_ino; /* Always zero. */ - union { - unsigned short d_reclen; /* Always zero. */ - unsigned char d_type; /* Reimplementation adds this */ - }; - unsigned short d_namlen; /* Length of name in d_name. */ - char d_name[FILENAME_MAX]; /* File name. */ -}; -#define dirent mingw_dirent -#define readdir(x) mingw_readdir(x) -struct dirent *mingw_readdir(DIR *dir); -#endif // !NO_MINGW_REPLACE_READDIR - /* * Used by Pthread API implementation for Windows */