This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Bug in userIDs in large domains in Cygwin 1.3.22-1


> From: cygwin-owner at cygwin dot com [mailto:cygwin-owner at cygwin dot com]On Behalf
> Of Lafond, Kenneth G

> Suggestion: Extend the userID field to be an INT instead of a SHORT.
> That'll give 2147483648 users before we run into problems.  If
> the issue is
> with 'id' then maybe someone can tell me who to talk to to fix it?

 I flinch every time I see such a suggestion!

 Per definition in the ANSI C standard;
 The size of an INT can *differ* depending on compiler and/or host system,
 i.e. this is a "portability issue". Switching compiler is enough for
getting trouble.

 Please, beware! I'd say; that stay away from "int" altogether.
 IMO "unsigned long" is a better choice here, unless
WINDOWS/Netware/<whatever> uses something else that has a better match.

Reference:
 The ANSI C Programming Language,
 Kernighan/Ritchie,
 Prentice Hall,
 ISBN 0-13-110362-8 (pbk),

 The index gives these;
 p 9 last paragraph,
 p 36 one third down the page,
 p 211 middle paragraph.

/Hannu E K Nevalainen, Mariefred, Sweden - M68K assembler, C/C++, B.Sc. EE
soon

--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]