Hi Andrew,

> As Heinrich noticed, gmtime, strerror, and strtok are non-thread-safe

Checking the online MSDN documentation, I see that strtok is also safe
on Windows for multiple threads, but It isn't clear what happens for
strerror - it is implied that a pointer to a fixed string is returned
but there is no explicit mention of threads.
That being said, I think it is better to use the _s functions on
windows, so that linking will fail in old version where there may be
issues.

> The problem I
> encountered is that gcc (Debian 4.7.2-5) 4.7.2 installed on my Linux
> machine doesn't have gmtime_s, strerror_s, and strtok_s.

My understanding is that it is unlikely that a version will be
provided by glibc.

> It is unclear
> what to do if no thread-safe version of these functions are available.

I think that configure should check for the posix versions or the
windows versions and fail if not found when TLS is set. I can prepare
a patch for this, but I can only test it on Linux.

Best Regards,

Chris Matrakidis

_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to