← Back to team overview

kicad-developers team mailing list archive

Re: Symbol library table remapping question

 

   int
     lstat(const char *restrict path, struct stat *restrict buf);


So yes macOS has stat, apparently it came from 4.2 BSD, Is one of the posix functions not able to do what is needed?


> On 8/12/2017, at 2:21 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
> 
> On 12/7/2017 3:14 AM, Bernhard Stegmaier wrote:
>> 
>> 
>>> On 7. Dec 2017, at 00:27, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
>>>>> 
>>>> 
>>>> Well, technically this is the same library.
>>>> It is only reachable by 2 different paths (the real and the symlinked one).
>>> 
>>> I could check for symlinks.  I'm not sure how much trouble it would be.
>>> I'll take a look at it as soon as I get a chance.
>> 
>> I never tried, but maybe using realpath(…) on both sides of the comparison could just do the trick.
>> And maybe eliminates also other weird path constructs…?
> 
> Thanks for the tip.  I dug through the wxWidget's wxFileName source and
> found that wxFileName::SameAs() method does an lstat() on platforms that
> support it if the comparison operator between two wxFileName objects
> fails.  It should be a simple change (famous last words).  I'm assuming
> macos has lstat.  If not, then I will have to find another solution.
> 
>> 
>> 
>> Regards,
>> Bernhard
>> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References