From owner-freebsd-current Sat Mar 11 15:40:15 2000 Delivered-To: freebsd-current@freebsd.org Received: from mail.originative.co.uk (mailgate.originative.co.uk [194.217.50.228]) by hub.freebsd.org (Postfix) with ESMTP id 95EE737BD80 for ; Sat, 11 Mar 2000 15:40:10 -0800 (PST) (envelope-from paul@originative.co.uk) Received: from originative.co.uk (lobster.originative.co.uk [194.217.50.241]) by mail.originative.co.uk (Postfix) with ESMTP id F2F501D132 for ; Sat, 11 Mar 2000 23:40:06 +0000 (GMT) Message-ID: <38CAD957.3C839375@originative.co.uk> Date: Sat, 11 Mar 2000 23:40:07 +0000 From: Paul Richards Organization: Originative Solutions Ltd X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en-GB, en MIME-Version: 1.0 To: current@FreeBSD.org Subject: MAX_UID ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The fix I applied to pwd_mkdb is an improvement over what was there before i.e. nothing, but is a poor solution at the moment since it won't work correctly on the alpha. The following code snippet is OK on the i386 but on the alpha ULONG_MAX is 64 bits and so is a totally wrong constant to check a max uid against. id = strtoul(p, (char **)NULL, 10); if (errno == ERANGE) { warnx("%s > max uid value (%lu)", p, ULONG_MAX); return (0) } I think we need a MAX_UID and a MAX_GID to perform checks like this. Anyone got any objections to adding them to /usr/include/limits.h ? Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message