John Polstra wrote:
>
> In article <[EMAIL PROTECTED]>,
> Paul Richards <[EMAIL PROTECTED]> wrote:
> > John Polstra wrote:
> > >
> > > I guess it could go into <machine/limits.h> in the
> > > "!defined(_ANSI_SOURCE)" section. Bruce might have a better idea.
> >
> > I don't think <machine/limits.h> is the right place. These are constants
> > that are definately not architecture dependent. The whole problem at the
> > moment is that the code is abusing architecture dependent constants in
> > lieu of anything better.
>
> Hmm, you're right. How about <sys/syslimits.h>?
That sounds ideal :-)
I guess my next question is, are there any objections to
#define UID_MAX ((uid_t)0-1)
which would actually give us the best of both worlds. I assume that gcc
optimises the calculation away so it's effectively a constant but
automagically of the right size.
I can see the flaw in that straight away in that uid_t isn't available
in <sys/syslimits.h>
On the other hand, since you may want to limit the MAX_UID (or some
other paramter) independently of the size of the type then its probably
best to maintain the value manually in any case.
Paul.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message