bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stat-macros oddness


From: David Feuer
Subject: stat-macros oddness
Date: Sun, 26 Jun 2005 17:03:52 -0400
User-agent: Mutt/1.5.9i

In lib/stat-macros.h,

# if !S_IRWXG
#  define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
# endif
# if !S_IRWXO
#  define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
# endif

/* S_IXUGO is a common extension to POSIX.  */
# if !S_IXUGO
#  define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
# endif

# ifndef S_IRWXUGO
#  define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
# endif

I think it would be good to document why in some cases the value of the
macro is checked, while in others only its existence is checked.  That
is, if there is a reason.  I'm also a bit nervous about relying on
system-specified values for these when they exist: it is possible,
though unlikely, that they could do something unexpected and break
stuff.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]