[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] mountlist: fix local drive detection on cygwin
From: |
Eric Blake |
Subject: |
Re: [PATCH] mountlist: fix local drive detection on cygwin |
Date: |
Wed, 29 Dec 2010 15:53:56 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 12/29/2010 01:41 PM, Paul Eggert wrote:
> 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>.
The MSDN documentation is not known for being stellar (that is, I tested
things and they worked without the trailing backslash), but I'll go
ahead and add it in.
>
> Also, are pre-C99 compilers are still a possibility
> when __CYGWIN__ is defined?
No, cygwin's only compiler is gcc. However,
> If so, the above needs
> to be reworded into something like this:
>
> char drive[4];
> sprintf (drive, "%c:\\", fs_name[0]);
This still looks reasonable. I've pushed the update accordingly.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature