(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>.
This commit is contained in:
Jim Meyering
1996-07-10 03:33:01 +00:00
parent 640cdd2df4
commit 5885cbf0d2
+4 -2
View File
@@ -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 ();