[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Eli Zaretskii
Subject: Re: $USERPROFILE for $HOME on W32
Date: Sat, 27 Nov 2004 11:33:46 +0200

> Cc: address@hidden, address@hidden, address@hidden
> From: Andreas Schwab <address@hidden>
> Date: Sat, 27 Nov 2004 00:42:07 +0100
> Any fixed length would be wrong, IMHO.  Can't this just be dynamically
> allocated?

Any _arbitrary_ fixed length is wrong.  But if the filesystem supports
at most FILENAME_MAX-long file names, then using FILENAME_MAX for
strings that hold file names is not arbitrary.  Likewise, if we know
what is the maximum length of a Windows user name, we could use that
value as the size of the pw_name member.

But using strdup would also be okay, IMHO, and would avoid the need
for looking up the OS limits for each member.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]