bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] mountlist: fix local drive detection on cygwin


From: Paul Eggert
Subject: Re: [PATCH] mountlist: fix local drive detection on cygwin
Date: Wed, 29 Dec 2010 12:41:34 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

On 12/29/2010 10:25 AM, Jim Meyering wrote:
>          char const drive[3] = { fs_name[0], ':', '\0' };

The Microsoft documentation says that a trailing
backslash is required here; see
<http://msdn.microsoft.com/en-us/library/aa364939%28v=vs.85%29.aspx>.

Also, are pre-C99 compilers are still a possibility
when __CYGWIN__ is defined?  If so, the above needs
to be reworded into something like this:

       char drive[4];
       sprintf (drive, "%c:\\", fs_name[0]);

because C89 requires constant expressions in initializers
for aggregate objects.



reply via email to

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