[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + sug
From: |
Chris Matrakidis |
Subject: |
Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch |
Date: |
Sun, 29 Jan 2017 21:51:17 +0200 |
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] things I don't understand in src/env/time.c + bugs + suggested patch, David Monniaux, 2017/01/28
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Heinrich Schuchardt, 2017/01/28
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Andrew Makhorin, 2017/01/28
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Heinrich Schuchardt, 2017/01/28
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Andrew Makhorin, 2017/01/28
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Chris Matrakidis, 2017/01/28
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Andrew Makhorin, 2017/01/29
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Heinrich Schuchardt, 2017/01/29
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch,
Chris Matrakidis <=
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, Andrew Makhorin, 2017/01/30
- Re: [Help-glpk] things I don't understand in src/env/time.c + bugs + suggested patch, David Monniaux, 2017/01/28