← Back to team overview

kicad-developers team mailing list archive

Re: Symbol library table remapping question

 

Ah sorry I misread, I thought you were going to use lstat rather than wxwidgets using it,



> On 8/12/2017, at 2:44 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
> 
> AFAIK, Posix isn't available on windows and I would rather not have ugly
> #ifdef/#endif statements if I can avoid it.
> 
> I discovered that the issue is the library table lookup by uri code so
> fixing this is going to be a bit more complicated than I initially
> thought because uris can be more than just file names.
> 
> On 12/7/2017 8:30 AM, Simon Wells wrote:
>>    int
>>      lstat(constchar*restrictpath, structstat*restrictbuf);
>> 
>> 
>> 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 <mailto:stambaughw@xxxxxxxxx>
>>> <mailto:stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>>> wrote:
>>> 
>>> On 12/7/2017 3:14 AM, Bernhard Stegmaier wrote:
>>>> 
>>>> 
>>>>> On 7. Dec 2017, at 00:27, Wayne Stambaugh <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>
>>>>> <mailto:stambaughw@xxxxxxxxx <mailto: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 <https://launchpad.net/~kicad-developers>
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>>> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>

References