Fix compilation of Readline on mingw.org's MinGW
authorEli Zaretskii <eliz@gnu.org>
Mon, 23 Dec 2019 14:28:32 +0000 (16:28 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 23 Dec 2019 14:28:32 +0000 (16:28 +0200)
readline/ChangeLog
2019-12-23  Eli Zaretskii  <eliz@gnu.org>

* posixstat.h (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH)
(S_IXOTH, S_IRWXG, S_IRWXO): Define if undefined, even if S_IRWXU
is defined, because non-Posix systems may defined only the user
bits.

readline/readline/CHANGELOG
readline/readline/posixstat.h

index 18265ab10524a6f8aaba55f9208bc07bfd7893ec..6fa1ebb9e62eccb4b81374877eb2931a16ce3ed9 100644 (file)
@@ -1,3 +1,10 @@
+2019-12-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * posixstat.h (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH)
+       (S_IXOTH, S_IRWXG, S_IRWXO): Define if undefined, even if S_IRWXU
+       is defined, because non-Posix systems may defined only the user
+       bits.
+
 [Readline-specific changelog.  Descriptions of changes to the source are
  found in the bash changelog.]
 
index 3eb7f2906f788b80b9d984999d63e65ba76725d9..b9d8eb3761868ab0ad5b2de778e0a9cc14c2d1c1 100644 (file)
 #  define S_IRWXU      (S_IRUSR | S_IWUSR | S_IXUSR)
 #  define S_IRWXG      (S_IRGRP | S_IWGRP | S_IXGRP)
 #  define S_IRWXO      (S_IROTH | S_IWOTH | S_IXOTH)
+#else  /* !S_IRWXU */
+   /* S_IRWXU is defined, but "group" and "other" bits might not be
+      (happens in certain versions of MinGW).  */
+#  if !defined (S_IRGRP)
+#    define S_IRGRP    (S_IREAD  >> 3)         /* read, group */
+#    define S_IWGRP    (S_IWRITE >> 3)         /* write, group */
+#    define S_IXGRP    (S_IEXEC  >> 3)         /* execute, group */
+#  endif /* !S_IRGRP */
+
+#  if !defined (S_IROTH)
+#    define S_IROTH    (S_IREAD  >> 6)         /* read, other */
+#    define S_IWOTH    (S_IWRITE >> 6)         /* write, other */
+#    define S_IXOTH    (S_IEXEC  >> 6)         /* execute, other */
+#  endif /* !S_IROTH */
+#  if !defined (S_IRWXG)
+#    define S_IRWXG    (S_IRGRP | S_IWGRP | S_IXGRP)
+#  endif
+#  if !defined (S_IRWXO)
+#    define S_IRWXO    (S_IROTH | S_IWOTH | S_IXOTH)
+#  endif
 #endif /* !S_IRWXU */
 
 /* These are non-standard, but are used in builtins.c$symbolic_umask() */
This page took 0.024587 seconds and 4 git commands to generate.