diff options
author | Jim Meyering <jim@meyering.net> | 1996-07-10 03:33:01 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-07-10 03:33:01 +0000 |
commit | 5885cbf0d2d33802bed40c251addc92299eccc0c (patch) | |
tree | ebae1e7ab6e96b1e82a2767fdbea97457303b091 /src/install.c | |
parent | 640cdd2df4ae0b52179a0b5f1050d1ccc0c151af (diff) | |
download | coreutils-5885cbf0d2d33802bed40c251addc92299eccc0c.tar.xz |
(UID_T_MAX): Use `(unsigned long)1' rather than
`(uid_t)1' to avoid problems on systems where uid_t is signed.
(GID_T_MAX): Likewise for gid_t.
From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
Diffstat (limited to 'src/install.c')
-rw-r--r-- | src/install.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c index f95fdb243..6cd5b208c 100644 --- a/src/install.c +++ b/src/install.c @@ -102,11 +102,13 @@ int wait (); #define READ_SIZE (32 * 1024) #ifndef UID_T_MAX -# define UID_T_MAX ((uid_t)(~((uid_t)1 << (sizeof (uid_t) * BITSPERBYTE - 1)))) +# define UID_T_MAX ((uid_t)(~((unsigned long)1 << ((sizeof (uid_t) \ + * BITSPERBYTE - 1))))) #endif #ifndef GID_T_MAX -# define GID_T_MAX ((gid_t)(~((gid_t)1 << (sizeof (gid_t) * BITSPERBYTE - 1)))) +# define GID_T_MAX ((gid_t)(~((unsigned long)1 << ((sizeof (gid_t) \ + * BITSPERBYTE - 1))))) #endif char *basename (); |