aboutsummaryrefslogtreecommitdiff
path: root/src/os/win32/ngx_stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/win32/ngx_stat.h')
-rw-r--r--src/os/win32/ngx_stat.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/os/win32/ngx_stat.h b/src/os/win32/ngx_stat.h
new file mode 100644
index 000000000..600facd3e
--- /dev/null
+++ b/src/os/win32/ngx_stat.h
@@ -0,0 +1,26 @@
+#ifndef _NGX_STAT_H_INCLUDED_
+#define _NGX_STAT_H_INCLUDED_
+
+
+#include <windows.h>
+
+/* INVALID_FILE_ATTRIBUTES specified but never defined */
+#ifndef INVALID_FILE_ATTRIBUTES
+#define INVALID_FILE_ATTRIBUTES 0xFFFFFFFF
+#endif
+
+typedef DWORD ngx_stat_t;
+
+
+#define ngx_is_dir(sb) (*sb & FILE_ATTRIBUTE_DIRECTORY)
+
+#define ngx_stat_n "GetFileAttributes"
+
+#define ngx_fstat(file, fd, sb) ngx_stat(file, sb)
+#define ngx_fstat_n "GetFileAttributes"
+
+
+int ngx_stat(char *file, ngx_stat_t *sb);
+
+
+#endif /* _NGX_STAT_H_INCLUDED_ */