From: Jim Meyering Date: Wed, 10 Jul 1996 03:33:01 +0000 (+0000) Subject: (UID_T_MAX): Use `(unsigned long)1' rather than X-Git-Tag: FILEUTILS-3_12s~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5885cbf0d2d33802bed40c251addc92299eccc0c;p=platform%2Fupstream%2Fcoreutils.git (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 . --- diff --git a/src/install.c b/src/install.c index f95fdb2..6cd5b20 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 ();