summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-09-11 11:27:38 +0000
committergrant <grant@pkgsrc.org>2003-09-11 11:27:38 +0000
commit6078a6d2e6600bc4a5149e4d743dd9ca0b9f4c95 (patch)
tree829ec949b49718cfdcd88f49607db60fa980096d /pkgtools
parenta77ed0a130b01123e4240f26ff51c170cd2c70aa (diff)
downloadpkgsrc-6078a6d2e6600bc4a5149e4d743dd9ca0b9f4c95.tar.gz
ensure GID_MAX and UID_MAX are defined, fixing build of mtree and pax
after latest rototill.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/libnbcompat/files/nbcompat.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgtools/libnbcompat/files/nbcompat.h b/pkgtools/libnbcompat/files/nbcompat.h
index 5a9fba16081..460b548dbd8 100644
--- a/pkgtools/libnbcompat/files/nbcompat.h
+++ b/pkgtools/libnbcompat/files/nbcompat.h
@@ -1,4 +1,4 @@
-/* $NetBSD: nbcompat.h,v 1.19 2003/09/11 10:57:20 grant Exp $ */
+/* $NetBSD: nbcompat.h,v 1.20 2003/09/11 11:27:38 grant Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -542,6 +542,7 @@ int gid_from_group(const char *, gid_t *);
} while (0)
#endif
+/* not all systems define all of these in sys/stat.h */
#if !defined(S_ISLNK)
# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
#endif
@@ -554,4 +555,13 @@ int gid_from_group(const char *, gid_t *);
# define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
#endif
+/* not all systems define all of these in limits.h */
+#ifndef GID_MAX
+# define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
+#endif
+
+#ifndef UID_MAX
+# define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */
+#endif
+
#endif /* _NBCOMPAT_H */