[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    stat-macros oddness
From:       dfeuer () techhouse ! brown ! edu (David Feuer)
Date:       2005-06-26 21:03:52
Message-ID: 20050626210351.GA18716 () techhouse ! org
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic