coreutils
[Top][All Lists]
Advanced

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

Re: RFE: stat(1) flag for learning the d_type value of a given file


From: Pádraig Brady
Subject: Re: RFE: stat(1) flag for learning the d_type value of a given file
Date: Thu, 23 Oct 2014 03:34:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 10/22/2014 08:50 PM, Mike Frysinger wrote:
> On 13 Oct 2014 14:34, Eric Blake wrote:
>> On 10/13/2014 02:14 PM, Pádraig Brady wrote:
>>> Maybe, though coreutils' tests also check d_type is available.
>>> Would this suffice for cygwin?
>>>
>>> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=tests/d_type-check;hb=HEAD
>>
>> That seems like a useful starting point for a hack, but it's a bit too
>> platform-specific (libc = ctypes.cdll.LoadLibrary("libc.so.6") has no
>> chance on Cygwin
> 
> it also doesn't hold true for all Linux/glibc platforms, let alone 
> Linux/non-glibc.  if you were to leverage ctypes.util.find_library however, 
> you'd have a much better chance ...
>       libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
> -mike
> 

Pushed that improvement in your name.

thanks!

Pádraig.



reply via email to

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