~ chicken-core (chicken-5) 822b5c99a3a2d05d06c27a53846f52713d7efec9
commit 822b5c99a3a2d05d06c27a53846f52713d7efec9 Author: Peter Bex <peter@more-magic.net> AuthorDate: Sun Apr 7 16:32:25 2019 +0200 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Mon Apr 8 11:06:02 2019 +1200 Fix definitions of (chicken file posix) permission values These were accidentally copied from Windows, which does not have the "group" and "other" definitions. Fixes #1602 Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/NEWS b/NEWS index 2d3e62fb..2c73ebd8 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ than #!key, #!rest or #!optional is now preserved (#1572). - When using (set-file-position!) on a port, its EOF status will now be reset. + - In (chicken file posix), the values of perm/irgrp, perm/iwgrp, + perm/ixgrp, perm/iroth, perm/iwoth and perm/ixoth are now correctly + defined (they were all for "usr"; #1602, thanks to Eric Hoffman). - Runtime system - Removed the unused, undocumented (and incorrect!) C functions diff --git a/manual/Acknowledgements b/manual/Acknowledgements index a962f708..73b48dbb 100644 --- a/manual/Acknowledgements +++ b/manual/Acknowledgements @@ -22,9 +22,9 @@ Martin Gasbichler, Abdulaziz Ghuloum, Joey Gibson, Stephen C. Gilardi, Mario Domenech Goulart, Joshua Griffith, Johannes Groedem, Damian Gryski, Matt Gushee, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, Moritz Heidkamp, -William P. Heinemann, Bill Hoffman, Bruce Hoult, Hans Hübner, Markus Hülsmann, -Götz Isenmann, Paulo Jabardo, Wietse Jacobs, David Janssens, Christian -Jäger, Matt Jones, Dale Jordan, Valentin Kamyshenko, Daishi Kato, +William P. Heinemann, Bill Hoffman, Eric Hoffman, Bruce Hoult, Hans Hübner, +Markus Hülsmann, Götz Isenmann, Paulo Jabardo, Wietse Jacobs, David Janssens, +Christian Jäger, Matt Jones, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller, Christian Kellermann, Brad Kind, Ron Kneusel, "Kooda", Matthias Köppe, Krysztof Kowalczyk, Andre Kühne, Todd R. Kueny Sr, Goran Krampe, David Krentzlin, Ben Kurtz, Michele La Monaca, Micky diff --git a/posix-common.scm b/posix-common.scm index 73e14841..b65317ed 100644 --- a/posix-common.scm +++ b/posix-common.scm @@ -44,6 +44,36 @@ static C_TLS struct stat C_statbuf; # define S_IFSOCK 0140000 #endif +#ifndef S_IRUSR +# define S_IRUSR S_IREAD +#endif +#ifndef S_IWUSR +# define S_IWUSR S_IWRITE +#endif +#ifndef S_IXUSR +# define S_IXUSR S_IEXEC +#endif + +#ifndef S_IRGRP +# define S_IRGRP S_IREAD +#endif +#ifndef S_IWGRP +# define S_IWGRP S_IWRITE +#endif +#ifndef S_IXGRP +# define S_IXGRP S_IEXEC +#endif + +#ifndef S_IROTH +# define S_IROTH S_IREAD +#endif +#ifndef S_IWOTH +# define S_IWOTH S_IWRITE +#endif +#ifndef S_IXOTH +# define S_IXOTH S_IEXEC +#endif + #define cpy_tmvec_to_tmstc08(ptm, v) \ ((ptm)->tm_sec = C_unfix(C_block_item((v), 0)), \ (ptm)->tm_min = C_unfix(C_block_item((v), 1)), \ @@ -419,18 +449,18 @@ EOF ;; open/noinherit is platform-specific -(define-foreign-variable _s_irusr int "S_IREAD") -(define-foreign-variable _s_iwusr int "S_IWRITE") -(define-foreign-variable _s_ixusr int "S_IEXEC") -(define-foreign-variable _s_irgrp int "S_IREAD") -(define-foreign-variable _s_iwgrp int "S_IWRITE") -(define-foreign-variable _s_ixgrp int "S_IEXEC") -(define-foreign-variable _s_iroth int "S_IREAD") -(define-foreign-variable _s_iwoth int "S_IWRITE") -(define-foreign-variable _s_ixoth int "S_IEXEC") -(define-foreign-variable _s_irwxu int "S_IREAD | S_IWRITE | S_IEXEC") -(define-foreign-variable _s_irwxg int "S_IREAD | S_IWRITE | S_IEXEC") -(define-foreign-variable _s_irwxo int "S_IREAD | S_IWRITE | S_IEXEC") +(define-foreign-variable _s_irusr int "S_IRUSR") +(define-foreign-variable _s_iwusr int "S_IWUSR") +(define-foreign-variable _s_ixusr int "S_IXUSR") +(define-foreign-variable _s_irgrp int "S_IRGRP") +(define-foreign-variable _s_iwgrp int "S_IWGRP") +(define-foreign-variable _s_ixgrp int "S_IXGRP") +(define-foreign-variable _s_iroth int "S_IROTH") +(define-foreign-variable _s_iwoth int "S_IWOTH") +(define-foreign-variable _s_ixoth int "S_IXOTH") +(define-foreign-variable _s_irwxu int "S_IRUSR | S_IWUSR | S_IXUSR") +(define-foreign-variable _s_irwxg int "S_IRGRP | S_IWGRP | S_IXGRP") +(define-foreign-variable _s_irwxo int "S_IROTH | S_IWOTH | S_IXOTH") (set! chicken.file.posix#perm/irusr _s_irusr) (set! chicken.file.posix#perm/iwusr _s_iwusr)Trap