about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-05-11 12:59:50 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-05-11 12:59:50 +0000
commit7f7e58935b965845c2413a8b948865643d32d7e5 (patch)
tree66a615c41687dc1ea37dbe4110b527eeff9c0b03
parent326be4e98fbf811533dcbce0395ac873f77a87dc (diff)
downloadzsh-7f7e58935b965845c2413a8b948865643d32d7e5.tar.gz
zsh-7f7e58935b965845c2413a8b948865643d32d7e5.tar.xz
zsh-7f7e58935b965845c2413a8b948865643d32d7e5.zip
14314: writing const variable under cygwin
-rw-r--r--ChangeLog2
-rw-r--r--Src/Modules/stat.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 47173fb23..5651740a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2001-05-11  Peter Stephenson  <pws@csr.com>
 
+	* 14314: Src/Modules/stat.c: writing const variable under cygwin.
+
 	* 14313: Test/E01options.ztst, Test/ztst.zsh: new options tests.
 
 2001-05-10  Wayne Davison  <wayned@users.sourceforge.net>
diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c
index 053d0ace0..335f7271e 100644
--- a/Src/Modules/stat.c
+++ b/Src/Modules/stat.c
@@ -54,15 +54,15 @@ statmodeprint(mode_t mode, char *outbuf, int flags)
     }
     if (flags & STF_STRING) {
 	static const char *modes = "?rwxrwxrwx";
-	static const mode_t mflags[9] = {
 #ifdef __CYGWIN__
-	    0
+	static mode_t mflags[9] = { 0 };
 #else
+	static const mode_t mflags[9] = {
 	    S_IRUSR, S_IWUSR, S_IXUSR,
 	    S_IRGRP, S_IWGRP, S_IXGRP,
 	    S_IROTH, S_IWOTH, S_IXOTH
-#endif
 	};
+#endif
 	const mode_t *mfp = mflags;
 	char pm[11];
 	int i;