Re: [hatari-devel] build fails on cirrus-ci for visualstudio target

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Mon, 21 Oct 2024 14:14:05 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:

> Le 21/10/2024 à 12:31, Christian Zietz a écrit :
> > Hi,
> > I think the attribution to the breaking commit is wrong. As far as I can 
> > see, Cirrus CI did not run on what (probably) is the real breaking commit:
> > https://github.com/hatari/hatari/commit/a22de5759741eaf8c6bf95ff7a0e128d516a11e5 <https://github.com/hatari/hatari/commit/a22de5759741eaf8c6bf95ff7a0e128d516a11e5>
> > Afaik, strtok*_r* is not available in Visual C's runtime library. 
> > However, strtok*_s* achieves a similar goal.  
> 
> Hi
> 
> yes, strtok_s seems to be the alternative ; this thread discuss it :
> 
> https://stackoverflow.com/questions/9021502/whats-the-difference-between-strtok-r-and-strtok-s-in-c
> 
> One possible change could be this :
> 
> #ifdef _MSC_VER
> #define strtok_r strtok_s
> #endif
> 
> 
> In all cases it's not recommanded to rely on _WIN32 define because 
> cygwin defines it but it uses strtok_r, not _s

 Hi,

we've got a special header dedicated for fixes like this:
src/includes/vs-fix.h ... I've now added the #define there and this seems
to fix the problem, indeed.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/