aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-12-11 13:11:18 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2010-12-11 13:11:18 -0500
commit1319002e2ee166c06b38cdbc5e8508c7205fa115 (patch)
tree6b8168ef707beb21b305a2b1f109e915eccaa991
parentd3d414696f39e2b57072fab3dd4fa11e465be4ed (diff)
downloadpostgresql-1319002e2ee166c06b38cdbc5e8508c7205fa115.tar.gz
postgresql-1319002e2ee166c06b38cdbc5e8508c7205fa115.zip
Provide a complete set of file-permission-bit macros in win32.h.
My previous patch exposed the fact that we didn't have these. Those hard-wired octal constants were actually wrong on Windows, not just inconsistent.
-rw-r--r--src/include/port/win32.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 9c2ae4d60c8..64fa2e176bc 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -326,13 +326,18 @@ typedef unsigned short mode_t;
#endif
#ifndef __BORLANDC__
-#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
-#define _S_IXUSR _S_IEXEC
-#define _S_IWUSR _S_IWRITE
-#define _S_IRUSR _S_IREAD
-#define S_IRUSR _S_IRUSR
-#define S_IWUSR _S_IWUSR
-#define S_IXUSR _S_IXUSR
+#define S_IRUSR _S_IREAD
+#define S_IWUSR _S_IWRITE
+#define S_IXUSR _S_IEXEC
+#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#define S_IRGRP 0
+#define S_IWGRP 0
+#define S_IXGRP 0
+#define S_IRWXG 0
+#define S_IROTH 0
+#define S_IWOTH 0
+#define S_IXOTH 0
+#define S_IRWXO 0
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif