Are strtol, strtoll, strtod really thread safe?

I know how to convert a string to int, float ... a new question never arises. After going through several articles, I was offered to use strtol, strtoll, strtod, so I carefully examined these functions.

Although strtol claims that the thread is safe on its manual page, but it will modify errno, is it really thread safe?

If not, what is the correct way to perform such conversions in C ++ (not C ++ 11) and keep the thread safe?

+4
source share
2 answers

On the page errno:

errno ISO C l type int ; errno . errno - -; .

, errno, , .

+4

, , errno : errno .

errno ?.

+4

Source: https://habr.com/ru/post/1530575/


All Articles